GLC_StructOccurence Class Reference

GLC_StructOccurence : A scene graph occurence node. More...

#include <glc_structoccurence.h>

List of all members.

Public Member Functions

Constructor / Destructor

 GLC_StructOccurence ()
 Default constructor.
 GLC_StructOccurence (GLC_StructInstance *, GLC_WorldHandle *pWorldHandle=NULL, GLuint shaderId=0)
 Create Occurence of the specified instance.
 GLC_StructOccurence (GLC_3DRep *)
 Construct Occurence withe the specified GLC_3DRep.
 GLC_StructOccurence (GLC_WorldHandle *, const GLC_StructOccurence &, bool shareInstance)
 Copy constructor.
virtual ~GLC_StructOccurence ()
 Destructor.
Get Functions

GLC_uint id () const
 Return the Occurence id.
const QString name () const
 Return Occurence instance name.
GLC_Matrix4x4 absoluteMatrix () const
 Return the absolute matrix.
bool isOrphan () const
 Return true if this occurence is orphan.
bool hasRepresentation () const
 Return true if this occurence has a representation.
GLC_StructInstancestructInstance () const
 Return the instance of this occurence.
GLC_StructReferencestructReference () const
 Return the reference of this occurence.
int childCount () const
 Return the number of childs.
bool hasChild () const
 Return true if the occurence has child.
GLC_StructOccurenceparent () const
 Return The parent.
GLC_StructOccurencechild (const int index) const
 Return a child.
QList< GLC_StructOccurence * > children () const
 Return the list of children.
unsigned int numberOfFaces () const
 Get number of faces.
unsigned int numberOfVertex () const
 Get number of vertex.
unsigned int numberOfMaterials () const
 Get number of materials.
QSet< GLC_Material * > materialSet () const
 Get materials List.
GLC_StructOccurenceclone (GLC_WorldHandle *, bool shareInstance) const
 Clone the occurence.
bool isVisible () const
 Return true if the occurence is visible.
GLC_BoundingBox boundingBox () const
 Return the occurence Bounding Box.
unsigned int occurenceNumber () const
 Return the occurence number of this occurence.
GLC_RenderPropertiesrenderPropertiesHandle () const
 Return an handle of the renderProperties of this occurence.
unsigned int nodeCount () const
 Return the number of node of this branch.
Set Functions

void setName (const QString name)
 Set Occurence instance Name.
GLC_StructOccurenceupdateAbsoluteMatrix ()
 Update the absolute matrix.
GLC_StructOccurenceupdateChildrenAbsoluteMatrix ()
 Update children obsolute Matrix.
void addChild (GLC_StructOccurence *)
 Add Child.
GLC_StructOccurenceaddChild (GLC_StructInstance *)
 Add Child instance and returns the newly created occurence.
void makeOrphan ()
 make the occurence orphan
bool removeChild (GLC_StructOccurence *pChild)
 Remove the specified child.
void reverseNormals ()
 Reverse Normals of this Occurence and childs.
void checkForRepresentation ()
 Check the presence of representation.
void setWorldHandle (GLC_WorldHandle *)
 Set the occurence world Handle.
bool loadRepresentation ()
 Load the representation and return true if success.
bool unloadRepresentation ()
 UnLoad the representation and return true if success.
void setOccurenceNumber (unsigned int n)
 Set the occurence number of this occurence.
unsigned int updateOccurenceNumber (unsigned int n)
 Update the occurence number of this occurence branch.
void setVisibility (bool visibility)
 Set this occurence visibility.
void setRenderProperties (const GLC_RenderProperties &renderProperties)
 set the renderProperties of this occurence
void removeEmptyChildren ()
 Remove empty children.

Private Member Functions

void detach ()
 Detach the occurence from the GLC_World.

Private Attributes

GLC_uint m_Uid
 Occurence Unique ID.
GLC_WorldHandlem_pWorldHandle
 the occurence's World Handle
int * m_pNumberOfOccurence
 Number of this Occurence.
GLC_StructInstancem_pStructInstance
 The struct instance of this occurence.
GLC_StructOccurencem_pParent
 The parent of this occurence.
QList< GLC_StructOccurence * > m_Childs
 The Child of this occurence.
GLC_Matrix4x4 m_AbsoluteMatrix
 The absolute matrix of the occurence.
bool m_HasRepresentation
 true if occurence has a representation
unsigned int m_OccurenceNumber
 The occurence number.
bool m_IsVisible
 Flag to know if a occurence without instance is visible.
