GLC_Lod is a Level of detail index and accuracy. More...
#include <glc_lod.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_Lod () | |
| Default Constructor. | |
| GLC_Lod (double accuracy) | |
| Construct a Lod with the specified accuracy. | |
| GLC_Lod (const GLC_Lod &) | |
| Copy constructor. | |
| GLC_Lod & | operator= (const GLC_Lod &) |
| Overload "=" operator. | |
| virtual | ~GLC_Lod () |
| Destructor. | |
Set Functions | |
| void | copyIboToClientSide () |
| Copy IBO to the Client Side. | |
| void | releaseIboClientSide (bool update=false) |
| Release client IBO. | |
| void | finishVbo () |
| The mesh wich use this lod is finished. | |
| void | setAccuracy (const double &accuracy) |
| Set accuracy of the LOD. | |
| void | trianglesAdded (unsigned int count) |
| Given number of triangles added. | |
OpenGL Functions | |
| void | createIBO () |
| IBO creation. | |
| void | useIBO () const |
| Ibo Usage. | |
Private Attributes | |
| double | m_Accuracy |
| The accuracy of the LOD. | |
| GLuint | m_IboId |
| The IBO ID. | |
| QVector< GLuint > | m_IndexVector |
| The Index Vector. | |
| int | m_IndexSize |
| The Index vector size. | |
| unsigned int | m_TrianglesCount |
| Lod number of faces. | |
Static Private Attributes | |
| static quint32 | m_ChunkId = 0xA708 |
| Class chunk id. | |
Friends | |
| GLC_LIB_EXPORT QDataStream & | operator<< (QDataStream &, const GLC_Lod &) |
| Non-member stream operator. | |
| GLC_LIB_EXPORT QDataStream & | operator>> (QDataStream &, GLC_Lod &) |
Get Functions | |
|
| |
| double | accuracy () const |
| Return the accuracy of the LOD. | |
| QVector< GLuint > | indexVector () const |
| Return The unique index Vector which contains :. | |
| QVector< GLuint > * | indexVectorHandle () |
| Return The unique index Vector handle which contains :. | |
| int | indexVectorSize () const |
| Return the size of the index Vector. | |
| unsigned int | trianglesCount () const |
| Return this lod triangle count. | |
| static quint32 | chunckID () |
| Return the class Chunk ID. | |
GLC_Lod is a Level of detail index and accuracy.
Definition at line 37 of file glc_lod.h.
| GLC_Lod::GLC_Lod | ( | ) |
Default Constructor.
Definition at line 32 of file glc_lod.cpp.
| GLC_Lod::GLC_Lod | ( | double | accuracy | ) |
Construct a Lod with the specified accuracy.
Definition at line 43 of file glc_lod.cpp.
| GLC_Lod::GLC_Lod | ( | const GLC_Lod & | lod | ) |
Copy constructor.
Definition at line 54 of file glc_lod.cpp.
| GLC_Lod::~GLC_Lod | ( | ) | [virtual] |
| double GLC_Lod::accuracy | ( | ) | const [inline] |
Return the accuracy of the LOD.
Definition at line 73 of file glc_lod.h.
Referenced by GLC_Mesh::copyIndex().
| quint32 GLC_Lod::chunckID | ( | ) | [static] |
| void GLC_Lod::copyIboToClientSide | ( | ) |
Copy IBO to the Client Side.
Definition at line 122 of file glc_lod.cpp.
References indexVector(), m_IboId, and m_IndexVector.
| void GLC_Lod::createIBO | ( | ) | [inline] |
| void GLC_Lod::finishVbo | ( | ) | [inline] |
| QVector< GLuint > GLC_Lod::indexVector | ( | ) | const |
Return The unique index Vector which contains :.
Definition at line 99 of file glc_lod.cpp.
References glBindBuffer, glMapBuffer, glUnmapBuffer, m_IboId, m_IndexSize, m_IndexVector, and useIBO().
Referenced by copyIboToClientSide(), operator<<(), and operator=().
| QVector<GLuint>* GLC_Lod::indexVectorHandle | ( | ) | [inline] |
| int GLC_Lod::indexVectorSize | ( | ) | const [inline] |
Overload "=" operator.
Definition at line 66 of file glc_lod.cpp.
References indexVector(), m_Accuracy, m_IboId, m_IndexSize, m_IndexVector, and m_TrianglesCount.
| void GLC_Lod::releaseIboClientSide | ( | bool | update = false |
) |
Release client IBO.
Definition at line 131 of file glc_lod.cpp.
References glBindBuffer, glBufferData, m_IboId, m_IndexVector, and useIBO().
| void GLC_Lod::setAccuracy | ( | const double & | accuracy | ) | [inline] |
| void GLC_Lod::trianglesAdded | ( | unsigned int | count | ) | [inline] |
| unsigned int GLC_Lod::trianglesCount | ( | ) | const [inline] |
| void GLC_Lod::useIBO | ( | ) | const [inline] |
Ibo Usage.
Definition at line 148 of file glc_lod.h.
References glBindBuffer.
Referenced by indexVector(), and releaseIboClientSide().
| GLC_LIB_EXPORT QDataStream& operator<< | ( | QDataStream & | , | |
| const GLC_Lod & | ||||
| ) | [friend] |
Non-member stream operator.
Definition at line 150 of file glc_lod.cpp.
| GLC_LIB_EXPORT QDataStream& operator>> | ( | QDataStream & | , | |
| GLC_Lod & | ||||
| ) | [friend] |
Definition at line 161 of file glc_lod.cpp.
double GLC_Lod::m_Accuracy [private] |
The accuracy of the LOD.
Definition at line 159 of file glc_lod.h.
Referenced by operator<<(), operator=(), and operator>>().
quint32 GLC_Lod::m_ChunkId = 0xA708 [static, private] |
Class chunk id.
Definition at line 174 of file glc_lod.h.
Referenced by chunckID(), operator<<(), and operator>>().
GLuint GLC_Lod::m_IboId [private] |
The IBO ID.
Definition at line 162 of file glc_lod.h.
Referenced by copyIboToClientSide(), indexVector(), operator=(), releaseIboClientSide(), and ~GLC_Lod().
int GLC_Lod::m_IndexSize [private] |
The Index vector size.
Definition at line 168 of file glc_lod.h.
Referenced by indexVector(), and operator=().
QVector<GLuint> GLC_Lod::m_IndexVector [private] |
The Index Vector.
Definition at line 165 of file glc_lod.h.
Referenced by copyIboToClientSide(), indexVector(), operator=(), operator>>(), and releaseIboClientSide().
unsigned int GLC_Lod::m_TrianglesCount [private] |
Lod number of faces.
Definition at line 171 of file glc_lod.h.
Referenced by operator<<(), operator=(), and operator>>().