GLC_lib
2.5.0
|
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 | containsOccurence (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. | |
int | representationCount () const |
Return the number of representation. | |
GLC_Vector3d | upVector () const |
Return the world Up vector. | |
GLC_SelectionSet * | selectionSetHandle () |
Return an handle to the selection set. | |
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. | |
void | select (GLC_uint occurenceId) |
Select the given occurence id. | |
void | unselect (GLC_uint occurenceId, bool propagate=true) |
Unselect the given occurence id. | |
void | selectAllWith3DViewInstance (bool allShowState) |
Select all occurence of this world handle. | |
void | unselectAll () |
Unselect all occurence of this world handle. | |
void | showHideSelected3DViewInstance () |
Show / Hide selected 3DViewInstance. | |
void | setSelected3DViewInstanceVisibility (bool isVisible) |
Set selected 3DViewInstance visibility. | |
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 |
This world Up Vector. | |
GLC_SelectionSet | m_SelectionSet |
This world selectionSet. | |
GLC_WorldHandle : Handle of shared GLC_World.
Definition at line 38 of file glc_worldhandle.h.
GLC_WorldHandle::GLC_WorldHandle | ( | ) |
The default constructor.
Definition at line 27 of file glc_worldhandle.cpp.
GLC_WorldHandle::~GLC_WorldHandle | ( | ) |
The default destructor.
Definition at line 37 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 95 of file glc_worldhandle.cpp.
References GLC_StructOccurence::create3DViewInstance(), GLC_StructOccurence::id(), m_OccurenceHash, GLC_StructReference::representationIsLoaded(), select(), GLC_StructOccurence::structReference(), and GLC_StructOccurence::useAutomatic3DViewInstanceCreation().
Referenced by GLC_StructOccurence::doCreateOccurrenceFromInstance(), GLC_StructOccurence::GLC_StructOccurence(), and GLC_StructOccurence::setWorldHandle().
|
inline |
Return the collection.
Definition at line 58 of file glc_worldhandle.h.
Referenced by GLC_StructOccurence::boundingBox(), GLC_StructOccurence::create3DViewInstance(), GLC_StructOccurence::detach(), GLC_SelectionSet::GLC_SelectionSet(), GLC_StructOccurence::GLC_StructOccurence(), GLC_StructOccurence::has3DViewInstance(), GLC_StructOccurence::isVisible(), GLC_StructOccurence::remove3DViewInstance(), GLC_StructOccurence::reverseNormals(), GLC_StructOccurence::setRenderProperties(), GLC_StructOccurence::setVisibility(), GLC_StructOccurence::setWorldHandle(), GLC_StructOccurence::unloadRepresentation(), and GLC_StructOccurence::updateAbsoluteMatrix().
|
inline |
Return true if the specified occurence id is in this world.
Definition at line 70 of file glc_worldhandle.h.
References GLC_3DViewCollection::contains().
Referenced by GLC_SelectionSet::insert(), and GLC_SelectionSet::remove().
|
inline |
Decrement the number of world.
Definition at line 121 of file glc_worldhandle.h.
Referenced by GLC_World::operator=(), and GLC_World::~GLC_World().
|
inline |
Return the occurence specified by an id.
Id must be a valid identifier
Definition at line 75 of file glc_worldhandle.h.
Referenced by GLC_SelectionSet::insert().
|
inline |
Increment the number of world.
Definition at line 117 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 43 of file glc_worldhandle.cpp.
References m_OccurenceHash.
|
inline |
Return true if there is only one world associated with this handle.
Definition at line 66 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 69 of file glc_worldhandle.cpp.
References references().
|
inline |
Return the number of occurence.
Definition at line 86 of file glc_worldhandle.h.
|
inline |
Return the number of world associated with this handle.
Definition at line 62 of file glc_worldhandle.h.
|
inline |
Return the list off occurences.
Definition at line 82 of file glc_worldhandle.h.
QList< GLC_StructReference * > GLC_WorldHandle::references | ( | ) | const |
Return the list of Reference.
Definition at line 56 of file glc_worldhandle.cpp.
References m_OccurenceHash.
Referenced by numberOfBody(), and representationCount().
|
inline |
All Occurence has been removed.
Definition at line 131 of file glc_worldhandle.h.
void GLC_WorldHandle::removeOccurence | ( | GLC_StructOccurence * | pOccurence | ) |
An Occurence has been removed.
Definition at line 111 of file glc_worldhandle.cpp.
References GLC_StructOccurence::id(), m_Collection, m_OccurenceHash, m_SelectionSet, GLC_SelectionSet::remove(), and GLC_3DViewCollection::remove().
Referenced by GLC_StructOccurence::detach(), and GLC_StructOccurence::setWorldHandle().
int GLC_WorldHandle::representationCount | ( | ) | const |
Return the number of representation.
Definition at line 81 of file glc_worldhandle.cpp.
References references().
void GLC_WorldHandle::select | ( | GLC_uint | occurenceId | ) |
Select the given occurence id.
The given occurence id must belong to this worldhandle
Definition at line 122 of file glc_worldhandle.cpp.
References GLC_3DViewCollection::contains(), GLC_StructOccurence::hasChild(), GLC_SelectionSet::insert(), m_Collection, m_OccurenceHash, m_SelectionSet, GLC_3DViewCollection::select(), and GLC_StructOccurence::subOccurenceList().
Referenced by addOccurence().
void GLC_WorldHandle::selectAllWith3DViewInstance | ( | bool | allShowState | ) |
Select all occurence of this world handle.
Definition at line 163 of file glc_worldhandle.cpp.
References GLC_SelectionSet::clear(), GLC_SelectionSet::insert(), m_Collection, m_SelectionSet, GLC_3DViewCollection::selectAll(), and GLC_3DViewCollection::selection().
|
inline |
Return an handle to the selection set.
Definition at line 106 of file glc_worldhandle.h.
Referenced by GLC_StructOccurence::create3DViewInstance(), and GLC_World::minimumSelectedOccurenceList().
|
inline |
Set the attached viewport of this world handle.
Definition at line 139 of file glc_worldhandle.h.
void GLC_WorldHandle::setSelected3DViewInstanceVisibility | ( | bool | isVisible | ) |
Set selected 3DViewInstance visibility.
Definition at line 192 of file glc_worldhandle.cpp.
References m_Collection, GLC_3DViewCollection::selection(), and GLC_3DViewInstance::setVisibility().
|
inline |
Set the world Up Vector.
Definition at line 135 of file glc_worldhandle.h.
void GLC_WorldHandle::showHideSelected3DViewInstance | ( | ) |
Show / Hide selected 3DViewInstance.
Definition at line 181 of file glc_worldhandle.cpp.
References GLC_3DViewInstance::isVisible(), m_Collection, GLC_3DViewCollection::selection(), and GLC_3DViewInstance::setVisibility().
void GLC_WorldHandle::unselect | ( | GLC_uint | occurenceId, |
bool | propagate = true |
||
) |
Unselect the given occurence id.
The given occurence id must belong to this worldhandle
Definition at line 144 of file glc_worldhandle.cpp.
References GLC_StructOccurence::hasChild(), m_Collection, m_OccurenceHash, m_SelectionSet, GLC_SelectionSet::remove(), GLC_StructOccurence::subOccurenceList(), and GLC_3DViewCollection::unselect().
void GLC_WorldHandle::unselectAll | ( | ) |
Unselect all occurence of this world handle.
Definition at line 175 of file glc_worldhandle.cpp.
References GLC_SelectionSet::clear(), m_Collection, m_SelectionSet, and GLC_3DViewCollection::unselectAll().
|
inline |
Return the world Up vector.
Definition at line 102 of file glc_worldhandle.h.
|
private |
The Collection.
Definition at line 169 of file glc_worldhandle.h.
Referenced by removeOccurence(), select(), selectAllWith3DViewInstance(), setSelected3DViewInstanceVisibility(), showHideSelected3DViewInstance(), unselect(), and unselectAll().
|
private |
Number of this world.
Definition at line 172 of file glc_worldhandle.h.
|
private |
The hash table containing struct occurence.
Definition at line 175 of file glc_worldhandle.h.
Referenced by addOccurence(), instances(), references(), removeOccurence(), select(), and unselect().
|
private |
This world selectionSet.
Definition at line 181 of file glc_worldhandle.h.
Referenced by removeOccurence(), select(), selectAllWith3DViewInstance(), unselect(), and unselectAll().
|
private |
This world Up Vector.
Definition at line 178 of file glc_worldhandle.h.