MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / singleTimeStep

Method singleTimeStep

Simulator/SimulatorBase.cpp:878–892  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

876}
877
878void SimulatorBase::singleTimeStep()
879{
880 const unsigned int numSteps = getValue<unsigned int>(SimulatorBase::NUM_STEPS_PER_RENDER);
881 setValue<unsigned int>(SimulatorBase::NUM_STEPS_PER_RENDER, 1);
882 setValue<bool>(SimulatorBase::PAUSE, false);
883
884 timeStep();
885
886 setValue<unsigned int>(SimulatorBase::NUM_STEPS_PER_RENDER, numSteps);
887 setValue<bool>(SimulatorBase::PAUSE, true);
888
889 const Real stopAt = getValue<Real>(SimulatorBase::STOP_AT);
890 if (m_gui && (stopAt > 0.0) && (stopAt < TimeManager::getCurrent()->getTime()))
891 m_gui->stop();
892}
893
894void SimulatorBase::timeStep()
895{

Callers 1

createMenuBarMethod · 0.80

Calls 2

getTimeMethod · 0.80
stopMethod · 0.45

Tested by

no test coverage detected