Container of object3d+material and light to define a 3D scene. More...

Public Member Functions | |
| scene3d () | |
| create an empty scene | |
| void | clean_memory () |
| free pointers of objects 3D | |
| void | add (const object3d *obj, const material &material) |
| add a generic object3d in the container and its material | |
| void | add (const light_parameters &light) |
| add a light in the scene | |
| unsigned int | N_object () const |
| get the number of object3d in the scene | |
| unsigned int | N_light () const |
| get the number of light in the scene | |
| const object3d * | get_object (const unsigned int k_object) const |
| get a given object | |
| const light_parameters & | get_light (const unsigned int k_light) const |
| get a given light | |
| const material & | get_material (const unsigned int k_material) const |
| get a given material | |
Private Attributes | |
| std::vector< std::pair< const object3d *, material > > | v_object |
| internal container for object3d+material | |
| std::vector< light_parameters > | v_light |
| internal container for the lights | |
Container of object3d+material and light to define a 3D scene.
The class contains pointers. The free process is performed by the explicit call of clean_memory.
| void cpe::scene3d::add | ( | const light_parameters & | light | ) |
add a light in the scene
References v_light.
| void cpe::scene3d::clean_memory | ( | ) |
| const light_parameters & cpe::scene3d::get_light | ( | const unsigned int | k_light | ) | const |
get a given light
References v_light.
| const material & cpe::scene3d::get_material | ( | const unsigned int | k_material | ) | const |
| const object3d * cpe::scene3d::get_object | ( | const unsigned int | k_object | ) | const |
| unsigned int cpe::scene3d::N_light | ( | ) | const |
get the number of light in the scene
References v_light.
| unsigned int cpe::scene3d::N_object | ( | ) | const |
get the number of object3d in the scene
References v_object.
Referenced by cpe::ray_tracer::find_inter().
std::vector<light_parameters> cpe::scene3d::v_light [private] |
internal container for the lights
Referenced by add(), get_light(), N_light(), and scene3d().
std::vector<std::pair<const object3d*,material> > cpe::scene3d::v_object [private] |
internal container for object3d+material
Referenced by add(), clean_memory(), get_material(), get_object(), N_object(), and scene3d().
1.6.3