Lugre::cBufferedVertexData Class Reference

#include <lugre_meshbuffer.h>

Collaboration diagram for Lugre::cBufferedVertexData:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cBufferedVertexData ()
 ~cBufferedVertexData ()
void SetFromVertexData (const Ogre::VertexData &pVertexData)
 init, don't call more than once
float * GetVertexPos (const int i)
 returns a pointer to the x,y,z part of the vertex, assumes that the data type at this position is VT_FLOAT*
Ogre::Vector3 GetVertexPosVec3 (const int i)
float * GetVertexTexCoord (const int i)
 returns a pointer to the u,v part of the vertex, assumes that the data type at this position is VT_FLOAT*
const char * GetVertexData (const int iSource, const int iVertex)
 you have to check yourself if iSource is legal
const char * GetVertexData (const int iSource)
 you have to check yourself if iSource is legal
int GetVertexSize (const int iSource)
int GetVertexCount ()
Ogre::VertexDeclaration * GetVertexDecl ()
 readonly for external use !

Public Attributes

Ogre::VertexDeclaration * mpVertexDecl
cQuickData mQuickPos
cQuickData mQuickTexCoord
std::vector< char * > mDataBuffers
std::vector< int > mDataBufferVertexSize
int miVertexCount

Private Member Functions

void SetQuickDataFromSemantic (cQuickData &pQuickData, const Ogre::VertexElementSemantic sem, const int i=0)

Classes

class  cQuickData
 internal helper for faster access to position and texture coordinate data, useful for mousepicking (texcoord:alpha) More...


Detailed Description

Definition at line 42 of file lugre_meshbuffer.h.


Constructor & Destructor Documentation

Lugre::cBufferedVertexData::cBufferedVertexData (  ) 

Definition at line 104 of file lugre_meshbuffer.cpp.

Lugre::cBufferedVertexData::~cBufferedVertexData (  ) 

release buffer copies

Definition at line 106 of file lugre_meshbuffer.cpp.

References mDataBuffers, and mDataBufferVertexSize.


Member Function Documentation

void Lugre::cBufferedVertexData::SetFromVertexData ( const Ogre::VertexData &  pVertexData  ) 

float* Lugre::cBufferedVertexData::GetVertexPos ( const int  i  )  [inline]

returns a pointer to the x,y,z part of the vertex, assumes that the data type at this position is VT_FLOAT*

Definition at line 58 of file lugre_meshbuffer.h.

References Lugre::cBufferedVertexData::cQuickData::Get(), and mQuickPos.

Referenced by GetVertexPosVec3().

Ogre::Vector3 Lugre::cBufferedVertexData::GetVertexPosVec3 ( const int  i  )  [inline]

float* Lugre::cBufferedVertexData::GetVertexTexCoord ( const int  i  )  [inline]

returns a pointer to the u,v part of the vertex, assumes that the data type at this position is VT_FLOAT*

Definition at line 62 of file lugre_meshbuffer.h.

References Lugre::cBufferedVertexData::cQuickData::Get(), and mQuickTexCoord.

Referenced by Lugre::cBufferedSubMesh::TransformTexCoords().

const char* Lugre::cBufferedVertexData::GetVertexData ( const int  iSource,
const int  iVertex 
) [inline]

you have to check yourself if iSource is legal

Definition at line 65 of file lugre_meshbuffer.h.

References GetVertexSize(), and mDataBuffers.

Referenced by Lugre::cFastBatch::cSubBatch::Build().

const char* Lugre::cBufferedVertexData::GetVertexData ( const int  iSource  )  [inline]

you have to check yourself if iSource is legal

Definition at line 69 of file lugre_meshbuffer.h.

References mDataBuffers.

int Lugre::cBufferedVertexData::GetVertexSize ( const int  iSource  )  [inline]

result in bytes you have to check yourself if iSource is legal

Definition at line 73 of file lugre_meshbuffer.h.

References mDataBufferVertexSize.

Referenced by GetVertexData().

int Lugre::cBufferedVertexData::GetVertexCount (  )  [inline]

Ogre::VertexDeclaration* Lugre::cBufferedVertexData::GetVertexDecl (  )  [inline]

void Lugre::cBufferedVertexData::SetQuickDataFromSemantic ( cQuickData pQuickData,
const Ogre::VertexElementSemantic  sem,
const int  i = 0 
) [private]


Member Data Documentation

Ogre::VertexDeclaration* Lugre::cBufferedVertexData::mpVertexDecl

Definition at line 84 of file lugre_meshbuffer.h.

Referenced by GetVertexDecl(), SetFromVertexData(), and SetQuickDataFromSemantic().

Definition at line 85 of file lugre_meshbuffer.h.

Referenced by GetVertexPos(), and SetFromVertexData().

Definition at line 86 of file lugre_meshbuffer.h.

Referenced by GetVertexTexCoord(), and SetFromVertexData().

Definition at line 88 of file lugre_meshbuffer.h.

Referenced by GetVertexSize(), SetFromVertexData(), and ~cBufferedVertexData().

Definition at line 89 of file lugre_meshbuffer.h.

Referenced by GetVertexCount(), and SetFromVertexData().


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

Generated on Thu Feb 9 06:00:21 2012 for cpp by  doxygen 1.5.6