GLC_Lod Class Reference

GLC_Lod is a Level of detail index and accuracy. More...

#include <glc_lod.h>

List of all members.

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_Lodoperator= (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.

Detailed Description

GLC_Lod is a Level of detail index and accuracy.

Definition at line 37 of file glc_lod.h.


Constructor & Destructor Documentation

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]

Destructor.

Definition at line 80 of file glc_lod.cpp.

References glDeleteBuffers, and m_IboId.


Member Function Documentation

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]

Return the class Chunk ID.

Definition at line 93 of file glc_lod.cpp.

References m_ChunkId.

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]

IBO creation.

Definition at line 139 of file glc_lod.h.

References glGenBuffers.

void GLC_Lod::finishVbo (  )  [inline]

The mesh wich use this lod is finished.

Definition at line 115 of file glc_lod.h.

QVector< GLuint > GLC_Lod::indexVector (  )  const

Return The unique index Vector which contains :.

  • Triangles index
  • Triangles Strips index
  • Triangles Fans index

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]

Return The unique index Vector handle which contains :.

  • Triangles index
  • Triangles Strips index
  • Triangles Fans index

Definition at line 90 of file glc_lod.h.

int GLC_Lod::indexVectorSize (  )  const [inline]

Return the size of the index Vector.

Definition at line 94 of file glc_lod.h.

GLC_Lod & GLC_Lod::operator= ( const GLC_Lod lod  ) 

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]

Set accuracy of the LOD.

Definition at line 121 of file glc_lod.h.

void GLC_Lod::trianglesAdded ( unsigned int  count  )  [inline]

Given number of triangles added.

Definition at line 125 of file glc_lod.h.

unsigned int GLC_Lod::trianglesCount (  )  const [inline]

Return this lod triangle count.

Definition at line 98 of file glc_lod.h.

void GLC_Lod::useIBO (  )  const [inline]

Ibo Usage.

Definition at line 148 of file glc_lod.h.

References glBindBuffer.

Referenced by indexVector(), and releaseIboClientSide().


Friends And Related Function Documentation

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.


Member Data Documentation

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


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

SourceForge.net Logo

©2005-2011 Laurent Ribon