TSSkinMesh

Engine/source/ts/tsMesh.h

More...

Classes:

Vertex tuples

{

updateSkinBuffer(const Vector< MatrixF > & transforms, U8 * buffer)

set verts and normals...

updateSkinBones(const Vector< MatrixF > & transforms, Vector< MatrixF > & destTransforms)

update bone transforms for this mesh

This is used by sgShadowProjector to render the mesh directly, skipping the render manager.

render(TSMaterialList * , const TSRenderState & data, bool isSkinDirty, const Vector< MatrixF > & transforms, TSVertexBufferHandle & vertexBuffer, const char * meshName)
bool
buildPolyList(S32 frame, AbstractPolyList * polyList, U32 & surfaceKey, TSMaterialList * materials)
bool
castRay(S32 frame, const Point3F & start, const Point3F & end, RayInfo * rayInfo, TSMaterialList * materials)
bool

returns false if not convex (still builds planes)

computeBounds(const MatrixF & transform, Box3F & bounds, S32 frame, Point3F * center, F32 * radius)
assemble(bool skip)

persist methods...

Helper method to add a blend tuple for a vertex.

blend weight

Maps from mesh node to bone in shape.

index of affected vertex

Structure containing data needed to batch skinning.

variables used during assembly (for skipping mesh detail levels on load and for sharing verts between meshes)

Public Types

Parent 

Public Functions

Clears split vertex lists.

This method will build the batch operations and prepare the BatchData for use.

Returns maximum bones used per vertex.

Moves vertices from the vertex buffer back into the split vert lists, unless verts already exist.

Inserts transform indices and weights into vertex data.

Detailed Description

Vertex tuples

{

updateSkinBuffer(const Vector< MatrixF > & transforms, U8 * buffer)

set verts and normals...

updateSkinBones(const Vector< MatrixF > & transforms, Vector< MatrixF > & destTransforms)

update bone transforms for this mesh

render(TSVertexBufferHandle & vb)

Reimplemented from: TSMesh

render(TSMaterialList * , const TSRenderState & data, bool isSkinDirty, const Vector< MatrixF > & transforms, TSVertexBufferHandle & vertexBuffer, const char * meshName)

Reimplemented from: TSMesh

buildPolyList(S32 frame, AbstractPolyList * polyList, U32 & surfaceKey, TSMaterialList * materials)

Reimplemented from: TSMesh

castRay(S32 frame, const Point3F & start, const Point3F & end, RayInfo * rayInfo, TSMaterialList * materials)

Reimplemented from: TSMesh

buildConvexHull()

Reimplemented from: TSMesh

computeBounds(const MatrixF & transform, Box3F & bounds, S32 frame, Point3F * center, F32 * radius)

Reimplemented from: TSMesh

assemble(bool skip)

Reimplemented from: TSMesh

disassemble()

Reimplemented from: TSMesh

addWeightForVert(U32 vi, U32 bi, F32 w)

Helper method to add a blend tuple for a vertex.

TSSkinMesh()

FreeableVector< F32 > weight 

blend weight

FreeableVector< S32 > boneIndex 

Maps from mesh node to bone in shape.

FreeableVector< S32 > vertexIndex 

index of affected vertex

S32 maxBones 

}

Maximum number of bones referenced by this skin mesh

BatchData batchData 

Structure containing data needed to batch skinning.

Vector< MatrixF * > smInitTransformList 

variables used during assembly (for skipping mesh detail levels on load and for sharing verts between meshes)

Vector< S32 * > smVertexIndexList 
Vector< S32 * > smBoneIndexList 
Vector< F32 * > smWeightList 
Vector< S32 * > smNodeIndexList 
bool smDebugSkinVerts 

Public Types

typedef TSMesh Parent 

Public Functions

addWeightsFromVertexBuffer()

clearEditable()

Reimplemented from: TSMesh

convertToVertexData()

Reimplemented from: TSMesh

copySourceVertexDataFrom(const TSMesh * srcMesh)

Reimplemented from: TSMesh

createSkinBatchData()

This method will build the batch operations and prepare the BatchData for use.

getMaxBonesPerVert()

Reimplemented from: TSMesh

makeEditable()

Reimplemented from: TSMesh

printVerts()

setupVertexTransforms()

Inserts transform indices and weights into vertex data.