Phongo Clap RT  1.0
Simple Raytracing Renderer
Public Member Functions | Private Attributes | Friends | List of all members
Scene Class Reference

Hold all the objects and lights of the scene. More...

#include <Scene.h>

Collaboration diagram for Scene:
Collaboration graph

Public Member Functions

 Scene ()
 Default constructor. More...
 
 Scene (std::string _n)
 Constructor which takes a string and sets it as the name of the scene. More...
 
 ~Scene ()
 Default destructor for the Scene class. More...
 
void addObject (geo::Shape *_object)
 Adds an shape obejct to the scene. More...
 
void addLight (Light *_light)
 Adds a light to the scene structure. More...
 

Private Attributes

std::string m_fileName
 Holds the name of the file scene. More...
 
std::vector< geo::Shape * > m_objects
 Holds all the Shape objects in the scene. More...
 
std::vector< Light * > m_lights
 Holds all the Light instances of the scene. More...
 

Friends

class Renderer
 

Detailed Description

Hold all the objects and lights of the scene.

Author
Ramon Blanquer

Definition at line 20 of file Scene.h.

Constructor & Destructor Documentation

Scene::Scene ( )

Default constructor.

Definition at line 6 of file Scene.cpp.

6 {}
Scene::Scene ( std::string  _n)

Constructor which takes a string and sets it as the name of the scene.

Parameters
[in]_nName of the scene

Definition at line 8 of file Scene.cpp.

8 : m_fileName(_n) {}
std::string m_fileName
Holds the name of the file scene.
Definition: Scene.h:54
Scene::~Scene ( )

Default destructor for the Scene class.

Definition at line 10 of file Scene.cpp.

10 {}

Member Function Documentation

void Scene::addLight ( Light _light)

Adds a light to the scene structure.

Parameters
[in]Lightto push

Definition at line 17 of file Scene.cpp.

References m_lights.

18 {
19  m_lights.push_back(dynamic_cast<Light*>(_light));
20 }
std::vector< Light * > m_lights
Holds all the Light instances of the scene.
Definition: Scene.h:62

Here is the caller graph for this function:

void Scene::addObject ( geo::Shape _object)

Adds an shape obejct to the scene.

Parameters
[in]Shapeto push into the objects vector contanier

Definition at line 12 of file Scene.cpp.

References m_objects.

13 {
14  m_objects.push_back(dynamic_cast<geo::Shape*>(_object));
15 }
std::vector< geo::Shape * > m_objects
Holds all the Shape objects in the scene.
Definition: Scene.h:58

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class Renderer
friend

Definition at line 48 of file Scene.h.

Member Data Documentation

std::string Scene::m_fileName
private

Holds the name of the file scene.

Definition at line 54 of file Scene.h.

std::vector<Light*> Scene::m_lights
private

Holds all the Light instances of the scene.

Definition at line 62 of file Scene.h.

std::vector<geo::Shape*> Scene::m_objects
private

Holds all the Shape objects in the scene.

Definition at line 58 of file Scene.h.


The documentation for this class was generated from the following files: