GLC_3dxmlToWorld : Create an GLC_World from 3dxml file. More...
#include <glc_3dxmltoworld.h>
Classes | |
| struct | AssyLink |
| AssyLink : Assemblage link between parent id and GLC_StructInstance*. More... | |
| class | MaterialRef |
| MaterialRef : Material reference containing id, name and associated file. More... | |
| class | OccurenceAttrib |
| OccurenceAttrib : Specifique occurence attribute. More... | |
| class | RepLink |
| RepLink : Representation link between reference id and representation id. More... | |
Signals | |
| void | currentQuantum (int) |
Public Member Functions | |
Constructor / Destructor | |
| GLC_3dxmlToWorld () | |
| Default constructor. | |
| virtual | ~GLC_3dxmlToWorld () |
Set Functions | |
| GLC_World * | createWorldFrom3dxml (QFile &, bool StructureOnly, bool getExternalRef=false) |
| Create an GLC_World from an input 3DXML File. | |
| GLC_3DRep | create3DrepFrom3dxmlRep (const QString &) |
| Create 3DRep from an 3DXML rep. | |
| QStringList | listOfAttachedFileName () const |
| Get the list of attached files. | |
Private Types | |
| typedef QHash< unsigned int, GLC_StructReference * > | ReferenceHash |
| typedef QHash < GLC_StructInstance *, unsigned int > | InstanceOfHash |
| typedef QHash < GLC_StructInstance *, QString > | InstanceOfExtRefHash |
| typedef QSet< const QString > | SetOfExtRef |
| typedef QList< AssyLink > | AssyLinkList |
| typedef QList< RepLink > | RepLinkList |
| typedef QHash< const QString, GLC_StructReference * > | ExternalReferenceHash |
| typedef QHash< const QString, GLC_Material * > | MaterialHash |
| typedef QHash< const unsigned int, QString > | ReferenceRepHash |
Private Member Functions | |
Private services functions | |
| void | loadManifest () |
| Load the 3dxml's manifest. | |
| void | clear () |
| Close all files and clear memmory. | |
| void | goToRepId (const QString &) |
| Go to a Rep of a xml. | |
| void | gotToPolygonalRepType () |
| Go to Polygonal Rep Type. | |
| QString | readAttribute (const QString &, bool required=false) |
| Read the specified attribute. | |
| void | loadProductStructure () |
| Load the product structure. | |
| void | loadReference3D () |
| Load a Reference3D. | |
| void | loadInstance3D () |
| Load a Instance3D. | |
| void | loadReferenceRep () |
| Load a Reference representation. | |
| void | loadInstanceRep () |
| Load a Instance representation. | |
| void | loadExternalRef3D () |
| Load External Ref. | |
| GLC_StructReference * | createReferenceRep (QString id, GLC_3DRep *pRep) |
| Add a reference from 3dxml to m_ExternalReferenceHash. | |
| GLC_Matrix4x4 | loadMatrix (const QString &) |
| Load Matrix. | |
| void | createUnfoldedTree () |
| Create the unfolded tree. | |
| void | checkForXmlError (const QString &) |
| void | loadLOD (GLC_Mesh *) |
| Load Level of detail. | |
| void | loadFace (GLC_Mesh *, const int lod, double accuracy) |
| Load a face. | |
| void | loadPolyline (GLC_Mesh *) |
| Load polyline. | |
| void | clearMaterialHash () |
| Clear material hash. | |
| GLC_Material * | loadSurfaceAttributes () |
| Load surface attributes. | |
| GLC_Material * | getMaterial () |
| get material | |
| bool | setStreamReaderToFile (QString, bool test=false) |
| Set the stream reader to the specified file. | |
| void | loadGraphicsProperties () |
| Load graphics properties. | |
| void | loadDefaultViewProperty () |
| Load default view property. | |
| void | loadLocalRepresentations () |
| Load the local representation. | |
| void | loadExternRepresentations () |
| Load the extern representation. | |
| GLC_3DRep | loadCurrentExtRep () |
| Return the instance of the current extern representation. | |
| void | loadCatMaterialRef () |
| Load CatMaterial Ref if present. | |
| void | loadMaterialDef (const MaterialRef &) |
| Create material from material def file. | |
| void | loadCatRepImage () |
| Load CATRepIage if present. | |
| GLC_Texture * | loadTexture (QString) |
| Try to construct a texture with the specified fileName. | |
| void | factorizeMaterial (GLC_3DRep *) |
| Factorize material use. | |
| void | setRepresentationFileName (GLC_3DRep *pRep) |
| Set fileName of the given 3DRep. | |
| QXmlStreamReader::TokenType | readNext () |
| Read next element from the stream. | |
| bool | goToElement (QXmlStreamReader *pReader, const QString &element) |
| Go to the given xml Element, return true on succes. | |
| QString | getContent (QXmlStreamReader *pReader, const QString &element) |
| QString | readAttribute (QXmlStreamReader *pReader, const QString &attribute) |
| Read the specified attribute. | |
| bool | endElementNotReached (QXmlStreamReader *pReader, const QString &element) |
| Return true if the end of specified element is not reached. | |
| bool | startElementNotReached (QXmlStreamReader *pReader, const QString &element) |
| Return true if the start of specified element is not reached. | |
| void | goToEndElement (QXmlStreamReader *pReader, const QString &element) |
| Go to the end Element of a xml. | |
| void | checkFileValidity (QIODevice *pIODevice) |
| Check if the given file is binary. | |
Private Attributes | |
| QXmlStreamReader * | m_pStreamReader |
| Xml Reader. | |
| QString | m_FileName |
| The 3dxml fileName. | |
| QuaZip * | m_p3dxmlArchive |
| The Quazip archive. | |
| QFile * | m_pCurrentFile |
| The current file (if there is no archive). | |
| QString | m_RootName |
| The root Name of the 3dxml file. | |
| GLC_World * | m_pWorld |
| The World to return. | |
| ReferenceHash | m_ReferenceHash |
| Reference Hash Table. | |
| AssyLinkList | m_AssyLinkList |
| The Structure Link Hash Table. | |
| InstanceOfHash | m_InstanceOf |
| Instance of Hash table. | |
| SetOfExtRef | m_SetOfExtRef |
| The set of ext ref to load. | |
| InstanceOfExtRefHash | m_InstanceOfExtRefHash |
| Instance of ext ref hash table. | |
| ExternalReferenceHash | m_ExternalReferenceHash |
| Externam reference hash table. | |
| MaterialHash | m_MaterialHash |
| Hash table of material. | |
| bool | m_IsInArchive |
| Flag to know if the 3dxml is in an archive. | |
| ReferenceRepHash | m_ReferenceRepHash |
| The Reference representation hash table. | |
| RepLinkList | m_LocalRepLinkList |
| The list of local representation link. | |
| RepLinkList | m_ExternRepLinkList |
| The list of extern representation link. | |
| SetOfExtRef | m_SetOfExtRep |
| The set of ext rep to load. | |
| GLC_Material * | m_pCurrentMaterial |
| The 3DREP current material. | |
| QHash< QString, QString > | m_TextureImagesHash |
| The image file hash table. | |
| bool | m_LoadStructureOnly |
| Flag indicate the loading method. | |
| QSet< QString > | m_SetOfAttachedFileName |
| The Set of attached file name. | |
| QString | m_CurrentFileName |
| The current file name. | |
| QDateTime | m_CurrentDateTime |
| The current file time and date. | |
| QHash< unsigned int, OccurenceAttrib * > | m_OccurenceAttrib |
| Hash table of occurence specific attributes. | |
| bool | m_GetExternalRef3DName |
| bool get external ref 3D name | |
| QList< QByteArray > | m_ByteArrayList |
Static Private Attributes | |
| static QMutex | m_ZipMutex |
GLC_3dxmlToWorld : Create an GLC_World from 3dxml file.
Definition at line 51 of file glc_3dxmltoworld.h.
typedef QList<AssyLink> GLC_3dxmlToWorld::AssyLinkList [private] |
Definition at line 102 of file glc_3dxmltoworld.h.
typedef QHash<const QString, GLC_StructReference*> GLC_3dxmlToWorld::ExternalReferenceHash [private] |
Definition at line 104 of file glc_3dxmltoworld.h.
typedef QHash<GLC_StructInstance*, QString> GLC_3dxmlToWorld::InstanceOfExtRefHash [private] |
Definition at line 100 of file glc_3dxmltoworld.h.
typedef QHash<GLC_StructInstance*, unsigned int> GLC_3dxmlToWorld::InstanceOfHash [private] |
Definition at line 99 of file glc_3dxmltoworld.h.
typedef QHash<const QString, GLC_Material*> GLC_3dxmlToWorld::MaterialHash [private] |
Definition at line 105 of file glc_3dxmltoworld.h.
typedef QHash<unsigned int, GLC_StructReference*> GLC_3dxmlToWorld::ReferenceHash [private] |
Definition at line 98 of file glc_3dxmltoworld.h.
typedef QHash<const unsigned int, QString> GLC_3dxmlToWorld::ReferenceRepHash [private] |
Definition at line 106 of file glc_3dxmltoworld.h.
typedef QList<RepLink> GLC_3dxmlToWorld::RepLinkList [private] |
Definition at line 103 of file glc_3dxmltoworld.h.
typedef QSet<const QString> GLC_3dxmlToWorld::SetOfExtRef [private] |
Definition at line 101 of file glc_3dxmltoworld.h.
| GLC_3dxmlToWorld::GLC_3dxmlToWorld | ( | ) |
Default constructor.
Definition at line 48 of file glc_3dxmltoworld.cpp.
| GLC_3dxmlToWorld::~GLC_3dxmlToWorld | ( | ) | [virtual] |
Definition at line 81 of file glc_3dxmltoworld.cpp.
References clearMaterialHash(), m_OccurenceAttrib, m_p3dxmlArchive, m_pCurrentFile, and m_pStreamReader.
| void GLC_3dxmlToWorld::checkFileValidity | ( | QIODevice * | pIODevice | ) | [private] |
Check if the given file is binary.
Definition at line 2254 of file glc_3dxmltoworld.cpp.
References clear(), GLC_FileFormatException::FileNotSupported, and m_CurrentFileName.
Referenced by setStreamReaderToFile().
| void GLC_3dxmlToWorld::checkForXmlError | ( | const QString & | info | ) | [private] |
Check for XML error Throw ecxeption if error occur
Definition at line 1226 of file glc_3dxmltoworld.cpp.
References GLC_ErrorLog::addError(), clear(), m_CurrentFileName, m_FileName, m_pStreamReader, and GLC_FileFormatException::WrongFileFormat.
Referenced by createReferenceRep(), loadCatMaterialRef(), loadCatRepImage(), loadCurrentExtRep(), loadLOD(), loadMaterialDef(), and loadSurfaceAttributes().
| void GLC_3dxmlToWorld::clear | ( | ) | [private] |
Close all files and clear memmory.
Definition at line 276 of file glc_3dxmltoworld.cpp.
References clearMaterialHash(), m_ByteArrayList, m_p3dxmlArchive, m_pCurrentFile, m_pStreamReader, m_pWorld, and m_SetOfAttachedFileName.
Referenced by checkFileValidity(), checkForXmlError(), createReferenceRep(), createWorldFrom3dxml(), loadCurrentExtRep(), loadDefaultViewProperty(), loadGraphicsProperties(), loadManifest(), loadProductStructure(), loadReferenceRep(), loadTexture(), readAttribute(), and setStreamReaderToFile().
| void GLC_3dxmlToWorld::clearMaterialHash | ( | ) | [private] |
Clear material hash.
Definition at line 1378 of file glc_3dxmltoworld.cpp.
References m_MaterialHash.
Referenced by clear(), and ~GLC_3dxmlToWorld().
| GLC_3DRep GLC_3dxmlToWorld::create3DrepFrom3dxmlRep | ( | const QString & | fileName | ) |
Create 3DRep from an 3DXML rep.
Definition at line 155 of file glc_3dxmltoworld.cpp.
References glc::archiveEntryFileName(), glc::archiveFileName(), GLC_CacheManager::binary3DRep(), GLC_State::cacheIsUsed(), GLC_3DRep::clean(), createReferenceRep(), GLC_State::currentCacheManager(), GLC_StructReference::hasRepresentation(), glc::isArchiveString(), glc::isFileString(), GLC_CacheManager::isUsable(), loadCurrentExtRep(), GLC_BSRep::loadRep(), m_CurrentDateTime, m_CurrentFileName, m_FileName, m_IsInArchive, m_p3dxmlArchive, m_ZipMutex, GLC_StructReference::name(), GLC_StructReference::representationHandle(), GLC_Rep::setName(), setRepresentationFileName(), and setStreamReaderToFile().
Referenced by GLC_Factory::create3DRepFromFile().
| GLC_StructReference * GLC_3dxmlToWorld::createReferenceRep | ( | QString | id, | |
| GLC_3DRep * | pRep | |||
| ) | [private] |
Add a reference from 3dxml to m_ExternalReferenceHash.
Definition at line 821 of file glc_3dxmltoworld.cpp.
References GLC_ErrorLog::addError(), GLC_3DRep::addGeom(), GLC_Mesh::addNormals(), GLC_Mesh::addTexels(), GLC_CacheManager::addToCache(), GLC_Mesh::addVertice(), GLC_State::cacheIsUsed(), checkForXmlError(), GLC_3DRep::clean(), clear(), GLC_State::currentCacheManager(), endElementNotReached(), GLC_Rep::fileName(), GLC_FileFormatException::FileNotSupported, GLC_Mesh::finish(), getContent(), goToElement(), goToRepId(), gotToPolygonalRepType(), GLC_3DRep::isEmpty(), loadFace(), loadLOD(), loadPolyline(), m_CurrentDateTime, m_CurrentFileName, m_FileName, m_pStreamReader, readAttribute(), readNext(), GLC_Rep::setLastModified(), GLC_Geometry::setName(), GLC_Rep::setName(), setRepresentationFileName(), setStreamReaderToFile(), startElementNotReached(), and GLC_FileFormatException::WrongFileFormat.
Referenced by create3DrepFrom3dxmlRep(), loadExternalRef3D(), and loadLocalRepresentations().
| void GLC_3dxmlToWorld::createUnfoldedTree | ( | ) | [private] |
Create the unfolded tree.
Definition at line 1109 of file glc_3dxmltoworld.cpp.
References GLC_StructOccurence::addChild(), GLC_ErrorLog::addError(), GLC_StructInstance::firstOccurenceHandle(), GLC_StructReference::hasStructInstance(), GLC_StructInstance::hasStructOccurence(), GLC_StructOccurence::isOrphan(), GLC_StructReference::listOfStructInstances(), GLC_StructInstance::listOfStructOccurences(), m_AssyLinkList, m_FileName, m_pWorld, m_ReferenceHash, GLC_StructOccurence::name(), GLC_StructInstance::name(), GLC_StructReference::name(), GLC_World::rootOccurence(), GLC_StructInstance::setReference(), GLC_StructInstance::structReference(), GLC_StructOccurence::updateChildrenAbsoluteMatrix(), and GLC_World::worldHandle().
Referenced by loadProductStructure().
| GLC_World * GLC_3dxmlToWorld::createWorldFrom3dxml | ( | QFile & | file, | |
| bool | StructureOnly, | |||
| bool | getExternalRef = false | |||
| ) |
Create an GLC_World from an input 3DXML File.
Definition at line 106 of file glc_3dxmltoworld.cpp.
References clear(), currentQuantum(), loadCatMaterialRef(), loadCatRepImage(), loadManifest(), loadProductStructure(), m_CurrentDateTime, m_FileName, m_GetExternalRef3DName, m_IsInArchive, m_LoadStructureOnly, m_p3dxmlArchive, m_pWorld, and m_RootName.
Referenced by GLC_FileLoader::createWorldFromFile(), and GLC_Factory::createWorldStructureFrom3dxml().
| void GLC_3dxmlToWorld::currentQuantum | ( | int | ) | [signal] |
Referenced by createWorldFrom3dxml(), loadExternalRef3D(), and loadExternRepresentations().
| bool GLC_3dxmlToWorld::endElementNotReached | ( | QXmlStreamReader * | pReader, | |
| const QString & | element | |||
| ) | [inline, private] |
Return true if the end of specified element is not reached.
Definition at line 405 of file glc_3dxmltoworld.h.
Referenced by createReferenceRep(), getContent(), goToEndElement(), gotToPolygonalRepType(), loadCatMaterialRef(), loadCatRepImage(), loadCurrentExtRep(), loadDefaultViewProperty(), loadFace(), loadGraphicsProperties(), loadInstance3D(), loadLocalRepresentations(), loadLOD(), loadMaterialDef(), loadProductStructure(), loadReference3D(), and loadSurfaceAttributes().
| void GLC_3dxmlToWorld::factorizeMaterial | ( | GLC_3DRep * | pRep | ) | [private] |
Factorize material use.
The hash table of rep material
Definition at line 2202 of file glc_3dxmltoworld.cpp.
References GLC_Material::hashCode(), GLC_Object::id(), m_MaterialHash, GLC_3DRep::materialSet(), and GLC_3DRep::replaceMaterial().
Referenced by loadExternalRef3D(), and loadExternRepresentations().
| QString GLC_3dxmlToWorld::getContent | ( | QXmlStreamReader * | pReader, | |
| const QString & | element | |||
| ) | [inline, private] |
Definition at line 385 of file glc_3dxmltoworld.h.
References endElementNotReached(), and readNext().
Referenced by createReferenceRep(), loadCurrentExtRep(), loadDefaultViewProperty(), loadInstance3D(), loadInstanceRep(), and loadManifest().
| GLC_Material * GLC_3dxmlToWorld::getMaterial | ( | ) | [private] |
get material
Definition at line 1422 of file glc_3dxmltoworld.cpp.
References GLC_Material::hashCode(), m_MaterialHash, readAttribute(), GLC_Material::setAmbientColor(), GLC_Object::setName(), GLC_Material::setOpacity(), GLC_Material::setShininess(), and GLC_Material::setSpecularColor().
Referenced by loadSurfaceAttributes().
| bool GLC_3dxmlToWorld::goToElement | ( | QXmlStreamReader * | pReader, | |
| const QString & | element | |||
| ) | [inline, private] |
Go to the given xml Element, return true on succes.
Definition at line 376 of file glc_3dxmltoworld.h.
References readNext().
Referenced by createReferenceRep(), loadCatMaterialRef(), loadCatRepImage(), loadDefaultViewProperty(), loadLocalRepresentations(), loadMaterialDef(), and loadProductStructure().
| void GLC_3dxmlToWorld::goToEndElement | ( | QXmlStreamReader * | pReader, | |
| const QString & | element | |||
| ) | [inline, private] |
Go to the end Element of a xml.
Definition at line 415 of file glc_3dxmltoworld.h.
References endElementNotReached(), and readNext().
| void GLC_3dxmlToWorld::goToRepId | ( | const QString & | id | ) | [private] |
Go to a Rep of a xml.
Definition at line 307 of file glc_3dxmltoworld.cpp.
References m_pStreamReader, and readNext().
Referenced by createReferenceRep().
| void GLC_3dxmlToWorld::gotToPolygonalRepType | ( | ) | [private] |
Go to Polygonal Rep Type.
Definition at line 318 of file glc_3dxmltoworld.cpp.
References endElementNotReached(), m_pStreamReader, and readNext().
Referenced by createReferenceRep(), and loadCurrentExtRep().
| QStringList GLC_3dxmlToWorld::listOfAttachedFileName | ( | ) | const [inline] |
Get the list of attached files.
Definition at line 130 of file glc_3dxmltoworld.h.
Referenced by GLC_FileLoader::createWorldFromFile().
| void GLC_3dxmlToWorld::loadCatMaterialRef | ( | ) | [private] |
Load CatMaterial Ref if present.
Definition at line 1974 of file glc_3dxmltoworld.cpp.
References checkForXmlError(), endElementNotReached(), goToElement(), loadMaterialDef(), GLC_3dxmlToWorld::MaterialRef::m_AssociatedFile, GLC_3dxmlToWorld::MaterialRef::m_Id, GLC_3dxmlToWorld::MaterialRef::m_Name, m_pStreamReader, readAttribute(), readNext(), and setStreamReaderToFile().
Referenced by createWorldFrom3dxml().
| void GLC_3dxmlToWorld::loadCatRepImage | ( | ) | [private] |
Load CATRepIage if present.
Definition at line 2103 of file glc_3dxmltoworld.cpp.
References checkForXmlError(), endElementNotReached(), goToElement(), m_pStreamReader, m_TextureImagesHash, readAttribute(), readNext(), and setStreamReaderToFile().
Referenced by createWorldFrom3dxml().
| GLC_3DRep GLC_3dxmlToWorld::loadCurrentExtRep | ( | ) | [private] |
Return the instance of the current extern representation.
Definition at line 1810 of file glc_3dxmltoworld.cpp.
References GLC_ErrorLog::addError(), GLC_3DRep::addGeom(), GLC_Mesh::addNormals(), GLC_Mesh::addTexels(), GLC_CacheManager::addToCache(), GLC_Mesh::addVertice(), GLC_State::cacheIsUsed(), checkForXmlError(), GLC_3DRep::clean(), clear(), GLC_State::currentCacheManager(), endElementNotReached(), GLC_Mesh::finish(), getContent(), gotToPolygonalRepType(), loadFace(), loadLOD(), loadPolyline(), m_CurrentDateTime, m_CurrentFileName, m_FileName, m_pCurrentMaterial, m_pStreamReader, readAttribute(), readNext(), GLC_Rep::setLastModified(), GLC_Rep::setName(), setRepresentationFileName(), startElementNotReached(), and GLC_FileFormatException::WrongFileFormat.
Referenced by create3DrepFrom3dxmlRep(), and loadExternRepresentations().
| void GLC_3dxmlToWorld::loadDefaultViewProperty | ( | ) | [private] |
Load default view property.
Definition at line 1620 of file glc_3dxmltoworld.cpp.
References clear(), endElementNotReached(), getContent(), goToElement(), m_FileName, GLC_3dxmlToWorld::OccurenceAttrib::m_IsVisible, m_OccurenceAttrib, GLC_3dxmlToWorld::OccurenceAttrib::m_pRenderProperties, m_pStreamReader, glc::OverwriteMaterial, glc::OverwriteTransparency, readAttribute(), readNext(), GLC_Material::setDiffuseColor(), GLC_RenderProperties::setOverwriteMaterial(), GLC_RenderProperties::setOverwriteTransparency(), GLC_RenderProperties::setRenderingMode(), and GLC_FileFormatException::WrongFileFormat.
Referenced by loadGraphicsProperties().
| void GLC_3dxmlToWorld::loadExternalRef3D | ( | ) | [private] |
Load External Ref.
Definition at line 717 of file glc_3dxmltoworld.cpp.
References GLC_ErrorLog::addError(), glc::archiveEntryFileName(), GLC_CacheManager::binary3DRep(), glc::builtArchiveString(), glc::builtFileString(), GLC_State::cacheIsUsed(), createReferenceRep(), GLC_State::currentCacheManager(), currentQuantum(), factorizeMaterial(), GLC_BSRep::loadRep(), m_CurrentDateTime, m_CurrentFileName, m_ExternalReferenceHash, m_FileName, m_GetExternalRef3DName, m_IsInArchive, m_LoadStructureOnly, m_SetOfAttachedFileName, m_SetOfExtRef, GLC_Rep::setFileName(), GLC_StructReference::setName(), setRepresentationFileName(), and setStreamReaderToFile().
Referenced by loadProductStructure().
| void GLC_3dxmlToWorld::loadExternRepresentations | ( | ) | [private] |
Load the extern representation.
Definition at line 1699 of file glc_3dxmltoworld.cpp.
References glc::archiveEntryFileName(), GLC_CacheManager::binary3DRep(), glc::builtArchiveString(), glc::builtFileString(), GLC_State::cacheIsUsed(), GLC_3DRep::clean(), GLC_State::currentCacheManager(), currentQuantum(), factorizeMaterial(), GLC_StructReference::hasRepresentation(), GLC_3DRep::isEmpty(), loadCurrentExtRep(), GLC_BSRep::loadRep(), m_CurrentDateTime, m_CurrentFileName, m_ExternRepLinkList, m_FileName, m_IsInArchive, m_LoadStructureOnly, m_ReferenceHash, m_ReferenceRepHash, m_SetOfAttachedFileName, GLC_StructReference::name(), GLC_StructReference::representationHandle(), GLC_StructReference::representationName(), GLC_Rep::setFileName(), GLC_StructReference::setRepresentation(), setRepresentationFileName(), GLC_StructReference::setRepresentationName(), setStreamReaderToFile(), and GLC_3DRep::take().
Referenced by loadProductStructure().
| void GLC_3dxmlToWorld::loadFace | ( | GLC_Mesh * | pMesh, | |
| const int | lod, | |||
| double | accuracy | |||
| ) | [private] |
Load a face.
Definition at line 1270 of file glc_3dxmltoworld.cpp.
References GLC_ErrorLog::addError(), GLC_Mesh::addTriangles(), GLC_Mesh::addTrianglesFan(), GLC_Mesh::addTrianglesStrip(), endElementNotReached(), loadSurfaceAttributes(), m_CurrentFileName, m_pCurrentMaterial, m_pStreamReader, readAttribute(), and readNext().
Referenced by createReferenceRep(), loadCurrentExtRep(), and loadLOD().
| void GLC_3dxmlToWorld::loadGraphicsProperties | ( | ) | [private] |
Load graphics properties.
Definition at line 1588 of file glc_3dxmltoworld.cpp.
References clear(), endElementNotReached(), loadDefaultViewProperty(), m_FileName, m_pStreamReader, readNext(), and GLC_FileFormatException::WrongFileFormat.
Referenced by loadProductStructure().
| void GLC_3dxmlToWorld::loadInstance3D | ( | ) | [private] |
Load a Instance3D.
Definition at line 586 of file glc_3dxmltoworld.cpp.
References endElementNotReached(), getContent(), GLC_Attributes::insert(), GLC_Attributes::isEmpty(), loadMatrix(), m_AssyLinkList, GLC_3dxmlToWorld::AssyLink::m_InstanceId, m_InstanceOf, m_InstanceOfExtRefHash, GLC_3dxmlToWorld::AssyLink::m_ParentRefId, GLC_3dxmlToWorld::AssyLink::m_pChildInstance, m_pStreamReader, m_SetOfExtRef, GLC_StructInstance::move(), readAttribute(), readNext(), and GLC_StructInstance::setAttributes().
Referenced by loadProductStructure().
| void GLC_3dxmlToWorld::loadInstanceRep | ( | ) | [private] |
Load a Instance representation.
Definition at line 685 of file glc_3dxmltoworld.cpp.
References getContent(), m_ExternRepLinkList, m_LocalRepLinkList, m_pStreamReader, GLC_3dxmlToWorld::RepLink::m_ReferenceId, and GLC_3dxmlToWorld::RepLink::m_RepId.
Referenced by loadProductStructure().
| void GLC_3dxmlToWorld::loadLocalRepresentations | ( | ) | [private] |
Load the local representation.
Definition at line 1546 of file glc_3dxmltoworld.cpp.
References createReferenceRep(), endElementNotReached(), goToElement(), GLC_StructReference::hasRepresentation(), m_LocalRepLinkList, m_pStreamReader, m_ReferenceHash, m_ReferenceRepHash, GLC_StructReference::name(), readAttribute(), readNext(), GLC_StructReference::representationHandle(), GLC_StructReference::setRepresentation(), and GLC_StructReference::setRepresentationName().
Referenced by loadProductStructure().
| void GLC_3dxmlToWorld::loadLOD | ( | GLC_Mesh * | pMesh | ) | [private] |
Load Level of detail.
Definition at line 1242 of file glc_3dxmltoworld.cpp.
References checkForXmlError(), endElementNotReached(), loadFace(), loadSurfaceAttributes(), m_pCurrentMaterial, m_pStreamReader, readAttribute(), and readNext().
Referenced by createReferenceRep(), and loadCurrentExtRep().
| void GLC_3dxmlToWorld::loadManifest | ( | ) | [private] |
Load the 3dxml's manifest.
Definition at line 258 of file glc_3dxmltoworld.cpp.
References clear(), getContent(), m_FileName, m_pStreamReader, m_RootName, setStreamReaderToFile(), and GLC_FileFormatException::WrongFileFormat.
Referenced by createWorldFrom3dxml().
| void GLC_3dxmlToWorld::loadMaterialDef | ( | const MaterialRef & | materialRef | ) | [private] |
Create material from material def file.
Definition at line 2019 of file glc_3dxmltoworld.cpp.
References checkForXmlError(), endElementNotReached(), goToElement(), loadTexture(), GLC_3dxmlToWorld::MaterialRef::m_AssociatedFile, GLC_3dxmlToWorld::MaterialRef::m_Id, m_MaterialHash, GLC_3dxmlToWorld::MaterialRef::m_Name, m_pStreamReader, m_TextureImagesHash, readAttribute(), readNext(), GLC_Material::setAmbientColor(), GLC_Material::setDiffuseColor(), GLC_Object::setName(), GLC_Material::setOpacity(), GLC_Material::setShininess(), GLC_Material::setSpecularColor(), and GLC_Material::setTexture().
Referenced by loadCatMaterialRef().
| GLC_Matrix4x4 GLC_3dxmlToWorld::loadMatrix | ( | const QString & | stringMatrix | ) | [private] |
| void GLC_3dxmlToWorld::loadPolyline | ( | GLC_Mesh * | pMesh | ) | [private] |
Load polyline.
Definition at line 1361 of file glc_3dxmltoworld.cpp.
References GLC_Geometry::addVerticeGroup(), and readAttribute().
Referenced by createReferenceRep(), and loadCurrentExtRep().
| void GLC_3dxmlToWorld::loadProductStructure | ( | ) | [private] |
Load the product structure.
Definition at line 350 of file glc_3dxmltoworld.cpp.
References GLC_ErrorLog::addError(), clear(), createUnfoldedTree(), endElementNotReached(), goToElement(), GLC_StructReference::hasStructInstance(), GLC_StructInstance::hasStructOccurence(), GLC_StructOccurence::isOrphan(), GLC_World::listOfOccurence(), GLC_StructInstance::listOfStructOccurences(), loadExternalRef3D(), loadExternRepresentations(), loadGraphicsProperties(), loadInstance3D(), loadInstanceRep(), loadLocalRepresentations(), loadReference3D(), loadReferenceRep(), m_ExternalReferenceHash, m_FileName, m_InstanceOf, m_InstanceOfExtRefHash, GLC_3dxmlToWorld::OccurenceAttrib::m_IsVisible, m_OccurenceAttrib, GLC_3dxmlToWorld::OccurenceAttrib::m_pRenderProperties, m_pStreamReader, m_pWorld, m_ReferenceHash, m_RootName, GLC_StructOccurence::name(), GLC_StructReference::name(), GLC_StructInstance::name(), readNext(), GLC_World::rootOccurence(), GLC_StructInstance::setReference(), setStreamReaderToFile(), GLC_StructOccurence::updateOccurenceNumber(), and GLC_FileFormatException::WrongFileFormat.
Referenced by createWorldFrom3dxml().
| void GLC_3dxmlToWorld::loadReference3D | ( | ) | [private] |
Load a Reference3D.
Definition at line 538 of file glc_3dxmltoworld.cpp.
References endElementNotReached(), GLC_Attributes::insert(), GLC_Attributes::isEmpty(), m_FileName, m_pStreamReader, m_pWorld, m_ReferenceHash, readAttribute(), readNext(), GLC_World::rootOccurence(), GLC_StructReference::setAttributes(), GLC_StructReference::setName(), GLC_World::setRootName(), GLC_StructOccurence::structInstance(), and GLC_StructInstance::structReference().
Referenced by loadProductStructure().
| void GLC_3dxmlToWorld::loadReferenceRep | ( | ) | [private] |
Load a Reference representation.
Definition at line 652 of file glc_3dxmltoworld.cpp.
References clear(), GLC_FileFormatException::FileNotSupported, m_CurrentFileName, m_FileName, m_ReferenceRepHash, and readAttribute().
Referenced by loadProductStructure().
| GLC_Material * GLC_3dxmlToWorld::loadSurfaceAttributes | ( | ) | [private] |
Load surface attributes.
Definition at line 1393 of file glc_3dxmltoworld.cpp.
References checkForXmlError(), endElementNotReached(), getMaterial(), m_MaterialHash, m_pStreamReader, readAttribute(), and readNext().
Referenced by loadFace(), and loadLOD().
| GLC_Texture * GLC_3dxmlToWorld::loadTexture | ( | QString | fileName | ) | [private] |
Try to construct a texture with the specified fileName.
Definition at line 2130 of file glc_3dxmltoworld.cpp.
References GLC_ErrorLog::addError(), glc::builtArchiveString(), clear(), GLC_FileFormatException::FileNotSupported, m_CurrentFileName, m_FileName, m_IsInArchive, m_p3dxmlArchive, and m_SetOfAttachedFileName.
Referenced by loadMaterialDef().
| QString GLC_3dxmlToWorld::readAttribute | ( | QXmlStreamReader * | pReader, | |
| const QString & | attribute | |||
| ) | [inline, private] |
Read the specified attribute.
Definition at line 400 of file glc_3dxmltoworld.h.
| QString GLC_3dxmlToWorld::readAttribute | ( | const QString & | name, | |
| bool | required = false | |||
| ) | [private] |
Read the specified attribute.
Definition at line 332 of file glc_3dxmltoworld.cpp.
References clear(), m_FileName, m_pStreamReader, and GLC_FileFormatException::WrongFileFormat.
Referenced by createReferenceRep(), getMaterial(), loadCatMaterialRef(), loadCatRepImage(), loadCurrentExtRep(), loadDefaultViewProperty(), loadFace(), loadInstance3D(), loadLocalRepresentations(), loadLOD(), loadMaterialDef(), loadPolyline(), loadReference3D(), loadReferenceRep(), and loadSurfaceAttributes().
| QXmlStreamReader::TokenType GLC_3dxmlToWorld::readNext | ( | ) | [inline, private] |
Read next element from the stream.
Definition at line 361 of file glc_3dxmltoworld.h.
References m_ByteArrayList, and m_pStreamReader.
Referenced by createReferenceRep(), getContent(), goToElement(), goToEndElement(), goToRepId(), gotToPolygonalRepType(), loadCatMaterialRef(), loadCatRepImage(), loadCurrentExtRep(), loadDefaultViewProperty(), loadFace(), loadGraphicsProperties(), loadInstance3D(), loadLocalRepresentations(), loadLOD(), loadMaterialDef(), loadProductStructure(), loadReference3D(), and loadSurfaceAttributes().
| void GLC_3dxmlToWorld::setRepresentationFileName | ( | GLC_3DRep * | pRep | ) | [private] |
Set fileName of the given 3DRep.
Definition at line 2242 of file glc_3dxmltoworld.cpp.
References glc::builtArchiveString(), m_CurrentFileName, m_FileName, m_IsInArchive, and GLC_Rep::setFileName().
Referenced by create3DrepFrom3dxmlRep(), createReferenceRep(), loadCurrentExtRep(), loadExternalRef3D(), and loadExternRepresentations().
| bool GLC_3dxmlToWorld::setStreamReaderToFile | ( | QString | fileName, | |
| bool | test = false | |||
| ) | [private] |
Set the stream reader to the specified file.
Definition at line 1458 of file glc_3dxmltoworld.cpp.
References GLC_ErrorLog::addError(), checkFileValidity(), chunckSize, clear(), GLC_FileFormatException::FileNotSupported, m_ByteArrayList, m_CurrentDateTime, m_CurrentFileName, m_FileName, m_IsInArchive, m_p3dxmlArchive, m_pCurrentFile, m_pStreamReader, m_SetOfAttachedFileName, m_ZipMutex, and GLC_FileFormatException::WrongFileFormat.
Referenced by create3DrepFrom3dxmlRep(), createReferenceRep(), loadCatMaterialRef(), loadCatRepImage(), loadExternalRef3D(), loadExternRepresentations(), loadManifest(), and loadProductStructure().
| bool GLC_3dxmlToWorld::startElementNotReached | ( | QXmlStreamReader * | pReader, | |
| const QString & | element | |||
| ) | [inline, private] |
Return true if the start of specified element is not reached.
Definition at line 410 of file glc_3dxmltoworld.h.
Referenced by createReferenceRep(), and loadCurrentExtRep().
AssyLinkList GLC_3dxmlToWorld::m_AssyLinkList [private] |
The Structure Link Hash Table.
Definition at line 299 of file glc_3dxmltoworld.h.
Referenced by createUnfoldedTree(), and loadInstance3D().
QList<QByteArray> GLC_3dxmlToWorld::m_ByteArrayList [private] |
Definition at line 357 of file glc_3dxmltoworld.h.
Referenced by clear(), readNext(), and setStreamReaderToFile().
QDateTime GLC_3dxmlToWorld::m_CurrentDateTime [private] |
The current file time and date.
Definition at line 347 of file glc_3dxmltoworld.h.
Referenced by create3DrepFrom3dxmlRep(), createReferenceRep(), createWorldFrom3dxml(), loadCurrentExtRep(), loadExternalRef3D(), loadExternRepresentations(), and setStreamReaderToFile().
QString GLC_3dxmlToWorld::m_CurrentFileName [private] |
The current file name.
Definition at line 344 of file glc_3dxmltoworld.h.
Referenced by checkFileValidity(), checkForXmlError(), create3DrepFrom3dxmlRep(), createReferenceRep(), loadCurrentExtRep(), loadExternalRef3D(), loadExternRepresentations(), loadFace(), loadReferenceRep(), loadTexture(), setRepresentationFileName(), and setStreamReaderToFile().
Externam reference hash table.
Definition at line 311 of file glc_3dxmltoworld.h.
Referenced by loadExternalRef3D(), and loadProductStructure().
The list of extern representation link.
Definition at line 326 of file glc_3dxmltoworld.h.
Referenced by loadExternRepresentations(), and loadInstanceRep().
QString GLC_3dxmlToWorld::m_FileName [private] |
The 3dxml fileName.
Definition at line 281 of file glc_3dxmltoworld.h.
Referenced by checkForXmlError(), create3DrepFrom3dxmlRep(), createReferenceRep(), createUnfoldedTree(), createWorldFrom3dxml(), loadCurrentExtRep(), loadDefaultViewProperty(), loadExternalRef3D(), loadExternRepresentations(), loadGraphicsProperties(), loadManifest(), loadProductStructure(), loadReference3D(), loadReferenceRep(), loadTexture(), readAttribute(), setRepresentationFileName(), and setStreamReaderToFile().
bool GLC_3dxmlToWorld::m_GetExternalRef3DName [private] |
bool get external ref 3D name
Definition at line 353 of file glc_3dxmltoworld.h.
Referenced by createWorldFrom3dxml(), and loadExternalRef3D().
InstanceOfHash GLC_3dxmlToWorld::m_InstanceOf [private] |
Instance of Hash table.
Definition at line 302 of file glc_3dxmltoworld.h.
Referenced by loadInstance3D(), and loadProductStructure().
Instance of ext ref hash table.
Definition at line 308 of file glc_3dxmltoworld.h.
Referenced by loadInstance3D(), and loadProductStructure().
bool GLC_3dxmlToWorld::m_IsInArchive [private] |
Flag to know if the 3dxml is in an archive.
Definition at line 317 of file glc_3dxmltoworld.h.
Referenced by create3DrepFrom3dxmlRep(), createWorldFrom3dxml(), loadExternalRef3D(), loadExternRepresentations(), loadTexture(), setRepresentationFileName(), and setStreamReaderToFile().
bool GLC_3dxmlToWorld::m_LoadStructureOnly [private] |
Flag indicate the loading method.
Definition at line 338 of file glc_3dxmltoworld.h.
Referenced by createWorldFrom3dxml(), loadExternalRef3D(), and loadExternRepresentations().
The list of local representation link.
Definition at line 323 of file glc_3dxmltoworld.h.
Referenced by loadInstanceRep(), and loadLocalRepresentations().
MaterialHash GLC_3dxmlToWorld::m_MaterialHash [private] |
Hash table of material.
Definition at line 314 of file glc_3dxmltoworld.h.
Referenced by clearMaterialHash(), factorizeMaterial(), getMaterial(), loadMaterialDef(), and loadSurfaceAttributes().
QHash<unsigned int, OccurenceAttrib*> GLC_3dxmlToWorld::m_OccurenceAttrib [private] |
Hash table of occurence specific attributes.
Definition at line 350 of file glc_3dxmltoworld.h.
Referenced by loadDefaultViewProperty(), loadProductStructure(), and ~GLC_3dxmlToWorld().
QuaZip* GLC_3dxmlToWorld::m_p3dxmlArchive [private] |
The Quazip archive.
Definition at line 284 of file glc_3dxmltoworld.h.
Referenced by clear(), create3DrepFrom3dxmlRep(), createWorldFrom3dxml(), loadTexture(), setStreamReaderToFile(), and ~GLC_3dxmlToWorld().
QFile* GLC_3dxmlToWorld::m_pCurrentFile [private] |
The current file (if there is no archive).
Definition at line 287 of file glc_3dxmltoworld.h.
Referenced by clear(), setStreamReaderToFile(), and ~GLC_3dxmlToWorld().
GLC_Material* GLC_3dxmlToWorld::m_pCurrentMaterial [private] |
The 3DREP current material.
Definition at line 332 of file glc_3dxmltoworld.h.
Referenced by loadCurrentExtRep(), loadFace(), and loadLOD().
QXmlStreamReader* GLC_3dxmlToWorld::m_pStreamReader [private] |
Xml Reader.
Definition at line 278 of file glc_3dxmltoworld.h.
Referenced by checkForXmlError(), clear(), createReferenceRep(), goToRepId(), gotToPolygonalRepType(), loadCatMaterialRef(), loadCatRepImage(), loadCurrentExtRep(), loadDefaultViewProperty(), loadFace(), loadGraphicsProperties(), loadInstance3D(), loadInstanceRep(), loadLocalRepresentations(), loadLOD(), loadManifest(), loadMaterialDef(), loadProductStructure(), loadReference3D(), loadSurfaceAttributes(), readAttribute(), readNext(), setStreamReaderToFile(), and ~GLC_3dxmlToWorld().
GLC_World* GLC_3dxmlToWorld::m_pWorld [private] |
The World to return.
Definition at line 293 of file glc_3dxmltoworld.h.
Referenced by clear(), createUnfoldedTree(), createWorldFrom3dxml(), loadProductStructure(), and loadReference3D().
Reference Hash Table.
Definition at line 296 of file glc_3dxmltoworld.h.
Referenced by createUnfoldedTree(), loadExternRepresentations(), loadLocalRepresentations(), loadProductStructure(), and loadReference3D().
The Reference representation hash table.
Definition at line 320 of file glc_3dxmltoworld.h.
Referenced by loadExternRepresentations(), loadLocalRepresentations(), and loadReferenceRep().
QString GLC_3dxmlToWorld::m_RootName [private] |
The root Name of the 3dxml file.
Definition at line 290 of file glc_3dxmltoworld.h.
Referenced by createWorldFrom3dxml(), loadManifest(), and loadProductStructure().
QSet<QString> GLC_3dxmlToWorld::m_SetOfAttachedFileName [private] |
The Set of attached file name.
Definition at line 341 of file glc_3dxmltoworld.h.
Referenced by clear(), loadExternalRef3D(), loadExternRepresentations(), loadTexture(), and setStreamReaderToFile().
SetOfExtRef GLC_3dxmlToWorld::m_SetOfExtRef [private] |
The set of ext ref to load.
Definition at line 305 of file glc_3dxmltoworld.h.
Referenced by loadExternalRef3D(), and loadInstance3D().
SetOfExtRef GLC_3dxmlToWorld::m_SetOfExtRep [private] |
The set of ext rep to load.
Definition at line 329 of file glc_3dxmltoworld.h.
QHash<QString, QString> GLC_3dxmlToWorld::m_TextureImagesHash [private] |
The image file hash table.
Definition at line 335 of file glc_3dxmltoworld.h.
Referenced by loadCatRepImage(), and loadMaterialDef().
QMutex GLC_3dxmlToWorld::m_ZipMutex [static, private] |
Definition at line 355 of file glc_3dxmltoworld.h.
Referenced by create3DrepFrom3dxmlRep(), and setStreamReaderToFile().