diff options
author | brett weiland <brettsweiland@gmail.com> | 2024-06-01 01:36:18 -0500 |
---|---|---|
committer | brett weiland <brettsweiland@gmail.com> | 2024-06-01 01:36:18 -0500 |
commit | b0dd97ee6bf8d5daa587da40ad941efac68152df (patch) | |
tree | f162d32767e0b0f84bed284f6e8ab2c5309ff248 /src/scene.cuh | |
parent | 093200a449ea38952de52012e324036c106e294b (diff) |
got raycasting laid out
Diffstat (limited to 'src/scene.cuh')
-rw-r--r-- | src/scene.cuh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/scene.cuh b/src/scene.cuh new file mode 100644 index 0000000..e3d5896 --- /dev/null +++ b/src/scene.cuh @@ -0,0 +1,31 @@ +#ifndef SCENE_H +#define SCENE_H + +#include "common.cuh" +#include "sphere.cuh" +#include "render_object.cuh" +#include "include/helper_math.h" +#include <stdint.h> + +//template <class T> class camera; + +//when we get animations with multiple scenes, we'll make this a virtual function +//with array of DE objects and cam +class Scene { + const int max_bounces = 10; + public: + //__device__ void render(uint8_t *image) { cam.render(); }; + __device__ Render_object **get_objs() { return objs; } + __device__ void debug(); + __device__ Color raycast(struct Ray ray); + private: + //camera cam = camera(); + Sphere sp1 = Sphere(make_vect3(0, .4, -5)); + Sphere sp2 = Sphere(make_vect3(0, -0.4,-5)); + protected: + //idk why I need to specify the size... why can't the compiler figure that out? + Render_object *objs[3] = {&sp1, &sp2, NULL}; + uint8_t *image; +}; + +#endif |