libccd
libccd copied to clipboard
support function example for 3D convex mesh
Hi, I need to write a support function for convex meshes. Is there any sample code or implementation for this?. Can somebody give me some direction on this?. Thanks.
Hi Xendian,
did you found out how to implement this? It would help me aswell.
Thanks
no not yet. is there anybody has any say on this?!!.
You could find one here.
I tried the same implementation..it didn't work out for my case. This doesn't consider the connectivity of the mesh. The reference triangle support function didn't work out either. That is reason, I asked sample code with convex mesh working.
I believe this code works. We don't need to consider the connectivity because we assume that the shape is convex. Checking all the vertices of a convex mesh would be enough to find the supporting point.
One corner case would be having multiple supporting vertices (when the dot products of the vertices and the are all the equal). In that case, we might want to set the supporting point in the middle of the vertices. I think extending the code for the corner case would be straightforward.
Edit: It would be helpful if you could post your code that doesn't work.
but the contact point differs based on the connectivity. You need to incorporate the connectivity, right?.