aboutsummaryrefslogtreecommitdiff
path: root/src/raytracer/raytracescene.h
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2023-12-07 16:23:20 -0500
committersotech117 <michael_foiani@brown.edu>2023-12-07 16:23:20 -0500
commitcaa765bff49d54217b75aaf0e7acf4e5392a11e4 (patch)
tree9b92914dfb88b99599e8e60e4512e9e9ea9a25db /src/raytracer/raytracescene.h
parenta9274459443f1d560d7580a162deb581549980cb (diff)
upload base code
Diffstat (limited to 'src/raytracer/raytracescene.h')
-rw-r--r--src/raytracer/raytracescene.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/raytracer/raytracescene.h b/src/raytracer/raytracescene.h
new file mode 100644
index 0000000..b61bd2f
--- /dev/null
+++ b/src/raytracer/raytracescene.h
@@ -0,0 +1,42 @@
+#pragma once
+
+#include "utils/scenedata.h"
+#include "utils/sceneparser.h"
+#include "camera/camera.h"
+#include "accelerate/kdtree.h"
+#include "accelerate/bvh.h"
+
+// A class representing a scene to be ray-traced
+
+// Feel free to make your own design choices for RayTraceScene, the functions below are all optional / for your convenience.
+// You can either implement and use these getters, or make your own design.
+// If you decide to make your own design, feel free to delete these as TAs won't rely on them to grade your assignments.
+class RayTraceScene
+{
+public:
+ RayTraceScene(int width, int height, const RenderData &metaData);
+
+ // The getter of the width of the scene
+ const int& width() const;
+
+ // The getter of the height of the scene
+ const int& height() const;
+
+ // The getter of the global data of the scene
+ const SceneGlobalData& getGlobalData() const;
+ const std::vector<RenderShapeData> getShapes() const;
+ const std::vector<SceneLightData> getLights() const;
+
+ // The getter of the shared pointer to the camera instance of the scene
+ const Camera& getCamera() const;
+
+ KdTree *m_kdTree;
+ bvh *m_bvh;
+private:
+ int m_width;
+ int m_height;
+ SceneGlobalData m_sceneGlobalData;
+ Camera& m_camera;
+ std::vector<RenderShapeData>m_shapes;
+ std::vector<SceneLightData>m_lights;
+};