#include <glc_extendedgeomengine.h>

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. | |
| GLfloatVector * | positionVectorHandle () |
| Return the Position Vector handle. | |
| GLfloatVector * | normalVectorHandle () |
| Return the Normal Vector handle. | |
| GLfloatVector * | texelVectorHandle () |
| Return the Texel Vector handle. | |
| GLfloatVector * | colorVectorHandle () |
| Return the Color Vector handle. | |
| GLuintVector | indexVector (const int i=0) const |
| Return the Index Vector. | |
| GLuintVector * | indexVectorHandle (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_EngineLod * | getLod (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. | |
GLC_ExtendedGeomEngine can handle mesh with Triangles, strips and fans
Definition at line 48 of file glc_extendedgeomengine.h.
| GLC_ExtendedGeomEngine::GLC_ExtendedGeomEngine | ( | ) |
| 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] |
Definition at line 73 of file glc_extendedgeomengine.cpp.
References glDeleteBuffers, m_ColorVboId, m_EngineLodList, m_NormalVboId, and m_TexelVboId.
| 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 |
Return the normal Vector.
Definition at line 129 of file glc_extendedgeomengine.cpp.
References glBindBuffer, glMapBuffer, glUnmapBuffer, m_Normals, m_NormalVboId, and m_PositionSize.
Referenced by colorVector(), GLC_ExtendedMesh::normalVector(), and GLC_ExtendedMesh::reverseNormals().
| 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] |
Return the Position Vector handle.
Definition at line 93 of file glc_extendedgeomengine.h.
References m_Positions.
Referenced by GLC_ExtendedMesh::addVertices(), GLC_Rectangle::boundingBox(), GLC_ExtendedMesh::boundingBox(), GLC_Rectangle::createRectangleMesh(), GLC_Rectangle::createVbos(), GLC_ExtendedMesh::createVbos(), GLC_Rectangle::glDraw(), and GLC_ExtendedMesh::glDraw().
| GLfloatVector* GLC_ExtendedGeomEngine::normalVectorHandle | ( | ) | [inline] |
Return the Normal Vector handle.
Definition at line 97 of file glc_extendedgeomengine.h.
References m_Normals.
Referenced by GLC_ExtendedMesh::addNormals(), GLC_Rectangle::createRectangleMesh(), GLC_Rectangle::createVbos(), GLC_ExtendedMesh::createVbos(), GLC_Rectangle::glDraw(), GLC_ExtendedMesh::glDraw(), and GLC_ExtendedMesh::reverseNormals().
| GLfloatVector* GLC_ExtendedGeomEngine::texelVectorHandle | ( | ) | [inline] |
Return the Texel Vector handle.
Definition at line 101 of file glc_extendedgeomengine.h.
References m_Texels.
Referenced by GLC_ExtendedMesh::addTexels(), GLC_Rectangle::createRectangleMesh(), GLC_Rectangle::createVbos(), GLC_ExtendedMesh::createVbos(), GLC_Rectangle::glDraw(), and GLC_ExtendedMesh::glDraw().
| 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] |
Return the Index Vector.
Definition at line 109 of file glc_extendedgeomengine.h.
References m_EngineLodList.
Referenced by GLC_ExtendedMesh::getFansIndex(), GLC_ExtendedMesh::getStripsIndex(), and GLC_ExtendedMesh::getTrianglesIndex().
| GLuintVector* GLC_ExtendedGeomEngine::indexVectorHandle | ( | const int | i = 0 |
) | const [inline] |
Return the Index Vector handle.
Definition at line 116 of file glc_extendedgeomengine.h.
References m_EngineLodList.
Referenced by GLC_Rectangle::createVbos(), GLC_ExtendedMesh::createVbos(), GLC_Rectangle::finishNonVbo(), GLC_ExtendedMesh::finishNonVbo(), GLC_Rectangle::finishVbo(), GLC_ExtendedMesh::finishVbo(), GLC_Rectangle::glDraw(), and GLC_ExtendedMesh::glDraw().
| 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 | ( | ) |
Clear the engine.
Reimplemented from GLC_GeomEngine.
Definition at line 233 of file glc_extendedgeomengine.cpp.
References GLC_GeomEngine::clear(), glDeleteBuffers, m_EngineLodList, m_Normals, m_NormalVboId, m_Positions, m_PositionSize, m_Texels, m_TexelsSize, and m_TexelVboId.
Referenced by GLC_Rectangle::createRectangleMesh().
| void GLC_ExtendedGeomEngine::createVBOs | ( | ) |
Vbo creation.
Vbo creation
Definition at line 269 of file glc_extendedgeomengine.cpp.
References glGenBuffers, m_Colors, m_ColorVboId, m_EngineLodList, m_NormalVboId, m_Texels, m_TexelVboId, and GLC_GeomEngine::m_VboId.
Referenced by GLC_Rectangle::glDraw(), and GLC_ExtendedMesh::glDraw().
| bool GLC_ExtendedGeomEngine::useVBO | ( | bool | use, | |
| GLC_ExtendedGeomEngine::VboType | type | |||
| ) |
Ibo Usage.
Definition at line 297 of file glc_extendedgeomengine.cpp.
References glBindBuffer, GLC_Color, GLC_Normal, GLC_Texel, GLC_Vertex, m_ColorVboId, m_NormalVboId, m_TexelVboId, and GLC_GeomEngine::m_VboId.
Referenced by GLC_Rectangle::createVbos(), GLC_ExtendedMesh::createVbos(), GLC_Rectangle::glDraw(), and GLC_ExtendedMesh::glDraw().
| void GLC_ExtendedGeomEngine::useIBO | ( | bool | use, | |
| const int | currentLod = 0 | |||
| ) | [inline] |
Ibo Usage.
Definition at line 168 of file glc_extendedgeomengine.h.
References glBindBuffer, and m_EngineLodList.
Referenced by GLC_Rectangle::createVbos(), GLC_ExtendedMesh::createVbos(), GLC_Rectangle::glDraw(), and GLC_ExtendedMesh::glDraw().
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().
GLuint GLC_ExtendedGeomEngine::m_NormalVboId [private] |
Normals VBO ID.
Definition at line 193 of file glc_extendedgeomengine.h.
Referenced by clear(), createVBOs(), normalVector(), useVBO(), and ~GLC_ExtendedGeomEngine().
GLuint GLC_ExtendedGeomEngine::m_TexelVboId [private] |
Texture VBO ID.
Definition at line 196 of file glc_extendedgeomengine.h.
Referenced by clear(), createVBOs(), texelVector(), useVBO(), and ~GLC_ExtendedGeomEngine().
GLuint GLC_ExtendedGeomEngine::m_ColorVboId [private] |
Color VBO ID.
Definition at line 199 of file glc_extendedgeomengine.h.
Referenced by colorVector(), createVBOs(), useVBO(), and ~GLC_ExtendedGeomEngine().
QList<GLC_EngineLod*> GLC_ExtendedGeomEngine::m_EngineLodList [private] |
The list of LOD.
Definition at line 202 of file glc_extendedgeomengine.h.
Referenced by appendLod(), clear(), createVBOs(), finished(), finishedLod(), getLod(), GLC_ExtendedGeomEngine(), indexVector(), indexVectorHandle(), indexVectorSize(), numberOfLod(), useIBO(), and ~GLC_ExtendedGeomEngine().
int GLC_ExtendedGeomEngine::m_PositionSize [private] |
The size of Position and normal VBO.
Definition at line 205 of file glc_extendedgeomengine.h.
Referenced by clear(), finished(), normalVector(), and positionVector().
int GLC_ExtendedGeomEngine::m_TexelsSize [private] |
The size of texel VBO.
Definition at line 208 of file glc_extendedgeomengine.h.
Referenced by clear(), finished(), and texelVector().
int GLC_ExtendedGeomEngine::m_ColorSize [private] |
The size of Color VBO.
Definition at line 211 of file glc_extendedgeomengine.h.
Referenced by colorVector(), and finished().