GLC_WireData Class Reference

GLC_WireData : Contains geometries's wire data. More...

#include <glc_wiredata.h>

List of all members.

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_WireDataoperator= (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_BoundingBoxm_pBoundingBox
 Wire data bounding box.
IndexSizes m_VerticeGrouprSizes
 Vector of Vertice group size.
OffsetVectori m_VerticeGroupOffset
 Vector of vertice group offset.
QList< GLC_uintm_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_BoundingBoxboundingBox ()
 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.

Detailed Description

GLC_WireData : Contains geometries's wire data.

Definition at line 38 of file glc_wiredata.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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   ) 
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 (  ) 
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]
GLC_WireData & GLC_WireData::operator= ( const GLC_WireData data  ) 
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.


Friends And Related Function Documentation

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.


Member Data Documentation

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>>().

The next primitive local id.

Definition at line 143 of file glc_wiredata.h.

Referenced by addVerticeGroup(), clear(), operator<<(), operator=(), and operator>>().

Wire data bounding box.

Definition at line 152 of file glc_wiredata.h.

Referenced by boundingBox(), clear(), GLC_WireData(), and operator=().

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]

The number of vertice group.

Definition at line 164 of file glc_wiredata.h.

Referenced by addVerticeGroup(), clear(), glDraw(), operator<<(), operator=(), and operator>>().

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>>().

Vector of Vertice group size.

Definition at line 155 of file glc_wiredata.h.

Referenced by addVerticeGroup(), clear(), glDraw(), operator<<(), operator=(), and operator>>().


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

SourceForge.net Logo

©2005-2011 Laurent Ribon