Exemplo n.º 1
0
void PhysicsWorld::StepSimulation(f32 deltaTime)
{
	mTimer += deltaTime;
	if (mTimer >= mSettings.timeStep)
	{
		mTimer -= mSettings.timeStep;
		AccumulateForces();
		Integrate();
		SatisfyConstraints();
	}
}
Exemplo n.º 2
0
/* Idle function */
void Idle(void)
{
	AccumulateForces();
	IntegrateEuler();
  /**
	  * Update Pressure (pump an air into the ball)
	  */
	  if(Pressure < FINAL_PRESSURE)
	  {
		Pressure += FINAL_PRESSURE/100.0f;
	   	printf("Pressure = %4.4f\n",Pressure);
	  }	
	  
//	  sg_glDumpWindow(windW,windH);
	  
	glutPostRedisplay();
}
Exemplo n.º 3
0
void ParticleSystem::TimeStep() {
    AccumulateForces();
    Verlet();
    SatisfyConstraints();
}