51 light->init( viewer );
59 light->draw( viewer );
65 light->light( viewer );
float Real
the type for representing a real number.
Lights are used to give lights in a scene.
void init(Viewer &viewer)
This function calls the init method of each of its objects.
std::vector< GraphicalObject * > myObjects
The list of objects modelled as a vector.
Real rayIntersection(const Ray &ray, GraphicalObject *&object, Point3 &p)
std::vector< Light * > myLights
The list of lights modelled as a vector.
Scene()
Default constructor. Nothing to do.
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.
~Scene()
Destructor. Frees objects.
void draw(Viewer &viewer)
This function calls the draw method of each of its objects.