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

Method Update

trinity/TriDevice.cpp:444–478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442
443
444void TriDevice::Update( Be::Time realTime, Be::Time simTime )
445{
446#if BLUE_WITH_PYTHON
447 AutoTasklet _at( PyOS->GetTaskletTimer(), "TriDevice::Update" );
448#endif
449
450 TriSrand( simTime );
451
452 // Callbacks to Python when curve sets finish may add curve sets to the device curve sets
453 // list. This will mess up the iterator unless we iterate over a copy.
454 CTriCurveSetVector curveSets;
455 for( auto it = m_curveSets.cbegin(); it != m_curveSets.cend(); ++it )
456 {
457 curveSets.Insert( -1, ( *it )->GetRawRoot() );
458 }
459 for( auto it = curveSets.cbegin(); it != curveSets.cend(); ++it )
460 {
461 ( *it )->Update( realTime, simTime );
462 }
463 curveSets.Remove( -1 );
464
465 // Remember, m_curveSets is a BlueList, must use Remove to get ref-count right.
466 for( ssize_t i = 0; i < m_curveSets.GetSize(); )
467 {
468 TriCurveSet* cs = m_curveSets[i];
469 if( !cs->IsPlaying() )
470 {
471 m_curveSets.Remove( i );
472 }
473 else
474 {
475 ++i;
476 }
477 }
478}
479
480void TriDevice::DestroyRenderContext()
481{

Callers 7

HandleRenderTickMethod · 0.45
HandleRenderTickMethod · 0.45
ExecuteMethod · 0.45
PostPhysicsUpdateMethod · 0.45
HandleRenderTickMethod · 0.45
HandleRenderTickMethod · 0.45
UnloadLodIfNeededMethod · 0.45

Calls 3

TriSrandFunction · 0.85
IsPlayingMethod · 0.80
GetSizeMethod · 0.45

Tested by

no test coverage detected