#include <GAnimatedMesh.h>
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< GVec4f > | transvertices |
model vertices after skinning | |
vector< GVec4f > | transnormals |
model normals after skinning |
GAnimatedMesh::GAnimatedMesh | ( | GMesh * | Base, | |
bool | _bDestroyBase = true | |||
) |
Initialize with an existing mesh.
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
float** GAnimatedMesh::BoneDataM |
Bone transformation matrices in float** format for GPU-based vertex skinning.
float* GAnimatedMesh::SkinningData |
Skinningdata for GPU-based vertex skinning.
vector<GVec4f> GAnimatedMesh::transnormals |
model normals after skinning
vector<GVec4f> GAnimatedMesh::transvertices |
model vertices after skinning