Hi. This question is related to narrowphase collision detection.
I am doing my thesis in collision detection and I am implementing a broadphase algorithm to cull away collisions. My problem is that I have some benchmark files that describes a scene as a triangle soup, meaning triangles are not grouped in any way. Even though the scene e.g describes a collection of spheres they are just triangles not related to each other.
My implemented broadphase algorithm is going to cull away collision based on spatial location, based on an uniform grid. The problem here is that because the scene is just a triangle soup, consider 2 triangles which are neighbours (I mean not sharing edge or vertex, but their edges data are represented with the same vertices geoemetrically).
E.g tri 1: (0,0,0) , (1,0,0), (0,1,0) and tri 2: (1,0,0) , (1,1,0), (0,1,0), they are neighbours. I do not want these to be reported as a collision pair. Narrowphase algorithm such as GJK will report distance 0 (in ideal case with no floating point errors o.w some small pos value). How can I solve this? I plan to use GJK as narrowphase algorithm in a triangle soup scene. In such a scene all neighbouring triangles will be considered in collision. Maybe this is the consequence of representing the scene as a triangle soup?
In the GJK algorithm negative distance does not exist. 0 means that tirangle are intersecting each other. Isn't one solution to the problem just to add some constant in GJK algorithm to distinguish the case where triangles are touching each other and do not report collision. Maybe triangle-triangle is preferred algorithm in this case? I do not know.
Hope you all understand my problem.
Thanks