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

GLC_StructInstance : A scene graph instance node. More...

#include <glc_structinstance.h>

Public Member Functions

 GLC_StructInstance (GLC_StructReference *pRef=NULL)
 Default constructor.
 
 GLC_StructInstance (GLC_Rep *)
 Create instance with a rep.
 
 GLC_StructInstance (const GLC_StructInstance &)
 Copy constructor.
 
 GLC_StructInstance (GLC_StructInstance *)
 Copy constructor.
 
 GLC_StructInstance (const QString &)
 Create empty instance.
 
void setReference (GLC_StructReference *)
 Set the reference of an empty instance.
 
virtual ~GLC_StructInstance ()
 
Get Functions
bool hasStructOccurence () const
 Return true if this instance have occurence.
 
int numberOfOccurence () const
 Return the number of occurence.
 
GLC_StructOccurencefirstOccurenceHandle () const
 Return first occurence handle.
 
GLC_Matrix4x4 relativeMatrix () const
 Return the relative matrix of this instance.
 
GLC_StructReferencestructReference () const
 Return the reference of this instance.
 
QList< GLC_StructOccurence * > listOfStructOccurences () const
 Return the list off occurence of this instance.
 
QString name () const
 Return the instance name.
 
bool containsAttributes () const
 Return true if the reference contains User attributes.
 
GLC_AttributesattributesHandle () const
 Return handle to the reference attributes.
 
int usageCount () const
 Return the number of usage of this instance.
 
Set Functions
void structOccurenceCreated (GLC_StructOccurence *pOccurence)
 An occurence of this instance have been created.
 
void structOccurenceDeleted (GLC_StructOccurence *pOccurence)
 
GLC_StructInstancemove (const GLC_Matrix4x4 &matrix)
 Move the instance by specified matrix.
 
GLC_StructInstancetranslate (double Tx, double Ty, double Tz)
 Translate Instance.
 
GLC_StructInstancetranslate (const GLC_Vector3d &v)
 Translate Instance.
 
GLC_StructInstancesetMatrix (const GLC_Matrix4x4 &SetMat)
 Replace the instance Matrix.
 
GLC_StructInstanceresetMatrix ()
 Reset the instance Matrix.
 
void setName (const QString &name)
 Set the instance name.
 
void setAttributes (const GLC_Attributes &attr)
 Set the instance attributes.
 
void updateOccurencesAbsoluteMatrix ()
 Update absolute matrix off children and all occurences of this instance.
 

Private Attributes

int * m_pNumberOfInstance
 Number of this Instance.
 
GLC_StructReferencem_pStructReference
 The Struct reference of this instance.
 
QList< GLC_StructOccurence * > m_ListOfOccurences
 The list of instance's occurences.
 
GLC_Matrix4x4 m_RelativeMatrix
 The relative matrix.
 
QString m_Name
 The instance Name.
 
GLC_Attributesm_pAttributes
 The Reference attributes.
 

Detailed Description

GLC_StructInstance : A scene graph instance node.

Definition at line 44 of file glc_structinstance.h.

Constructor & Destructor Documentation

GLC_StructInstance::GLC_StructInstance ( GLC_StructReference pRef = NULL)
GLC_StructInstance::GLC_StructInstance ( GLC_Rep pRep)
GLC_StructInstance::GLC_StructInstance ( const GLC_StructInstance structInstance)

Copy constructor.

Definition at line 81 of file glc_structinstance.cpp.

References m_pAttributes, m_pStructReference, and GLC_StructReference::structInstanceCreated().

GLC_StructInstance::GLC_StructInstance ( GLC_StructInstance pStructInstance)

Copy constructor.

Definition at line 104 of file glc_structinstance.cpp.

References m_pAttributes, m_pStructReference, and GLC_StructReference::structInstanceCreated().

GLC_StructInstance::GLC_StructInstance ( const QString &  name)

Create empty instance.

Definition at line 127 of file glc_structinstance.cpp.

GLC_StructInstance::~GLC_StructInstance ( )
virtual

Member Function Documentation

GLC_Attributes* GLC_StructInstance::attributesHandle ( ) const
inline

Return handle to the reference attributes.

Definition at line 105 of file glc_structinstance.h.

Referenced by GLC_WorldTo3dxml::writeInstance3D().

bool GLC_StructInstance::containsAttributes ( ) const
inline

Return true if the reference contains User attributes.

Definition at line 101 of file glc_structinstance.h.

Referenced by GLC_WorldTo3dxml::writeInstance3D().

GLC_StructOccurence* GLC_StructInstance::firstOccurenceHandle ( ) const
inline
bool GLC_StructInstance::hasStructOccurence ( ) const
inline
QList<GLC_StructOccurence*> GLC_StructInstance::listOfStructOccurences ( ) const
inline

