I have a 3D mesh Wavefront .obj file.
Is there any algorithm that takes an arbitrary point coordinates as input and determines which face of the mesh that point belongs to ??
The mesh is rendered on the screen, then the user clicks on it, I want to determine which part of the mesh the user has clicked on ?
Here's the code using LibGDX:
Vector3 intersection=new Vector3(); Ray ray=camera.getPickRay(x, y); //vertices is an array that hold the coordinates of the mesh boolean ok=Intersector.intersectRayTriangles(ray, vertices, intersection);