+ fixed issue related to temporary/root collision shape in btCollisionObject

+ normalize plane normal input for btStaticPlaneShape
+ fixed issue related to swapped collision detectors (SphereTriangleDetector in particular)
Thanks a lot to Andrey Tuganov for reporting the issue and his reproduction case ( http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2143 )
This commit is contained in:
erwin.coumans
2008-07-11 05:39:31 +00:00
parent dcf9f8d857
commit 8f3e9603f3
23 changed files with 355 additions and 203 deletions

View File

@@ -60,10 +60,12 @@ void btSphereTriangleCollisionAlgorithm::processCollision (btCollisionObject* co
btDiscreteCollisionDetectorInterface::ClosestPointInput input;
input.m_maximumDistanceSquared = btScalar(1e30);//todo: tighter bounds
input.m_transformA = col0->getWorldTransform();
input.m_transformB = col1->getWorldTransform();
input.m_transformA = sphereObj->getWorldTransform();
input.m_transformB = triObj->getWorldTransform();
detector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw);
bool swapResults = m_swapped && !m_ownManifold;
detector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw,swapResults);
if (m_ownManifold)
resultOut->refreshContactPoints();