Public Member Functions | Public Attributes

GAnimatedMesh Class Reference

#include <GAnimatedMesh.h>

Inheritance diagram for GAnimatedMesh:
GMesh GGraphicsObject GObject

List of all members.

Public Member Functions

 GAnimatedMesh (GMesh *Base, bool _bDestroyBase=true)
 Initialize with an existing mesh.
virtual int Draw (double time, double dtime, GMatrix16 *viewmatrix, GMatrix16 *worldmatrix, int FLAGS)
 draw the mesh
virtual int DrawSprites (double time, double dtime, GMatrix16 *viewmatrix, GMatrix16 *worldmatrix, int FLAGS)
 Draw sprites.
int Reset (void)
 reset the mesh
virtual int OutLineMappedVertices (int FLAGS)
 outline vertices that are registered in the vertexmapper structure (debug function, DEPRECATED)
virtual int Skin (int FLAGS)
 skin mesh DEPRECATED as this is now done on the GPU
virtual int CreateDefaultVertexMapper (int BoneIdx)
 assign all vertices in the mesh a mapping to a standard bone as provided in the argument. weight will be set to 1.0f
virtual int SetVertexMapper (vector< vertexmapper_t > vm)
 assign mesh a vertexmapper for skinning
int SetupVBO (void)
 set up a VBO and send data to GPU
int UpdateVBO (void)
 recalculate VBO and resend data to GPU
void SetupTransformations (GBone *B, float *_transformations)
 setup transformation array for skinning
float * GetSkinningTransformations (int &n)
 obtain pointer to skinning transformations needed for GPU-based vertex skinning
float ** GetBoneArrays (void)
 obtain set of bone transformation matrices needed for GPU-based vertex skinning

Public Attributes

float * SkinningData
 Skinningdata for GPU-based vertex skinning.
float ** BoneDataM
 Bone transformation matrices in float** format for GPU-based vertex skinning.
vector< GVec4ftransvertices
 model vertices after skinning
vector< GVec4ftransnormals
 model normals after skinning

Constructor & Destructor Documentation

GAnimatedMesh::GAnimatedMesh ( GMesh Base,
bool  _bDestroyBase = true 
)

Initialize with an existing mesh.


Member Function Documentation

int GAnimatedMesh::CreateDefaultVertexMapper ( int  BoneIdx  )  [virtual]

assign all vertices in the mesh a mapping to a standard bone as provided in the argument. weight will be set to 1.0f

Reimplemented from GMesh.

int GAnimatedMesh::Draw ( double  time,
double  dtime,
GMatrix16 viewmatrix,
GMatrix16 worldmatrix,
int  FLAGS 
) [virtual]

draw the mesh

Reimplemented from GMesh.

int GAnimatedMesh::DrawSprites ( double  time,
double  dtime,
GMatrix16 viewmatrix,
GMatrix16 worldmatrix,
int  FLAGS 
) [virtual]

Draw sprites.

Reimplemented from GMesh.

float ** GAnimatedMesh::GetBoneArrays ( void   ) 

obtain set of bone transformation matrices needed for GPU-based vertex skinning

float * GAnimatedMesh::GetSkinningTransformations ( int &  n  ) 

obtain pointer to skinning transformations needed for GPU-based vertex skinning

int GAnimatedMesh::OutLineMappedVertices ( int  FLAGS  )  [virtual]

outline vertices that are registered in the vertexmapper structure (debug function, DEPRECATED)

Reimplemented from GMesh.

int GAnimatedMesh::Reset ( void   ) 

reset the mesh

void GAnimatedMesh::SetupTransformations ( GBone B,
float *  _transformations 
)

setup transformation array for skinning

int GAnimatedMesh::SetupVBO ( void   )  [virtual]

set up a VBO and send data to GPU

Reimplemented from GMesh.

int GAnimatedMesh::SetVertexMapper ( vector< vertexmapper_t vm  )  [virtual]

assign mesh a vertexmapper for skinning

Reimplemented from GMesh.

int GAnimatedMesh::Skin ( int  FLAGS  )  [virtual]

skin mesh DEPRECATED as this is now done on the GPU

Reimplemented from GMesh.

int GAnimatedMesh::UpdateVBO ( void   ) 

recalculate VBO and resend data to GPU


Member Data Documentation

Bone transformation matrices in float** format for GPU-based vertex skinning.

Skinningdata for GPU-based vertex skinning.

model normals after skinning

model vertices after skinning


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Friends Defines