Revision: 16641
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16641
Author:   erwin
Date:     2008-09-21 00:34:54 +0200 (Sun, 21 Sep 2008)

Log Message:
-----------
fixed sphere-sphere collision: contact points were not properly 
removed/refreshed.

Modified Paths:
--------------
    
trunk/blender/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp

Modified: 
trunk/blender/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
===================================================================
--- 
trunk/blender/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
     2008-09-20 22:19:59 UTC (rev 16640)
+++ 
trunk/blender/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
     2008-09-20 22:34:54 UTC (rev 16641)
@@ -56,11 +56,16 @@
        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 @@
        
        resultOut->addContactPoint(normalOnSurfaceB,pos1,dist);
 
-       //no resultOut->refreshContactPoints(); needed, because of 
clearManifold (all points are new)
+#ifndef CLEAR_MANIFOLD
+       resultOut->refreshContactPoints();
+#endif //CLEAR_MANIFOLD
 
 }
 


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to