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

GLC_StructReference : A scene graph reference node. More...

#include <glc_structreference.h>

Public Member Functions

Constructor / Destructor
 GLC_StructReference (const QString &name=QString())
 Default Constructor.
 
 GLC_StructReference (GLC_Rep *)
 Create reference with representation.
 
 GLC_StructReference (const GLC_StructReference &)
 Copy constructor.
 
GLC_StructReferenceoperator= (const GLC_StructReference &)
 Overload "=" operator.
 
virtual ~GLC_StructReference ()
 Destructor.
 
Get Functions
bool hasStructInstance () const
 Return true if this reference has instance.
 
GLC_StructInstancefirstInstanceHandle () const
 Return first instance handle.
 
QList< GLC_StructInstance * > listOfStructInstances () const
 Return the list of instance of this reference.
 
QSet< GLC_StructOccurence * > setOfStructOccurence () const
 Return the Set of occurence of this reference.
 
QList< GLC_StructOccurence * > listOfStructOccurence () const
 Return the list of occurence of this reference.
 
bool hasRepresentation () const
 Return true if this reference has a representation.
 
GLC_ReprepresentationHandle () const
 Return the representation of this reference.
 
QString name () const
 Return the name.
 
unsigned int numberOfFaces () const
 Get number of faces.
 
unsigned int numberOfVertex () const
 Get number of vertex.
 
unsigned int numberOfMaterials () const
 Get number of materials.
 
unsigned int numberOfBody () const
 Return the number of body.
 
QSet< GLC_Material * > materialSet () const
 Get materials List.
 
bool containsAttributes () const
 Return true if the reference contains User attributes.
 
GLC_AttributesattributesHandle () const
 Return handle to the reference attributes.
 
QString representationName () const
 Return the name of the representation.
 
bool representationIsLoaded () const
 Return true if the representation is loaded.
 
QString representationFileName () const
 Return the representation file name.
 
bool representationIsEmpty () const
 Return true if the representation is empty or if there is no representation.
 
Set Functions
void structInstanceCreated (GLC_StructInstance *pInstance)
 An Instance of this reference have been created.
 
void structInstanceDeleted (GLC_StructInstance *pInstance)
 An Instance of this reference have been deleted.
 
void setName (const QString &name)
 Set the reference name.
 
void setRepresentation (const GLC_3DRep &rep)
 Set the reference representation.
 
void setAttributes (const GLC_Attributes &attr)
 Set the reference attributes.
 
void setRepresentationName (const QString &representationName)
 Set the representation name.
 
bool loadRepresentation ()
 Load the representation.
 
bool unloadRepresentation ()
 Unload the representation.
 
QList< GLC_StructOccurence * > addChild (GLC_StructOccurence *pOccurence)
 Add the given occurence as a child of all occurrences of this reference.
 

Private Attributes

QSet< GLC_StructInstance * > m_SetOfInstance
 The Set of reference's instances.
 
GLC_Repm_pRepresentation
 The representation of reference.
 
QString m_Name
 The Reference Name.
 
GLC_Attributesm_pAttributes
 The Reference attributes.
 

Detailed Description

GLC_StructReference : A scene graph reference node.

Definition at line 44 of file glc_structreference.h.

Constructor & Destructor Documentation

GLC_StructReference::GLC_StructReference ( const QString &  name = QString())

Default Constructor.

Definition at line 29 of file glc_structreference.cpp.

GLC_StructReference::GLC_StructReference ( GLC_Rep pRep)

Create reference with representation.

Definition at line 40 of file glc_structreference.cpp.

GLC_StructReference::GLC_StructReference ( const GLC_StructReference ref)

Copy constructor.

Definition at line 50 of file glc_structreference.cpp.

References GLC_Rep::clone(), and m_pRepresentation.

GLC_StructReference::~GLC_StructReference ( )
virtual

Destructor.

Definition at line 82 of file glc_structreference.cpp.

References m_pAttributes, and m_pRepresentation.

Member Function Documentation

QList< GLC_StructOccurence * > GLC_StructReference::addChild ( GLC_StructOccurence pOccurence)

Add the given occurence as a child of all occurrences of this reference.

Return the list of added occurence

Definition at line 244 of file glc_structreference.cpp.

References GLC_StructOccurence::addChild(), firstInstanceHandle(), hasStructInstance(), listOfStructOccurence(), and GLC_StructOccurence::structInstance().

GLC_Attributes* GLC_StructReference::attributesHandle ( ) const
inline

Return handle to the reference attributes.

Definition at line 155 of file glc_structreference.h.

Referenced by GLC_WorldTo3dxml::writeReference3D().

bool GLC_StructReference::containsAttributes ( ) const
inline

Return true if the reference contains User attributes.

Definition at line 151 of file glc_structreference.h.

Referenced by GLC_WorldTo3dxml::writeReference3D().

GLC_StructInstance* GLC_StructReference::firstInstanceHandle ( ) const
inline
bool GLC_StructReference::hasRepresentation ( ) const
inline
bool GLC_StructReference::hasStructInstance ( ) const
inline
QList<GLC_StructInstance*> GLC_StructReference::listOfStructInstances ( ) const
inline

Return the list of instance of this reference.

Definition at line 80 of file glc_structreference.h.

Referenced by GLC_3dxmlToWorld::createUnfoldedTree(), setOfStructOccurence(), and GLC_StructOccurence::setReference().

QList<GLC_StructOccurence*> GLC_StructReference::listOfStructOccurence ( ) const
inline

