Browse Source

Better to fill the function I suppose.

Godzil 4 years ago
parent
commit
71c236abb0
1 changed files with 5 additions and 1 deletions
  1. 5 1
      source/include/camera.h

+ 5 - 1
source/include/camera.h

@@ -34,7 +34,11 @@ public:
 
 public:
     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);
     Ray rayForPixel(uint32_t pixelX, uint32_t pixelY, double horzOffset = 0, double vertOffset = 0);
     Canvas render(World w, uint32_t depth = 5);