| 87 | } |
| 88 | |
| 89 | void timeStep () |
| 90 | { |
| 91 | const Real pauseAt = base->getValue<Real>(DemoBase::PAUSE_AT); |
| 92 | if ((pauseAt > 0.0) && (pauseAt < TimeManager::getCurrent()->getTime())) |
| 93 | base->setValue(DemoBase::PAUSE, true); |
| 94 | |
| 95 | if (base->getValue<bool>(DemoBase::PAUSE)) |
| 96 | return; |
| 97 | |
| 98 | // Simulation code |
| 99 | SimulationModel *model = Simulation::getCurrent()->getModel(); |
| 100 | const unsigned int numSteps = base->getValue<unsigned int>(DemoBase::NUM_STEPS_PER_RENDER); |
| 101 | for (unsigned int i = 0; i < numSteps; i++) |
| 102 | { |
| 103 | START_TIMING("SimStep"); |
| 104 | Simulation::getCurrent()->getTimeStep()->step(*model); |
| 105 | STOP_TIMING_AVG; |
| 106 | |
| 107 | base->step(); |
| 108 | } |
| 109 | |
| 110 | for (unsigned int i = 0; i < model->getTetModels().size(); i++) |
| 111 | { |
| 112 | model->getTetModels()[i]->updateMeshNormals(model->getParticles()); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | void buildModel () |
| 117 | { |
nothing calls this directly
no test coverage detected