|
Path Tracer
|
Group of objects. More...
#include <Object3DGroup.h>
Public Member Functions | |
| Object3DGroup () | |
| Default constructor. More... | |
| Object3DGroup (const std::string &name, std::vector< Object3D * > objects={}) | |
| Main constructor. More... | |
| Object3DGroup (const Object3DGroup &group) | |
| Copy constructor. More... | |
| ~Object3DGroup () | |
| Destructor. More... | |
| std::string | getName () const |
| Getter for the name. More... | |
| std::vector< Object3D * > | getObjects () const |
| Getter for the objects. More... | |
| DoubleVec3D | getCenter () const |
| Getter for the center. More... | |
| void | setName (const std::string &name) |
| Setter for the name. More... | |
| void | setObjects (const std::vector< Object3D * > &newObjects) |
| Setter for the objects. More... | |
| void | addObject (Object3D *object) |
| Adds an object to the current ones. More... | |
| void | addObjects (const std::vector< Object3D * > &newObjects) |
| Add multiple objects to the current ones. More... | |
| void | merge (const Object3DGroup &group) |
| Merge with an other object group. More... | |
| void | resetObjects () |
| Resets all objects of this object group. More... | |
| void | resetAndDeleteObjects () |
| Deletes all pointers to the objects of this object group, then reset its objects. More... | |
| void | printAll () const |
| Prints the whole page. More... | |
| void | modify () |
| Interactive modification of this object group. More... | |
Static Public Member Functions | |
| static Object3DGroup | create () |
| Interactive creation of an object group. More... | |
Group of objects.
It is used to make the interface clearer. Instead of having all the objects at the same place, they are grouped and have a common name.
| Object3DGroup::Object3DGroup | ( | ) |
Default constructor.
The name is "none" by default.
| Object3DGroup::Object3DGroup | ( | const std::string & | name, |
| std::vector< Object3D * > | objects = {} |
||
| ) |
Main constructor.
| name | The name of this object group. |
| objects | The std::vector of Object3D pointers that are in this group. |
| Object3DGroup::Object3DGroup | ( | const Object3DGroup & | group | ) |
Copy constructor.
| group | The group that will be copied. |
| Object3DGroup::~Object3DGroup | ( | ) |
Destructor.
Calls Object3DGroup::resetObjects().
| void Object3DGroup::addObject | ( | Object3D * | object | ) |
Adds an object to the current ones.
The pointer is deeply copied.
| object | The object that will be added. |
| void Object3DGroup::addObjects | ( | const std::vector< Object3D * > & | newObjects | ) |
Add multiple objects to the current ones.
| newObjects | The objects that will be added. |
|
static |
Interactive creation of an object group.
| DoubleVec3D Object3DGroup::getCenter | ( | ) | const |
Getter for the center.
The center is computed by taking the average of the center of each object.
| std::string Object3DGroup::getName | ( | ) | const |
Getter for the name.
| std::vector< Object3D * > Object3DGroup::getObjects | ( | ) | const |
Getter for the objects.
| void Object3DGroup::merge | ( | const Object3DGroup & | group | ) |
Merge with an other object group.
Keeps the current name, but adds the objects of the second one.
| group | The group from which the objects will be copied. |
| void Object3DGroup::modify | ( | ) |
Interactive modification of this object group.
This is a page on its own.
| void Object3DGroup::printAll | ( | ) | const |
Prints the whole page.
Clears the page, prints the header, information and the available commands.
| void Object3DGroup::resetAndDeleteObjects | ( | ) |
Deletes all pointers to the objects of this object group, then reset its objects.
Calls the function Object3DGroup::resetObjects().
| void Object3DGroup::resetObjects | ( | ) |
Resets all objects of this object group.
| void Object3DGroup::setName | ( | const std::string & | name | ) |
Setter for the name.
| name | The new name of this object group. |
| void Object3DGroup::setObjects | ( | const std::vector< Object3D * > & | newObjects | ) |
Setter for the objects.
| newObjects | The new objects of this object group. |