-
Notifications
You must be signed in to change notification settings - Fork 0
/
Scene.hh
62 lines (42 loc) · 1.09 KB
/
Scene.hh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef Scene_hh
#define Scene_hh
#include "Color.hh"
#include <vector>
using std::vector;
class Background;
class Camera;
class Image;
class Object;
class Light;
class Ray;
class RenderContext;
class HitRecord;
class Scene{
private:
Color ambient;
Background* background;
Camera* camera;
Image* image;
Object* object;
vector<Light*> lights;
//vector<Object*> objects;
void TraceRay(const Ray& ray, HitRecord& hr, RenderContext& rc)const;
public:
/*------------------- Set Methods -----------------*/
void SetAmbient(Color ambient);
void SetBackground(Background* background);
void SetCamera(Camera* camera);
void SetImage(Image* image);
void SetObject(Object* object);
void AddLight(Light* light);
/*------------------ Get Methods ------------------*/
Light* GetLight(int index);
int NumLights();
Color GetAmbient()const;
Object* GetObject();
Camera* GetCamera();
/*---------------- Other Methods ----------------*/
void Preprocess();
void Render();
};
#endif