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

Method SampleTextTracks

trinity/Tr2GrannyAnimationLayer.cpp:539–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537
538#if WITH_GRANNY
539void Tr2GrannyAnimationLayer::SampleTextTracks( IBlueEventListener* listener )
540{
541 CCP_ASSERT_M( !IsUsingCMF(), "Tr2GrannyAnimationLayer::SampleTextTracks: CMF does not have text tracks!" );
542
543 if( !listener )
544 {
545 return;
546 }
547 for( auto it = m_controlTextTracks.begin(); it != m_controlTextTracks.end(); it++ )
548 {
549 granny_control* control = it->first;
550 int currentLoop = GrannyGetControlLoopIndex( control );
551 granny_real32 t = GrannyGetControlRawLocalClock( control );
552 if( t < 0 )
553 {
554 continue; // Animation hasn't started yet
555 }
556
557 for( auto trackIt = it->second.begin(); trackIt != it->second.end(); trackIt++ )
558 {
559 const char* evt = trackIt->SampleTrack( t, currentLoop );
560 if( evt )
561 {
562 listener->HandleEvent( CA2W( evt ) );
563 }
564 }
565 }
566}
567#endif
568
569void Tr2GrannyAnimationLayer::SampleMorphTracks( std::unordered_map<std::string, float>& morphAnimations, bool additive )

Callers

nothing calls this directly

Calls 5

IsUsingCMFFunction · 0.85
SampleTrackMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
HandleEventMethod · 0.45

Tested by

no test coverage detected