GLC_RenderPropertiesm_pRenderProperties
 The occurence rendering properties.

Detailed Description

GLC_StructOccurence : A scene graph occurence node.

Definition at line 45 of file glc_structoccurence.h.


Constructor & Destructor Documentation

GLC_StructOccurence::GLC_StructOccurence (  ) 

Default constructor.

Definition at line 33 of file glc_structoccurence.cpp.

References m_pStructInstance, and GLC_StructInstance::structOccurenceCreated().

Referenced by addChild(), and clone().

GLC_StructOccurence::GLC_StructOccurence ( GLC_StructInstance pStructInstance,
GLC_WorldHandle pWorldHandle = NULL,
GLuint  shaderId = 0 
)
GLC_StructOccurence::GLC_StructOccurence ( GLC_3DRep pRep  ) 
GLC_StructOccurence::GLC_StructOccurence ( GLC_WorldHandle pWorldHandle,
const GLC_StructOccurence structOccurence,
bool  shareInstance 
)
GLC_StructOccurence::~GLC_StructOccurence (  )  [virtual]

Member Function Documentation

GLC_Matrix4x4 GLC_StructOccurence::absoluteMatrix (  )  const [inline]

Return the absolute matrix.

Definition at line 82 of file glc_structoccurence.h.

Referenced by updateAbsoluteMatrix().

GLC_StructOccurence * GLC_StructOccurence::addChild ( GLC_StructInstance pInstance  ) 

Add Child instance and returns the newly created occurence.

Definition at line 439 of file glc_structoccurence.cpp.

References addChild(), GLC_StructOccurence(), and m_pWorldHandle.

void GLC_StructOccurence::addChild ( GLC_StructOccurence pChild  ) 
GLC_BoundingBox GLC_StructOccurence::boundingBox ( void   )  const
void GLC_StructOccurence::checkForRepresentation (  ) 
GLC_StructOccurence* GLC_StructOccurence::child ( const int  index  )  const [inline]

Return a child.

The index must exist

Definition at line 118 of file glc_structoccurence.h.

Referenced by GLC_WorldTo3dxml::exportAssemblyFromOccurence(), GLC_StructOccurence(), and isVisible().

int GLC_StructOccurence::childCount (  )  const [inline]
QList<GLC_StructOccurence*> GLC_StructOccurence::children (  )  const [inline]

Return the list of children.

Definition at line 122 of file glc_structoccurence.h.

Referenced by boundingBox(), and GLC_World::mergeWithAnotherWorld().

GLC_StructOccurence * GLC_StructOccurence::clone ( GLC_WorldHandle pWorldHandle,
bool  shareInstance 
) const

Clone the occurence.

Definition at line 315 of file glc_structoccurence.cpp.

References GLC_StructOccurence().

Referenced by GLC_StructOccurence(), and GLC_World::mergeWithAnotherWorld().

void GLC_StructOccurence::detach (  )  [private]
bool GLC_StructOccurence::hasChild (  )  const [inline]

Return true if the occurence has child.

Definition at line 109 of file glc_structoccurence.h.

Referenced by boundingBox(), and setRenderProperties().

bool GLC_StructOccurence::hasRepresentation (  )  const [inline]

Return true if this occurence has a representation.

Definition at line 90 of file glc_structoccurence.h.

Referenced by GLC_WorldHandle::addOccurence(), and GLC_WorldHandle::removeOccurence().

GLC_uint GLC_StructOccurence::id (  )  const [inline]
bool GLC_StructOccurence::isOrphan (  )  const [inline]
bool GLC_StructOccurence::isVisible (  )  const
bool GLC_StructOccurence::loadRepresentation (  ) 
void GLC_StructOccurence::makeOrphan (  ) 

make the occurence orphan

Definition at line 450 of file glc_structoccurence.cpp.

References isOrphan(), m_pParent, and removeChild().

QSet< GLC_Material * > GLC_StructOccurence::materialSet (  )  const
const QString GLC_StructOccurence::name (  )  const [inline]
unsigned int GLC_StructOccurence::nodeCount (  )  const

Return the number of node of this branch.

Definition at line 374 of file glc_structoccurence.cpp.

References m_Childs.

unsigned int GLC_StructOccurence::numberOfFaces (  )  const
unsigned int GLC_StructOccurence::numberOfMaterials (  )  const
unsigned int GLC_StructOccurence::numberOfVertex (  )  const
unsigned int GLC_StructOccurence::occurenceNumber (  )  const [inline]

Return the occurence number of this occurence.

Definition at line 147 of file glc_structoccurence.h.

