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

Method SampleTrack

trinity/Tr2GrannyAnimationLayer.cpp:493–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491
492#if WITH_GRANNY
493const char* TextEventTrack::SampleTrack( float time, int loop )
494{
495 int entryIndex = -1;
496 for( int entryIdx = 0; entryIdx < m_grannyTrack->EntryCount; entryIdx++ )
497 {
498 if( m_grannyTrack->Entries[entryIdx].TimeStamp > time )
499 {
500 break;
501 }
502 entryIndex = entryIdx;
503 }
504 // Currently only the last event will be triggered
505 if( entryIndex >= 0 && ( entryIndex > m_lastIndex || loop > m_lastLoop ) )
506 {
507 m_lastIndex = entryIndex;
508 m_lastLoop = loop;
509 return m_grannyTrack->Entries[entryIndex].Text;
510 }
511 return nullptr;
512}
513#endif
514
515float MorphTrack::SampleTrack( float time, float duration ) const

Callers 2

SampleTextTracksMethod · 0.80
SampleMorphTracksMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected