Class AABB_tree<AT> is a static data structure for efficient intersection and distance computations in 3D. It builds a hierarchy of axis-aligned bounding boxes (a AABB tree) from a set of 3D geometric objects, and can receive intersection and distance queries, provided that the corresponding predicates are implemented in the traits class AT. The template parameter AT stands for a traits class which must be a model of the concept AABBTraits. #include <CGAL/AABB_tree.h>
| |
Unsigned integral size type.
|
|
| Number type returned by the distance queries. |
|
| Type of 3D point. |
|
| Type of input primitive. |
|
| Type of bounding box. |
| ||
|
||
| ||
|
| |
Constructs an empty tree.
| |
| |
| |
Builds the AABB tree data structure. Type InputIterator can be any const iterator such that Primitive has a constructor taking a InputIterator as argument. The tree stays empty if the memory allocation is not successful.
|
| ||
|
| Returns true, iff the query intersects at least one of the input primitives. Type Query must be a type for which do_intersect predicates are defined in the AT class. |
| ||
|
| |
Returns the number of primitives intersected by the query. Type Query must be a type for which do_intersect predicates are defined in the AT class. | ||
| ||
|
| |
Outputs to the iterator the list of all intersected primitives ids. This function does not compute the intersection points and is hence faster than the function all_intersections function below. Type Query must be a type for which do_intersect predicates are defined in the AT class. | ||
| ||
|
| |
Returns the first encountered intersected primitive id, iff the query intersects at least one of the input primitives. No particular order is guaranteed over the tree traversal, such that, e.g, the primitive returned is not necessarily the closest from the source point of a ray query. Type Query must be a type for which do_intersect predicates are defined in the AT class. |
| ||
|
| |
Outputs to the iterator the list of all intersections between the query and input data, as objects of type Object_and_primitive_id. Type Query must be a type for which do_intersect predicates and intersections are defined in the AT class. | ||
| ||
| ||
| ||
Returns the first encountered intersection, iff the query intersects at least one of the input primitives. No particular order is guaranteed over the tree traversal, such that, e.g, the primitive returned is not necessarily the closest from the source point of a ray query. Type Query must be a type for which do_intersect predicates and intersections are defined in the AT class. |
|
| |
Returns the minimum squared distance between the query point and all input primitives. The internal KD-tree is not used. | ||
|
| |
Returns the point in the union of all input primitives which is closest to the query. In case there are several closest points, one arbitrarily chosen closest point is returned. The internal KD-tree is not used. | ||
|
| |
Returns a Point_and_primitive_id which realizes the smallest distance between the query point and all input primitives. The internal KD-tree is not used. |