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