GLC_WireData : Contains geometries's wire data. More...
#include <glc_wiredata.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_WireData () | |
| Construct a empty wire data. | |
| GLC_WireData (const GLC_WireData &) | |
| Construct wire data from the given wire data. | |
| GLC_WireData & | operator= (const GLC_WireData &) |
| Copy the given wire data in this wire data. | |
| virtual | ~GLC_WireData () |
| Destructor. | |
Set Functions | |
| GLC_uint | addVerticeGroup (const GLfloatVector &) |
| Add a Polyline to this wire and returns its id if id are managed. | |
| void | clear () |
| Clear the content of this wire Data and makes it empty. | |
| void | copyVboToClientSide () |
| Copy VBO to the Client Side. | |
| void | releaseVboClientSide (bool update=false) |
| Release client VBO. | |
Private Attributes | |
| GLuint | m_VboId |
| VBO ID. | |
| GLC_uint | m_NextPrimitiveLocalId |
| The next primitive local id. | |
| GLfloatVector | m_Positions |
| Vertex Position Vector. | |
| int | m_PositionSize |
| The size of the VBO. | |
| GLC_BoundingBox * | m_pBoundingBox |
| Wire data bounding box. | |
| IndexSizes | m_VerticeGrouprSizes |
| Vector of Vertice group size. | |
| OffsetVectori | m_VerticeGroupOffset |
| Vector of vertice group offset. | |
| QList< GLC_uint > | m_VerticeGroupId |
| Vertice groups id. | |
| int | m_VerticeGroupCount |
| The number of vertice group. | |
Static Private Attributes | |
| static quint32 | m_ChunkId = 0xA706 |
| Class chunk id. | |
Friends | |
| GLC_LIB_EXPORT QDataStream & | operator<< (QDataStream &, const GLC_WireData &) |
| Non-member stream operator. | |
| GLC_LIB_EXPORT QDataStream & | operator>> (QDataStream &, GLC_WireData &) |
Get Functions | |
|
| |
| GLfloatVector | positionVector () const |
| Return this wire data Position Vector. | |
| bool | isEmpty () const |
| Return true if this wire data is empty. | |
| GLC_BoundingBox & | boundingBox () |
| Return this wire data bounding box. | |
| int | verticeGroupCount () const |
| Return the number of vertice group. | |
| GLuint | verticeGroupOffset (int index) const |
| Return the vertice group offset from the given index. | |
| GLsizei | verticeGroupSize (int index) const |
| Return the vertice group size from the given index. | |
| static quint32 | chunckID () |
| Return this wire data class Chunk ID. | |
OpenGL Functions | |
|
| |
| void | finishVbo () |
| Make this wire data a VBO. | |
| void | useVBO (bool usage) |
| Set vbo usage of this wire data. | |
| void | glDraw (const GLC_RenderProperties &, GLenum mode) |
| Render this wire data using Opengl. | |
| void | createVBOs () |
| Create this wire data VBO id. | |
| void | fillVBOs () |
| Fill this wire data VBO from memmory. | |
GLC_WireData : Contains geometries's wire data.
Definition at line 38 of file glc_wiredata.h.
| GLC_WireData::GLC_WireData | ( | ) |
Construct a empty wire data.
Definition at line 33 of file glc_wiredata.cpp.
| GLC_WireData::GLC_WireData | ( | const GLC_WireData & | data | ) |
Construct wire data from the given wire data.
Definition at line 48 of file glc_wiredata.cpp.
References m_pBoundingBox.
| GLC_WireData::~GLC_WireData | ( | ) | [virtual] |
Destructor.
Definition at line 86 of file glc_wiredata.cpp.
References clear(), glDeleteBuffers, and m_VboId.
| GLC_uint GLC_WireData::addVerticeGroup | ( | const GLfloatVector & | floatVector | ) |
Add a Polyline to this wire and returns its id if id are managed.
Definition at line 160 of file glc_wiredata.cpp.
References m_NextPrimitiveLocalId, m_Positions, m_VerticeGroupCount, m_VerticeGroupId, m_VerticeGroupOffset, and m_VerticeGrouprSizes.
Referenced by GLC_PointCloud::addPoint(), and GLC_Polylines::addPolyline().
| GLC_BoundingBox & GLC_WireData::boundingBox | ( | void | ) |
Return this wire data bounding box.
Definition at line 131 of file glc_wiredata.cpp.
References GLC_BoundingBox::combine(), m_pBoundingBox, and m_Positions.
Referenced by GLC_Polylines::boundingBox(), GLC_PointCloud::boundingBox(), GLC_Mesh::boundingBox(), GLC_Circle::boundingBox(), and GLC_Arrow::boundingBox().
| quint32 GLC_WireData::chunckID | ( | ) | [static] |
Return this wire data class Chunk ID.
Definition at line 102 of file glc_wiredata.cpp.
References m_ChunkId.
| void GLC_WireData::clear | ( | ) |
Clear the content of this wire Data and makes it empty.
Definition at line 181 of file glc_wiredata.cpp.
References m_NextPrimitiveLocalId, m_pBoundingBox, m_Positions, m_PositionSize, m_VerticeGroupCount, m_VerticeGroupId, m_VerticeGroupOffset, and m_VerticeGrouprSizes.
Referenced by GLC_Polylines::clear(), GLC_PointCloud::clear(), GLC_Geometry::clearGeometry(), operator=(), operator>>(), and ~GLC_WireData().
| void GLC_WireData::copyVboToClientSide | ( | ) |
Copy VBO to the Client Side.
Definition at line 195 of file glc_wiredata.cpp.
References m_Positions, m_VboId, and positionVector().
Referenced by GLC_Geometry::copyVboToClientSide().
| void GLC_WireData::createVBOs | ( | ) | [private] |
Create this wire data VBO id.
Definition at line 280 of file glc_wiredata.cpp.
References glGenBuffers, and m_VboId.
Referenced by finishVbo().
| void GLC_WireData::fillVBOs | ( | ) | [private] |
Fill this wire data VBO from memmory.
Definition at line 289 of file glc_wiredata.cpp.
References glBufferData, and m_Positions.
Referenced by finishVbo().
| void GLC_WireData::finishVbo | ( | ) |
Make this wire data a VBO.
Definition at line 216 of file glc_wiredata.cpp.
References createVBOs(), fillVBOs(), m_Positions, m_PositionSize, and useVBO().
Referenced by glDraw(), and releaseVboClientSide().
| void GLC_WireData::glDraw | ( | const GLC_RenderProperties & | , | |
| GLenum | mode | |||
| ) |
Render this wire data using Opengl.
The mode can be : GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP GL_LINES
Definition at line 239 of file glc_wiredata.cpp.
References finishVbo(), isEmpty(), m_Positions, m_PositionSize, m_VboId, m_VerticeGroupCount, m_VerticeGroupOffset, m_VerticeGrouprSizes, useVBO(), and GLC_State::vboUsed().
Referenced by GLC_Polylines::glDraw(), GLC_PointCloud::glDraw(), GLC_Mesh::glDraw(), GLC_Circle::glDraw(), and GLC_Arrow::glDraw().
| bool GLC_WireData::isEmpty | ( | void | ) | const [inline] |
Return true if this wire data is empty.
Definition at line 73 of file glc_wiredata.h.
Referenced by GLC_Polylines::boundingBox(), GLC_PointCloud::boundingBox(), GLC_Circle::boundingBox(), GLC_Arrow::boundingBox(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Cone::createMeshAndWire(), GLC_Circle::createWire(), GLC_Box::createWire(), GLC_Arrow::createWire(), glDraw(), GLC_Mesh::glDraw(), GLC_Circle::glDraw(), GLC_Arrow::glDraw(), GLC_Polylines::isEmpty(), and GLC_PointCloud::isEmpty().
| GLC_WireData & GLC_WireData::operator= | ( | const GLC_WireData & | data | ) |
Copy the given wire data in this wire data.
Definition at line 66 of file glc_wiredata.cpp.
References clear(), m_NextPrimitiveLocalId, m_pBoundingBox, m_Positions, m_PositionSize, m_VerticeGroupCount, m_VerticeGroupId, m_VerticeGroupOffset, m_VerticeGrouprSizes, and positionVector().
| GLfloatVector GLC_WireData::positionVector | ( | ) | const |
Return this wire data Position Vector.
Definition at line 108 of file glc_wiredata.cpp.
References glBindBuffer, glMapBuffer, glUnmapBuffer, m_Positions, m_PositionSize, and m_VboId.
Referenced by copyVboToClientSide(), operator<<(), and operator=().
| void GLC_WireData::releaseVboClientSide | ( | bool | update = false |
) |
Release client VBO.
Definition at line 203 of file glc_wiredata.cpp.
References finishVbo(), m_Positions, and m_VboId.
Referenced by GLC_Geometry::releaseVboClientSide().
| void GLC_WireData::useVBO | ( | bool | usage | ) |
Set vbo usage of this wire data.
Definition at line 227 of file glc_wiredata.cpp.
References glBindBuffer, and m_VboId.
Referenced by finishVbo(), and glDraw().
| int GLC_WireData::verticeGroupCount | ( | ) | const [inline] |
Return the number of vertice group.
Definition at line 80 of file glc_wiredata.h.
| GLuint GLC_WireData::verticeGroupOffset | ( | int | index | ) | const [inline] |
Return the vertice group offset from the given index.
Definition at line 84 of file glc_wiredata.h.
| GLsizei GLC_WireData::verticeGroupSize | ( | int | index | ) | const [inline] |
Return the vertice group size from the given index.
Definition at line 88 of file glc_wiredata.h.
| GLC_LIB_EXPORT QDataStream& operator<< | ( | QDataStream & | , | |
| const GLC_WireData & | ||||
| ) | [friend] |
Non-member stream operator.
Definition at line 296 of file glc_wiredata.cpp.
| GLC_LIB_EXPORT QDataStream& operator>> | ( | QDataStream & | , | |
| GLC_WireData & | ||||
| ) | [friend] |
Definition at line 313 of file glc_wiredata.cpp.
quint32 GLC_WireData::m_ChunkId = 0xA706 [static, private] |
Class chunk id.
Definition at line 167 of file glc_wiredata.h.
Referenced by chunckID(), operator<<(), and operator>>().
GLC_uint GLC_WireData::m_NextPrimitiveLocalId [private] |
The next primitive local id.
Definition at line 143 of file glc_wiredata.h.
Referenced by addVerticeGroup(), clear(), operator<<(), operator=(), and operator>>().
GLC_BoundingBox* GLC_WireData::m_pBoundingBox [private] |
Wire data bounding box.
Definition at line 152 of file glc_wiredata.h.
Referenced by boundingBox(), clear(), GLC_WireData(), and operator=().
GLfloatVector GLC_WireData::m_Positions [private] |
Vertex Position Vector.
Definition at line 146 of file glc_wiredata.h.
Referenced by addVerticeGroup(), boundingBox(), clear(), copyVboToClientSide(), fillVBOs(), finishVbo(), glDraw(), operator=(), operator>>(), positionVector(), and releaseVboClientSide().
int GLC_WireData::m_PositionSize [private] |
The size of the VBO.
Definition at line 149 of file glc_wiredata.h.
Referenced by clear(), finishVbo(), glDraw(), operator<<(), operator=(), operator>>(), and positionVector().
GLuint GLC_WireData::m_VboId [private] |
VBO ID.
Definition at line 140 of file glc_wiredata.h.
Referenced by copyVboToClientSide(), createVBOs(), glDraw(), positionVector(), releaseVboClientSide(), useVBO(), and ~GLC_WireData().
int GLC_WireData::m_VerticeGroupCount [private] |
The number of vertice group.
Definition at line 164 of file glc_wiredata.h.
Referenced by addVerticeGroup(), clear(), glDraw(), operator<<(), operator=(), and operator>>().
QList<GLC_uint> GLC_WireData::m_VerticeGroupId [private] |
Vertice groups id.
Definition at line 161 of file glc_wiredata.h.
Referenced by addVerticeGroup(), clear(), operator<<(), operator=(), and operator>>().
Vector of vertice group offset.
Definition at line 158 of file glc_wiredata.h.
Referenced by addVerticeGroup(), clear(), glDraw(), operator<<(), operator=(), and operator>>().
IndexSizes GLC_WireData::m_VerticeGrouprSizes [private] |
Vector of Vertice group size.
Definition at line 155 of file glc_wiredata.h.
Referenced by addVerticeGroup(), clear(), glDraw(), operator<<(), operator=(), and operator>>().