Return the list of occurence of this reference.

Definition at line 87 of file glc_structreference.h.

Referenced by addChild(), and GLC_StructOccurence::swap().

bool GLC_StructReference::loadRepresentation ( )
QSet<GLC_Material*> GLC_StructReference::materialSet ( ) const
inline

Get materials List.

Definition at line 142 of file glc_structreference.h.

References GLC_3DRep::materialSet().

Referenced by GLC_StructOccurence::materialSet().

QString GLC_StructReference::name ( ) const
inline
unsigned int GLC_StructReference::numberOfBody ( ) const
inline

Return the number of body.

Definition at line 130 of file glc_structreference.h.

References GLC_3DRep::numberOfBody().

unsigned int GLC_StructReference::numberOfFaces ( ) const
inline

Get number of faces.

Definition at line 103 of file glc_structreference.h.

References GLC_3DRep::faceCount().

Referenced by GLC_StructOccurence::numberOfFaces().

unsigned int GLC_StructReference::numberOfMaterials ( ) const
inline

Get number of materials.

Definition at line 121 of file glc_structreference.h.

References GLC_3DRep::materialCount().

Referenced by GLC_StructOccurence::numberOfMaterials().

unsigned int GLC_StructReference::numberOfVertex ( ) const
inline

Get number of vertex.

Definition at line 112 of file glc_structreference.h.

References GLC_3DRep::vertexCount().

Referenced by GLC_StructOccurence::numberOfVertex().

GLC_StructReference & GLC_StructReference::operator= ( const GLC_StructReference ref)

Overload "=" operator.

Definition at line 63 of file glc_structreference.cpp.

References GLC_Rep::clone(), m_Name, m_pAttributes, m_pRepresentation, and m_SetOfInstance.

QString GLC_StructReference::representationFileName ( ) const

Return the representation file name.

Definition at line 178 of file glc_structreference.cpp.

References GLC_Rep::fileName(), and m_pRepresentation.

GLC_Rep * GLC_StructReference::representationHandle ( ) const
bool GLC_StructReference::representationIsEmpty ( ) const

Return true if the representation is empty or if there is no representation.

Definition at line 187 of file glc_structreference.cpp.

References GLC_Rep::isEmpty(), and m_pRepresentation.

bool GLC_StructReference::representationIsLoaded ( ) const

Return true if the representation is loaded.

Definition at line 168 of file glc_structreference.cpp.

References GLC_Rep::isLoaded(), and m_pRepresentation.

Referenced by GLC_WorldHandle::addOccurence(), GLC_StructOccurence::loadRepresentation(), and GLC_StructOccurence::unloadRepresentation().

QString GLC_StructReference::representationName ( ) const

Return the name of the representation.

Definition at line 159 of file glc_structreference.cpp.

References m_pRepresentation, and GLC_Rep::name().

Referenced by GLC_3dxmlToWorld::loadExternRepresentations().

void GLC_StructReference::setAttributes ( const GLC_Attributes attr)
inline

Set the reference attributes.

Definition at line 196 of file glc_structreference.h.

Referenced by GLC_3dxmlToWorld::loadReference3D().

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

Set the reference name.

Definition at line 189 of file glc_structreference.h.

Referenced by GLC_3dxmlToWorld::loadExternalRef3D(), and GLC_3dxmlToWorld::loadReference3D().

QSet< GLC_StructOccurence * > GLC_StructReference::setOfStructOccurence ( ) const

Return the Set of occurence of this reference.

Definition at line 93 of file glc_structreference.cpp.

References listOfStructInstances().

Referenced by loadRepresentation(), setRepresentation(), unloadRepresentation(), and GLC_StructOccurence::unloadRepresentation().

void GLC_StructReference::setRepresentation ( const GLC_3DRep rep)
void GLC_StructReference::setRepresentationName ( const QString &  representationName)

Set the representation name.

Definition at line 197 of file glc_structreference.cpp.

References m_pRepresentation, and GLC_Rep::setName().

Referenced by GLC_3dxmlToWorld::loadExternRepresentations(), and GLC_3dxmlToWorld::loadLocalRepresentations().

void GLC_StructReference::structInstanceCreated ( GLC_StructInstance pInstance)
inline

An Instance of this reference have been created.

Definition at line 178 of file glc_structreference.h.

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

void GLC_StructReference::structInstanceDeleted ( GLC_StructInstance pInstance)
inline

An Instance of this reference have been deleted.

Definition at line 185 of file glc_structreference.h.

Referenced by GLC_StructInstance::~GLC_StructInstance().

bool GLC_StructReference::unloadRepresentation ( )

Unload the representation.

The representation must exists

Definition at line 227 of file glc_structreference.cpp.

References m_pRepresentation, setOfStructOccurence(), and GLC_Rep::unload().

Referenced by GLC_StructOccurence::unloadRepresentation().

Member Data Documentation

QString GLC_StructReference::m_Name
private

The Reference Name.

Definition at line 231 of file glc_structreference.h.

Referenced by operator=().

GLC_Attributes* GLC_StructReference::m_pAttributes
private

The Reference attributes.

Definition at line 234 of file glc_structreference.h.

Referenced by operator=(), and ~GLC_StructReference().

GLC_Rep* GLC_StructReference::m_pRepresentation
private
QSet<GLC_StructInstance*> GLC_StructReference::m_SetOfInstance
private

The Set of reference's instances.

Definition at line 225 of file glc_structreference.h.

Referenced by operator=().


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

©2005-2013 Laurent Ribon