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

Function GetJointPosition

TombEngine/Game/Animation/Animation.cpp:342–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340 }
341
342 Vector3i GetJointPosition(const ItemInfo& item, int boneID, const Vector3i& relOffset)
343 {
344 bool incorrectBone = false;
345 if (boneID < 0 || boneID >= Objects[item.ObjectNumber].nmeshes)
346 {
347 TENLog("Unknown bone ID specified for object " + GetObjectName(item.ObjectNumber), LogLevel::Warning, LogConfig::All);
348 incorrectBone = true;
349 }
350
351 // Always return object's root position if it's invisible. Joint position can't be predicted otherwise since it's not animated.
352 if (incorrectBone || Objects[item.ObjectNumber].Hidden || item.Status == ITEM_INVISIBLE)
353 return Geometry::TranslatePoint(item.Pose.Position, item.Pose.Orientation, relOffset);
354
355 // Use matrices done in renderer to transform relative offset.
356 return Vector3i(g_Renderer.GetMoveableBonePosition(item.Index, boneID, relOffset.ToVector3()));
357 }
358
359 Vector3i GetJointPosition(ItemInfo* item, int boneID, const Vector3i& relOffset)
360 {

Callers 15

RenderBlobShadowsMethod · 0.85
PrepareParticlesMethod · 0.85
MeshSwapNormalToJadeFunction · 0.85
MeshSwapJadeToNormalFunction · 0.85
DoSpiderBloodEffectFunction · 0.85
SkidooManControlFunction · 0.85
WorkerFlamethrowerFunction · 0.85
MeshSwapNormalToJadeFunction · 0.85
MeshSwapJadeToNormalFunction · 0.85

Calls 5

TENLogFunction · 0.85
TranslatePointFunction · 0.85
Vector3iClass · 0.70
ToVector3Method · 0.45

Tested by

no test coverage detected