MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / getRootNodePositionAt

Method getRootNodePositionAt

src/components/AnimHandler.cpp:343–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343Math::float3 AnimHandler::getRootNodePositionAt(size_t frame)
344{
345 Animations::Animation* anim = getActiveAnimationPtr();
346 if (!anim)
347 return Math::float3(0, 0, 0);
348
349 Animations::AnimationData& anim_data = m_pWorld->getAnimationLibrary().getAnimationData(anim->m_Data);
350 size_t numAnimationNodes = anim_data.m_NodeIndexList.size();
351
352 if (frame == (size_t)-1)
353 frame = anim->m_FrameCount - 1;
354
355 // Root node is always node 0
356 return Math::float3(anim_data.m_Samples[numAnimationNodes * frame].position.v);
357}
358
359Math::float3 AnimHandler::getRootNodeVelocityTotal()
360{

Callers

nothing calls this directly

Calls 2

getAnimationDataMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected