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

Method GetBoneIndex

trinity/Tr2SkinnedObject.cpp:335–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335unsigned Tr2SkinnedObject::GetBoneIndex( const std::string& boneName ) const
336{
337 if( !m_animationUpdater )
338 {
339 return ~0u;
340 }
341
342 unsigned numBones = 0;
343 const std::string* const boneList = m_animationUpdater->GetAnimationBoneList( numBones );
344 if( !boneList || !numBones || numBones != m_skinningMatrixCount )
345 {
346 return ~0u;
347 }
348
349 for( unsigned int jointIx = 0; jointIx < numBones; ++jointIx )
350 {
351 if( boneList[jointIx] == boneName )
352 {
353 return jointIx;
354 }
355 }
356
357 return ~0u;
358}
359
360void Tr2SkinnedObject::PrintAllBones()
361{

Callers

nothing calls this directly

Calls 1

GetAnimationBoneListMethod · 0.45

Tested by

no test coverage detected