GLC_3dsToWorld : Create an GLC_World from 3ds file. More...
#include <glc_3dstoworld.h>
Signals | |
| void | currentQuantum (int) |
Public Member Functions | |
Constructor / Destructor | |
| GLC_3dsToWorld (const QGLContext *) | |
| virtual | ~GLC_3dsToWorld () |
Set Functions | |
| GLC_World * | CreateWorldFrom3ds (QFile &file) |
| Create an GLC_World from an input 3DS File. | |
| QStringList | listOfAttachedFileName () const |
| Get the list of attached files. | |
Private Member Functions | |
Private services functions | |
| void | clear () |
| clear 3dsToWorld allocate memmory | |
| void | createMeshes (GLC_StructOccurence *, Lib3dsNode *) |
| Create meshes from the 3ds File. | |
| GLC_3DRep | create3DRep (Lib3dsMesh *) |
| Create 3DRep from a Lib3dsMesh. | |
| void | loadMaterial (Lib3dsMaterial *) |
| Load Material. | |
Private Attributes | |
| GLC_World * | m_pWorld |
| pointer to a GLC_World | |
| QString | m_FileName |
| The 3DS File name. | |
| const QGLContext * | m_pQGLContext |
| OpenGL Context. | |
| GLC_Mesh * | m_pCurrentMesh |
| The current mesh. | |
| Lib3dsFile * | m_pLib3dsFile |
| The Lib3dsFile Structure. | |
| QHash< QString, GLC_Material * > | m_Materials |
| The GLC_Material Hash Table. | |
| int | m_NextMaterialIndex |
| The next material index. | |
| QSet< QString > | m_LoadedMeshes |
| const int | m_InitQuantumValue |
| int | m_CurrentQuantumValue |
| int | m_PreviousQuantumValue |
| int | m_NumberOfMeshes |
| int | m_CurrentMeshNumber |
| QSet< QString > | m_ListOfAttachedFileName |
| The list of attached file name. | |
GLC_3dsToWorld : Create an GLC_World from 3ds file.
An GLC_3dsToWorld extract meshs from an .3ds file
List of elements extracted from the 3ds
Definition at line 67 of file glc_3dstoworld.h.
| GLC_3dsToWorld::GLC_3dsToWorld | ( | const QGLContext * | pContext | ) |
Definition at line 50 of file glc_3dstoworld.cpp.
| GLC_3dsToWorld::~GLC_3dsToWorld | ( | ) | [virtual] |
Definition at line 68 of file glc_3dstoworld.cpp.
References clear().
| void GLC_3dsToWorld::clear | ( | ) | [private] |
clear 3dsToWorld allocate memmory
Definition at line 159 of file glc_3dstoworld.cpp.
References m_CurrentMeshNumber, m_CurrentQuantumValue, m_FileName, m_ListOfAttachedFileName, m_LoadedMeshes, m_Materials, m_NextMaterialIndex, m_NumberOfMeshes, m_pCurrentMesh, m_pLib3dsFile, m_PreviousQuantumValue, and m_pWorld.
Referenced by CreateWorldFrom3ds(), and ~GLC_3dsToWorld().
| GLC_3DRep GLC_3dsToWorld::create3DRep | ( | Lib3dsMesh * | p3dsMesh | ) | [private] |
Create 3DRep from a Lib3dsMesh.
Create 3DRep from a Lib3dsNode.
Definition at line 267 of file glc_3dstoworld.cpp.
References GLC_Mesh::addNormals(), GLC_Mesh::addTexels(), GLC_Mesh::addTriangles(), GLC_Mesh::addVertice(), GLC_World::collection(), currentQuantum(), GLC_Mesh::finish(), GLC_3DViewCollection::instancesHandle(), loadMaterial(), m_CurrentMeshNumber, m_CurrentQuantumValue, m_InitQuantumValue, m_LoadedMeshes, m_Materials, m_NumberOfMeshes, m_pLib3dsFile, m_PreviousQuantumValue, m_pWorld, and GLC_Geometry::setName().
Referenced by createMeshes().
| void GLC_3dsToWorld::createMeshes | ( | GLC_StructOccurence * | pProduct, | |
| Lib3dsNode * | pFatherNode | |||
| ) | [private] |
Create meshes from the 3ds File.
Definition at line 193 of file glc_3dstoworld.cpp.
References GLC_StructOccurence::addChild(), create3DRep(), GLC_Matrix4x4::data(), GLC_Matrix4x4::invert(), m_LoadedMeshes, m_Materials, m_pLib3dsFile, GLC_3DRep::materialSet(), GLC_Rep::name(), GLC_StructOccurence::setName(), and GLC_3DRep::vertexCount().
Referenced by CreateWorldFrom3ds().
| GLC_World * GLC_3dsToWorld::CreateWorldFrom3ds | ( | QFile & | file | ) |
Create an GLC_World from an input 3DS File.
Definition at line 74 of file glc_3dstoworld.cpp.
References GLC_3DViewCollection::boundingBox(), clear(), GLC_World::collection(), createMeshes(), currentQuantum(), GLC_FileFormatException::FileNotFound, GLC_FileFormatException::FileNotSupported, m_CurrentQuantumValue, m_FileName, m_InitQuantumValue, m_LoadedMeshes, m_NumberOfMeshes, m_pLib3dsFile, m_PreviousQuantumValue, m_pWorld, GLC_FileFormatException::NoMeshFound, and GLC_World::rootOccurence().
Referenced by GLC_Factory::createWorldFromFile().
| void GLC_3dsToWorld::currentQuantum | ( | int | ) | [signal] |
Referenced by create3DRep(), and CreateWorldFrom3ds().
| QStringList GLC_3dsToWorld::listOfAttachedFileName | ( | ) | const [inline] |
Get the list of attached files.
Definition at line 90 of file glc_3dstoworld.h.
Referenced by GLC_Factory::createWorldFromFile().
| void GLC_3dsToWorld::loadMaterial | ( | Lib3dsMaterial * | p3dsMaterial | ) | [private] |
Load Material.
Definition at line 368 of file glc_3dstoworld.cpp.
References m_FileName, m_ListOfAttachedFileName, m_Materials, m_pQGLContext, GLC_Material::setAmbientColor(), GLC_Material::setDiffuseColor(), GLC_Object::setName(), GLC_Material::setOpacity(), GLC_Material::setShininess(), GLC_Material::setSpecularColor(), and GLC_Material::setTexture().
Referenced by create3DRep().
int GLC_3dsToWorld::m_CurrentMeshNumber [private] |
Definition at line 161 of file glc_3dstoworld.h.
Referenced by clear(), and create3DRep().
int GLC_3dsToWorld::m_CurrentQuantumValue [private] |
Definition at line 152 of file glc_3dstoworld.h.
Referenced by clear(), create3DRep(), and CreateWorldFrom3ds().
QString GLC_3dsToWorld::m_FileName [private] |
The 3DS File name.
Definition at line 128 of file glc_3dstoworld.h.
Referenced by clear(), CreateWorldFrom3ds(), and loadMaterial().
const int GLC_3dsToWorld::m_InitQuantumValue [private] |
Definition at line 149 of file glc_3dstoworld.h.
Referenced by create3DRep(), and CreateWorldFrom3ds().
QSet<QString> GLC_3dsToWorld::m_ListOfAttachedFileName [private] |
The list of attached file name.
Definition at line 164 of file glc_3dstoworld.h.
Referenced by clear(), and loadMaterial().
QSet<QString> GLC_3dsToWorld::m_LoadedMeshes [private] |
Definition at line 146 of file glc_3dstoworld.h.
Referenced by clear(), create3DRep(), createMeshes(), and CreateWorldFrom3ds().
QHash<QString, GLC_Material*> GLC_3dsToWorld::m_Materials [private] |
The GLC_Material Hash Table.
Definition at line 140 of file glc_3dstoworld.h.
Referenced by clear(), create3DRep(), createMeshes(), and loadMaterial().
int GLC_3dsToWorld::m_NextMaterialIndex [private] |
int GLC_3dsToWorld::m_NumberOfMeshes [private] |
Definition at line 158 of file glc_3dstoworld.h.
Referenced by clear(), create3DRep(), and CreateWorldFrom3ds().
GLC_Mesh* GLC_3dsToWorld::m_pCurrentMesh [private] |
Lib3dsFile* GLC_3dsToWorld::m_pLib3dsFile [private] |
The Lib3dsFile Structure.
Definition at line 137 of file glc_3dstoworld.h.
Referenced by clear(), create3DRep(), createMeshes(), and CreateWorldFrom3ds().
const QGLContext* GLC_3dsToWorld::m_pQGLContext [private] |
int GLC_3dsToWorld::m_PreviousQuantumValue [private] |
Definition at line 155 of file glc_3dstoworld.h.
Referenced by clear(), create3DRep(), and CreateWorldFrom3ds().
GLC_World* GLC_3dsToWorld::m_pWorld [private] |
pointer to a GLC_World
Definition at line 125 of file glc_3dstoworld.h.
Referenced by clear(), create3DRep(), and CreateWorldFrom3ds().