74154ebf927fa8caafc35bda4df0f11f18f7661b
[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 // lights
32 std::vector<Light*> m_lights;
33 private:
34 Scene(const Scene& );
35 Scene& operator=(const Scene& );
36
37 Camera* m_camera;
38 // background color
39 Vec3f m_bgColor;
40
41 // primitives
42 std::vector<Primitive*> m_primitives;
43 };
44 #endif
This page took 0.048045 seconds and 3 git commands to generate.