GLC_World : The Root of GLC_Lib Scene Graph. More...
#include <glc_world.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_World () | |
| Default constructor. | |
| GLC_World (const GLC_World &) | |
| Copy constructor. | |
| virtual | ~GLC_World () |
| Destructor. | |
Get Functions | |
| GLC_BoundingBox | boundingBox () |
| Return the entire world Bounding Box. | |
| GLC_StructOccurence * | rootOccurence () const |
| Return the root of the world. | |
| GLC_3DViewCollection * | collection () |
| Return the world collection. | |
| int | size () const |
| Return the size of the world. | |
| bool | isEmpty () const |
| Return true if the world is empty. | |
| int | numberOfFaces () const |
| Return number of faces. | |
| int | numberOfVertex () const |
| Return number of vertex. | |
| int | numberOfMaterials () const |
| Return the number of materials. | |
| QList< GLC_Material * > | listOfMaterials () const |
| Return the list of material. | |
| QList< GLC_3DViewInstance * > | instancesHandle () const |
| Return list of world's instances. | |
| QList< GLC_3DViewInstance * > | visibleInstancesHandle () const |
| Return all visible GLC_3DViewInstance from the world. | |
| QList< QString > | instanceNamesFromShadingGroup (GLuint id) const |
| Return instances name from the specified shading group. | |
| int | numberOfUsedShadingGroup () const |
| Return the number of used shading group. | |
| GLC_WorldHandle * | worldHandle () |
| Return the worldHandle of this world. | |
| GLC_StructOccurence * | occurence (GLC_uint id) const |
| Return the occurence specified by an id. | |
| QList< GLC_StructOccurence * > | listOfOccurence () const |
| Return the list off occurences. | |
| int | numberOfOccurence () const |
| Return the number of occurence. | |
| int | containsOccurence (GLC_uint id) const |
| Return true if the world contians specified id. | |
| 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. | |
| int | selectionSize () const |
| Return the number of selected occurence. | |
| bool | isSelected (const GLC_StructOccurence *pOccurence) const |
| Return true if the given occurence is selected. | |
| bool | isSelected (GLC_uint selectionId) const |
| Return true if the given occurence id is selected. | |
| QList< GLC_StructOccurence * > | selectedOccurenceList () const |
| Return the list of selected occurences. | |
| QList< GLC_StructOccurence * > | selectedPrimitiveOccurenceList () const |
| Return the list of selected occurences. | |
Set Functions | |
| void | mergeWithAnotherWorld (GLC_World &) |
| Merge this world with another world. | |
| void | reversePartNormal () |
| Reverse worlds part normal. | |
| GLC_World & | clear () |
| Clear this world. | |
| void | setRootName (const QString &name) |
| Set the World root Name. | |
| void | setUpVector (const GLC_Vector3d &vect) |
| Set the world Up Vector. | |
| void | setAttachedViewport (GLC_Viewport *pViewport) |
| Set the attached viewport of this world. | |
| void | select (const GLC_StructOccurence *pOccurence) |
| Select the given occurence. | |
| void | select (GLC_uint occurenceId) |
| Select the given occurence id. | |
| void | unselect (GLC_uint occurenceId) |
| Unselect the given occurence id. | |
| void | selectAllWith3DViewInstance () |
| Select all occurence of this world with a 3DViewInstance. | |
| void | selectAllWith3DViewInstanceInCurrentShowState () |
| Select all occurence of this world with a 3DViewInstance in the current show state. | |
| void | unselectAll () |
| Unselect all occurence of this world. | |
| void | showHideSelected3DViewInstance () |
| Show / Hide selected 3DViewInstance. | |
| void | showSelected3DViewInstance () |
| Show selected 3DViewInstance. | |
| void | hideSelected3DViewInstance () |
| Hide selected 3DViewInstance. | |
Operator Overload | |
| GLC_World & | operator= (const GLC_World &) |
| Assignement operator. | |
OpenGL Functions | |
| void | render (GLuint groupId, glc::RenderFlag renderFlag=glc::ShadingFlag) |
| Display the world. | |
| void | renderShaderGroup (glc::RenderFlag renderFlag=glc::ShadingFlag) |
| Display the world's shader group. | |
Private Attributes | |
| GLC_WorldHandle * | m_pWorldHandle |
| The World Handle. | |
| GLC_StructOccurence * | m_pRoot |
| The root of the structure. | |
GLC_World : The Root of GLC_Lib Scene Graph.
GLC_World contain :
Definition at line 46 of file glc_world.h.
| GLC_World::GLC_World | ( | ) |
Default constructor.
Definition at line 30 of file glc_world.cpp.
References m_pRoot, m_pWorldHandle, and GLC_StructOccurence::setWorldHandle().
| GLC_World::GLC_World | ( | const GLC_World & | world | ) |
Copy constructor.
Definition at line 39 of file glc_world.cpp.
References GLC_WorldHandle::increment(), and m_pWorldHandle.
| GLC_World::~GLC_World | ( | ) | [virtual] |
Destructor.
Definition at line 48 of file glc_world.cpp.
References GLC_WorldHandle::decrement(), GLC_WorldHandle::isOrphan(), m_pRoot, and m_pWorldHandle.
| GLC_BoundingBox GLC_World::boundingBox | ( | void | ) | [inline] |
Return the entire world Bounding Box.
Definition at line 69 of file glc_world.h.
| GLC_World& GLC_World::clear | ( | void | ) | [inline] |
Clear this world.
Definition at line 195 of file glc_world.h.
| GLC_3DViewCollection* GLC_World::collection | ( | ) | [inline] |
Return the world collection.
Definition at line 77 of file glc_world.h.
Referenced by GLC_3dsToWorld::create3DRep(), GLC_3dsToWorld::CreateWorldFrom3ds(), GLC_WorldTo3dxml::exportAssemblyFromOccurence(), and GLC_WorldTo3dxml::writeOccurenceDefaultViewProperty().
| int GLC_World::containsOccurence | ( | GLC_uint | id | ) | const [inline] |
Return true if the world contians specified id.
Definition at line 138 of file glc_world.h.
| void GLC_World::hideSelected3DViewInstance | ( | ) | [inline] |
Hide selected 3DViewInstance.
Definition at line 245 of file glc_world.h.
| QList<QString> GLC_World::instanceNamesFromShadingGroup | ( | GLuint | id | ) | const [inline] |
Return instances name from the specified shading group.
Definition at line 113 of file glc_world.h.
| QList<GLC_StructInstance*> GLC_World::instances | ( | ) | const [inline] |
Return the list of instance.
Definition at line 142 of file glc_world.h.
| QList<GLC_3DViewInstance*> GLC_World::instancesHandle | ( | ) | const [inline] |
Return list of world's instances.
Definition at line 105 of file glc_world.h.
| bool GLC_World::isEmpty | ( | void | ) | const [inline] |
Return true if the world is empty.
Definition at line 85 of file glc_world.h.
| bool GLC_World::isSelected | ( | GLC_uint | selectionId | ) | const [inline] |
Return true if the given occurence id is selected.
Definition at line 170 of file glc_world.h.
| bool GLC_World::isSelected | ( | const GLC_StructOccurence * | pOccurence | ) | const [inline] |
Return true if the given occurence is selected.
Definition at line 166 of file glc_world.h.
| QList<GLC_Material*> GLC_World::listOfMaterials | ( | ) | const [inline] |
Return the list of material.
Definition at line 101 of file glc_world.h.
Referenced by GLC_WorldTo3dxml::writeAllMaterialRelatedFilesIn3dxml().
| QList<GLC_StructOccurence*> GLC_World::listOfOccurence | ( | ) | const [inline] |
Return the list off occurences.
Definition at line 130 of file glc_world.h.
Referenced by GLC_3dxmlToWorld::loadProductStructure().
| void GLC_World::mergeWithAnotherWorld | ( | GLC_World & | anotherWorld | ) |
Merge this world with another world.
Definition at line 64 of file glc_world.cpp.
References GLC_StructOccurence::addChild(), GLC_StructOccurence::childCount(), GLC_StructOccurence::children(), GLC_StructOccurence::clone(), m_pRoot, m_pWorldHandle, rootOccurence(), size(), and GLC_StructOccurence::updateChildrenAbsoluteMatrix().
| int GLC_World::numberOfBody | ( | ) | const [inline] |
Return the number of body.
Definition at line 150 of file glc_world.h.
| int GLC_World::numberOfFaces | ( | ) | const [inline] |
Return number of faces.
Definition at line 89 of file glc_world.h.
| int GLC_World::numberOfMaterials | ( | ) | const [inline] |
Return the number of materials.
Definition at line 97 of file glc_world.h.
| int GLC_World::numberOfOccurence | ( | ) | const [inline] |
Return the number of occurence.
Definition at line 134 of file glc_world.h.
| int GLC_World::numberOfUsedShadingGroup | ( | ) | const [inline] |
Return the number of used shading group.
Definition at line 117 of file glc_world.h.
| int GLC_World::numberOfVertex | ( | ) | const [inline] |
Return number of vertex.
Definition at line 93 of file glc_world.h.
| GLC_StructOccurence* GLC_World::occurence | ( | GLC_uint | id | ) | const [inline] |
Return the occurence specified by an id.
Id must be a valid identifier
Definition at line 126 of file glc_world.h.
Assignement operator.
Definition at line 85 of file glc_world.cpp.
References GLC_WorldHandle::decrement(), GLC_WorldHandle::increment(), GLC_WorldHandle::isOrphan(), m_pRoot, and m_pWorldHandle.
| QList<GLC_StructReference*> GLC_World::references | ( | ) | const [inline] |
Return the list of Reference.
Definition at line 146 of file glc_world.h.
| void GLC_World::render | ( | GLuint | groupId, | |
| glc::RenderFlag | renderFlag = glc::ShadingFlag | |||
| ) | [inline] |
Display the world.
Definition at line 266 of file glc_world.h.
| void GLC_World::renderShaderGroup | ( | glc::RenderFlag | renderFlag = glc::ShadingFlag |
) | [inline] |
Display the world's shader group.
Definition at line 270 of file glc_world.h.
| int GLC_World::representationCount | ( | ) | const [inline] |
Return the number of representation.
Definition at line 154 of file glc_world.h.
| void GLC_World::reversePartNormal | ( | ) | [inline] |
Reverse worlds part normal.
Definition at line 192 of file glc_world.h.
| GLC_StructOccurence* GLC_World::rootOccurence | ( | ) | const [inline] |
Return the root of the world.
Definition at line 73 of file glc_world.h.
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld(), GLC_ColladaToWorld::createSceneGraph(), GLC_3dxmlToWorld::createUnfoldedTree(), GLC_3dsToWorld::CreateWorldFrom3ds(), GLC_ObjToWorld::CreateWorldFromObj(), GLC_OffToWorld::CreateWorldFromOff(), GLC_StlToWorld::CreateWorldFromStl(), GLC_WorldTo3dxml::exportAssemblyStructure(), GLC_WorldTo3dxml::GLC_WorldTo3dxml(), GLC_3dxmlToWorld::loadProductStructure(), GLC_3dxmlToWorld::loadReference3D(), mergeWithAnotherWorld(), and GLC_StlToWorld::scanFacet().
| void GLC_World::select | ( | GLC_uint | occurenceId | ) | [inline] |
Select the given occurence id.
The given occurence id must belong to the world handle of this world
Definition at line 216 of file glc_world.h.
| void GLC_World::select | ( | const GLC_StructOccurence * | pOccurence | ) | [inline] |
Select the given occurence.
The given occurence must belong to the world handle of this world
Definition at line 211 of file glc_world.h.
References GLC_StructOccurence::id().
| void GLC_World::selectAllWith3DViewInstance | ( | ) | [inline] |
Select all occurence of this world with a 3DViewInstance.
Definition at line 225 of file glc_world.h.
| void GLC_World::selectAllWith3DViewInstanceInCurrentShowState | ( | ) | [inline] |
Select all occurence of this world with a 3DViewInstance in the current show state.
Definition at line 229 of file glc_world.h.
| QList<GLC_StructOccurence*> GLC_World::selectedOccurenceList | ( | ) | const [inline] |
Return the list of selected occurences.
Definition at line 174 of file glc_world.h.
| QList<GLC_StructOccurence*> GLC_World::selectedPrimitiveOccurenceList | ( | ) | const [inline] |
Return the list of selected occurences.
Definition at line 178 of file glc_world.h.
| int GLC_World::selectionSize | ( | void | ) | const [inline] |
Return the number of selected occurence.
Definition at line 162 of file glc_world.h.
| void GLC_World::setAttachedViewport | ( | GLC_Viewport * | pViewport | ) | [inline] |
Set the attached viewport of this world.
Definition at line 206 of file glc_world.h.
| void GLC_World::setRootName | ( | const QString & | name | ) | [inline] |
Set the World root Name.
Definition at line 198 of file glc_world.h.
Referenced by GLC_3dxmlToWorld::loadReference3D().
| void GLC_World::setUpVector | ( | const GLC_Vector3d & | vect | ) | [inline] |
Set the world Up Vector.
Definition at line 202 of file glc_world.h.
Referenced by GLC_ColladaToWorld::CreateWorldFromCollada().
| void GLC_World::showHideSelected3DViewInstance | ( | ) | [inline] |
Show / Hide selected 3DViewInstance.
Definition at line 237 of file glc_world.h.
| void GLC_World::showSelected3DViewInstance | ( | ) | [inline] |
Show selected 3DViewInstance.
Definition at line 241 of file glc_world.h.
| int GLC_World::size | ( | void | ) | const [inline] |
Return the size of the world.
Definition at line 81 of file glc_world.h.
Referenced by mergeWithAnotherWorld().
| void GLC_World::unselect | ( | GLC_uint | occurenceId | ) | [inline] |
Unselect the given occurence id.
The given occurence id must belong to the world handle of this world
Definition at line 221 of file glc_world.h.
| void GLC_World::unselectAll | ( | ) | [inline] |
Unselect all occurence of this world.
Definition at line 233 of file glc_world.h.
| GLC_Vector3d GLC_World::upVector | ( | void | ) | const [inline] |
Return the world Up vector.
Definition at line 158 of file glc_world.h.
| QList<GLC_3DViewInstance*> GLC_World::visibleInstancesHandle | ( | ) | const [inline] |
Return all visible GLC_3DViewInstance from the world.
Definition at line 109 of file glc_world.h.
| GLC_WorldHandle* GLC_World::worldHandle | ( | ) | [inline] |
Return the worldHandle of this world.
Definition at line 121 of file glc_world.h.
Referenced by GLC_3dxmlToWorld::createUnfoldedTree().
GLC_StructOccurence* GLC_World::m_pRoot [private] |
The root of the structure.
Definition at line 282 of file glc_world.h.
Referenced by GLC_World(), mergeWithAnotherWorld(), operator=(), and ~GLC_World().
GLC_WorldHandle* GLC_World::m_pWorldHandle [private] |
The World Handle.
Definition at line 279 of file glc_world.h.
Referenced by GLC_World(), mergeWithAnotherWorld(), operator=(), and ~GLC_World().