Add the second function; change changes.html

This commit is contained in:
Andreas Fabri 2016-04-22 16:10:35 +02:00 committed by Sébastien Loriot
parent 768b34068e
commit 2fabd2c170
2 changed files with 24 additions and 4 deletions

View File

@ -402,10 +402,15 @@ public:
}; };
// Returns the input primitive id closest to the source point of the ray // Returns the intersection and primitive id closest to the source point of the ray
// query. Type `Ray` must be the same as `AABBTraits::Ray_3` and // query.
// \tparam Ray must be the same as `AABBTraits::Ray_3` and
// `do_intersect` predicates and intersections for it must be // `do_intersect` predicates and intersections for it must be
// defined. // 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 // `AABBTraits` must be a model of `AABBRayIntersectionTraits` to
// call this member function. // call this member function.
@ -413,6 +418,21 @@ public:
boost::optional< typename Intersection_and_primitive_id<Ray>::Type > boost::optional< typename Intersection_and_primitive_id<Ray>::Type >
first_intersection_and_primitive(const Ray& query, SkipFunctor skip = SkipFunctor()) const; 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<typename Ray, typename SkipFunctor = False_functor>
boost::optional<Primitive_id>
first_intersected_primitive(const Ray& query, SkipFunctor skip = SkipFunctor()) const;
///@} ///@}
/// \name Distance Queries /// \name Distance Queries

View File

@ -150,8 +150,8 @@ and <code>src/</code> directories).
<h3>3D Fast Intersection and Distance Computation</h3> <h3>3D Fast Intersection and Distance Computation</h3>
<ul> <ul>
<li>Add the functions <code>AABB_tree::first_intersection_and_primitive(Ray_3)</code> <li>Add the functions <code>AABB_tree::first_intersection_and_primitive(Ray_3)</code>
and <code>AABB_tree::first_intersection(Ray_3)</code> that computes the intersection and <code>AABB_tree::first_intersected_primitive(Ray_3)</code> that computes
which is closest to the source of the ray</li> the intersection which is closest to the source of the ray</li>
</ul> </ul>
<!-- Geometric Optimization --> <!-- Geometric Optimization -->
<!-- Interpolation --> <!-- Interpolation -->