Added support for separating axis test for polyhedral shapes

Added initial support for polyhedral contact clipping. 
This clipping takes a separating normal, that can be computed using either SAT or GJK/EPA.
To enable clipping, use btPolyhedralConvexShape::initializePolyhedralFeatures(); (needs to be enabled for both convex shapes)
No concave trimesh support for SAT/clipping yet. To enable SAT, see the toggle in btConvexConvexAlgorithm.
Fixes in contact normal in btGjkPairDetector. Hopefully this doesn't cause any regression (we need unit tests!)
This commit is contained in:
erwin.coumans
2011-03-29 08:52:18 +00:00
parent 1f5af32203
commit 784e7fdb39
10 changed files with 824 additions and 8 deletions

View File

@@ -145,7 +145,7 @@ public:
virtual void getVertex(int i,btVector3& vtx) const
{
btVector3 halfExtents = getHalfExtentsWithoutMargin();
btVector3 halfExtents = getHalfExtentsWithMargin();
vtx = btVector3(
halfExtents.x() * (1-(i&1)) - halfExtents.x() * (i&1),