git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@187 92aac97c-a6ce-11dd-a772-7fcde58d38e6

This commit is contained in:
chappuis.daniel 2009-07-31 16:14:15 +00:00
parent 4ce65e9aaa
commit 385301229d

View File

@ -43,12 +43,11 @@ void CollisionEngine::update() {
// While the time accumulator is not empty
while(timer.getAccumulator() >= timer.getTimeStep().getValue()) {
// Remove all old collision contact constraints
collisionWorld->removeAllContactConstraints();
Time timeFirst = 0; // First collision time
Time timeLast = DBL_MAX; // Last collision separation time
Time timeFirst(0); // First collision time
Time timeLast(DBL_MAX); // Last collision separation time
// Compute the collision detection
if (collisionDetection.computeCollisionDetection(collisionWorld, timer.getTimeStep(), timeFirst, timeLast)) {
@ -60,6 +59,9 @@ void CollisionEngine::update() {
// Update the state of the rigid body
updateBodyState(rigidBody, timeFirst);
}
// Stop the body (TO DELETE)
rigidBody->setIsMotionEnabled(false); // TODO : DELETE THIS
}
}
else {
@ -70,6 +72,7 @@ void CollisionEngine::update() {
if (rigidBody && rigidBody->getIsMotionEnabled()) {
// Update the state of the rigid body with an entire time step
updateBodyState(rigidBody, timer.getTimeStep());
std::cout << "NO NO NO" << std::endl; // TODO : DELETE THIS
}
}
}