Referenced by GLC_WorldTo3dxml::writeOccurenceDefaultViewProperty().

GLC_StructOccurence* GLC_StructOccurence::parent (  )  const [inline]

Return The parent.

Definition at line 113 of file glc_structoccurence.h.

Referenced by GLC_WorldTo3dxml::exportAssemblyFromOccurence().

bool GLC_StructOccurence::removeChild ( GLC_StructOccurence pChild  ) 

Remove the specified child.

The removed child will not be deleted

Definition at line 460 of file glc_structoccurence.cpp.

References detach(), m_Childs, and m_pParent.

Referenced by makeOrphan(), and ~GLC_StructOccurence().

void GLC_StructOccurence::removeEmptyChildren (  ) 

Remove empty children.

Definition at line 629 of file glc_structoccurence.cpp.

References m_Childs.

Referenced by GLC_ColladaToWorld::createSceneGraph().

GLC_RenderProperties* GLC_StructOccurence::renderPropertiesHandle (  )  const [inline]

Return an handle of the renderProperties of this occurence.

Definition at line 151 of file glc_structoccurence.h.

void GLC_StructOccurence::reverseNormals (  ) 
void GLC_StructOccurence::setName ( const QString  name  )  [inline]

Set Occurence instance Name.

Definition at line 166 of file glc_structoccurence.h.

Referenced by GLC_3dsToWorld::createMeshes(), and GLC_StructOccurence().

void GLC_StructOccurence::setOccurenceNumber ( unsigned int  n  )  [inline]

Set the occurence number of this occurence.

Definition at line 204 of file glc_structoccurence.h.

void GLC_StructOccurence::setRenderProperties ( const GLC_RenderProperties renderProperties  ) 
void GLC_StructOccurence::setVisibility ( bool  visibility  ) 
void GLC_StructOccurence::setWorldHandle ( GLC_WorldHandle pWorldHandle  ) 
GLC_StructInstance* GLC_StructOccurence::structInstance (  )  const [inline]
GLC_StructReference* GLC_StructOccurence::structReference (  )  const [inline]

Return the reference of this occurence.

Definition at line 98 of file glc_structoccurence.h.

Referenced by GLC_WorldHandle::addOccurence(), and GLC_WorldTo3dxml::exportAssemblyFromOccurence().

bool GLC_StructOccurence::unloadRepresentation (  ) 

UnLoad the representation and return true if success.

Definition at line 574 of file glc_structoccurence.cpp.

References m_HasRepresentation, m_pStructInstance, GLC_StructReference::representationHandle(), GLC_StructInstance::structReference(), and GLC_Rep::unload().

GLC_StructOccurence * GLC_StructOccurence::updateAbsoluteMatrix (  ) 
GLC_StructOccurence * GLC_StructOccurence::updateChildrenAbsoluteMatrix (  ) 
unsigned int GLC_StructOccurence::updateOccurenceNumber ( unsigned int  n  ) 

Update the occurence number of this occurence branch.

Definition at line 583 of file glc_structoccurence.cpp.

References childCount(), m_Childs, and m_OccurenceNumber.

Referenced by GLC_WorldTo3dxml::GLC_WorldTo3dxml(), and GLC_3dxmlToWorld::loadProductStructure().


Member Data Documentation

The absolute matrix of the occurence.

Definition at line 251 of file glc_structoccurence.h.

Referenced by updateAbsoluteMatrix().

Flag to know if a occurence without instance is visible.

Definition at line 260 of file glc_structoccurence.h.

Referenced by isVisible(), loadRepresentation(), setVisibility(), and setWorldHandle().

The occurence number.

Definition at line 257 of file glc_structoccurence.h.

Referenced by updateOccurenceNumber().

Number of this Occurence.

Definition at line 239 of file glc_structoccurence.h.

Referenced by GLC_StructOccurence(), and ~GLC_StructOccurence().

The parent of this occurence.

Definition at line 245 of file glc_structoccurence.h.

Referenced by addChild(), makeOrphan(), removeChild(), and updateAbsoluteMatrix().

The occurence rendering properties.

Definition at line 263 of file glc_structoccurence.h.

Referenced by detach(), GLC_StructOccurence(), setRenderProperties(), and ~GLC_StructOccurence().

Occurence Unique ID.

Definition at line 233 of file glc_structoccurence.h.

Referenced by detach(), loadRepresentation(), setRenderProperties(), setVisibility(), and setWorldHandle().


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

SourceForge.net Logo

©2005-2010 Laurent Ribon