GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Private Attributes | List of all members
GLC_World Class Reference

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 (GLC_StructOccurence *pOcc)
 Create a world and set the root occurrence to the given occurrence.
 
 GLC_World (const GLC_World &)
 Copy constructor.
 
virtual ~GLC_World ()
 Destructor.
 
Get Functions
GLC_BoundingBox boundingBox ()
 Return the entire world Bounding Box.
 
GLC_StructOccurencerootOccurence () const
 Return the root of the world.
 
GLC_3DViewCollectioncollection ()
 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_WorldHandleworldHandle ()
 Return the worldHandle of this world.
 
GLC_StructOccurenceoccurence (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 * > minimumSelectedOccurenceList () const
 Return the minimum selected occurences list.
 
GLC_StructOccurencetakeRootOccurrence ()
 Take the root occurence of this world.
 
Set Functions
void replaceRootOccurrence (GLC_StructOccurence *pOcc)
 Replace the root occurrence of this world by the given occurrence.
 
void mergeWithAnotherWorld (GLC_World &)
 Merge this world with another world.
 
void reversePartNormal ()
 Reverse worlds part normal.
 
GLC_Worldclear ()
 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_Worldoperator= (const GLC_World &)
 Assignement operator.
 
bool operator== (const GLC_World &other) const
 Return true if this world is the same than the given world.
 
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_WorldHandlem_pWorldHandle
 The World Handle.
 
GLC_StructOccurencem_pRoot
 The root of the structure.
 

Detailed Description

GLC_World : The Root of GLC_Lib Scene Graph.

GLC_World contain :

Definition at line 46 of file glc_world.h.

Constructor & Destructor Documentation

GLC_World::GLC_World ( )

Default constructor.

Definition at line 29 of file glc_world.cpp.

References m_pRoot, m_pWorldHandle, and GLC_StructOccurence::setWorldHandle().

GLC_World::GLC_World ( GLC_StructOccurence pOcc)
explicit

Create a world and set the root occurrence to the given occurrence.

Definition at line 36 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 43 of file glc_world.cpp.

References GLC_WorldHandle::increment(), and m_pWorldHandle.

GLC_World::~GLC_World ( )
virtual

Destructor.

Definition at line 53 of file glc_world.cpp.

References GLC_WorldHandle::decrement(), GLC_WorldHandle::isOrphan(), m_pRoot, and m_pWorldHandle.

Member Function Documentation

GLC_BoundingBox GLC_World::boundingBox ( void  )
inline

Return the entire world Bounding Box.

Definition at line 72 of file glc_world.h.

GLC_World& GLC_World::clear ( void  )
inline

Clear this world.

Definition at line 203 of file glc_world.h.

GLC_3DViewCollection* GLC_World::collection ( )
inline
int GLC_World::containsOccurence ( GLC_uint  id) const
inline

Return true if the world contians specified id.

Definition at line 141 of file glc_world.h.

void GLC_World::hideSelected3DViewInstance ( )
inline

Hide selected 3DViewInstance.

Definition at line 253 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 116 of file glc_world.h.

QList<GLC_StructInstance*> GLC_World::instances ( ) const
inline

Return the list of instance.

Definition at line 145 of file glc_world.h.

QList<GLC_3DViewInstance*> GLC_World::instancesHandle ( ) const
inline

Return list of world's instances.

Definition at line 108 of file glc_world.h.

bool GLC_World::isEmpty ( void  ) const
inline

Return true if the world is empty.

Definition at line 88 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 169 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 173 of file glc_world.h.

QList<GLC_Material*> GLC_World::listOfMaterials ( ) const
inline

Return the list of material.

Definition at line 104 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 133 of file glc_world.h.

Referenced by GLC_3dxmlToWorld::loadProductStructure().

void GLC_World::mergeWithAnotherWorld ( GLC_World anotherWorld)
QList< GLC_StructOccurence * > GLC_World::minimumSelectedOccurenceList ( ) const

Return the minimum selected occurences list.

Definition at line 64 of file glc_world.cpp.

References m_pWorldHandle, GLC_SelectionSet::occurencesList(), and GLC_WorldHandle::selectionSetHandle().

int GLC_World::numberOfBody ( ) const
inline

Return the number of body.

Definition at line 153 of file glc_world.h.

int GLC_World::numberOfFaces ( ) const
inline

Return number of faces.

Definition at line 92 of file glc_world.h.

int GLC_World::numberOfMaterials ( ) const
inline

Return the number of materials.

Definition at line 100 of file glc_world.h.

int GLC_World::numberOfOccurence ( ) const
inline

Return the number of occurence.

Definition at line 137 of file glc_world.h.

int GLC_World::numberOfUsedShadingGroup ( ) const
inline

Return the number of used shading group.

Definition at line 120 of file glc_world.h.

int GLC_World::numberOfVertex ( ) const
inline

Return number of vertex.

Definition at line 96 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 129 of file glc_world.h.

GLC_World & GLC_World::operator= ( const GLC_World world)
bool GLC_World::operator== ( const GLC_World other) const

Return true if this world is the same than the given world.

Definition at line 146 of file glc_world.cpp.

References m_pWorldHandle.

QList<GLC_StructReference*> GLC_World::references ( ) const
inline

Return the list of Reference.

Definition at line 149 of file glc_world.h.

Referenced by GLC_WorldTo3ds::saveMeshes().

void GLC_World::render ( GLuint  groupId,
glc::RenderFlag  renderFlag = glc::ShadingFlag 
)
inline

Display the world.

Definition at line 276 of file glc_world.h.

void GLC_World::renderShaderGroup ( glc::RenderFlag  renderFlag = glc::ShadingFlag)
inline

Display the world's shader group.

Definition at line 280 of file glc_world.h.

void GLC_World::replaceRootOccurrence ( GLC_StructOccurence pOcc)

Replace the root occurrence of this world by the given occurrence.

Definition at line 101 of file glc_world.cpp.

References GLC_StructOccurence::isOrphan(), m_pRoot, m_pWorldHandle, and GLC_StructOccurence::setWorldHandle().

int GLC_World::representationCount ( ) const
inline

Return the number of representation.

Definition at line 157 of file glc_world.h.

void GLC_World::reversePartNormal ( )
inline

Reverse worlds part normal.

Definition at line 200 of file glc_world.h.

GLC_StructOccurence* GLC_World::rootOccurence ( ) const
inline
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 219 of file glc_world.h.

References GLC_StructOccurence::id().

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 224 of file glc_world.h.

void GLC_World::selectAllWith3DViewInstance ( )
inline

Select all occurence of this world with a 3DViewInstance.

Definition at line 233 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 237 of file glc_world.h.

QList<GLC_StructOccurence*> GLC_World::selectedOccurenceList ( ) const
inline

Return the list of selected occurences.

Definition at line 177 of file glc_world.h.

int GLC_World::selectionSize ( void  ) const
inline

Return the number of selected occurence.

Definition at line 165 of file glc_world.h.

void GLC_World::setAttachedViewport ( GLC_Viewport pViewport)
inline

Set the attached viewport of this world.

Definition at line 214 of file glc_world.h.

void GLC_World::setRootName ( const QString &  name)
inline

Set the World root Name.

Definition at line 206 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 210 of file glc_world.h.

Referenced by GLC_ColladaToWorld::CreateWorldFromCollada().

void GLC_World::showHideSelected3DViewInstance ( )
inline

Show / Hide selected 3DViewInstance.

Definition at line 245 of file glc_world.h.

void GLC_World::showSelected3DViewInstance ( )
inline

Show selected 3DViewInstance.

Definition at line 249 of file glc_world.h.

int GLC_World::size ( void  ) const
inline

Return the size of the world.

Definition at line 84 of file glc_world.h.

References GLC_3DViewCollection::size().

Referenced by mergeWithAnotherWorld().

GLC_StructOccurence * GLC_World::takeRootOccurrence ( )

Take the root occurence of this world.

Definition at line 90 of file glc_world.cpp.

References m_pRoot, m_pWorldHandle, GLC_StructOccurence::makeOrphan(), and GLC_StructOccurence::setWorldHandle().

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 229 of file glc_world.h.

void GLC_World::unselectAll ( )
inline

Unselect all occurence of this world.

Definition at line 241 of file glc_world.h.

GLC_Vector3d GLC_World::upVector ( ) const
inline

Return the world Up vector.

Definition at line 161 of file glc_world.h.

QList<GLC_3DViewInstance*> GLC_World::visibleInstancesHandle ( ) const
inline

Return all visible GLC_3DViewInstance from the world.

Definition at line 112 of file glc_world.h.

GLC_WorldHandle* GLC_World::worldHandle ( )
inline

Return the worldHandle of this world.

Definition at line 124 of file glc_world.h.

Referenced by GLC_3dxmlToWorld::createUnfoldedTree().

Member Data Documentation

GLC_StructOccurence* GLC_World::m_pRoot
private

The root of the structure.

Definition at line 292 of file glc_world.h.

Referenced by GLC_World(), mergeWithAnotherWorld(), operator=(), replaceRootOccurrence(), takeRootOccurrence(), and ~GLC_World().

GLC_WorldHandle* GLC_World::m_pWorldHandle
private

The documentation for this class was generated from the following files:

©2005-2013 Laurent Ribon