Efficient querying of triangles within a radius of a point in 3D
I have a requirement: given a triangle mesh M (which may be unoriented, non-manifold, or a soup), as well as an arbitrary 3D point p and a radius r, I want to query all triangles on M whose distance from point p is less than or equal to r, and return the results sorted in ascending order of distance from point p to these triangles.