浏览代码

Better to fill the function I suppose.

Godzil 4 年之前
父节点
当前提交
71c236abb0
共有 1 个文件被更改,包括 5 次插入1 次删除
  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);