Open Levi-Armstrong opened 6 years ago
Several questions:
I haven't played as much with the distance queries -- so it's decidedly possible that it's using GJK. I know the recent improvements to EPA that @hongkai-dai did were inspired by the horrible solutions we were getting for distance between spheres and, at the time, I railed against the idea that it wasn't being evaluated by a primitive-specific function. So, in this case, it may be as bad as it seems.
Not sure if this make any difference but I using the Dynamic AABBTreeCollisionManager and I am calling its distance function.
I assume the desired approach would be to use the primitive shape method?
As near as I can tell, it should ultimately be invoking detail::sphereSphereDistance
. Try putting a breakpoint in it.
The broadphase shouldn't make a difference .
Oops -- that's for unsigned distance. If you call signed distance, there are no primitive tests.
Would you all be opposed to adding ones for signed distance?
Of course not. In some cases, it should be the same function. For primitives like spheres, the cost of finding the signed distance is the same as finding the separating distance.
The most important thing is that there not be two almost parallel computations. Ideally, one should be expressed in terms of the other. Because as soon as we offer two functions that should provide the same answer in a particular domain, but don't use the same code, we're setting ourselves up for trouble.
Agree I will look into it.
I am curious why when checking a primitive sphere to primitive sphere it is using the GJK solver instead of the primitive shape algorithm?