GLC_ExtendedGeomEngine Class Reference

GLC_ExtendedGeomEngine : Specialized engine. More...

#include <glc_extendedgeomengine.h>

Inheritance diagram for GLC_ExtendedGeomEngine:

GLC_GeomEngine

List of all members.

Public Types

enum  VboType { GLC_Vertex = 30, GLC_Normal, GLC_Texel, GLC_Color }
 Enum of VBO TYPE. More...

Public Member Functions

 GLC_ExtendedGeomEngine ()
 Default constructor.
 GLC_ExtendedGeomEngine (const GLC_ExtendedGeomEngine &)
 Copy constructor.
virtual ~GLC_ExtendedGeomEngine ()
Get Functions


int numberOfLod ()
 Return the number of lod.
GLfloatVector positionVector () const
 Return the Position Vector.
GLfloatVector normalVector () const
 Return the normal Vector.
GLfloatVector texelVector () const
 Return the texel Vector.
GLfloatVector colorVector () const
 Return the color Vector.
GLfloatVectorpositionVectorHandle ()
 Return the Position Vector handle.
GLfloatVectornormalVectorHandle ()
 Return the Normal Vector handle.
GLfloatVectortexelVectorHandle ()
 Return the Texel Vector handle.
GLfloatVectorcolorVectorHandle ()
 Return the Color Vector handle.
GLuintVector indexVector (const int i=0) const
 Return the Index Vector.
GLuintVectorindexVectorHandle (const int i=0) const
 Return the Index Vector handle.
int indexVectorSize (const int i=0) const
 Return the size of the triangles index Vector.
GLC_EngineLodgetLod (int index) const
 Return the specified LOD.
Set Functions


void appendLod (double accuracy=0.0)
 Add a Lod to the engine.
void finished ()
 The mesh wich use this engine is finished.
void finishedLod ()
 If the there is more than 2 LOD Swap the first and last.
void clear ()
 Clear the engine.
OpenGL Functions


void createVBOs ()
 Vbo creation.
bool useVBO (bool, GLC_ExtendedGeomEngine::VboType)
 Ibo Usage.
void useIBO (bool use, const int currentLod=0)
 Ibo Usage.

Private Attributes

GLfloatVector m_Positions
 Vertex Position Vector.
GLfloatVector m_Normals
 Vertex Normal Vector.
GLfloatVector m_Texels
 Vertex Texture coordinate.
GLfloatVector m_Colors
 Color index.
GLuint m_NormalVboId
 Normals VBO ID.
GLuint m_TexelVboId
 Texture VBO ID.
GLuint m_ColorVboId
 Color VBO ID.
QList< GLC_EngineLod * > m_EngineLodList
 The list of LOD.
int m_PositionSize
 The size of Position and normal VBO.
int m_TexelsSize
 The size of texel VBO.
int m_ColorSize
 The size of Color VBO.


Detailed Description

GLC_ExtendedGeomEngine : Specialized engine.

GLC_ExtendedGeomEngine can handle mesh with Triangles, strips and fans

Definition at line 48 of file glc_extendedgeomengine.h.


Member Enumeration Documentation

Enum of VBO TYPE.

Enumerator:
GLC_Vertex 
GLC_Normal 
GLC_Texel 
GLC_Color 

Definition at line 53 of file glc_extendedgeomengine.h.


Constructor & Destructor Documentation

GLC_ExtendedGeomEngine::GLC_ExtendedGeomEngine (  ) 

Default constructor.

Definition at line 31 of file glc_extendedgeomengine.cpp.

GLC_ExtendedGeomEngine::GLC_ExtendedGeomEngine ( const GLC_ExtendedGeomEngine engine  ) 

Copy constructor.

Definition at line 50 of file glc_extendedgeomengine.cpp.

References m_EngineLodList.

GLC_ExtendedGeomEngine::~GLC_ExtendedGeomEngine (  )  [virtual]


Member Function Documentation

int GLC_ExtendedGeomEngine::numberOfLod (  )  [inline]

Return the number of lod.

Definition at line 77 of file glc_extendedgeomengine.h.

References m_EngineLodList.

Referenced by GLC_ExtendedMesh::createVbos(), GLC_ExtendedMesh::numberOfLod(), and GLC_ExtendedMesh::setCurrentLod().

GLfloatVector GLC_ExtendedGeomEngine::positionVector (  )  const

Return the Position Vector.

Definition at line 105 of file glc_extendedgeomengine.cpp.

References glBindBuffer, glMapBuffer, glUnmapBuffer, m_Positions, m_PositionSize, and GLC_GeomEngine::m_VboId.

Referenced by GLC_ExtendedMesh::positionVector().

GLfloatVector GLC_ExtendedGeomEngine::normalVector (  )  const

GLfloatVector GLC_ExtendedGeomEngine::texelVector (  )  const

Return the texel Vector.

Definition at line 152 of file glc_extendedgeomengine.cpp.

References glBindBuffer, glMapBuffer, glUnmapBuffer, m_Texels, m_TexelsSize, and m_TexelVboId.

Referenced by GLC_ExtendedMesh::texelVector().

GLfloatVector GLC_ExtendedGeomEngine::colorVector (  )  const

