Better to fill the function I suppose.

This commit is contained in:
Godzil
2020-03-17 00:31:30 +00:00
parent c0fc061834
commit 71c236abb0

View File

@@ -34,7 +34,11 @@ public:
public: public:
Camera(uint32_t hsize, uint32_t vsize, double fov); Camera(uint32_t hsize, uint32_t vsize, double fov);
setFocal(double focal, double aperture, uint32_t rayCount); void setFocal(double focal, double aperture, uint32_t rayCount) {
this->focalDistance = focal;
this->apertureSize = aperture;
this->rayCount = rayCount;
}
void setTransform(Matrix transform); void setTransform(Matrix transform);
Ray rayForPixel(uint32_t pixelX, uint32_t pixelY, double horzOffset = 0, double vertOffset = 0); Ray rayForPixel(uint32_t pixelX, uint32_t pixelY, double horzOffset = 0, double vertOffset = 0);
Canvas render(World w, uint32_t depth = 5); Canvas render(World w, uint32_t depth = 5);