Calculate multiple contact points (for convex-convex and convex-plane) when less then 3 points exist in the persistent manifold.

Uses the normal pertubation method, described by Gino van den Bergen:  http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=4&t=288&p=888#p888
Made btRigidBody::getInvInertiaDiagLocal const, thanks to abhikp (http://code.google.com/p/bullet/issues/detail?id=183 )
This commit is contained in:
erwin.coumans
2009-02-03 00:54:01 +00:00
parent bcbe730471
commit 0754876d77
7 changed files with 145 additions and 30 deletions

View File

@@ -45,6 +45,8 @@ class btManifoldResult : public btDiscreteCollisionDetectorInterface::Result
int m_partId1;
int m_index0;
int m_index1;
public:
btManifoldResult()
@@ -77,8 +79,11 @@ public:
m_index1=index1;
}
virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth);
virtual void addLocalContactPointInternal(const btVector3& normalOnBInWorld,const btVector3& localPointA,const btVector3& localPointB);
SIMD_FORCE_INLINE void refreshContactPoints()
{
btAssert(m_manifoldPtr);