Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2008-09-21 02:34:54 +0400
committerErwin Coumans <blender@erwincoumans.com>2008-09-21 02:34:54 +0400
commit877d70b14a972fb3d3aee52da0ad6b7bb4fbdef4 (patch)
tree684d69081a396f30451e98207c02896d3f39b145
parenta72b65011e826342eaf9620413714fbbf1a1d872 (diff)
fixed sphere-sphere collision: contact points were not properly removed/refreshed.
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
index c9256473c00..c2b13f5903f 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
@@ -56,11 +56,16 @@ void btSphereSphereCollisionAlgorithm::processCollision (btCollisionObject* col0
btScalar radius0 = sphere0->getRadius();
btScalar radius1 = sphere1->getRadius();
- //m_manifoldPtr->clearManifold(); //don't do this, it disables warmstarting
+#ifdef CLEAR_MANIFOLD
+ m_manifoldPtr->clearManifold(); //don't do this, it disables warmstarting
+#endif
///iff distance positive, don't generate a new contact
if ( len > (radius0+radius1))
{
+#ifndef CLEAR_MANIFOLD
+ resultOut->refreshContactPoints();
+#endif //CLEAR_MANIFOLD
return;
}
///distance (negative means penetration)
@@ -82,7 +87,9 @@ void btSphereSphereCollisionAlgorithm::processCollision (btCollisionObject* col0
resultOut->addContactPoint(normalOnSurfaceB,pos1,dist);
- //no resultOut->refreshContactPoints(); needed, because of clearManifold (all points are new)
+#ifndef CLEAR_MANIFOLD
+ resultOut->refreshContactPoints();
+#endif //CLEAR_MANIFOLD
}