summaryrefslogtreecommitdiff
path: root/src/scene.cuh
blob: a8802ada72c89401cf44c8c0715acdca326782f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef SCENE_H
#define SCENE_H

#include "common.cuh"
#include "render_object.cuh"
#include "sphere.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 debug();
    __device__ Color raycast(struct Ray ray);
    __device__ Render_object **get_objects() { return objs; }
  private:
    Sphere sp1 = Sphere(make_vect3(0, -2, 5));
    Sphere sp2 = Sphere(make_vect3(2, 0, 5));
  protected:
    //idk why I need to specify the size... why can't the compiler figure that out?
    Render_object *objs[3] = {&sp1, &sp2, nullptr};
    uint8_t *image;
};

#endif