12 #include "Primitive.hxx"
20 // add another primitive to the scene
21 void Add(Primitive* p);
22 // add another light source to the scene
25 // intersect the ray with all objects in the scene
26 virtual bool Intersect(Ray& ray);
28 virtual bool Occluded(Ray& ray);
30 // trace the given ray and shade it, returnt the color of the shaded ray
31 Vec3f RayTrace(Ray& ray);
33 // acces to camera and light sources
34 const Camera* camera() const;
35 std::vector<Light*> lights() const;
38 void setCamera(const Camera* camera);
40 // reads in a scene description
41 void ParseOBJ(const std::string& file, float factor);
42 // calculate scene bounding box
45 const Box& GetSceneBox() const;
48 Scene& operator=(const Scene& );
50 void parseOBJLine(const std::string& line);
51 void parseVertex(std::istringstream& iss);
52 void parseFace(std::istringstream& iss);
53 void buildTriangleList(float scale);
60 std::vector<Primitive*> m_primitives;
62 std::vector<Light*> m_lights;
64 // shader used by loading routine
67 // storage for vertices and face indices
68 std::vector<Vec3f> m_vertices, m_faces;