3D convex hull SAT face clipping implementation question
Posted: Fri May 15, 2015 3:17 am
Hello guys,
i'm rewriting my old 3D physics engine PAPPE in the moment, which I wrote in anno 2007, because it was buggy as hell. The rewrite is almost complete now (except continuous collision detection), but I've some open questions yet, so the first question here (the other second open "which CCD&CP solution is the best for discrete->CCD&CP code upgrade case" question will be a own forum topic later).
Is it the (or also a) correct way, that the reference face for 3D convexhull(HullA)<->convexhull(HullB) SAT clipping in my implementation is always on HullA, and the clipping incident face always on HullB? At least, in this case the contact points are always directly automatically coherence and consistent/ without plane reprojection (among other things for warm starting for the nearest new->old feature-ID-key-free contact point search between last and current frame). It seems, that Bullet does also in this way. At least this way implementation works pretty well so far for me, and I saw no failure cases at my tests so far.
The alternative way should be that a face from HullB could also the clip reference face (rg. when face B SAT seperation > face A SAT seperation), where the contact points would be projected to the HullA in-this-case-now incident face then, but will be it the more correct way? It seems, that the most other open source physics engines and collision detection libraries, which I could find (but not Bullet), does it in this way.
Or in other words, what are the pros&cons of the two possible face-face-clipping implementation ways?
My code of my 3D convex-hull-vs-convex-hull collision detection => http://pastebin.com/J0yjHMh6
A physics engine test youtube capture video of my physics engine => test https://www.youtube.com/watch?v=QGO5Bk1JdbM
i'm rewriting my old 3D physics engine PAPPE in the moment, which I wrote in anno 2007, because it was buggy as hell. The rewrite is almost complete now (except continuous collision detection), but I've some open questions yet, so the first question here (the other second open "which CCD&CP solution is the best for discrete->CCD&CP code upgrade case" question will be a own forum topic later).
Is it the (or also a) correct way, that the reference face for 3D convexhull(HullA)<->convexhull(HullB) SAT clipping in my implementation is always on HullA, and the clipping incident face always on HullB? At least, in this case the contact points are always directly automatically coherence and consistent/ without plane reprojection (among other things for warm starting for the nearest new->old feature-ID-key-free contact point search between last and current frame). It seems, that Bullet does also in this way. At least this way implementation works pretty well so far for me, and I saw no failure cases at my tests so far.
The alternative way should be that a face from HullB could also the clip reference face (rg. when face B SAT seperation > face A SAT seperation), where the contact points would be projected to the HullA in-this-case-now incident face then, but will be it the more correct way? It seems, that the most other open source physics engines and collision detection libraries, which I could find (but not Bullet), does it in this way.
Or in other words, what are the pros&cons of the two possible face-face-clipping implementation ways?
My code of my 3D convex-hull-vs-convex-hull collision detection => http://pastebin.com/J0yjHMh6
A physics engine test youtube capture video of my physics engine => test https://www.youtube.com/watch?v=QGO5Bk1JdbM