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_StructReference & | operator= (const GLC_StructReference &) |
| Overload "=" operator. | |
| virtual | ~GLC_StructReference () |
| Destructor. | |
Get Functions | |
| bool | hasStructInstance () const |
| Return true if this reference has instance. | |
| GLC_StructInstance * | firstInstanceHandle () 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_Rep * | representationHandle () 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_Attributes * | attributesHandle () 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. | |
| bool | addChild (GLC_StructOccurence *pOccurence) |
| Add the given occurence as a child. | |
Private Attributes | |
| QSet< GLC_StructInstance * > | m_SetOfInstance |
| The Set of reference's instances. | |
| GLC_Rep * | m_pRepresentation |
| The representation of reference. | |
| QString | m_Name |
| The Reference Name. | |
| GLC_Attributes * | m_pAttributes |
| The Reference attributes. | |
GLC_StructReference : A scene graph reference node.
Definition at line 44 of file glc_structreference.h.
| 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.
| bool GLC_StructReference::addChild | ( | GLC_StructOccurence * | pOccurence | ) |
Add the given occurence as a child.
Return true on success
Definition at line 244 of file glc_structreference.cpp.
References GLC_StructOccurence::addChild(), GLC_StructOccurence::clone(), firstInstanceHandle(), hasStructInstance(), GLC_StructInstance::listOfStructOccurences(), m_SetOfInstance, and GLC_StructOccurence::worldHandle().
| 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] |
Return first instance handle.
Definition at line 76 of file glc_structreference.h.
Referenced by addChild(), GLC_StructInstance::GLC_StructInstance(), GLC_StructOccurence::setReference(), and GLC_StructInstance::setReference().
| bool GLC_StructReference::hasRepresentation | ( | ) | const [inline] |
Return true if this reference has a representation.
Definition at line 91 of file glc_structreference.h.
Referenced by GLC_3dxmlToWorld::create3DrepFrom3dxmlRep(), GLC_WorldTo3dxml::exportAssemblyFromOccurence(), GLC_StructOccurence::hasRepresentation(), GLC_3dxmlToWorld::loadExternRepresentations(), and GLC_3dxmlToWorld::loadLocalRepresentations().
| bool GLC_StructReference::hasStructInstance | ( | ) | const [inline] |
Return true if this reference has instance.
Definition at line 72 of file glc_structreference.h.
Referenced by addChild(), GLC_3dxmlToWorld::createUnfoldedTree(), GLC_StructInstance::GLC_StructInstance(), GLC_3dxmlToWorld::loadProductStructure(), GLC_StructOccurence::setReference(), GLC_StructInstance::setReference(), and GLC_StructInstance::~GLC_StructInstance().
| 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.
| bool GLC_StructReference::loadRepresentation | ( | ) |
Load the representation.
The representation must exists
Definition at line 205 of file glc_structreference.cpp.
References GLC_StructOccurence::create3DViewInstance(), GLC_StructOccurence::has3DViewInstance(), GLC_Rep::load(), m_pRepresentation, setOfStructOccurence(), and GLC_StructOccurence::useAutomatic3DViewInstanceCreation().
Referenced by GLC_StructOccurence::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] |
Return the name.
Definition at line 99 of file glc_structreference.h.
Referenced by GLC_3dxmlToWorld::create3DrepFrom3dxmlRep(), GLC_3dxmlToWorld::createUnfoldedTree(), GLC_StructInstance::GLC_StructInstance(), GLC_3dxmlToWorld::loadExternRepresentations(), GLC_3dxmlToWorld::loadLocalRepresentations(), GLC_3dxmlToWorld::loadProductStructure(), GLC_StructInstance::setReference(), GLC_WorldTo3dxml::writeReference3D(), and GLC_StructOccurence::~GLC_StructOccurence().
| 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 |
Return the representation of this reference.
The representation must exists
Definition at line 153 of file glc_structreference.cpp.
References m_pRepresentation.
Referenced by GLC_WorldHandle::addOccurence(), GLC_3dxmlToWorld::create3DrepFrom3dxmlRep(), GLC_StructOccurence::create3DViewInstance(), GLC_WorldTo3dxml::exportAssemblyFromOccurence(), GLC_3dxmlToWorld::loadExternRepresentations(), and GLC_3dxmlToWorld::loadLocalRepresentations().
| 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 | ) |
Set the reference representation.
Definition at line 114 of file glc_structreference.cpp.
References GLC_StructOccurence::create3DViewInstance(), GLC_StructOccurence::has3DViewInstance(), GLC_Rep::isLoaded(), m_pRepresentation, setOfStructOccurence(), and GLC_StructOccurence::useAutomatic3DViewInstanceCreation().
Referenced by GLC_3dxmlToWorld::loadExternRepresentations(), and GLC_3dxmlToWorld::loadLocalRepresentations().
| 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().
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] |
The representation of reference.
Definition at line 228 of file glc_structreference.h.
Referenced by GLC_StructReference(), loadRepresentation(), operator=(), representationFileName(), representationHandle(), representationIsEmpty(), representationIsLoaded(), representationName(), setRepresentation(), setRepresentationName(), unloadRepresentation(), and ~GLC_StructReference().
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 addChild(), and operator=().