文档:https://doc.cgal.org/latest/AABB_tree/index.html
文档中关于距离计算的实现:
Distance. An AABB tree computes the closest point from a given point query to the input primitives through the function AABB_tree::closest_point()
. In addition, it can compute the id of the closest primitive from a given point query through the function AABB_tree::closest_point_and_primitive()
, i.e., the id of the primitive which realizes the minimum distance from the point query. The AABB tree uses a secondary search structure to speed up the distance queries. The construction of this secondary structure should be requested by the user by a call to AABB_tree::accelerate_distance_queries()
before the first the distance computation. This data structure is not generated by default because it is used only for distance computations.
操作方式如下: