Beispiel #1
0
void idleCB(void)
{
	animTcl::checkEvents() ;
	if( g_state == STATE_ANIMATE )
	{
		if( g_frameDumping == 0 )
			GlobalResourceManager::use()->setActualTime( g_globalTimer.GetElapsedTime() );
		else 
		{

			GlobalResourceManager::use()->advanceActualTime( 0.33 );

		}
		glutPostRedisplay() ; 
	}
	else if( g_state == STATE_SIMULATE )
	{

		GlobalResourceManager::use()->setActualTime( g_globalTimer.GetElapsedTime() );

		SimulationStep() ;
		glutPostRedisplay() ; 
	}
	myIdleCB() ;
}
void CSimulator::Run()
{
    unsigned int unCurrentStep = 0;
    m_bEndSimulation = false;    

    while (unCurrentStep < m_unNumberOfCycles && !m_bEndSimulation)
    {
        SimulationStep(unCurrentStep);
        unCurrentStep++;
    }
}