mirror of https://github.com/CGAL/cgal
update AABB_tree documentation
This commit is contained in:
parent
88cc2621a1
commit
7e6a880aa4
|
|
@ -37,12 +37,12 @@ among `Ray_3`, `Segment_3`, `Line_3`, `Triangle_3`, `Plane_3` and `Bbox_3`. Rele
|
|||
typedef Hidden_type Do_intersect_3;
|
||||
|
||||
/*!
|
||||
A functor object to construct the intersection between two geometric objects.
|
||||
Provides the nested type `Result<A, B>` where `Result<A, B>::Type` is the return
|
||||
type of the `operator()(A, B)`.
|
||||
A functor object to construct the intersection between two geometric objects.
|
||||
This functor must support the result_of protocol, that is the return
|
||||
type of the `operator()(A, B)` is `CGAL::cpp11::result<Intersect_3(A,B)>`.
|
||||
|
||||
Provides the operators:
|
||||
`Result<A, B>::type operator()(const A& a, const B& b);`
|
||||
`CGAL::cpp11::result<Intersect_3(A,B)> operator()(const A& a, const B& b);`
|
||||
where `A` and `B` are any relevant types among `Ray_3`, `Segment_3`, `Line_3`,
|
||||
`Triangle_3`, `Plane_3` and `Bbox_3`.
|
||||
Relevant herein means that a line primitive (ray, segment, line) is tested
|
||||
|
|
|
|||
|
|
@ -58,12 +58,10 @@ typedef std::pair<Point_3, Primitive::Id> Point_and_primitive_id;
|
|||
typedef std::pair<Object, Primitive::Id> Object_and_primitive_id;
|
||||
|
||||
|
||||
/*! A nested class template to aquire the pair of the return type of
|
||||
intersections with an object of type `Query` and a
|
||||
`Primitive::Id` through the member typedef `Type`.
|
||||
|
||||
This class is convertible to `Point_and_primitive_id`.
|
||||
*/
|
||||
/*! A nested class template providing as a pair the intersection result of a `Query` object
|
||||
and a `Primitive::Datum`, together with the `Primitive::Id` of the primitive intersected.
|
||||
The type of the pair is given by the nested type `Type`.
|
||||
*/
|
||||
|
||||
template <typename Query>
|
||||
struct Intersection_and_primitive_id{};
|
||||
|
|
@ -123,7 +121,9 @@ typedef Hidden_type Do_intersect;
|
|||
|
||||
/*!
|
||||
A functor object to compute the intersection of a query and a primitive. Provides the operator:
|
||||
`boost::optional<Intersection_and_primitive_id<Query>::type operator()(const Query & q, const Primitive& primitive);` which returns the intersection as a pair composed of an object and a primitive id, iff the query intersects the primitive.
|
||||
`boost::optional<Intersection_and_primitive_id<Query>::type > operator()(const Query & q, const Primitive& primitive);` which returns the intersection as a pair composed of an object and a primitive id, iff the query intersects the primitive.
|
||||
\cgalHeading{Note on Backward Compatibility}
|
||||
Before the release 4.3 of \cgal, the return type of this function used to be `boost::optional<Object_and_primitive_id>`.
|
||||
*/
|
||||
typedef Hidden_type Intersect;
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ public:
|
|||
|
||||
typedef typename std::pair<typename GeomTraits::Point_3, typename Primitive::Id> Point_and_primitive_id;
|
||||
|
||||
///\todo update this to use the return type of `GeomTraits::Intersection` together with an helper to remove optional
|
||||
template<typename Query>
|
||||
struct Intersection_and_primitive_id {
|
||||
typedef std::pair<
|
||||
|
|
|
|||
|
|
@ -87,17 +87,12 @@ namespace CGAL {
|
|||
/// \deprecated
|
||||
typedef typename AABBTraits::Object_and_primitive_id Object_and_primitive_id;
|
||||
|
||||
/*!
|
||||
\todo Fill in the types in the std::pair.
|
||||
A nested type to aquire the return type of intersections
|
||||
with an object of type `Query` through the member typedef
|
||||
`Type` equal to `std::pair< >`
|
||||
/*!
|
||||
An alias to AABBTraits::Interesction_and_primitive_id
|
||||
*/
|
||||
|
||||
template<typename Query>
|
||||
struct Intersection_and_primitive_id {
|
||||
typedef typename AABBTraits::template Intersection_and_primitive_id<Query>::Type Type;
|
||||
typedef Type type;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -246,7 +241,7 @@ public:
|
|||
/// `Intersection_and_primitive_id<Query>::Type`,
|
||||
/// between the query and the input data to
|
||||
/// the iterator. `do_intersect()`
|
||||
/// predicates and intersections must be defined for Query`
|
||||
/// predicates and intersections must be defined for `Query`
|
||||
/// in the `AABBTraits` class.
|
||||
template<typename Query, typename OutputIterator>
|
||||
OutputIterator all_intersections(const Query& query, OutputIterator out) const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue