public void GetWorldTransforms( Matrix4[] matrices )
{
if ( parent.numBoneMatrices == 0 || !parent.IsHardwareAnimationEnabled )
{
matrices[ 0 ] = parent.ParentNodeFullTransform;
}
else
{
// TODO : Look at OGRE version
// ??? In the ogre version, it chooses the transforms based on
// ??? an index map maintained by the mesh. Is that appropriate here?
if ( parent.IsSkeletonAnimated )
{
// use cached bone matrices of the parent entity
for ( int i = 0; i < parent.numBoneMatrices; i++ )
{
matrices[ i ] = parent.boneWorldMatrices[ i ];
}
}
else
for ( int i = 0; i < matrices.Length; i++ )
{
matrices[ i ] = parent.ParentNodeFullTransform;
}
}
}