diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2021-07-24 17:32:49 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2021-07-24 17:32:49 +0200 |
| commit | 6bdf3ab65a7c1e98595ad167479b94a82184a444 (patch) | |
| tree | de1113e28d78ae5325aa9417b059ba9963407e26 /include/scene.hpp | |
| parent | 44e63fdbd30e9d43a02ab894c548467039397aa0 (diff) | |
Clean up includes, scene class, simplify scene buffer access from main
Diffstat (limited to 'include/scene.hpp')
| -rw-r--r-- | include/scene.hpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/scene.hpp b/include/scene.hpp new file mode 100644 index 0000000..b7e1100 --- /dev/null +++ b/include/scene.hpp @@ -0,0 +1,41 @@ +#ifndef __SCENE_HPP_
+#define __SCENE_HPP_
+
+#include "vec3.hpp"
+#include "sphere.hpp"
+#include "camera.hpp"
+#include "bvh-node.hpp"
+
+
+class scene {
+public:
+ scene(uint32_t width, uint32_t height);
+
+ color sky_color = { 0.5, 0.7, 1.0 };
+ color ground_color = { 1.0, 1.0, 1.0 };
+
+ camera cam;
+
+ sphere spheres[512] = {};
+ bvh_node nodes[1024] = {};
+
+ uint32_t max_bounce = 50;
+
+ // Output image resolution
+ uint32_t width;
+ uint32_t height;
+
+ uint32_t sample_index = 0;
+
+ uint32_t spheres_count = 0;
+ uint32_t enable_dof = true;
+ uint32_t debug_bvh = false;
+ uint32_t padding;
+
+private:
+
+ uint32_t random_scene(sphere* world);
+
+};
+
+#endif // !__SCENE_HPP_
|
