Lugre::cBufferedSubMesh Class Reference

#include <lugre_meshbuffer.h>

Collaboration diagram for Lugre::cBufferedSubMesh:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cBufferedSubMesh ()
int GetVertexCount ()
int GetIndexCount ()
bool GetUsesShared ()
unsigned int * GetIndexData ()
std::string & GetMatName ()
Ogre::MaterialPtr & GetMat ()
std::string & GetFormatHash ()
std::string & GetFormatHashWithColour ()
 added diffuse colour if needed
cBufferedVertexDataGetBufferedVertexData ()
void SetFromSubMesh (cBufferedMesh *pParent, Ogre::SubMesh &pSubMesh)
 init, don't call more than once
void SetMatName (const char *szMatName)
void TransformTexCoords (const float u0, const float v0, const float u1, const float v1)

Private Attributes

cBufferedVertexData mBufferedVertexData
cBufferedMeshmpParent
std::vector< unsigned int > mIndexData
std::string msMatName
Ogre::MaterialPtr mpMat
std::string msFormatHash
std::string msFormatHashWithColour
bool mbUseSharedVertexData


Detailed Description

Definition at line 122 of file lugre_meshbuffer.h.


Constructor & Destructor Documentation

Lugre::cBufferedSubMesh::cBufferedSubMesh (  ) 

Definition at line 170 of file lugre_meshbuffer.cpp.


Member Function Documentation

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

int Lugre::cBufferedSubMesh::GetIndexCount (  )  [inline]

bool Lugre::cBufferedSubMesh::GetUsesShared (  )  [inline]

unsigned int* Lugre::cBufferedSubMesh::GetIndexData (  )  [inline]

Definition at line 128 of file lugre_meshbuffer.h.

References mIndexData.

Referenced by Lugre::cFastBatch::cSubBatch::Build(), and Lugre::cBufferedMesh::RayPick().

std::string& Lugre::cBufferedSubMesh::GetMatName (  )  [inline]

Definition at line 129 of file lugre_meshbuffer.h.

References msMatName.

Ogre::MaterialPtr& Lugre::cBufferedSubMesh::GetMat (  )  [inline]

Definition at line 130 of file lugre_meshbuffer.h.

References mpMat.

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

std::string& Lugre::cBufferedSubMesh::GetFormatHash (  )  [inline]

Definition at line 131 of file lugre_meshbuffer.h.

References msFormatHash.

Referenced by Lugre::cFastBatch::AddMesh().

std::string& Lugre::cBufferedSubMesh::GetFormatHashWithColour (  )  [inline]

added diffuse colour if needed

Definition at line 132 of file lugre_meshbuffer.h.

References msFormatHashWithColour.

Referenced by Lugre::cFastBatch::AddMesh().

cBufferedVertexData& Lugre::cBufferedSubMesh::GetBufferedVertexData (  )  [inline]

void Lugre::cBufferedSubMesh::SetFromSubMesh ( cBufferedMesh pParent,
Ogre::SubMesh &  pSubMesh 
)

void Lugre::cBufferedSubMesh::SetMatName ( const char *  szMatName  ) 

asigns the specified material name interesting for texatlas

Definition at line 183 of file lugre_meshbuffer.cpp.

References mpMat, and msMatName.

Referenced by SetFromSubMesh().

void Lugre::cBufferedSubMesh::TransformTexCoords ( const float  u0,
const float  v0,
const float  u1,
const float  v1 
)

changes texturecoordinates : clamps them in the range [0,1],[0,1] and maps that range to [u0,u1],[v0,v1] interesting for texatlas

Definition at line 172 of file lugre_meshbuffer.cpp.

References GetUsesShared(), GetVertexCount(), Lugre::cBufferedVertexData::GetVertexTexCoord(), mBufferedVertexData, msMatName, Lugre::mymax(), and Lugre::mymin().


Member Data Documentation

Definition at line 148 of file lugre_meshbuffer.h.

Referenced by SetFromSubMesh().

std::vector<unsigned int> Lugre::cBufferedSubMesh::mIndexData [private]

Definition at line 149 of file lugre_meshbuffer.h.

Referenced by GetIndexCount(), GetIndexData(), and SetFromSubMesh().

std::string Lugre::cBufferedSubMesh::msMatName [private]

Definition at line 150 of file lugre_meshbuffer.h.

Referenced by GetMatName(), SetFromSubMesh(), SetMatName(), and TransformTexCoords().

Ogre::MaterialPtr Lugre::cBufferedSubMesh::mpMat [private]

Definition at line 151 of file lugre_meshbuffer.h.

Referenced by GetMat(), and SetMatName().

Definition at line 152 of file lugre_meshbuffer.h.

Referenced by GetFormatHash(), and SetFromSubMesh().

Definition at line 153 of file lugre_meshbuffer.h.

Referenced by GetFormatHashWithColour(), and SetFromSubMesh().

Definition at line 154 of file lugre_meshbuffer.h.

Referenced by GetUsesShared(), and SetFromSubMesh().


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

Generated on Sat Jul 31 06:00:12 2010 for cpp by  doxygen 1.5.6