GLC_ObjToWorld Class Reference

GLC_ObjToWorld : Create an GLC_World from obj file. More...

#include <glc_objtoworld.h>

List of all members.

Classes

struct  CurrentObjMesh
struct  MatOffsetSize
struct  ObjVertice

Signals

void currentQuantum (int)

Public Member Functions

Constructor / Destructor

 GLC_ObjToWorld ()
virtual ~GLC_ObjToWorld ()
Set Functions

GLC_WorldCreateWorldFromObj (QFile &file)
 Create an GLC_World from an input OBJ File.
QStringList listOfAttachedFileName () const
 Get the list of attached files.

Private Member Functions

QString getMtlLibFileName (QString)
 Return the name of the mtl file.
void scanLigne (QString &)
 Scan a line previously extracted from OBJ file.
void changeGroup (QString)
 Change current group.
QList< float > extract3dVect (QString &)
 Extract a 3D Vector from a string.
QList< float > extract2dVect (QString &)
 Extract a 2D Vector from a string.
void extractFaceIndex (QString &)
 Extract a face from a string.
void setCurrentMaterial (QString &line)
 Set Current material index.
void extractVertexIndex (QString ligne, int &Coordinate, int &Normal, int &TextureCoordinate)
 Extract a vertex from a string.
void setObjType (QString &)
 set the OBJ File type
GLC_Vector3df computeNormal (GLuint, GLuint, GLuint)
 compute face normal
void clear ()
 clear objToWorld allocate memmory
void mergeLines (QString *, QTextStream *)
 Merge Mutli line in one.
void addCurrentObjMeshToWorld ()
 Add the current Obj mesh to the world.

Private Attributes

GLC_Worldm_pWorld
 pointer to a GLC_World
QString m_FileName
 The Obj File name.
GLC_ObjMtlLoaderm_pMtlLoader
 the Obj Mtl loader
int m_CurrentLineNumber
 The current line number.
CurrentObjMeshm_pCurrentObjMesh
 The current mesh.
FaceType m_FaceType
 Face type.
QHash< QString, int > m_CurrentMeshMaterials
 List of material already used by the current mesh.
QString m_CurrentMaterialName
 Current material name.
QStringList m_ListOfAttachedFileName
 The list of attached file name.
QList< float > m_Positions
 The position bulk data.
QList< float > m_Normals
 The normal bulk data.
QList< float > m_Texels
 The texture coordinate bulk data.

Detailed Description

GLC_ObjToWorld : Create an GLC_World from obj file.

An GLC_ObjToWorld extract the meshs from an .obj file
List of elements extracted from the OBJ

Definition at line 69 of file glc_objtoworld.h.


Constructor & Destructor Documentation

GLC_ObjToWorld::GLC_ObjToWorld (  ) 

Definition at line 43 of file glc_objtoworld.cpp.

GLC_ObjToWorld::~GLC_ObjToWorld (  )  [virtual]

Definition at line 59 of file glc_objtoworld.cpp.

References clear().


Member Function Documentation

void GLC_ObjToWorld::addCurrentObjMeshToWorld (  )  [private]
void GLC_ObjToWorld::changeGroup ( QString  line  )  [private]
void GLC_ObjToWorld::clear (  )  [private]
GLC_Vector3df GLC_ObjToWorld::computeNormal ( GLuint  index1,
GLuint  index2,
GLuint  index3 
) [private]
GLC_World * GLC_ObjToWorld::CreateWorldFromObj ( QFile &  file  ) 
void GLC_ObjToWorld::currentQuantum ( int   )  [signal]

Referenced by CreateWorldFromObj().

QList< float > GLC_ObjToWorld::extract2dVect ( QString &  line  )  [private]

Extract a 2D Vector from a string.

Definition at line 372 of file glc_objtoworld.cpp.

References clear(), m_CurrentLineNumber, m_FileName, and GLC_FileFormatException::WrongFileFormat.

Referenced by scanLigne().

QList< float > GLC_ObjToWorld::extract3dVect ( QString &  line  )  [private]

Extract a 3D Vector from a string.

Definition at line 331 of file glc_objtoworld.cpp.

References GLC_ErrorLog::addError(), m_CurrentLineNumber, and m_FileName.

Referenced by scanLigne().

void GLC_ObjToWorld::extractFaceIndex ( QString &  line  )  [private]
void GLC_ObjToWorld::extractVertexIndex ( QString  ligne,
int &  Coordinate,
int &  Normal,
int &  TextureCoordinate 
) [private]
QString GLC_ObjToWorld::getMtlLibFileName ( QString  line  )  [private]

Return the name of the mtl file.

Definition at line 199 of file glc_objtoworld.cpp.

References m_FileName.

Referenced by CreateWorldFromObj().

QStringList GLC_ObjToWorld::listOfAttachedFileName (  )  const [inline]

Get the list of attached files.

Definition at line 166 of file glc_objtoworld.h.

Referenced by GLC_FileLoader::createWorldFromFile().

void GLC_ObjToWorld::mergeLines ( QString *  pLineBuff,
QTextStream *  p0bjStream 
) [private]

Merge Mutli line in one.

Definition at line 820 of file glc_objtoworld.cpp.

References m_CurrentLineNumber.

Referenced by CreateWorldFromObj().

void GLC_ObjToWorld::scanLigne ( QString &  line  )  [private]

Scan a line previously extracted from OBJ file.

Definition at line 231 of file glc_objtoworld.cpp.

References changeGroup(), extract2dVect(), extract3dVect(), extractFaceIndex(), m_FaceType, m_Normals, m_pCurrentObjMesh, m_Positions, m_Texels, notSet, and setCurrentMaterial().

Referenced by CreateWorldFromObj().

void GLC_ObjToWorld::setCurrentMaterial ( QString &  line  )  [private]
void GLC_ObjToWorld::setObjType ( QString &  ligne  )  [private]

Member Data Documentation

Current material name.

Definition at line 246 of file glc_objtoworld.h.

Referenced by changeGroup(), and setCurrentMaterial().

QHash<QString, int> GLC_ObjToWorld::m_CurrentMeshMaterials [private]

List of material already used by the current mesh.

Definition at line 243 of file glc_objtoworld.h.

Referenced by clear().

Face type.

Definition at line 240 of file glc_objtoworld.h.

Referenced by extractFaceIndex(), extractVertexIndex(), scanLigne(), and setObjType().

QString GLC_ObjToWorld::m_FileName [private]

The list of attached file name.

Definition at line 249 of file glc_objtoworld.h.

Referenced by clear(), and CreateWorldFromObj().

QList<float> GLC_ObjToWorld::m_Normals [private]

The normal bulk data.

Definition at line 255 of file glc_objtoworld.h.

Referenced by extractFaceIndex(), and scanLigne().

the Obj Mtl loader

Definition at line 231 of file glc_objtoworld.h.

Referenced by addCurrentObjMeshToWorld(), clear(), CreateWorldFromObj(), and setCurrentMaterial().

QList<float> GLC_ObjToWorld::m_Positions [private]

The position bulk data.

Definition at line 252 of file glc_objtoworld.h.

Referenced by extractFaceIndex(), and scanLigne().

pointer to a GLC_World

Definition at line 225 of file glc_objtoworld.h.

Referenced by addCurrentObjMeshToWorld(), and CreateWorldFromObj().

QList<float> GLC_ObjToWorld::m_Texels [private]

The texture coordinate bulk data.

Definition at line 258 of file glc_objtoworld.h.

Referenced by extractFaceIndex(), and scanLigne().


The documentation for this class was generated from the following files:

SourceForge.net Logo

©2005-2011 Laurent Ribon