GLC_ColladaToWorld : Create an GLC_World from dae file. More...
#include <glc_colladatoworld.h>
Classes | |
| struct | Accessor |
| struct | ColladaNode |
| struct | ColladaVertice |
| struct | InputData |
| struct | MatOffsetSize |
| struct | MeshInfo |
Signals | |
| void | currentQuantum (int) |
Public Member Functions | |
Constructor / Destructor | |
| GLC_ColladaToWorld () | |
| Default constructor. | |
| virtual | ~GLC_ColladaToWorld () |
| Destructor. | |
Set Functions | |
| GLC_World * | CreateWorldFromCollada (QFile &) |
| Create an GLC_World from an input Collada File. | |
| QStringList | listOfAttachedFileName () const |
| Get the list of attached files. | |
Private Types | |
| enum | Semantic { VERTEX = 0, NORMAL = 1, TEXCOORD = 2 } |
| typedef QHash< const QString, GLC_Material * > | MaterialHash |
| typedef QHash< const QString, QList< float > > | BulkDataHash |
| typedef QHash< const QString, Accessor > | DataAccessorHash |
Private Member Functions | |
Private services functions | |
| void | goToElement (const QString &) |
| Go to an Element of a xml. | |
| void | goToEndElement (const QString &) |
| Go to the end Element of a xml. | |
| QString | getContent (const QString &) |
| QString | readAttribute (const QString &, bool required=false) |
| Read the specified attribute. | |
| void | checkForXmlError (const QString &) |
| void | throwException (const QString &) |
| Throw an exception with the specified text. | |
| void | clear () |
| Clear memmory. | |
| void | loadLibraryImage () |
| Load library_images element. | |
| void | loadImage () |
| Load image element. | |
| void | loadLibraryMaterials () |
| Load library_materials element. | |
| void | loadMaterial () |
| Load a material. | |
| void | loadLibraryEffects () |
| Load library_effects element. | |
| void | loadEffect () |
| Load an effect. | |
| void | loadProfileCommon () |
| Load profile_COMMON. | |
| void | loadNewParam () |
| Load a new param. | |
| void | loadSurface (const QString &) |
| Load a surface. | |
| void | loadSampler2D (const QString &) |
| Load Sampler 2D. | |
| void | loadTechnique () |
| Load technique. | |
| void | loadMaterialTechnique (const QString &) |
| load material technique | |
| void | loadCommonColorOrTexture (const QString &) |
| load common color or texture | |
| void | loadTransparent () |
| Load transparent. | |
| void | loadTransparency (const QString &) |
| Load transparency. | |
| void | loadShininess (const QString &) |
| Load shininess. | |
| QColor | readXmlColor () |
| Read a xml Color. | |
| void | loadLibraryGeometries () |
| Load library_geometries element. | |
| void | loadGeometry () |
| Load an geometry element. | |
| void | loadMesh () |
| Load a mesh. | |
| void | loadVertexBulkData () |
| Load Vertex bulk data. | |
| void | loadTechniqueCommon () |
| Load Technique Common. | |
| void | loadAccessor () |
| Load Accessor. | |
| void | loadVertices () |
| Load attributes and identity of mesh vertices. | |
| void | loadPolylist () |
| Load polylist. | |
| void | loadPolygons () |
| Load Polygons. | |
| void | addPolylistToCurrentMesh (const QList< InputData > &, const QList< int > &, const QList< int > &, const QString &) |
| Add the polylist to the current mesh. | |
| void | computeNormalOfCurrentPrimitiveOfCurrentMesh (int offset) |
| Compute Normals for the current primitive element of the current mesh from the specified offset. | |
| void | loadTriangles () |
| Load triangles. | |
| void | addTrianglesToCurrentMesh (const QList< InputData > &, const QList< int > &, const QString &) |
| Add the triangles to current mesh. | |
| void | loadLibraryNodes () |
| Load the library nodes. | |
| void | loadLibraryContollers () |
| Load the library controllers. | |
| void | loadVisualScenes () |
| Load library_visual_scenes element. | |
| void | loadInstanceGeometry (ColladaNode *) |
| Load an instance geometry. | |
| void | loadInstanceNode (ColladaNode *) |
| Load an instance geometry. | |
| void | loadInstanceController (ColladaNode *) |
| Load an instance Controller. | |
| void | loadController () |
| Load a collada controller node. | |
| ColladaNode * | loadNode (ColladaNode *) |
| Load a Collada Node element and return it. | |
| void | translateNode (ColladaNode *) |
| Translate the node. | |
| void | scaleNode (ColladaNode *) |
| Scale the node. | |
| void | rotateNode (ColladaNode *) |
| Rotate the node. | |
| void | composeMatrixNode (ColladaNode *) |
| Compose Node matrix. | |
| void | loadScene () |
| Load scene element. | |
| void | linkTexturesToMaterials () |
| Link texture to material. | |
| void | createMesh () |
| Create mesh and link them to material. | |
| void | createSceneGraph () |
| Create the scene graph struct. | |
| GLC_StructOccurence * | createOccurenceFromNode (ColladaNode *) |
| Create Occurence tree from node tree. | |
| void | updateProgressBar () |
| Update progress bar. | |
Private Attributes | |
| GLC_World * | m_pWorld |
| The world to built. | |
| QXmlStreamReader * | m_pStreamReader |
| Xml Reader. | |
| QString | m_FileName |
| The collada fileName. | |
| QFile * | m_pFile |
| The collada file. | |
| QHash< QString, QString > | m_ImageFileHash |
| Map image id to image file name. | |
| QHash< QString, QString > | m_MaterialLibHash |
| Map materialInstance to material. | |
| QHash< QString, QString > | m_SurfaceImageHash |
| Map surface sid to image id. | |
| QHash< QString, QString > | m_Sampler2DSurfaceHash |
| Map sampler2D sid to surface sid. | |
| MaterialHash | m_MaterialEffectHash |
| Material Effect hash table. | |
| GLC_Material * | m_pCurrentMaterial |
| The current material. | |
| MaterialHash | m_TextureToMaterialHash |
| Texture to material link. | |
| BulkDataHash | m_BulkDataHash |
| Bulk data hash table. | |
| DataAccessorHash | m_DataAccessorHash |
| Data accessor hash. | |
| QHash< QString, QString > | m_VerticesSourceHash |
| Map vertices id to source data id. | |
| MeshInfo * | m_pMeshInfo |
| The current loadeed mesh. | |
| QHash< const QString, MeshInfo * > | m_GeometryHash |
| Hash table off geometry (MeshInfo*). | |
| QHash< const QString, ColladaNode * > | m_ColladaNodeHash |
| Hash table off collada node. | |
| QList< ColladaNode * > | m_TopLevelColladaNode |
| The list of top level node. | |
| QHash< const QString, QString > | m_MaterialInstanceMap |
| Mapping between material instance and material. | |
| QHash< const QString, GLC_3DRep * > | m_3DRepHash |
| 3DRep hash table | |
| QHash< const QString, GLC_StructInstance * > | m_StructInstanceHash |
| GLC instance Hash table. | |
| QString | m_CurrentId |
| The current Collada Element id. | |
| qint64 | m_FileSize |
| The Collada file size. | |
| int | m_CurrentOffset |
| The current offset in the collada file. | |
| QSet< QString > | m_ListOfAttachedFileName |
| The list of attached file name. | |
| bool | m_TransparentIsRgbZero |
| The transparent mode is RGB_ZERO. | |
GLC_ColladaToWorld : Create an GLC_World from dae file.
Definition at line 47 of file glc_colladatoworld.h.
typedef QHash<const QString, QList<float> > GLC_ColladaToWorld::BulkDataHash [private] |
Definition at line 156 of file glc_colladatoworld.h.
typedef QHash<const QString, Accessor> GLC_ColladaToWorld::DataAccessorHash [private] |
Definition at line 157 of file glc_colladatoworld.h.
typedef QHash<const QString, GLC_Material*> GLC_ColladaToWorld::MaterialHash [private] |
Definition at line 155 of file glc_colladatoworld.h.
enum GLC_ColladaToWorld::Semantic [private] |
Definition at line 53 of file glc_colladatoworld.h.
| GLC_ColladaToWorld::GLC_ColladaToWorld | ( | ) |
Default constructor.
Definition at line 36 of file glc_colladatoworld.cpp.
References currentNodeId.
| GLC_ColladaToWorld::~GLC_ColladaToWorld | ( | ) | [virtual] |
| void GLC_ColladaToWorld::addPolylistToCurrentMesh | ( | const QList< InputData > & | inputDataList, | |
| const QList< int > & | vcountList, | |||
| const QList< int > & | polyIndexList, | |||
| const QString & | materialId | |||
| ) | [private] |
Add the polylist to the current mesh.
Definition at line 1045 of file glc_colladatoworld.cpp.
References GLC_ErrorLog::addError(), computeNormalOfCurrentPrimitiveOfCurrentMesh(), m_BulkDataHash, m_DataAccessorHash, GLC_ColladaToWorld::MeshInfo::m_Datas, m_FileName, GLC_ColladaToWorld::MeshInfo::m_FreeIndex, GLC_ColladaToWorld::MeshInfo::m_Index, GLC_ColladaToWorld::MeshInfo::m_Mapping, GLC_ColladaToWorld::MeshInfo::m_Materials, GLC_ColladaToWorld::MatOffsetSize::m_Offset, GLC_ColladaToWorld::InputData::m_Offset, GLC_ColladaToWorld::MeshInfo::m_pMesh, m_pMeshInfo, GLC_ColladaToWorld::InputData::m_Semantic, GLC_ColladaToWorld::MatOffsetSize::m_size, GLC_ColladaToWorld::InputData::m_Source, GLC_ColladaToWorld::ColladaVertice::m_Values, GLC_Geometry::name(), NORMAL, TEXCOORD, throwException(), glc::triangulatePolygon(), and VERTEX.
Referenced by loadPolygons(), and loadPolylist().
| void GLC_ColladaToWorld::addTrianglesToCurrentMesh | ( | const QList< InputData > & | inputDataList, | |
| const QList< int > & | trianglesIndexList, | |||
| const QString & | materialId | |||
| ) | [private] |
Add the triangles to current mesh.
Definition at line 1301 of file glc_colladatoworld.cpp.
References computeNormalOfCurrentPrimitiveOfCurrentMesh(), m_BulkDataHash, m_DataAccessorHash, GLC_ColladaToWorld::MeshInfo::m_Datas, GLC_ColladaToWorld::MeshInfo::m_FreeIndex, GLC_ColladaToWorld::MeshInfo::m_Index, GLC_ColladaToWorld::MeshInfo::m_Mapping, GLC_ColladaToWorld::MeshInfo::m_Materials, GLC_ColladaToWorld::MatOffsetSize::m_Offset, GLC_ColladaToWorld::InputData::m_Offset, m_pMeshInfo, GLC_ColladaToWorld::InputData::m_Semantic, GLC_ColladaToWorld::MatOffsetSize::m_size, GLC_ColladaToWorld::InputData::m_Source, GLC_ColladaToWorld::ColladaVertice::m_Values, NORMAL, TEXCOORD, and throwException().
Referenced by loadTriangles().
| void GLC_ColladaToWorld::checkForXmlError | ( | const QString & | info | ) | [private] |
Check for XML error Throw ecxeption if error occur
Definition at line 212 of file glc_colladatoworld.cpp.
References clear(), m_FileName, m_pStreamReader, and GLC_FileFormatException::WrongFileFormat.
Referenced by goToElement(), goToEndElement(), loadAccessor(), loadCommonColorOrTexture(), loadController(), loadEffect(), loadGeometry(), loadImage(), loadInstanceController(), loadInstanceGeometry(), loadLibraryContollers(), loadLibraryEffects(), loadLibraryGeometries(), loadLibraryImage(), loadLibraryMaterials(), loadLibraryNodes(), loadMaterial(), loadMaterialTechnique(), loadMesh(), loadNewParam(), loadProfileCommon(), loadSampler2D(), loadShininess(), loadSurface(), loadTechnique(), loadTechniqueCommon(), loadTransparency(), loadVertexBulkData(), loadVertices(), and loadVisualScenes().
| void GLC_ColladaToWorld::clear | ( | ) | [private] |
Clear memmory.
Delete all 3DRep
Definition at line 230 of file glc_colladatoworld.cpp.
References m_3DRepHash, m_BulkDataHash, m_ColladaNodeHash, m_CurrentId, m_DataAccessorHash, m_GeometryHash, m_ImageFileHash, m_ListOfAttachedFileName, m_MaterialEffectHash, m_MaterialInstanceMap, m_MaterialLibHash, m_pCurrentMaterial, m_pFile, m_pMeshInfo, m_pStreamReader, m_pWorld, m_StructInstanceHash, m_SurfaceImageHash, m_TextureToMaterialHash, m_TopLevelColladaNode, and m_VerticesSourceHash.
Referenced by checkForXmlError(), readAttribute(), readXmlColor(), throwException(), and ~GLC_ColladaToWorld().
| void GLC_ColladaToWorld::composeMatrixNode | ( | ColladaNode * | pNode | ) | [private] |
Compose Node matrix.
Definition at line 1721 of file glc_colladatoworld.cpp.
References getContent(), GLC_ColladaToWorld::ColladaNode::m_Matrix, GLC_Matrix4x4::optimise(), and throwException().
Referenced by loadNode().
| void GLC_ColladaToWorld::computeNormalOfCurrentPrimitiveOfCurrentMesh | ( | int | offset | ) | [private] |
Compute Normals for the current primitive element of the current mesh from the specified offset.
Definition at line 1183 of file glc_colladatoworld.cpp.
References GLC_ColladaToWorld::MeshInfo::m_Datas, GLC_ColladaToWorld::MeshInfo::m_Index, m_pMeshInfo, NORMAL, GLC_Vector3d::normalize(), GLC_Vector3d::toVector3df(), VERTEX, GLC_Vector3df::x(), GLC_Vector3df::y(), and GLC_Vector3df::z().
Referenced by addPolylistToCurrentMesh(), and addTrianglesToCurrentMesh().
| void GLC_ColladaToWorld::createMesh | ( | ) | [private] |
Create mesh and link them to material.
Definition at line 1832 of file glc_colladatoworld.cpp.
References GLC_ErrorLog::addError(), GLC_Mesh::addNormals(), GLC_Mesh::addTexels(), GLC_Mesh::addTriangles(), GLC_Mesh::addVertice(), GLC_3DRep::clean(), GLC_Mesh::finish(), m_3DRepHash, GLC_ColladaToWorld::MeshInfo::m_Datas, m_FileName, m_GeometryHash, GLC_ColladaToWorld::MeshInfo::m_Index, m_MaterialEffectHash, m_MaterialInstanceMap, m_MaterialLibHash, GLC_ColladaToWorld::MeshInfo::m_Materials, GLC_ColladaToWorld::MeshInfo::m_pMesh, NORMAL, TEXCOORD, and VERTEX.
Referenced by CreateWorldFromCollada().
| GLC_StructOccurence * GLC_ColladaToWorld::createOccurenceFromNode | ( | ColladaNode * | pNode | ) | [private] |
Create Occurence tree from node tree.
Definition at line 1939 of file glc_colladatoworld.cpp.
References GLC_StructOccurence::addChild(), GLC_ErrorLog::addError(), GLC_3DRep::isEmpty(), m_3DRepHash, GLC_ColladaToWorld::ColladaNode::m_ChildNodes, m_ColladaNodeHash, m_FileName, GLC_ColladaToWorld::ColladaNode::m_Id, GLC_ColladaToWorld::ColladaNode::m_InstanceGeometryIDs, GLC_ColladaToWorld::ColladaNode::m_InstanceOffNodeIds, GLC_ColladaToWorld::ColladaNode::m_Matrix, m_StructInstanceHash, GLC_3DRep::merge(), GLC_StructInstance::move(), GLC_Rep::name(), and throwException().
Referenced by createSceneGraph().
| void GLC_ColladaToWorld::createSceneGraph | ( | ) | [private] |
Create the scene graph struct.
Definition at line 1918 of file glc_colladatoworld.cpp.
References GLC_StructOccurence::addChild(), createOccurenceFromNode(), m_pWorld, m_TopLevelColladaNode, GLC_StructOccurence::removeEmptyChildren(), GLC_World::rootOccurence(), and GLC_StructOccurence::updateChildrenAbsoluteMatrix().
Referenced by CreateWorldFromCollada().
| GLC_World * GLC_ColladaToWorld::CreateWorldFromCollada | ( | QFile & | file | ) |
Create an GLC_World from an input Collada File.
Definition at line 79 of file glc_colladatoworld.cpp.
References createMesh(), createSceneGraph(), currentQuantum(), glcXmlUtil::endElementNotReached(), GLC_FileFormatException::FileNotFound, getContent(), goToElement(), linkTexturesToMaterials(), loadLibraryContollers(), loadLibraryEffects(), loadLibraryGeometries(), loadLibraryImage(), loadLibraryMaterials(), loadLibraryNodes(), loadScene(), loadVisualScenes(), m_FileName, m_FileSize, m_pFile, m_pStreamReader, m_pWorld, readAttribute(), GLC_World::setUpVector(), glc::version(), glc::X_AXIS(), glc::Y_AXIS(), and glc::Z_AXIS().
Referenced by GLC_FileLoader::createWorldFromFile().
| void GLC_ColladaToWorld::currentQuantum | ( | int | ) | [signal] |
Referenced by CreateWorldFromCollada(), and updateProgressBar().
| QString GLC_ColladaToWorld::getContent | ( | const QString & | element | ) | [private] |
Definition at line 178 of file glc_colladatoworld.cpp.
References glcXmlUtil::endElementNotReached(), and m_pStreamReader.
Referenced by composeMatrixNode(), CreateWorldFromCollada(), loadImage(), loadPolygons(), loadPolylist(), loadSampler2D(), loadShininess(), loadSurface(), loadTransparency(), loadTriangles(), loadVertexBulkData(), readXmlColor(), rotateNode(), scaleNode(), and translateNode().
| void GLC_ColladaToWorld::goToElement | ( | const QString & | elementName | ) | [private] |
Go to an Element of a xml.
Definition at line 158 of file glc_colladatoworld.cpp.
References checkForXmlError(), m_pStreamReader, and glcXmlUtil::startElementNotReached().
Referenced by CreateWorldFromCollada(), loadMaterial(), loadVertices(), and loadVisualScenes().
| void GLC_ColladaToWorld::goToEndElement | ( | const QString & | elementName | ) | [private] |
Go to the end Element of a xml.
Definition at line 168 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), and m_pStreamReader.
| void GLC_ColladaToWorld::linkTexturesToMaterials | ( | ) | [private] |
Link texture to material.
Definition at line 1768 of file glc_colladatoworld.cpp.
References GLC_ErrorLog::addError(), m_FileName, m_ImageFileHash, m_ListOfAttachedFileName, m_Sampler2DSurfaceHash, m_SurfaceImageHash, m_TextureToMaterialHash, and GLC_Material::setTexture().
Referenced by CreateWorldFromCollada().
| QStringList GLC_ColladaToWorld::listOfAttachedFileName | ( | ) | const [inline] |
Get the list of attached files.
Definition at line 179 of file glc_colladatoworld.h.
Referenced by GLC_FileLoader::createWorldFromFile().
| void GLC_ColladaToWorld::loadAccessor | ( | ) | [private] |
Load Accessor.
Definition at line 852 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), GLC_ColladaToWorld::Accessor::m_Count, m_CurrentId, m_DataAccessorHash, GLC_ColladaToWorld::Accessor::m_Offset, m_pStreamReader, GLC_ColladaToWorld::Accessor::m_Stride, and readAttribute().
Referenced by loadTechniqueCommon().
| void GLC_ColladaToWorld::loadCommonColorOrTexture | ( | const QString & | name | ) | [private] |
load common color or texture
Definition at line 573 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), m_CurrentId, m_pCurrentMaterial, m_pStreamReader, m_TextureToMaterialHash, readAttribute(), readXmlColor(), GLC_Material::setAmbientColor(), GLC_Material::setDiffuseColor(), GLC_Material::setEmissiveColor(), and GLC_Material::setSpecularColor().
Referenced by loadMaterialTechnique().
| void GLC_ColladaToWorld::loadController | ( | ) | [private] |
Load a collada controller node.
Definition at line 1544 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), m_ColladaNodeHash, m_CurrentId, GLC_ColladaToWorld::ColladaNode::m_InstanceGeometryIDs, m_pStreamReader, and readAttribute().
Referenced by loadLibraryContollers().
| void GLC_ColladaToWorld::loadEffect | ( | ) | [private] |
Load an effect.
Definition at line 429 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadProfileCommon(), m_CurrentId, m_MaterialEffectHash, m_pCurrentMaterial, m_pStreamReader, readAttribute(), and GLC_Object::setName().
Referenced by loadLibraryEffects().
| void GLC_ColladaToWorld::loadGeometry | ( | ) | [private] |
Load an geometry element.
Definition at line 736 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadMesh(), m_CurrentId, m_GeometryHash, GLC_ColladaToWorld::MeshInfo::m_pMesh, m_pMeshInfo, m_pStreamReader, readAttribute(), and GLC_Geometry::setName().
Referenced by loadLibraryGeometries().
| void GLC_ColladaToWorld::loadImage | ( | ) | [private] |
Load image element.
Definition at line 326 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), getContent(), m_CurrentId, m_ImageFileHash, m_pStreamReader, and readAttribute().
Referenced by loadLibraryImage(), and loadProfileCommon().
| void GLC_ColladaToWorld::loadInstanceController | ( | ColladaNode * | pNode | ) | [private] |
Load an instance Controller.
Definition at line 1521 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), GLC_ColladaToWorld::ColladaNode::m_InstanceOffNodeIds, m_MaterialInstanceMap, m_pStreamReader, and readAttribute().
Referenced by loadNode().
| void GLC_ColladaToWorld::loadInstanceGeometry | ( | ColladaNode * | pNode | ) | [private] |
Load an instance geometry.
Definition at line 1487 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), GLC_ColladaToWorld::ColladaNode::m_InstanceGeometryIDs, m_MaterialInstanceMap, m_pStreamReader, and readAttribute().
Referenced by loadNode().
| void GLC_ColladaToWorld::loadInstanceNode | ( | ColladaNode * | pNode | ) | [private] |
Load an instance geometry.
Definition at line 1513 of file glc_colladatoworld.cpp.
References GLC_ColladaToWorld::ColladaNode::m_InstanceOffNodeIds, and readAttribute().
Referenced by loadNode().
| void GLC_ColladaToWorld::loadLibraryContollers | ( | ) | [private] |
Load the library controllers.
Definition at line 1438 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadController(), m_pStreamReader, and updateProgressBar().
Referenced by CreateWorldFromCollada().
| void GLC_ColladaToWorld::loadLibraryEffects | ( | ) | [private] |
Load library_effects element.
Definition at line 411 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadEffect(), m_pStreamReader, and updateProgressBar().
Referenced by CreateWorldFromCollada().
| void GLC_ColladaToWorld::loadLibraryGeometries | ( | ) | [private] |
Load library_geometries element.
Definition at line 718 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadGeometry(), m_pStreamReader, and updateProgressBar().
Referenced by CreateWorldFromCollada().
| void GLC_ColladaToWorld::loadLibraryImage | ( | ) | [private] |
Load library_images element.
Definition at line 309 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadImage(), m_pStreamReader, and updateProgressBar().
Referenced by CreateWorldFromCollada().
| void GLC_ColladaToWorld::loadLibraryMaterials | ( | ) | [private] |
Load library_materials element.
Definition at line 356 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadMaterial(), m_pStreamReader, and updateProgressBar().
Referenced by CreateWorldFromCollada().
| void GLC_ColladaToWorld::loadLibraryNodes | ( | ) | [private] |
Load the library nodes.
Definition at line 1411 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadNode(), m_pStreamReader, and updateProgressBar().
Referenced by CreateWorldFromCollada().
| void GLC_ColladaToWorld::loadMaterial | ( | ) | [private] |
Load a material.
Definition at line 374 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), goToElement(), m_CurrentId, m_MaterialLibHash, m_pStreamReader, and readAttribute().
Referenced by loadLibraryMaterials().
| void GLC_ColladaToWorld::loadMaterialTechnique | ( | const QString & | elementName | ) | [private] |
load material technique
Definition at line 550 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadCommonColorOrTexture(), loadShininess(), loadTransparency(), loadTransparent(), and m_pStreamReader.
Referenced by loadTechnique().
| void GLC_ColladaToWorld::loadMesh | ( | ) | [private] |
Load a mesh.
Definition at line 775 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadPolygons(), loadPolylist(), loadTriangles(), loadVertexBulkData(), loadVertices(), and m_pStreamReader.
Referenced by loadGeometry().
| void GLC_ColladaToWorld::loadNewParam | ( | ) | [private] |
Load a new param.
Definition at line 473 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadSampler2D(), loadSurface(), m_CurrentId, m_pStreamReader, and readAttribute().
Referenced by loadProfileCommon().
| GLC_ColladaToWorld::ColladaNode * GLC_ColladaToWorld::loadNode | ( | ColladaNode * | pParent | ) | [private] |
Load a Collada Node element and return it.
Definition at line 1568 of file glc_colladatoworld.cpp.
References composeMatrixNode(), currentNodeId, glcXmlUtil::endElementNotReached(), loadInstanceController(), loadInstanceGeometry(), loadInstanceNode(), GLC_ColladaToWorld::ColladaNode::m_ChildNodes, m_ColladaNodeHash, m_CurrentId, m_pStreamReader, prefixNodeId, readAttribute(), rotateNode(), scaleNode(), and translateNode().
Referenced by loadLibraryNodes(), and loadVisualScenes().
| void GLC_ColladaToWorld::loadPolygons | ( | ) | [private] |
Load Polygons.
Definition at line 977 of file glc_colladatoworld.cpp.
References addPolylistToCurrentMesh(), glcXmlUtil::endElementNotReached(), getContent(), GLC_ColladaToWorld::InputData::m_Offset, m_pStreamReader, GLC_ColladaToWorld::InputData::m_Semantic, GLC_ColladaToWorld::InputData::m_Source, m_VerticesSourceHash, NORMAL, readAttribute(), TEXCOORD, throwException(), updateProgressBar(), and VERTEX.
Referenced by loadMesh().
| void GLC_ColladaToWorld::loadPolylist | ( | ) | [private] |
Load polylist.
Definition at line 896 of file glc_colladatoworld.cpp.
References addPolylistToCurrentMesh(), glcXmlUtil::endElementNotReached(), getContent(), GLC_ColladaToWorld::InputData::m_Offset, m_pStreamReader, GLC_ColladaToWorld::InputData::m_Semantic, GLC_ColladaToWorld::InputData::m_Source, m_VerticesSourceHash, NORMAL, readAttribute(), TEXCOORD, throwException(), updateProgressBar(), and VERTEX.
Referenced by loadMesh().
| void GLC_ColladaToWorld::loadProfileCommon | ( | ) | [private] |
Load profile_COMMON.
Definition at line 455 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadImage(), loadNewParam(), loadTechnique(), and m_pStreamReader.
Referenced by loadEffect().
| void GLC_ColladaToWorld::loadSampler2D | ( | const QString & | sid | ) | [private] |
Load Sampler 2D.
Definition at line 512 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), getContent(), m_CurrentId, m_pStreamReader, and m_Sampler2DSurfaceHash.
Referenced by loadNewParam().
| void GLC_ColladaToWorld::loadScene | ( | ) | [private] |
Load scene element.
Definition at line 1757 of file glc_colladatoworld.cpp.
References glcXmlUtil::endElementNotReached(), and m_pStreamReader.
Referenced by CreateWorldFromCollada().
| void GLC_ColladaToWorld::loadShininess | ( | const QString & | name | ) | [private] |
Load shininess.
Definition at line 646 of file glc_colladatoworld.cpp.
References GLC_ErrorLog::addError(), checkForXmlError(), glcXmlUtil::endElementNotReached(), getContent(), m_FileName, m_pCurrentMaterial, m_pStreamReader, and GLC_Material::setShininess().
Referenced by loadMaterialTechnique().
| void GLC_ColladaToWorld::loadSurface | ( | const QString & | sid | ) | [private] |
Load a surface.
Definition at line 492 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), getContent(), m_pStreamReader, and m_SurfaceImageHash.
Referenced by loadNewParam().
| void GLC_ColladaToWorld::loadTechnique | ( | ) | [private] |
Load technique.
Definition at line 532 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadMaterialTechnique(), and m_pStreamReader.
Referenced by loadProfileCommon().
| void GLC_ColladaToWorld::loadTechniqueCommon | ( | ) | [private] |
Load Technique Common.
Definition at line 834 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), loadAccessor(), and m_pStreamReader.
Referenced by loadVertexBulkData().
| void GLC_ColladaToWorld::loadTransparency | ( | const QString & | name | ) | [private] |
Load transparency.
Definition at line 611 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), getContent(), m_pCurrentMaterial, m_pStreamReader, m_TransparentIsRgbZero, GLC_Material::setOpacity(), and throwException().
Referenced by loadMaterialTechnique().
| void GLC_ColladaToWorld::loadTransparent | ( | ) | [private] |
Load transparent.
Definition at line 603 of file glc_colladatoworld.cpp.
References m_TransparentIsRgbZero, and readAttribute().
Referenced by loadMaterialTechnique().
| void GLC_ColladaToWorld::loadTriangles | ( | ) | [private] |
Load triangles.
Definition at line 1236 of file glc_colladatoworld.cpp.
References addTrianglesToCurrentMesh(), glcXmlUtil::endElementNotReached(), getContent(), GLC_ColladaToWorld::InputData::m_Offset, m_pStreamReader, GLC_ColladaToWorld::InputData::m_Semantic, GLC_ColladaToWorld::InputData::m_Source, m_VerticesSourceHash, NORMAL, readAttribute(), TEXCOORD, throwException(), updateProgressBar(), and VERTEX.
Referenced by loadMesh().
| void GLC_ColladaToWorld::loadVertexBulkData | ( | ) | [private] |
Load Vertex bulk data.
Definition at line 797 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), getContent(), loadTechniqueCommon(), m_BulkDataHash, m_CurrentId, m_pStreamReader, readAttribute(), throwException(), and updateProgressBar().
Referenced by loadMesh().
| void GLC_ColladaToWorld::loadVertices | ( | ) | [private] |
Load attributes and identity of mesh vertices.
Definition at line 883 of file glc_colladatoworld.cpp.
References checkForXmlError(), goToElement(), m_CurrentId, m_VerticesSourceHash, and readAttribute().
Referenced by loadMesh().
| void GLC_ColladaToWorld::loadVisualScenes | ( | ) | [private] |
Load library_visual_scenes element.
Definition at line 1458 of file glc_colladatoworld.cpp.
References checkForXmlError(), glcXmlUtil::endElementNotReached(), goToElement(), loadNode(), m_pStreamReader, m_TopLevelColladaNode, and updateProgressBar().
Referenced by CreateWorldFromCollada().
| QString GLC_ColladaToWorld::readAttribute | ( | const QString & | name, | |
| bool | required = false | |||
| ) | [private] |
Read the specified attribute.
Definition at line 194 of file glc_colladatoworld.cpp.
References clear(), m_FileName, m_pStreamReader, and GLC_FileFormatException::WrongFileFormat.
Referenced by CreateWorldFromCollada(), loadAccessor(), loadCommonColorOrTexture(), loadController(), loadEffect(), loadGeometry(), loadImage(), loadInstanceController(), loadInstanceGeometry(), loadInstanceNode(), loadMaterial(), loadNewParam(), loadNode(), loadPolygons(), loadPolylist(), loadTransparent(), loadTriangles(), loadVertexBulkData(), and loadVertices().
| QColor GLC_ColladaToWorld::readXmlColor | ( | ) | [private] |
Read a xml Color.
Definition at line 675 of file glc_colladatoworld.cpp.
References clear(), getContent(), m_FileName, and GLC_FileFormatException::WrongFileFormat.
Referenced by loadCommonColorOrTexture().
| void GLC_ColladaToWorld::rotateNode | ( | ColladaNode * | pNode | ) | [private] |
Rotate the node.
Definition at line 1695 of file glc_colladatoworld.cpp.
References getContent(), GLC_ColladaToWorld::ColladaNode::m_Matrix, and throwException().
Referenced by loadNode().
| void GLC_ColladaToWorld::scaleNode | ( | ColladaNode * | pNode | ) | [private] |
Scale the node.
Definition at line 1669 of file glc_colladatoworld.cpp.
References getContent(), GLC_ColladaToWorld::ColladaNode::m_Matrix, GLC_Matrix4x4::optimise(), GLC_Matrix4x4::setMatScaling(), and throwException().
Referenced by loadNode().
| void GLC_ColladaToWorld::throwException | ( | const QString & | message | ) | [private] |
Throw an exception with the specified text.
Definition at line 222 of file glc_colladatoworld.cpp.
References clear(), m_FileName, and GLC_FileFormatException::WrongFileFormat.
Referenced by addPolylistToCurrentMesh(), addTrianglesToCurrentMesh(), composeMatrixNode(), createOccurenceFromNode(), loadPolygons(), loadPolylist(), loadTransparency(), loadTriangles(), loadVertexBulkData(), rotateNode(), scaleNode(), and translateNode().
| void GLC_ColladaToWorld::translateNode | ( | ColladaNode * | pNode | ) | [private] |
Translate the node.
Definition at line 1645 of file glc_colladatoworld.cpp.
References getContent(), GLC_ColladaToWorld::ColladaNode::m_Matrix, and throwException().
Referenced by loadNode().
| void GLC_ColladaToWorld::updateProgressBar | ( | ) | [private] |
Update progress bar.
Definition at line 2082 of file glc_colladatoworld.cpp.
References currentQuantum(), m_CurrentOffset, m_FileSize, and m_pStreamReader.
Referenced by loadLibraryContollers(), loadLibraryEffects(), loadLibraryGeometries(), loadLibraryImage(), loadLibraryMaterials(), loadLibraryNodes(), loadPolygons(), loadPolylist(), loadTriangles(), loadVertexBulkData(), and loadVisualScenes().
QHash<const QString, GLC_3DRep*> GLC_ColladaToWorld::m_3DRepHash [private] |
3DRep hash table
Definition at line 426 of file glc_colladatoworld.h.
Referenced by clear(), createMesh(), and createOccurenceFromNode().
Bulk data hash table.
Definition at line 402 of file glc_colladatoworld.h.
Referenced by addPolylistToCurrentMesh(), addTrianglesToCurrentMesh(), clear(), and loadVertexBulkData().
QHash<const QString, ColladaNode*> GLC_ColladaToWorld::m_ColladaNodeHash [private] |
Hash table off collada node.
Definition at line 417 of file glc_colladatoworld.h.
Referenced by clear(), createOccurenceFromNode(), loadController(), and loadNode().
QString GLC_ColladaToWorld::m_CurrentId [private] |
The current Collada Element id.
Definition at line 432 of file glc_colladatoworld.h.
Referenced by clear(), loadAccessor(), loadCommonColorOrTexture(), loadController(), loadEffect(), loadGeometry(), loadImage(), loadMaterial(), loadNewParam(), loadNode(), loadSampler2D(), loadVertexBulkData(), and loadVertices().
int GLC_ColladaToWorld::m_CurrentOffset [private] |
The current offset in the collada file.
Definition at line 438 of file glc_colladatoworld.h.
Referenced by updateProgressBar().
Data accessor hash.
Definition at line 405 of file glc_colladatoworld.h.
Referenced by addPolylistToCurrentMesh(), addTrianglesToCurrentMesh(), clear(), and loadAccessor().
QString GLC_ColladaToWorld::m_FileName [private] |
The collada fileName.
Definition at line 375 of file glc_colladatoworld.h.
Referenced by addPolylistToCurrentMesh(), checkForXmlError(), createMesh(), createOccurenceFromNode(), CreateWorldFromCollada(), linkTexturesToMaterials(), loadShininess(), readAttribute(), readXmlColor(), and throwException().
qint64 GLC_ColladaToWorld::m_FileSize [private] |
The Collada file size.
Definition at line 435 of file glc_colladatoworld.h.
Referenced by CreateWorldFromCollada(), and updateProgressBar().
QHash<const QString, MeshInfo*> GLC_ColladaToWorld::m_GeometryHash [private] |
Hash table off geometry (MeshInfo*).
Definition at line 414 of file glc_colladatoworld.h.
Referenced by clear(), createMesh(), and loadGeometry().
QHash<QString, QString> GLC_ColladaToWorld::m_ImageFileHash [private] |
Map image id to image file name.
Definition at line 381 of file glc_colladatoworld.h.
Referenced by clear(), linkTexturesToMaterials(), and loadImage().
QSet<QString> GLC_ColladaToWorld::m_ListOfAttachedFileName [private] |
The list of attached file name.
Definition at line 441 of file glc_colladatoworld.h.
Referenced by clear(), and linkTexturesToMaterials().
Material Effect hash table.
Definition at line 393 of file glc_colladatoworld.h.
Referenced by clear(), createMesh(), and loadEffect().
QHash<const QString, QString> GLC_ColladaToWorld::m_MaterialInstanceMap [private] |
Mapping between material instance and material.
Definition at line 423 of file glc_colladatoworld.h.
Referenced by clear(), createMesh(), loadInstanceController(), and loadInstanceGeometry().
QHash<QString, QString> GLC_ColladaToWorld::m_MaterialLibHash [private] |
Map materialInstance to material.
Definition at line 384 of file glc_colladatoworld.h.
Referenced by clear(), createMesh(), and loadMaterial().
The current material.
Definition at line 396 of file glc_colladatoworld.h.
Referenced by clear(), loadCommonColorOrTexture(), loadEffect(), loadShininess(), and loadTransparency().
QFile* GLC_ColladaToWorld::m_pFile [private] |
The collada file.
Definition at line 378 of file glc_colladatoworld.h.
Referenced by clear(), and CreateWorldFromCollada().
MeshInfo* GLC_ColladaToWorld::m_pMeshInfo [private] |
The current loadeed mesh.
Definition at line 411 of file glc_colladatoworld.h.
Referenced by addPolylistToCurrentMesh(), addTrianglesToCurrentMesh(), clear(), computeNormalOfCurrentPrimitiveOfCurrentMesh(), and loadGeometry().
QXmlStreamReader* GLC_ColladaToWorld::m_pStreamReader [private] |
Xml Reader.
Definition at line 372 of file glc_colladatoworld.h.
Referenced by checkForXmlError(), clear(), CreateWorldFromCollada(), getContent(), goToElement(), goToEndElement(), loadAccessor(), loadCommonColorOrTexture(), loadController(), loadEffect(), loadGeometry(), loadImage(), loadInstanceController(), loadInstanceGeometry(), loadLibraryContollers(), loadLibraryEffects(), loadLibraryGeometries(), loadLibraryImage(), loadLibraryMaterials(), loadLibraryNodes(), loadMaterial(), loadMaterialTechnique(), loadMesh(), loadNewParam(), loadNode(), loadPolygons(), loadPolylist(), loadProfileCommon(), loadSampler2D(), loadScene(), loadShininess(), loadSurface(), loadTechnique(), loadTechniqueCommon(), loadTransparency(), loadTriangles(), loadVertexBulkData(), loadVisualScenes(), readAttribute(), and updateProgressBar().
GLC_World* GLC_ColladaToWorld::m_pWorld [private] |
The world to built.
Definition at line 369 of file glc_colladatoworld.h.
Referenced by clear(), createSceneGraph(), CreateWorldFromCollada(), and ~GLC_ColladaToWorld().
QHash<QString, QString> GLC_ColladaToWorld::m_Sampler2DSurfaceHash [private] |
Map sampler2D sid to surface sid.
Definition at line 390 of file glc_colladatoworld.h.
Referenced by linkTexturesToMaterials(), and loadSampler2D().
QHash<const QString, GLC_StructInstance*> GLC_ColladaToWorld::m_StructInstanceHash [private] |
GLC instance Hash table.
Definition at line 429 of file glc_colladatoworld.h.
Referenced by clear(), and createOccurenceFromNode().
QHash<QString, QString> GLC_ColladaToWorld::m_SurfaceImageHash [private] |
Map surface sid to image id.
Definition at line 387 of file glc_colladatoworld.h.
Referenced by clear(), linkTexturesToMaterials(), and loadSurface().
Texture to material link.
Definition at line 399 of file glc_colladatoworld.h.
Referenced by clear(), linkTexturesToMaterials(), and loadCommonColorOrTexture().
QList<ColladaNode*> GLC_ColladaToWorld::m_TopLevelColladaNode [private] |
The list of top level node.
Definition at line 420 of file glc_colladatoworld.h.
Referenced by clear(), createSceneGraph(), and loadVisualScenes().
bool GLC_ColladaToWorld::m_TransparentIsRgbZero [private] |
The transparent mode is RGB_ZERO.
Definition at line 444 of file glc_colladatoworld.h.
Referenced by loadTransparency(), and loadTransparent().
QHash<QString, QString> GLC_ColladaToWorld::m_VerticesSourceHash [private] |
Map vertices id to source data id.
Definition at line 408 of file glc_colladatoworld.h.
Referenced by clear(), loadPolygons(), loadPolylist(), loadTriangles(), and loadVertices().