From 6bc9298b5f54a3679c35e524b27e956d10de15a0 Mon Sep 17 00:00:00 2001 From: "chappuis.daniel" Date: Tue, 23 Feb 2010 08:38:37 +0000 Subject: [PATCH] git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@285 92aac97c-a6ce-11dd-a772-7fcde58d38e6 --- sources/reactphysics3d/integration/ExplicitEuler.cpp | 4 ++-- sources/reactphysics3d/integration/SemiImplicitEuler.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/reactphysics3d/integration/ExplicitEuler.cpp b/sources/reactphysics3d/integration/ExplicitEuler.cpp index f2d1430a..193934ec 100644 --- a/sources/reactphysics3d/integration/ExplicitEuler.cpp +++ b/sources/reactphysics3d/integration/ExplicitEuler.cpp @@ -44,9 +44,9 @@ void ExplicitEuler::integrate(BodyState& bodyState, const Time& time, const Time // Compute the integrated body state bodyState.setPosition(bodyState.getPosition() + bodyState.getLinearVelocity() * dt); - bodyState.setLinearMomentum(bodyState.getLinearMomentum() + bodyState.getForce() * dt); + bodyState.setLinearMomentum(bodyState.getLinearMomentum() + bodyState.getExternalForce() * dt); bodyState.setOrientation(bodyState.getOrientation() + bodyState.getSpin() * dt); - bodyState.setAngularMomentum(bodyState.getAngularMomentum() + bodyState.getTorque() * dt); + bodyState.setAngularMomentum(bodyState.getAngularMomentum() + bodyState.getExternalTorque() * dt); // Recalculate the secondary values of the body state bodyState.recalculate(); diff --git a/sources/reactphysics3d/integration/SemiImplicitEuler.cpp b/sources/reactphysics3d/integration/SemiImplicitEuler.cpp index 5f286fb8..d3d8c220 100644 --- a/sources/reactphysics3d/integration/SemiImplicitEuler.cpp +++ b/sources/reactphysics3d/integration/SemiImplicitEuler.cpp @@ -43,8 +43,8 @@ void SemiImplicitEuler::integrate(BodyState& bodyState, const Time& time, const double dt = timeStep.getValue(); // Timestep // Compute the integrated body state - bodyState.setLinearMomentum(bodyState.getLinearMomentum() + bodyState.getForce() * dt); - bodyState.setAngularMomentum(bodyState.getAngularMomentum() + bodyState.getTorque() * dt); + bodyState.setLinearMomentum(bodyState.getLinearMomentum() + bodyState.getExternalForce() * dt); + bodyState.setAngularMomentum(bodyState.getAngularMomentum() + bodyState.getExternalTorque() * dt); // Recalculate the secondary values of the body state bodyState.recalculate();