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
Is there SAT algorithm in Bullet Physics Engine
-
- Posts: 83
- Joined: Mon Nov 05, 2018 8:16 am
- Location: China
Re: Is there SAT algorithm in Bullet Physics Engine
i think you should implement it yourself, but you can refer to the GPU part computeConvexConvexContactsGPUSAT()
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Is there SAT algorithm in Bullet Physics Engine
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
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