BoxvsTriangle and SweptBoxVsTriangle

Warchief
Posts: 1
Joined: Tue May 31, 2011 10:40 pm

BoxvsTriangle and SweptBoxVsTriangle

Post by Warchief »

Hi,

I have a tool that explores a static world searching for clear paths, and I'm currently using Sphere and SweptSphere tests. For compatibility issues with another tool I need to switch the tests to use boxes instead of spheres, and I am stuck since I'm pretty new to Bullet.
  • For Sphere I'm currently using:
    btBvhTriangleMeshShape::processAllTriangles(btTriangleCallback* callback ...)
    Where the callback is implemented using the SphereTriangleDetector.
  • For SweptSphere I'm currently using:
    btCollisionWorld::convexSweepTest(const btConvexShape* castShape, ...)
    With btSphereShape as shape.
I can't however find a BoxTriangleDetector (just BoxBox).
  1. How can I implement the box vs triangle test?
  2. I assume just changing the shape to box will work for the swept box, right?
  3. If there's a better way to do it?
Any hints appreciated!

Thanks,
Warchief.