GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Private Attributes | Static Private Attributes | Friends | List of all members
GLC_Lod Class Reference

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_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 setAccuracy (const double &accuracy)
 Set accuracy of the LOD.
 
void trianglesAdded (unsigned int count)
 Given number of triangles added.
 
void setIboUsage (bool usage)
 Set IBO usage.
 
OpenGL Functions
void createIBO ()
 IBO creation.
 
void useIBO () const
 Ibo Usage.
 
void fillIbo ()
 Fill IBO.
 

Private Attributes

double m_Accuracy
 The accuracy of the LOD.
 
QGLBuffer m_IndexBuffer
 The Index Buffer.
 
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 39 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.

Member Function Documentation

double GLC_Lod::accuracy ( ) const
inline

Return the accuracy of the LOD.

Definition at line 75 of file glc_lod.h.

Referenced by GLC_Mesh::copyIndex().

quint32 GLC_Lod::chunckID ( )
static

Return the class Chunk ID.

Definition at line 89 of file glc_lod.cpp.

References m_ChunkId.

void GLC_Lod::copyIboToClientSide ( )

Copy IBO to the Client Side.

Definition at line 118 of file glc_lod.cpp.

References indexVector(), m_IndexBuffer, and m_IndexVector.

void GLC_Lod::createIBO ( )
inline

IBO creation.

Definition at line 138 of file glc_lod.h.

Referenced by setIboUsage().

void GLC_Lod::fillIbo ( )
inline

Fill IBO.

Definition at line 150 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 95 of file glc_lod.cpp.

References m_IndexBuffer, m_IndexSize, and m_IndexVector.

Referenced by copyIboToClientSide(), operator<<(), operator=(), and setIboUsage().

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 92 of file glc_lod.h.

int GLC_Lod::indexVectorSize ( ) const
inline

Return the size of the index Vector.

Definition at line 96 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_IndexBuffer, m_IndexSize, m_IndexVector, and m_TrianglesCount.

void GLC_Lod::releaseIboClientSide ( bool  update = false)

Release client IBO.

Definition at line 127 of file glc_lod.cpp.

References m_IndexBuffer, m_IndexSize, and m_IndexVector.

void GLC_Lod::setAccuracy ( const double &  accuracy)
inline

Set accuracy of the LOD.

Definition at line 117 of file glc_lod.h.

void GLC_Lod::setIboUsage ( bool  usage)

Set IBO usage.

Definition at line 146 of file glc_lod.cpp.

References createIBO(), indexVector(), m_IndexBuffer, m_IndexSize, and m_IndexVector.

void GLC_Lod::trianglesAdded ( unsigned int  count)
inline

Given number of triangles added.

Definition at line 121 of file glc_lod.h.

unsigned int GLC_Lod::trianglesCount ( ) const
inline

Return this lod triangle count.

Definition at line 100 of file glc_lod.h.

Referenced by GLC_MeshData::trianglesCount().

void GLC_Lod::useIBO ( ) const

Ibo Usage.

Definition at line 170 of file glc_lod.cpp.

References m_IndexBuffer.

Friends And Related Function Documentation

GLC_LIB_EXPORT QDataStream& operator<< ( QDataStream &  ,
const GLC_Lod  
)
friend

Non-member stream operator.

Definition at line 181 of file glc_lod.cpp.

GLC_LIB_EXPORT QDataStream& operator>> ( QDataStream &  ,
GLC_Lod  
)
friend

Definition at line 192 of file glc_lod.cpp.

Member Data Documentation

double GLC_Lod::m_Accuracy
private

The accuracy of the LOD.

Definition at line 161 of file glc_lod.h.

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

quint32 GLC_Lod::m_ChunkId = 0xA708
staticprivate

Class chunk id.

Definition at line 176 of file glc_lod.h.

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

QGLBuffer GLC_Lod::m_IndexBuffer
private

The Index Buffer.

Definition at line 164 of file glc_lod.h.

Referenced by copyIboToClientSide(), indexVector(), operator=(), releaseIboClientSide(), setIboUsage(), and useIBO().

int GLC_Lod::m_IndexSize
private

The Index vector size.

Definition at line 170 of file glc_lod.h.

Referenced by indexVector(), operator=(), releaseIboClientSide(), and setIboUsage().

QVector<GLuint> GLC_Lod::m_IndexVector
private

The Index Vector.

Definition at line 167 of file glc_lod.h.

Referenced by copyIboToClientSide(), indexVector(), operator=(), operator>>(), releaseIboClientSide(), and setIboUsage().

unsigned int GLC_Lod::m_TrianglesCount
private

Lod number of faces.

Definition at line 173 of file glc_lod.h.

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


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

©2005-2013 Laurent Ribon