One approximate way to generate contact points between two convex polyhedra A and B, is the following recipe:
1) find a separating axis between A and B using your favorite method (SAT, GJK etc)
2) find reference face on A and a incident face on B with a normal that is closest to this separating axis
3) perform Sutherland-Hodgman clipping on the vertices of this face on A against the polyhedron B
This clipping can be performed either in worldspace or in the local space of B, using the faces connected to face B
I recently implemented this method in the open source Bullet physics library, part of the Bullet 2.78 release, so you can test the implementation and read the code here:
http://code.google.c...actClipping.cpp in particular btPolyhedralContactClipping::clipHullAgainstHull and clipFace.
For general convex polyhedra you need to compute the connectivity and connected faces (m_connectedFaces in above code), Bullet uses the btConvexHullComputer for this. For the special case of OBB-OBB this information can be hard-coded, you can see the OBB-OBB clipping code in ODE/Bullet here: http://code.google.com/p/bullet/source/browse/trunk/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp#574
Thanks,
Erwin
erwincoumans
Member Since 24 Jul 2005Offline Last Active Oct 26 2012 04:27 PM

Find content
Not Telling