solution for 3.1a)
[MicroTrace.git] / Scene.hxx
1 #ifndef SCENE_HXX
2 #define SCENE_HXX
3
4 #include <vector>
5
6 #include "Ray.hxx"
7 #include "Camera.hxx"
8 #include "Light.hxx"
9 #include "Primitive.hxx"
10
11 class Scene
12 {
13 public:
14 Scene();
15 virtual ~Scene();
16
17 // add another primitive to the scene
18 void Add(Primitive* p);
19 // add another light source to the scene
20 void Add(Light* l);
21
22 // intersect the ray with all objects in the scene
23 virtual bool Intersect(Ray& ray);
24 // find occluder
25 virtual bool Occluded(Ray& ray);
26
27 // trace the given ray and shade it, returnt the color of the shaded ray
28 Vec3f RayTrace(Ray& ray);
29
30 const Camera* camera() const;
31 private:
32 Scene(const Scene& );
33 Scene& operator=(const Scene& );
34
35 Camera* m_camera;
36 // background color
37 Vec3f m_bgColor;
38
39 // primitives
40 std::vector<Primitive*> m_primitives;
41 // lights
42 std::vector<Light*> m_lights;
43 };
44 #endif
This page took 0.045998 seconds and 5 git commands to generate.