How does CGAL get closest point and primitive

941 Views Asked by At

I did not get the source code, I wonder how to get the closest primitive, in fact it is a triangle, if I want to get the nearest point with another, just use their
Euler distance, but how to get the nearest primitive with specific point?

1

There are 1 best solutions below

2
On BEST ANSWER

If you want to get the closest point and the closest primitive to a specific point, you can use the function closest_point_and_primitive() of the AABB-tree.

See a usage example here