diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index 6dd982f35ef..26470133277 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -402,10 +402,15 @@ public: }; - // Returns the input primitive id closest to the source point of the ray - // query. Type `Ray` must be the same as `AABBTraits::Ray_3` and + // Returns the intersection and primitive id closest to the source point of the ray + // query. + // \tparam Ray must be the same as `AABBTraits::Ray_3` and // `do_intersect` predicates and intersections for it must be // defined. + // \tparam Skip a functor with an operator + // `bool operator()(const Primitive_id& id) const` + // that returns `true` in order to skip the primitive. + // Defaults to a functor that always returns `false`. // // `AABBTraits` must be a model of `AABBRayIntersectionTraits` to // call this member function. @@ -413,6 +418,21 @@ public: boost::optional< typename Intersection_and_primitive_id::Type > first_intersection_and_primitive(const Ray& query, SkipFunctor skip = SkipFunctor()) const; + // Returns the primitive id closest to the source point of the ray + // query. + // \tparam Ray must be the same as `AABBTraits::Ray_3` and + // `do_intersect` predicates and intersections for it must be + // defined. + // \tparam Skip a functor with an operator + // `bool operator()(const Primitive_id& id) const` + // that returns `true` in order to skip the primitive. + // Defaults to a functor that always returns `false`. + // + // `AABBTraits` must be a model of `AABBRayIntersectionTraits` to + // call this member function. + template + boost::optional + first_intersected_primitive(const Ray& query, SkipFunctor skip = SkipFunctor()) const; ///@} /// \name Distance Queries diff --git a/Installation/changes.html b/Installation/changes.html index 326525c1e14..41ad204b767 100644 --- a/Installation/changes.html +++ b/Installation/changes.html @@ -150,8 +150,8 @@ and src/ directories).

3D Fast Intersection and Distance Computation

  • Add the functions AABB_tree::first_intersection_and_primitive(Ray_3) - and AABB_tree::first_intersection(Ray_3) that computes the intersection - which is closest to the source of the ray
  • + and AABB_tree::first_intersected_primitive(Ray_3) that computes + the intersection which is closest to the source of the ray