GLC_StlToWorld : Create an GLC_World from stl file. More...
#include <glc_stltoworld.h>
Signals | |
| void | currentQuantum (int) |
Public Member Functions | |
Constructor / Destructor | |
| GLC_StlToWorld () | |
| virtual | ~GLC_StlToWorld () |
Set Functions | |
| GLC_World * | CreateWorldFromStl (QFile &file) |
| Create and return an GLC_World* from an input STL File. | |
Private Member Functions | |
Private services functions | |
| void | clear () |
| clear stlToWorld allocate memmory | |
| void | scanFacet () |
| Scan a line previously extracted from STL file. | |
| GLC_Vector3df | extract3dVect (QString &) |
| Extract a 3D Vector from a string. | |
| void | LoadBinariStl (QFile &) |
| Load Binarie STL File. | |
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. | |
| QTextStream | m_StlStream |
| The Text Stream. | |
| GLC_Mesh * | m_pCurrentMesh |
| The current mesh. | |
| IndexList | m_CurrentFace |
| Current face index. | |
| QList< float > | m_VertexBulk |
| Vertex Bulk data. | |
| QList< float > | m_NormalBulk |
| Normal Bulk data. | |
| GLuint | m_CurrentIndex |
| The current index. | |
GLC_StlToWorld : Create an GLC_World from stl file.
An GLC_StlToWorld extract the only mesh from an .stl file
List of elements extracted from the STL
Definition at line 55 of file glc_stltoworld.h.
| GLC_StlToWorld::GLC_StlToWorld | ( | ) |
Definition at line 39 of file glc_stltoworld.cpp.
| GLC_StlToWorld::~GLC_StlToWorld | ( | ) | [virtual] |
Definition at line 54 of file glc_stltoworld.cpp.
References clear().
| void GLC_StlToWorld::clear | ( | ) | [private] |
clear stlToWorld allocate memmory
Definition at line 167 of file glc_stltoworld.cpp.
References m_CurrentFace, m_CurrentLineNumber, m_FileName, m_pCurrentMesh, and m_pWorld.
Referenced by CreateWorldFromStl(), extract3dVect(), LoadBinariStl(), scanFacet(), and ~GLC_StlToWorld().
| GLC_World * GLC_StlToWorld::CreateWorldFromStl | ( | QFile & | file | ) |
Create and return an GLC_World* from an input STL File.
Definition at line 64 of file glc_stltoworld.cpp.
References GLC_StructOccurence::addChild(), GLC_Mesh::addNormals(), GLC_Mesh::addTriangles(), GLC_Mesh::addVertice(), clear(), currentQuantum(), GLC_FileFormatException::FileNotFound, GLC_Mesh::finish(), LoadBinariStl(), m_CurrentFace, m_CurrentLineNumber, m_FileName, m_NormalBulk, m_pCurrentMesh, m_pWorld, m_StlStream, m_VertexBulk, GLC_World::rootOccurence(), scanFacet(), and GLC_Geometry::setName().
Referenced by GLC_Factory::createWorldFromFile().
| void GLC_StlToWorld::currentQuantum | ( | int | ) | [signal] |
Referenced by CreateWorldFromStl(), and LoadBinariStl().
| GLC_Vector3df GLC_StlToWorld::extract3dVect | ( | QString & | line | ) | [private] |
Extract a 3D Vector from a string.
Definition at line 317 of file glc_stltoworld.cpp.
References clear(), m_CurrentLineNumber, m_FileName, GLC_Vector3df::setVect(), and GLC_FileFormatException::WrongFileFormat.
Referenced by scanFacet().
| void GLC_StlToWorld::LoadBinariStl | ( | QFile & | file | ) | [private] |
Load Binarie STL File.
Definition at line 354 of file glc_stltoworld.cpp.
References clear(), currentQuantum(), m_CurrentFace, m_CurrentIndex, m_FileName, m_NormalBulk, m_VertexBulk, and GLC_FileFormatException::WrongFileFormat.
Referenced by CreateWorldFromStl().
| void GLC_StlToWorld::scanFacet | ( | ) | [private] |
Scan a line previously extracted from STL file.
Definition at line 182 of file glc_stltoworld.cpp.
References GLC_StructOccurence::addChild(), GLC_Mesh::addNormals(), GLC_Mesh::addTriangles(), GLC_Mesh::addVertice(), clear(), extract3dVect(), GLC_Mesh::finish(), m_CurrentFace, m_CurrentIndex, m_CurrentLineNumber, m_FileName, m_NormalBulk, m_pCurrentMesh, m_pWorld, m_StlStream, m_VertexBulk, GLC_World::rootOccurence(), GLC_Geometry::setName(), GLC_FileFormatException::WrongFileFormat, GLC_Vector3df::X(), GLC_Vector3df::Y(), and GLC_Vector3df::Z().
Referenced by CreateWorldFromStl().
IndexList GLC_StlToWorld::m_CurrentFace [private] |
Current face index.
Definition at line 119 of file glc_stltoworld.h.
Referenced by clear(), CreateWorldFromStl(), LoadBinariStl(), and scanFacet().
GLuint GLC_StlToWorld::m_CurrentIndex [private] |
The current index.
Definition at line 128 of file glc_stltoworld.h.
Referenced by LoadBinariStl(), and scanFacet().
int GLC_StlToWorld::m_CurrentLineNumber [private] |
The current line number.
Definition at line 110 of file glc_stltoworld.h.
Referenced by clear(), CreateWorldFromStl(), extract3dVect(), and scanFacet().
QString GLC_StlToWorld::m_FileName [private] |
The Stl File name.
Definition at line 107 of file glc_stltoworld.h.
Referenced by clear(), CreateWorldFromStl(), extract3dVect(), LoadBinariStl(), and scanFacet().
QList<float> GLC_StlToWorld::m_NormalBulk [private] |
Normal Bulk data.
Definition at line 125 of file glc_stltoworld.h.
Referenced by CreateWorldFromStl(), LoadBinariStl(), and scanFacet().
GLC_Mesh* GLC_StlToWorld::m_pCurrentMesh [private] |
The current mesh.
Definition at line 116 of file glc_stltoworld.h.
Referenced by clear(), CreateWorldFromStl(), and scanFacet().
GLC_World* GLC_StlToWorld::m_pWorld [private] |
pointer to a GLC_World
Definition at line 104 of file glc_stltoworld.h.
Referenced by clear(), CreateWorldFromStl(), and scanFacet().
QTextStream GLC_StlToWorld::m_StlStream [private] |
The Text Stream.
Definition at line 113 of file glc_stltoworld.h.
Referenced by CreateWorldFromStl(), and scanFacet().
QList<float> GLC_StlToWorld::m_VertexBulk [private] |
Vertex Bulk data.
Definition at line 122 of file glc_stltoworld.h.
Referenced by CreateWorldFromStl(), LoadBinariStl(), and scanFacet().