| 30 | namespace |
| 31 | { |
| 32 | void TransformLocator( Vector3& position, Quaternion& rotation, int boneIndex, Tr2GrannyAnimation* animation ) |
| 33 | { |
| 34 | if( boneIndex > 0 && animation && animation->IsInitialized() ) |
| 35 | { |
| 36 | size_t boneCount = size_t( animation->GetMeshBoneCount() ); |
| 37 | if( boneCount ) |
| 38 | { |
| 39 | const Float4x3* bones = animation->GetMeshBoneMatrixList(); |
| 40 | Matrix boneTF = IdentityMatrix(); |
| 41 | TriMatrixCopyFrom3x4( &boneTF, &bones[boneIndex] ); |
| 42 | position = XMVector3TransformCoord( position, boneTF ); |
| 43 | |
| 44 | rotation = XMQuaternionMultiply( rotation, XMQuaternionRotationMatrix( boneTF ) ); |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | void ApplyModelTransform( Vector3& position, Quaternion& rotation, ITriVectorFunctionPtr modelTranslationCurve, ITriQuaternionFunctionPtr modelRotationCurve ) |
| 50 | { |
no test coverage detected