Page 1 of 1

Is there SAT algorithm in Bullet Physics Engine

Posted: Sun Jan 06, 2019 1:31 am
by daye
Hi everyone,

I want to change the Collision Detection algorithm to SAT algorithm. I only found GJK algorithm in Bullet. Is there SAT algorithm in Bullet Physics Engine which I can call it directly? Or I have to achieve that by myself?

Thank you in advance!
Daye

Re: Is there SAT algorithm in Bullet Physics Engine

Posted: Mon Feb 11, 2019 4:34 am
by steven
i think you should implement it yourself, but you can refer to the GPU part computeConvexConvexContactsGPUSAT()

Re: Is there SAT algorithm in Bullet Physics Engine

Posted: Mon Feb 11, 2019 4:52 am
by Erwin Coumans
Yes, Bullet provides a SAT implementation.

You need to call the convexHull->initializePolyhedralFeatures(), this will create edges/trangles for a point cloud.
convex hull generation is

then enable SAT using getDispatchInfo().m_enableSatConvex=true;

Implementation is in src\BulletCollision\CollisionDispatch\btConvexConvexAlgorithm.cpp
and its contact clipping here:
src\BulletCollision\NarrowPhaseCollision\btPolyhedralContactClipping.cpp