How can I compute penetration depth between a convex shape and btBvhTriangleMeshShape?
Between two convex shapes, I use btGjkPairDetector, but it is no available for concave shapes.
Thanks in advance.
Nacho
Computing penetration depth from btBvhTriangleMeshShape
-
- Posts: 31
- Joined: Tue Mar 04, 2008 1:41 pm
-
- Posts: 508
- Joined: Fri May 30, 2008 2:51 am
- Location: Ossining, New York
Re: Computing penetration depth from btBvhTriangleMeshShape
I believe you find the right triangle in the mesh, and then the triangle is convex so it's just a convex-convex. However I don't know what I'm talking about.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Computing penetration depth from btBvhTriangleMeshShape
As sparkprime already mentioned, it boils down to a series of convex-triangle collisions indeed. You just need to implement a triangle-convex callback:Nacho wrote:Between two convex shapes, I use btGjkPairDetector, but it is no available for concave shapes.
Code: Select all
concaveShape->processAllTriangles( &convexTriangleCallback,cmAabbMin,cmAabbMax);
Hope this helps,
Erwin
-
- Posts: 31
- Joined: Tue Mar 04, 2008 1:41 pm