MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / GetJointOffset

Function GetJointOffset

TombEngine/Game/Animation/Animation.cpp:374–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372 }
373
374 Vector3 GetJointOffset(GAME_OBJECT_ID objectID, int boneID, bool discardZSign)
375 {
376 const auto& object = Objects[objectID];
377 int boneIndex = object.boneIndex + (boneID * 4);
378
379 if (g_Level.Bones.size() <= boneIndex)
380 return Vector3::Zero;
381
382 int* bone = &g_Level.Bones[boneIndex];
383 auto offset = Vector3(*(bone + 1), *(bone + 2), *(bone + 3));
384
385 if (discardZSign)
386 offset.z = abs(offset.z);
387
388 return offset;
389 }
390
391 Quaternion GetBoneOrientation(const ItemInfo& item, int boneID)
392 {

Callers 4

DrawLaraHairMethod · 0.85
UpdateMethod · 0.85
InitializeMethod · 0.85

Calls 2

Vector3Function · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected