示例#1
0
void PhysicsWorld::StepSimulation(f32 deltaTime)
{
	mTimer += deltaTime;
	if (mTimer >= mSettings.timeStep)
	{
		mTimer -= mSettings.timeStep;
		AccumulateForces();
		Integrate();
		SatisfyConstraints();
	}
}
示例#2
0
void ParticleSystem::TimeStep() {
    AccumulateForces();
    Verlet();
    SatisfyConstraints();
}