20 lines
343 B
C++
20 lines
343 B
C++
|
#include "SHFixedSystemRoutine.h"
|
||
|
#include "../SHECSMacros.h"
|
||
|
|
||
|
namespace SHADE
|
||
|
{
|
||
|
|
||
|
void SHFixedSystemRoutine::Execute(double dt)
|
||
|
{
|
||
|
accumulatedTime += dt;
|
||
|
int counter = 0;
|
||
|
while (accumulatedTime >= fixedTimeStep)
|
||
|
{
|
||
|
++counter;
|
||
|
accumulatedTime -= fixedTimeStep;
|
||
|
FixedExecute(fixedTimeStep);
|
||
|
}
|
||
|
stats.numSteps = counter;
|
||
|
}
|
||
|
|
||
|
}
|