Return the list off occurence of this instance.

Definition at line 93 of file glc_structinstance.h.

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

GLC_StructInstance* GLC_StructInstance::move ( const GLC_Matrix4x4 matrix)
inline

Move the instance by specified matrix.

Definition at line 131 of file glc_structinstance.h.

Referenced by GLC_ColladaToWorld::createOccurenceFromNode(), and GLC_3dxmlToWorld::loadInstance3D().

QString GLC_StructInstance::name ( ) const
inline
int GLC_StructInstance::numberOfOccurence ( ) const
inline

Return the number of occurence.

Definition at line 77 of file glc_structinstance.h.

GLC_Matrix4x4 GLC_StructInstance::relativeMatrix ( ) const
inline

Return the relative matrix of this instance.

Definition at line 85 of file glc_structinstance.h.

Referenced by GLC_WorldTo3ds::createNodeFromOccurrence(), GLC_StructOccurence::updateAbsoluteMatrix(), and GLC_WorldTo3dxml::writeInstance3D().

GLC_StructInstance* GLC_StructInstance::resetMatrix ( void  )
inline

Reset the instance Matrix.

Definition at line 158 of file glc_structinstance.h.

void GLC_StructInstance::setAttributes ( const GLC_Attributes attr)
inline

Set the instance attributes.

Definition at line 169 of file glc_structinstance.h.

Referenced by GLC_3dxmlToWorld::loadInstance3D().

GLC_StructInstance* GLC_StructInstance::setMatrix ( const GLC_Matrix4x4 SetMat)
inline

Replace the instance Matrix.

Definition at line 151 of file glc_structinstance.h.

void GLC_StructInstance::setName ( const QString &  name)
inline

Set the instance name.

Definition at line 165 of file glc_structinstance.h.

void GLC_StructInstance::setReference ( GLC_StructReference pStructReference)
void GLC_StructInstance::structOccurenceCreated ( GLC_StructOccurence pOccurence)
inline

An occurence of this instance have been created.

Definition at line 119 of file glc_structinstance.h.

Referenced by GLC_StructOccurence::doCreateOccurrenceFromInstance(), and GLC_StructOccurence::GLC_StructOccurence().

void GLC_StructInstance::structOccurenceDeleted ( GLC_StructOccurence pOccurence)
inline

Definition at line 125 of file glc_structinstance.h.

Referenced by GLC_StructOccurence::~GLC_StructOccurence().

GLC_StructReference* GLC_StructInstance::structReference ( ) const
inline
GLC_StructInstance* GLC_StructInstance::translate ( double  Tx,
double  Ty,
double  Tz 
)
inline

Translate Instance.

Definition at line 138 of file glc_structinstance.h.

GLC_StructInstance* GLC_StructInstance::translate ( const GLC_Vector3d v)
inline

Translate Instance.

Definition at line 145 of file glc_structinstance.h.

References GLC_Vector3d::x(), GLC_Vector3d::y(), and GLC_Vector3d::z().

void GLC_StructInstance::updateOccurencesAbsoluteMatrix ( )

Update absolute matrix off children and all occurences of this instance.

Definition at line 184 of file glc_structinstance.cpp.

References m_ListOfOccurences.

int GLC_StructInstance::usageCount ( ) const
inline

Return the number of usage of this instance.

Definition at line 109 of file glc_structinstance.h.

Member Data Documentation

QList<GLC_StructOccurence*> GLC_StructInstance::m_ListOfOccurences
private

The list of instance's occurences.

Definition at line 192 of file glc_structinstance.h.

Referenced by updateOccurencesAbsoluteMatrix().

QString GLC_StructInstance::m_Name
private

The instance Name.

Definition at line 198 of file glc_structinstance.h.

Referenced by GLC_StructInstance(), and setReference().

GLC_Attributes* GLC_StructInstance::m_pAttributes
private

The Reference attributes.

Definition at line 201 of file glc_structinstance.h.

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

int* GLC_StructInstance::m_pNumberOfInstance
private

Number of this Instance.

Definition at line 186 of file glc_structinstance.h.

Referenced by GLC_StructInstance(), setReference(), and ~GLC_StructInstance().

GLC_StructReference* GLC_StructInstance::m_pStructReference
private

The Struct reference of this instance.

Definition at line 189 of file glc_structinstance.h.

Referenced by GLC_StructInstance(), setReference(), and ~GLC_StructInstance().

GLC_Matrix4x4 GLC_StructInstance::m_RelativeMatrix
private

The relative matrix.

Definition at line 195 of file glc_structinstance.h.


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

©2005-2013 Laurent Ribon