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

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_3DViewCollectioncollection ()
 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_StructOccurencegetOccurence (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_SelectionSetselectionSetHandle ()
 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.
 

Detailed Description

GLC_WorldHandle : Handle of shared GLC_World.

Definition at line 38 of file glc_worldhandle.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

void GLC_WorldHandle::addOccurence ( GLC_StructOccurence pOccurence,
bool  isSelected = false,
GLuint  shaderId = 0 
)
GLC_3DViewCollection* GLC_WorldHandle::collection ( )
inline
bool GLC_WorldHandle::containsOccurence ( GLC_uint  id) const
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().

void GLC_WorldHandle::decrement ( )
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().

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 75 of file glc_worldhandle.h.

Referenced by GLC_SelectionSet::insert().

void GLC_WorldHandle::increment ( )
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.

bool GLC_WorldHandle::isOrphan ( ) const
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().

int GLC_WorldHandle::numberOfOccurence ( ) const
inline

Return the number of occurence.

Definition at line 86 of file glc_worldhandle.h.

int GLC_WorldHandle::numberOfWorld ( ) const
inline

Return the number of world associated with this handle.

Definition at line 62 of file glc_worldhandle.h.

QList<GLC_StructOccurence*> GLC_WorldHandle::occurences ( ) const
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().

void GLC_WorldHandle::removeAllOccurences ( )
inline

All Occurence has been removed.

Definition at line 131 of file glc_worldhandle.h.

void GLC_WorldHandle::removeOccurence ( GLC_StructOccurence pOccurence)
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)
GLC_SelectionSet* GLC_WorldHandle::selectionSetHandle ( )
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().

void GLC_WorldHandle::setAttachedViewport ( GLC_Viewport pViewport)
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().

void GLC_WorldHandle::setUpVector ( const GLC_Vector3d vect)
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().

GLC_Vector3d GLC_WorldHandle::upVector ( ) const
inline

Return the world Up vector.

Definition at line 102 of file glc_worldhandle.h.

Member Data Documentation

GLC_3DViewCollection GLC_WorldHandle::m_Collection
private
int GLC_WorldHandle::m_NumberOfWorld
private

Number of this world.

Definition at line 172 of file glc_worldhandle.h.

QHash<GLC_uint, GLC_StructOccurence*> GLC_WorldHandle::m_OccurenceHash
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().

GLC_SelectionSet GLC_WorldHandle::m_SelectionSet
private

This world selectionSet.

Definition at line 181 of file glc_worldhandle.h.

Referenced by removeOccurence(), select(), selectAllWith3DViewInstance(), unselect(), and unselectAll().

GLC_Vector3d GLC_WorldHandle::m_UpVector
private

This world Up Vector.

Definition at line 178 of file glc_worldhandle.h.


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

©2005-2013 Laurent Ribon