Return the color Vector.

Definition at line 175 of file glc_extendedgeomengine.cpp.

References glBindBuffer, glMapBuffer, glUnmapBuffer, m_Colors, m_ColorSize, m_ColorVboId, and normalVector().

GLfloatVector* GLC_ExtendedGeomEngine::positionVectorHandle (  )  [inline]

GLfloatVector* GLC_ExtendedGeomEngine::normalVectorHandle (  )  [inline]

GLfloatVector* GLC_ExtendedGeomEngine::texelVectorHandle (  )  [inline]

GLfloatVector* GLC_ExtendedGeomEngine::colorVectorHandle (  )  [inline]

Return the Color Vector handle.

Definition at line 105 of file glc_extendedgeomengine.h.

References m_Colors.

Referenced by GLC_ExtendedMesh::addColors(), GLC_ExtendedMesh::createVbos(), and GLC_ExtendedMesh::glDraw().

GLuintVector GLC_ExtendedGeomEngine::indexVector ( const int  i = 0  )  const [inline]

GLuintVector* GLC_ExtendedGeomEngine::indexVectorHandle ( const int  i = 0  )  const [inline]

int GLC_ExtendedGeomEngine::indexVectorSize ( const int  i = 0  )  const [inline]

Return the size of the triangles index Vector.

Definition at line 123 of file glc_extendedgeomengine.h.

References m_EngineLodList.

Referenced by GLC_Rectangle::finishNonVbo(), GLC_ExtendedMesh::finishNonVbo(), GLC_Rectangle::finishVbo(), and GLC_ExtendedMesh::finishVbo().

GLC_EngineLod* GLC_ExtendedGeomEngine::getLod ( int  index  )  const [inline]

Return the specified LOD.

Definition at line 129 of file glc_extendedgeomengine.h.

References m_EngineLodList.

Referenced by GLC_ExtendedMesh::containsLod(), and GLC_ExtendedMesh::getLodAccuracy().

void GLC_ExtendedGeomEngine::appendLod ( double  accuracy = 0.0  )  [inline]

Add a Lod to the engine.

Definition at line 142 of file glc_extendedgeomengine.h.

References m_EngineLodList.

Referenced by GLC_Rectangle::createRectangleMesh(), and GLC_ExtendedMesh::setCurrentMaterial().

void GLC_ExtendedGeomEngine::finished (  ) 

The mesh wich use this engine is finished.

Definition at line 202 of file glc_extendedgeomengine.cpp.

References m_Colors, m_ColorSize, m_EngineLodList, m_Normals, m_Positions, m_PositionSize, m_Texels, and m_TexelsSize.

Referenced by GLC_Rectangle::createVbos(), and GLC_ExtendedMesh::createVbos().

void GLC_ExtendedGeomEngine::finishedLod (  ) 

If the there is more than 2 LOD Swap the first and last.

Definition at line 220 of file glc_extendedgeomengine.cpp.

References m_EngineLodList.

Referenced by GLC_ExtendedMesh::finished().

void GLC_ExtendedGeomEngine::clear (  ) 

void GLC_ExtendedGeomEngine::createVBOs (  ) 

bool GLC_ExtendedGeomEngine::useVBO ( bool  use,
GLC_ExtendedGeomEngine::VboType  type 
)

void GLC_ExtendedGeomEngine::useIBO ( bool  use,
const int  currentLod = 0 
) [inline]


Member Data Documentation

Vertex Position Vector.

Definition at line 181 of file glc_extendedgeomengine.h.

Referenced by clear(), finished(), positionVector(), and positionVectorHandle().

Vertex Normal Vector.

Definition at line 184 of file glc_extendedgeomengine.h.

Referenced by clear(), finished(), normalVector(), and normalVectorHandle().

Vertex Texture coordinate.

Definition at line 187 of file glc_extendedgeomengine.h.

Referenced by clear(), createVBOs(), finished(), texelVector(), and texelVectorHandle().

Color index.

Definition at line 190 of file glc_extendedgeomengine.h.

Referenced by colorVector(), colorVectorHandle(), createVBOs(), and finished().

Normals VBO ID.

Definition at line 193 of file glc_extendedgeomengine.h.

Referenced by clear(), createVBOs(), normalVector(), useVBO(), and ~GLC_ExtendedGeomEngine().

Texture VBO ID.

Definition at line 196 of file glc_extendedgeomengine.h.

Referenced by clear(), createVBOs(), texelVector(), useVBO(), and ~GLC_ExtendedGeomEngine().

Color VBO ID.

Definition at line 199 of file glc_extendedgeomengine.h.

Referenced by colorVector(), createVBOs(), useVBO(), and ~GLC_ExtendedGeomEngine().

The size of Position and normal VBO.

Definition at line 205 of file glc_extendedgeomengine.h.

Referenced by clear(), finished(), normalVector(), and positionVector().

The size of texel VBO.

Definition at line 208 of file glc_extendedgeomengine.h.

Referenced by clear(), finished(), and texelVector().

The size of Color VBO.

Definition at line 211 of file glc_extendedgeomengine.h.

Referenced by colorVector(), and finished().


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

SourceForge.net Logo

©2005 Laurent Ribon