GLC_OffToWorld : Create an GLC_World from off file. More...
#include <glc_offtoworld.h>
Signals | |
| void | currentQuantum (int) |
Public Member Functions | |
Constructor / Destructor | |
| GLC_OffToWorld () | |
| virtual | ~GLC_OffToWorld () |
Set Functions | |
| GLC_World * | CreateWorldFromOff (QFile &file) |
| Create an GLC_World from an input OFF File. | |
Private Member Functions | |
Private services functions | |
| void | clear () |
| clear stlToWorld allocate memmory | |
| void | extractVertex (QString &) |
| Extract a vertex from a string and add color component if needed. | |
| void | extractNbrVertexsAndNbrFaces (QString &) |
| Extract Number off Vertex and faces. | |
| void | extractFaceIndex (QString &) |
| Extract a face from a string. | |
| void | computeNormal () |
| compute faces normal | |
Private Attributes | |
| GLC_World * | m_pWorld |
| pointer to a GLC_World | |
| QString | m_FileName |
| The Stl File name. | |
| int | m_CurrentLineNumber |
| The current line number. | |
| GLC_Mesh * | m_pCurrentMesh |
| The current mesh. | |
| int | m_CurVertexIndex |
| Index of the current vertex. | |
| int | m_NbrOfVertexs |
| The number of vertexs. | |
| int | m_NbrOfFaces |
| The number of faces. | |
| bool | m_IsCoff |
| The OFF is a COFF. | |
| bool | m_Is4off |
| The OFF is 4OFF. | |
| QList< float > | m_PositionBulk |
| QList< float > | m_NormalBulk |
| The Normal Bulk data. | |
| QList< float > | m_ColorBulk |
| The color Bulk data. | |
| IndexList | m_IndexList |
| The indexList. | |
GLC_OffToWorld : Create an GLC_World from off file.
An GLC_OffToWorld extract the only mesh from an .off file
List of elements extracted from the off
Definition at line 61 of file glc_offtoworld.h.
| GLC_OffToWorld::GLC_OffToWorld | ( | ) |
Definition at line 39 of file glc_offtoworld.cpp.
| GLC_OffToWorld::~GLC_OffToWorld | ( | ) | [virtual] |
Definition at line 57 of file glc_offtoworld.cpp.
References clear().
| void GLC_OffToWorld::clear | ( | ) | [private] |
clear stlToWorld allocate memmory
Definition at line 241 of file glc_offtoworld.cpp.
References m_ColorBulk, m_CurrentLineNumber, m_CurVertexIndex, m_FileName, m_Is4off, m_IsCoff, m_NbrOfFaces, m_NbrOfVertexs, m_NormalBulk, m_pCurrentMesh, m_PositionBulk, and m_pWorld.
Referenced by CreateWorldFromOff(), extractFaceIndex(), extractNbrVertexsAndNbrFaces(), extractVertex(), and ~GLC_OffToWorld().
| void GLC_OffToWorld::computeNormal | ( | ) | [private] |
compute faces normal
Definition at line 516 of file glc_offtoworld.cpp.
References m_IndexList, m_NormalBulk, m_PositionBulk, GLC_Vector3d::normalize(), GLC_Vector3d::toVector3df(), GLC_Vector3df::X(), GLC_Vector3df::Y(), and GLC_Vector3df::Z().
Referenced by CreateWorldFromOff().
| GLC_World * GLC_OffToWorld::CreateWorldFromOff | ( | QFile & | file | ) |
Create an GLC_World from an input OFF File.
Definition at line 67 of file glc_offtoworld.cpp.
References GLC_StructOccurence::addChild(), GLC_Mesh::addColors(), GLC_Mesh::addNormals(), GLC_Mesh::addTriangles(), GLC_Mesh::addVertice(), clear(), computeNormal(), currentQuantum(), extractFaceIndex(), extractNbrVertexsAndNbrFaces(), extractVertex(), GLC_FileFormatException::FileNotFound, GLC_FileFormatException::FileNotSupported, GLC_Mesh::finish(), m_ColorBulk, m_CurrentLineNumber, m_FileName, m_IndexList, m_Is4off, m_IsCoff, m_NbrOfFaces, m_NbrOfVertexs, m_NormalBulk, m_pCurrentMesh, m_PositionBulk, m_pWorld, GLC_World::rootOccurence(), and GLC_Mesh::setColorPearVertex().
Referenced by GLC_Factory::createWorldFromFile().
| void GLC_OffToWorld::currentQuantum | ( | int | ) | [signal] |
Referenced by CreateWorldFromOff().
| void GLC_OffToWorld::extractFaceIndex | ( | QString & | line | ) | [private] |
Extract a face from a string.
Definition at line 407 of file glc_offtoworld.cpp.
References clear(), m_ColorBulk, m_CurrentLineNumber, m_FileName, m_IndexList, m_PositionBulk, and GLC_FileFormatException::WrongFileFormat.
Referenced by CreateWorldFromOff().
| void GLC_OffToWorld::extractNbrVertexsAndNbrFaces | ( | QString & | line | ) | [private] |
Extract Number off Vertex and faces.
Definition at line 371 of file glc_offtoworld.cpp.
References clear(), m_CurrentLineNumber, m_FileName, m_NbrOfFaces, m_NbrOfVertexs, and GLC_FileFormatException::WrongFileFormat.
Referenced by CreateWorldFromOff().
| void GLC_OffToWorld::extractVertex | ( | QString & | line | ) | [private] |
Extract a vertex from a string and add color component if needed.
Definition at line 263 of file glc_offtoworld.cpp.
References clear(), m_ColorBulk, m_CurrentLineNumber, m_FileName, m_Is4off, m_IsCoff, m_PositionBulk, and GLC_FileFormatException::WrongFileFormat.
Referenced by CreateWorldFromOff().
QList<float> GLC_OffToWorld::m_ColorBulk [private] |
The color Bulk data.
Definition at line 149 of file glc_offtoworld.h.
Referenced by clear(), CreateWorldFromOff(), extractFaceIndex(), and extractVertex().
int GLC_OffToWorld::m_CurrentLineNumber [private] |
The current line number.
Definition at line 122 of file glc_offtoworld.h.
Referenced by clear(), CreateWorldFromOff(), extractFaceIndex(), extractNbrVertexsAndNbrFaces(), and extractVertex().
int GLC_OffToWorld::m_CurVertexIndex [private] |
Index of the current vertex.
Definition at line 128 of file glc_offtoworld.h.
Referenced by clear().
QString GLC_OffToWorld::m_FileName [private] |
The Stl File name.
Definition at line 119 of file glc_offtoworld.h.
Referenced by clear(), CreateWorldFromOff(), extractFaceIndex(), extractNbrVertexsAndNbrFaces(), and extractVertex().
IndexList GLC_OffToWorld::m_IndexList [private] |
The indexList.
Definition at line 152 of file glc_offtoworld.h.
Referenced by computeNormal(), CreateWorldFromOff(), and extractFaceIndex().
bool GLC_OffToWorld::m_Is4off [private] |
The OFF is 4OFF.
Definition at line 140 of file glc_offtoworld.h.
Referenced by clear(), CreateWorldFromOff(), and extractVertex().
bool GLC_OffToWorld::m_IsCoff [private] |
The OFF is a COFF.
Definition at line 137 of file glc_offtoworld.h.
Referenced by clear(), CreateWorldFromOff(), and extractVertex().
int GLC_OffToWorld::m_NbrOfFaces [private] |
The number of faces.
Definition at line 134 of file glc_offtoworld.h.
Referenced by clear(), CreateWorldFromOff(), and extractNbrVertexsAndNbrFaces().
int GLC_OffToWorld::m_NbrOfVertexs [private] |
The number of vertexs.
Definition at line 131 of file glc_offtoworld.h.
Referenced by clear(), CreateWorldFromOff(), and extractNbrVertexsAndNbrFaces().
QList<float> GLC_OffToWorld::m_NormalBulk [private] |
The Normal Bulk data.
Definition at line 146 of file glc_offtoworld.h.
Referenced by clear(), computeNormal(), and CreateWorldFromOff().
GLC_Mesh* GLC_OffToWorld::m_pCurrentMesh [private] |
The current mesh.
Definition at line 125 of file glc_offtoworld.h.
Referenced by clear(), and CreateWorldFromOff().
QList<float> GLC_OffToWorld::m_PositionBulk [private] |
Definition at line 143 of file glc_offtoworld.h.
Referenced by clear(), computeNormal(), CreateWorldFromOff(), extractFaceIndex(), and extractVertex().
GLC_World* GLC_OffToWorld::m_pWorld [private] |
pointer to a GLC_World
Definition at line 116 of file glc_offtoworld.h.
Referenced by clear(), and CreateWorldFromOff().