GLC_WorldHandle : Handle of shared GLC_World. More...
#include <glc_worldhandle.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_WorldHandle () | |
| The default constructor. | |
| ~GLC_WorldHandle () | |
| The default destructor. | |
Get Functions | |
| GLC_3DViewCollection * | collection () |
| Return the collection. | |
| int | numberOfWorld () const |
| Return the number of world associated with this handle. | |
| bool | isOrphan () const |
| Return true if there is only one world associated with this handle. | |
| bool | contains (GLC_uint id) const |
| Return true if the specified occurence id is in this world. | |
| GLC_StructOccurence * | getOccurence (GLC_uint id) const |
| Return the occurence specified by an id. | |
| QList< GLC_StructOccurence * > | occurences () const |
| Return the list off occurences. | |
| int | numberOfOccurence () const |
| Return the number of occurence. | |
| QList< GLC_StructInstance * > | instances () const |
| Return the list of instance. | |
| QList< GLC_StructReference * > | references () const |
| Return the list of Reference. | |
| int | numberOfBody () const |
| Return the number of body. | |
| GLC_Vector3d | upVector () const |
| Return the world Up vector. | |
Set Functions | |
| void | increment () |
| Increment the number of world. | |
| void | decrement () |
| Decrement the number of world. | |
| void | addOccurence (GLC_StructOccurence *pOccurence, bool isSelected=false, GLuint shaderId=0) |
| An Occurence has been added. | |
| void | removeOccurence (GLC_StructOccurence *pOccurence) |
| An Occurence has been removed. | |
| void | removeAllOccurences () |
| All Occurence has been removed. | |
| void | setUpVector (const GLC_Vector3d &vect) |
| Set the world Up Vector. | |
| void | setAttachedViewport (GLC_Viewport *pViewport) |
| Set the attached viewport of this world handle. | |
Private Attributes | |
| GLC_3DViewCollection | m_Collection |
| The Collection. | |
| int | m_NumberOfWorld |
| Number of this world. | |
| QHash< GLC_uint, GLC_StructOccurence * > | m_OccurenceHash |
| The hash table containing struct occurence. | |
| GLC_Vector3d | m_UpVector |
| The world Up Vector. | |
GLC_WorldHandle : Handle of shared GLC_World.
Definition at line 39 of file glc_worldhandle.h.
| GLC_WorldHandle::GLC_WorldHandle | ( | ) |
The default constructor.
Definition at line 29 of file glc_worldhandle.cpp.
| GLC_WorldHandle::~GLC_WorldHandle | ( | ) |
The default destructor.
Definition at line 38 of file glc_worldhandle.cpp.
| void GLC_WorldHandle::addOccurence | ( | GLC_StructOccurence * | pOccurence, | |
| bool | isSelected = false, |
|||
| GLuint | shaderId = 0 | |||
| ) |
An Occurence has been added.
Definition at line 84 of file glc_worldhandle.cpp.
References GLC_3DViewCollection::add(), GLC_3DViewCollection::bindShader(), GLC_StructOccurence::hasRepresentation(), GLC_StructOccurence::id(), m_Collection, m_OccurenceHash, GLC_StructOccurence::name(), GLC_StructReference::representationHandle(), GLC_3DViewCollection::select(), GLC_3DViewInstance::setId(), GLC_Object::setName(), and GLC_StructOccurence::structReference().
Referenced by GLC_StructOccurence::GLC_StructOccurence(), GLC_StructOccurence::loadRepresentation(), and GLC_StructOccurence::setWorldHandle().
| GLC_3DViewCollection* GLC_WorldHandle::collection | ( | ) | [inline] |
Return the collection.
Definition at line 59 of file glc_worldhandle.h.
Referenced by GLC_StructOccurence::boundingBox(), GLC_StructOccurence::checkForRepresentation(), GLC_StructOccurence::detach(), GLC_StructOccurence::GLC_StructOccurence(), GLC_StructOccurence::isVisible(), GLC_StructOccurence::loadRepresentation(), GLC_StructOccurence::reverseNormals(), GLC_StructOccurence::setRenderProperties(), GLC_StructOccurence::setVisibility(), GLC_StructOccurence::setWorldHandle(), and GLC_StructOccurence::updateAbsoluteMatrix().
| bool GLC_WorldHandle::contains | ( | GLC_uint | id | ) | const [inline] |
Return true if the specified occurence id is in this world.
Definition at line 71 of file glc_worldhandle.h.
| void GLC_WorldHandle::decrement | ( | ) | [inline] |
Decrement the number of world.
Definition at line 115 of file glc_worldhandle.h.
Referenced by GLC_World::operator=(), and GLC_World::~GLC_World().
| GLC_StructOccurence* GLC_WorldHandle::getOccurence | ( | GLC_uint | id | ) | const [inline] |
Return the occurence specified by an id.
Id must be a valid identifier
Definition at line 76 of file glc_worldhandle.h.
| void GLC_WorldHandle::increment | ( | ) | [inline] |
Increment the number of world.
Definition at line 111 of file glc_worldhandle.h.
Referenced by GLC_World::GLC_World(), and GLC_World::operator=().
| QList< GLC_StructInstance * > GLC_WorldHandle::instances | ( | ) | const |
Return the list of instance.
Definition at line 44 of file glc_worldhandle.cpp.
References m_OccurenceHash.
| bool GLC_WorldHandle::isOrphan | ( | ) | const [inline] |
Return true if there is only one world associated with this handle.
Definition at line 67 of file glc_worldhandle.h.
Referenced by GLC_World::operator=(), and GLC_World::~GLC_World().
| int GLC_WorldHandle::numberOfBody | ( | ) | const |
Return the number of body.
Definition at line 70 of file glc_worldhandle.cpp.
References references().
| int GLC_WorldHandle::numberOfOccurence | ( | ) | const [inline] |
Return the number of occurence.
Definition at line 87 of file glc_worldhandle.h.
| int GLC_WorldHandle::numberOfWorld | ( | ) | const [inline] |
Return the number of world associated with this handle.
Definition at line 63 of file glc_worldhandle.h.
| QList<GLC_StructOccurence*> GLC_WorldHandle::occurences | ( | ) | const [inline] |
Return the list off occurences.
Definition at line 83 of file glc_worldhandle.h.
| QList< GLC_StructReference * > GLC_WorldHandle::references | ( | ) | const |
Return the list of Reference.
Definition at line 57 of file glc_worldhandle.cpp.
References m_OccurenceHash.
Referenced by numberOfBody().
| void GLC_WorldHandle::removeAllOccurences | ( | ) | [inline] |
All Occurence has been removed.
Definition at line 125 of file glc_worldhandle.h.
| void GLC_WorldHandle::removeOccurence | ( | GLC_StructOccurence * | pOccurence | ) |
An Occurence has been removed.
Definition at line 109 of file glc_worldhandle.cpp.
References GLC_StructOccurence::hasRepresentation(), GLC_StructOccurence::id(), m_Collection, m_OccurenceHash, and GLC_3DViewCollection::remove().
Referenced by GLC_StructOccurence::detach(), GLC_StructOccurence::setWorldHandle(), and GLC_StructOccurence::~GLC_StructOccurence().
| void GLC_WorldHandle::setAttachedViewport | ( | GLC_Viewport * | pViewport | ) | [inline] |
Set the attached viewport of this world handle.
Definition at line 135 of file glc_worldhandle.h.
| void GLC_WorldHandle::setUpVector | ( | const GLC_Vector3d & | vect | ) | [inline] |
Set the world Up Vector.
Definition at line 131 of file glc_worldhandle.h.
| GLC_Vector3d GLC_WorldHandle::upVector | ( | void | ) | const [inline] |
Return the world Up vector.
Definition at line 100 of file glc_worldhandle.h.
The Collection.
Definition at line 146 of file glc_worldhandle.h.
Referenced by addOccurence(), and removeOccurence().
int GLC_WorldHandle::m_NumberOfWorld [private] |
Number of this world.
Definition at line 149 of file glc_worldhandle.h.
QHash<GLC_uint, GLC_StructOccurence*> GLC_WorldHandle::m_OccurenceHash [private] |
The hash table containing struct occurence.
Definition at line 152 of file glc_worldhandle.h.
Referenced by addOccurence(), instances(), references(), and removeOccurence().
GLC_Vector3d GLC_WorldHandle::m_UpVector [private] |
The world Up Vector.
Definition at line 155 of file glc_worldhandle.h.