Don't set the focal/aperture on the constructor and use a dedicated method for that.

This commit is contained in:
Godzil
2020-03-17 00:28:56 +00:00
parent 61ce9d3543
commit c0fc061834
2 changed files with 4 additions and 3 deletions

View File

@@ -33,7 +33,8 @@ public:
Matrix inverseTransform;
public:
Camera(uint32_t hsize, uint32_t vsize, double fov, double focal = 1, double aperture = 0, uint32_t rayCount = 1);
Camera(uint32_t hsize, uint32_t vsize, double fov);
setFocal(double focal, double aperture, uint32_t rayCount);
void setTransform(Matrix transform);
Ray rayForPixel(uint32_t pixelX, uint32_t pixelY, double horzOffset = 0, double vertOffset = 0);
Canvas render(World w, uint32_t depth = 5);