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 addPolyline (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_PolylinesSizes
 Polylines size.
OffsetVectori m_PolylinesOffset
 Vector of polyline group offset.
QList< GLC_uintm_PolylinesId
 Polyline groups id.
int m_PolylinesCount
 The number of polylines.

Static Private Attributes

static quint32 m_ChunkId = 0xA706
 Class chunk id.

Friends

QDataStream & operator<< (QDataStream &, const GLC_WireData &)
 Non-member stream operator.
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 polylineCount () const
 Return the number of polylines.
GLuint polylineOffset (int index) const
 Return the polyline offset from the given index.
GLsizei polylineSize (int index) const
 Return the polyline 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 &)
 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 40 of file glc_wiredata.h.


Constructor & Destructor Documentation

GLC_WireData::GLC_WireData (  ) 

Construct a empty wire data.

Definition at line 35 of file glc_wiredata.cpp.

GLC_WireData::GLC_WireData ( const GLC_WireData data  ) 

Construct wire data from the given wire data.

Definition at line 50 of file glc_wiredata.cpp.

References m_pBoundingBox.

GLC_WireData::~GLC_WireData (  )  [virtual]

Destructor.

Definition at line 88 of file glc_wiredata.cpp.

References clear(), glDeleteBuffers, and m_VboId.


Member Function Documentation

GLC_uint GLC_WireData::addPolyline ( const GLfloatVector floatVector  ) 

Add a Polyline to this wire and returns its id if id are managed.

Definition at line 162 of file glc_wiredata.cpp.

References m_NextPrimitiveLocalId, m_PolylinesCount, m_PolylinesId, m_PolylinesOffset, m_PolylinesSizes, and m_Positions.

Referenced by GLC_Polylines::addPolyline().

GLC_BoundingBox & GLC_WireData::boundingBox ( void   ) 

Return this wire data bounding box.

Definition at line 133 of file glc_wiredata.cpp.

References GLC_BoundingBox::combine(), m_pBoundingBox, and m_Positions.

Referenced by GLC_Polylines::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 104 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 197 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 282 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 291 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 218 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  ) 
bool GLC_WireData::isEmpty ( void   )  const [inline]
GLC_WireData & GLC_WireData::operator= ( const GLC_WireData data  ) 

Copy the given wire data in this wire data.

Definition at line 68 of file glc_wiredata.cpp.

References clear(), m_NextPrimitiveLocalId, m_pBoundingBox, m_PolylinesCount, m_PolylinesId, m_PolylinesOffset, m_PolylinesSizes, m_Positions, m_PositionSize, and positionVector().

int GLC_WireData::polylineCount (  )  const [inline]

Return the number of polylines.

Definition at line 82 of file glc_wiredata.h.

GLuint GLC_WireData::polylineOffset ( int  index  )  const [inline]

Return the polyline offset from the given index.

Definition at line 86 of file glc_wiredata.h.

GLsizei GLC_WireData::polylineSize ( int  index  )  const [inline]

Return the polyline size from the given index.

Definition at line 90 of file glc_wiredata.h.

GLfloatVector GLC_WireData::positionVector (  )  const

Return this wire data Position Vector.

Definition at line 110 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 205 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 229 of file glc_wiredata.cpp.

References glBindBuffer, and m_VboId.

Referenced by finishVbo(), and glDraw().


Friends And Related Function Documentation

QDataStream& operator<< ( QDataStream &  ,
const GLC_WireData  
) [friend]

Non-member stream operator.

Definition at line 298 of file glc_wiredata.cpp.

QDataStream& operator>> ( QDataStream &  ,
GLC_WireData  
) [friend]

Definition at line 315 of file glc_wiredata.cpp.


Member Data Documentation

quint32 GLC_WireData::m_ChunkId = 0xA706 [static, private]

Class chunk id.

Definition at line 168 of file glc_wiredata.h.

Referenced by chunckID(), operator<<(), and operator>>().

The next primitive local id.

Definition at line 144 of file glc_wiredata.h.

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

Wire data bounding box.

Definition at line 153 of file glc_wiredata.h.

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

The number of polylines.

Definition at line 165 of file glc_wiredata.h.

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

Polyline groups id.

Definition at line 162 of file glc_wiredata.h.

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

Vector of polyline group offset.

Definition at line 159 of file glc_wiredata.h.

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

Polylines size.

Definition at line 156 of file glc_wiredata.h.

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

The size of the VBO.

Definition at line 150 of file glc_wiredata.h.

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

GLuint GLC_WireData::m_VboId [private]

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

SourceForge.net Logo

©2005-2010 Laurent Ribon