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

Method SetBakedMorphTarget

trinity/Tr2Mesh.cpp:311–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311void Tr2Mesh::SetBakedMorphTarget( const char* name, bool isBaked )
312{
313 if( !GetGeometryResource() )
314 {
315 return;
316 }
317
318 auto mesh = GetGeometryResource()->GetMeshLod( GetMeshIndex(), 0 );
319 if( !mesh )
320 {
321 return;
322 }
323
324 for( int i = 0; i < mesh->m_morphTargetNames.size(); i++ )
325 {
326 if( mesh->m_morphTargetNames[i] == name )
327 {
328 mesh->m_isBakedMorphTarget[i] = isBaked;
329 return;
330 }
331 }
332}
333
334bool Tr2Mesh::GetBakedMorphTarget( const char* name )
335{

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80
GetMeshLodMethod · 0.45

Tested by

no test coverage detected