void PhysicsSystem::Update(float deltaTime) { Integrate(deltaTime); DetectCollisions(); ResolveContacts(deltaTime); SendCollisionMessages(); contacts.clear(); UpdateDebugDraw(); }
void JelloMesh::Update(double dt, const World& world, const vec3& externalForces) { m_externalForces = externalForces; CheckForCollisions(m_vparticles, world); ComputeForces(m_vparticles); ResolveContacts(m_vparticles); ResolveCollisions(m_vparticles); switch (m_integrationType) { case EULER: EulerIntegrate(dt); break; case MIDPOINT: MidPointIntegrate(dt); break; case RK4: RK4Integrate(dt); break; } }