|
INFO804 Introduction à l'informatique graphique
|
#include <Scene.h>
Public Member Functions | |
| Scene () | |
| Default constructor. Nothing to do. | |
| ~Scene () | |
| Destructor. Frees objects. | |
| void | init (Viewer &viewer) |
| This function calls the init method of each of its objects. | |
| void | draw (Viewer &viewer) |
| This function calls the draw method of each of its objects. | |
| void | light (Viewer &viewer) |
| This function calls the light method of each of its lights. | |
| void | addObject (GraphicalObject *anObject) |
| Adds a new object to the scene. | |
| void | addLight (Light *aLight) |
| Adds a new light to the scene. | |
| Real | rayIntersection (const Ray &ray, GraphicalObject *&object, Point3 &p) |
Public Attributes | |
| std::vector< Light * > | myLights |
| The list of lights modelled as a vector. | |
| std::vector< GraphicalObject * > | myObjects |
| The list of objects modelled as a vector. | |
Models a scene, i.e. a collection of lights and graphical objects (could be a tree, but we keep a list for now for the sake of simplicity).
|
inline |
|
inline |
Destructor. Frees objects.
Definition at line 36 of file Scene.h.
|
inline |
|
inline |
|
inline |
This function calls the draw method of each of its objects.
Definition at line 54 of file Scene.h.
|
inline |
This function calls the init method of each of its objects.
Definition at line 46 of file Scene.h.
|
inline |
|
inline |
| [in] | ray | the ray that is traveling in the scene |
| [out] | object | either a null pointer (0) if no object is intersected by the ray or a pointer to the closest object intersected by the given ray. |
| [out] | p | if object is not null, then it is the point of intersection between the ray and this object. |
Definition at line 93 of file Scene.h.
| std::vector< Light* > rt::Scene::myLights |
| std::vector< GraphicalObject* > rt::Scene::myObjects |