MCPcopy Create free account
hub / github.com/carbonengine/trinity / TransformLocator

Function TransformLocator

trinity/Eve/SpaceObject/EveSpaceObject2_Blue.cpp:32–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace
31{
32void 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
49void ApplyModelTransform( Vector3& position, Quaternion& rotation, ITriVectorFunctionPtr modelTranslationCurve, ITriQuaternionFunctionPtr modelRotationCurve )
50{

Callers 1

PyTransformLocatorsMethod · 0.85

Calls 4

TriMatrixCopyFrom3x4Function · 0.85
IsInitializedMethod · 0.45
GetMeshBoneCountMethod · 0.45
GetMeshBoneMatrixListMethod · 0.45

Tested by

no test coverage detected