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

Method GetBoneTransforms

trinity/Eve/SpaceObject/Children/EveChildMesh.cpp:1283–1305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1281}
1282
1283std::pair<const Float4x3*, size_t> EveChildMesh::GetBoneTransforms() const
1284{
1285 size_t boneCount = 0;
1286 const Float4x3* bones = nullptr;
1287
1288 if( !m_animationUpdater || !m_animationUpdater->IsInitialized() )
1289 {
1290 return std::make_pair( nullptr, 0 );
1291 }
1292
1293 auto accumulatedTransforms = m_animationUpdater->GetAnimationTransforms();
1294
1295 if( m_animationUpdater->HasMeshBinding() )
1296 {
1297 Tr2GrannyAnimationUtils::GetBoneList( m_animationUpdater, bones, boneCount );
1298 return std::make_pair( bones, boneCount );
1299 }
1300 if( m_meshBinding )
1301 {
1302 return m_meshBinding->GetBoneTransforms();
1303 }
1304 return std::make_pair( nullptr, 0 );
1305}
1306
1307std::pair<const Tr2MorphTargetAnimationData*, size_t> EveChildMesh::GetMorphTargets( MorphTargetAnimationFilter filter )
1308{

Callers

nothing calls this directly

Calls 4

GetBoneListFunction · 0.85
HasMeshBindingMethod · 0.80
IsInitializedMethod · 0.45

Tested by

no test coverage detected