From 0071ed16a8d3f89befe1309be491512d215e3506 Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Thu, 2 May 2013 22:51:31 +0200 Subject: [PATCH] Add comments in the dynamics world code --- src/engine/DynamicsWorld.cpp | 10 ++++++++-- src/engine/DynamicsWorld.h | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/engine/DynamicsWorld.cpp b/src/engine/DynamicsWorld.cpp index 237d5236..aac339ac 100644 --- a/src/engine/DynamicsWorld.cpp +++ b/src/engine/DynamicsWorld.cpp @@ -121,7 +121,9 @@ void DynamicsWorld::update() { setInterpolationFactorToAllBodies(); } -// Integrate position and orientation of the rigid bodies +// Integrate position and orientation of the rigid bodies. +/// The positions and orientations of the bodies are integrated using +/// the sympletic Euler time stepping scheme. void DynamicsWorld::integrateRigidBodiesPositions() { PROFILE("DynamicsWorld::updateRigidBodiesPositionAndOrientation()"); @@ -197,7 +199,11 @@ void DynamicsWorld::setInterpolationFactorToAllBodies() { } } -// Integrate the velocities of rigid bodies +// Integrate the velocities of rigid bodies. +/// This method only set the temporary velocities but does not update +/// the actual velocitiy of the bodies. The velocities updated in this method +/// might violate the constraints and will be corrected in the constraint and +/// contact solver. void DynamicsWorld::integrateRigidBodiesVelocities() { // TODO : Use better memory allocation here diff --git a/src/engine/DynamicsWorld.h b/src/engine/DynamicsWorld.h index 22fbc495..0503ebe2 100644 --- a/src/engine/DynamicsWorld.h +++ b/src/engine/DynamicsWorld.h @@ -99,7 +99,7 @@ class DynamicsWorld : public CollisionWorld { /// Private assignment operator DynamicsWorld& operator=(const DynamicsWorld& world); - /// Integrate the positions and orientations of rigid bodies + /// Integrate the positions and orientations of rigid bodies. void integrateRigidBodiesPositions(); /// Update the position and orientation of a body @@ -109,7 +109,7 @@ class DynamicsWorld : public CollisionWorld { /// Compute and set the interpolation factor to all bodies void setInterpolationFactorToAllBodies(); - /// Integrate the velocities of rigid bodies + /// Integrate the velocities of rigid bodies. void integrateRigidBodiesVelocities(); /// Solve the contacts and constraints