Efficient querying of triangles within a radius of a point #8159
Unanswered
Alan-Leo-Wong
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, everyone!
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.
My current idea is to use CGAL to construct an AABB Tree for$M$ , then construct a sphere centered at point $p$ with radius $r$ , and finally use the AABB's function
all_intersected_primitives()
to find all intersecting triangles. However, this does not guarantee that the results are sorted by distance, and may exhibit performance issues especially with a large number of queries.Are there any other better and faster alternatives?
Beta Was this translation helpful? Give feedback.
All reactions