aboutsummaryrefslogtreecommitdiffstats
path: root/include/camera.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/camera.hpp')
-rw-r--r--include/camera.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/camera.hpp b/include/camera.hpp
new file mode 100644
index 0000000..82f7155
--- /dev/null
+++ b/include/camera.hpp
@@ -0,0 +1,21 @@
+#ifndef __CAMERA_HPP_
+#define __CAMERA_HPP_
+
+#include "rt.hpp"
+
+class camera {
+ public:
+ camera(point3 position, double aspect_ratio, double focal_length);
+
+ ray get_ray(double u, double v) const;
+
+ point3 position;
+ double focal_length;
+
+ vec3 horizontal;
+ vec3 vertical;
+
+ point3 bottom_left_pixel;
+};
+
+#endif // !__CAMERA_HPP_