mirror of https://github.com/CGAL/cgal
document additional parameter pack blindly forwarded+update HalfedgeGraph primitive
This commit is contained in:
parent
9d9963d4a0
commit
77c3301ab1
|
|
@ -28,14 +28,11 @@ the memory footprint. The default is \ccc{CGAL::Tag_false} (datum is not stored)
|
||||||
\ccCreation
|
\ccCreation
|
||||||
\ccCreationVariable{p}
|
\ccCreationVariable{p}
|
||||||
|
|
||||||
\ccConstructor{AABB_HalfedgeGraph_segment_primitive(Id id)}
|
\ccConstructor{
|
||||||
{Constructs a primitive, the datum triangle is the one corresponding to \ccc{id}.
|
template <class Iterator>
|
||||||
HalfedgeGraph used in boost graph free functions is the default constructed one. This constructor is tailored for a \ccc{HalfedgeGraph}
|
AABB_HalfedgeGraph_segment_primitive(Iterator it,const HalfedgeGraph& graph)}
|
||||||
of type \ccc{CGAL::Polyhedron_3<Traits>} class, where the \ccc{edge_descriptor} is a handle and the graph need not to be known to extract
|
{Constructs a primitive. The \ccc{value_type} of \ccc{Iterator} must be \ccc{Id}.
|
||||||
the corresponding segment and reference point.}
|
The example below gives a way to call this constructor the insert-by-range method of the class \ccc{CGAL::AABB_tree<Traits>}.}
|
||||||
|
|
||||||
\ccConstructor{AABB_HalfedgeGraph_segment_primitive(std::pair<HalfedgeGraph*,Id> graph_and_id)}
|
|
||||||
{Constructs a primitive, the graph and the id being given as a pair. The example below gives a way to call this constructor the insert-by-range method of the class \ccc{CGAL::AABB_tree<Traits>}.}
|
|
||||||
|
|
||||||
|
|
||||||
\ccSeeAlso
|
\ccSeeAlso
|
||||||
|
|
|
||||||
|
|
@ -42,25 +42,27 @@ Class \ccRefName\ is a static data structure for efficient intersection and dist
|
||||||
\ccCreationVariable{tree}
|
\ccCreationVariable{tree}
|
||||||
|
|
||||||
\ccConstructor{AABB_tree();}{Constructs an empty tree.}
|
\ccConstructor{AABB_tree();}{Constructs an empty tree.}
|
||||||
\ccConstructor{template < class InputIterator>
|
\ccConstructor{template < class InputIterator, class ... T>
|
||||||
AABB_tree( InputIterator begin,
|
AABB_tree( InputIterator begin,
|
||||||
InputIterator beyond);}{Builds the AABB tree data structure. Type \ccc{InputIterator} can be any const iterator such that \ccc{Primitive} has a constructor taking a \ccc{InputIterator} as argument. The tree stays empty if the memory allocation is not successful.}
|
InputIterator beyond,
|
||||||
|
T ... t);}{Equivalent to constructing an empty tree and calling \ccc{insert(first,last,t...)}.}
|
||||||
|
|
||||||
\ccOperations
|
\ccOperations
|
||||||
|
|
||||||
\ccMethod{template < class InputIterator>
|
\ccMethod{template < class InputIterator, class ... T>
|
||||||
void rebuild(InputIterator begin,
|
void rebuild(InputIterator begin,
|
||||||
InputIterator beyond);}{Clears the current tree and rebuilds it from scratch. See constructor above for the parameters. }
|
InputIterator beyond,
|
||||||
\ccGlue
|
T ... t);}{Equivalent to calling \ccc{clear()} followed by \ccc{insert(first,last,t...)}.}
|
||||||
|
|
||||||
\ccMethod{void clear();}{Clears the AABB tree. }
|
\ccMethod{void clear();}{Clears the AABB tree. }
|
||||||
|
|
||||||
\ccGlue
|
|
||||||
\ccMethod{template <class InputIterator>
|
\ccMethod{template <class InputIterator, class ... T>
|
||||||
void insert(InputIterator begin, InputIterator beyond);}
|
void insert(InputIterator begin, InputIterator beyond, T ... t);}
|
||||||
{Add a sequence of primitives to the set of primitive of the AABB
|
{Add a sequence of primitives to the set of primitives of the AABB
|
||||||
tree. Type \ccc{InputIterator} can be any const iterator such that \ccc{Primitive}
|
tree. Type \ccc{InputIterator} is any iterator and parameter pack \ccc{T} any types such that \ccc{Primitive}
|
||||||
has a constructor taking an InputIterator as argument.}
|
has a constructor with the following signature: \ccc{Primitive(InputIterator, T...)}.}
|
||||||
\ccGlue
|
|
||||||
\ccMethod{void insert(const Primitive p);}
|
\ccMethod{void insert(const Primitive p);}
|
||||||
{Add a primitive to the set of primitives of the AABB tree.}
|
{Add a primitive to the set of primitives of the AABB tree.}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,7 @@ void run(const HalfedgeGraph& graph){
|
||||||
|
|
||||||
// constructs the AABB tree and the internal search tree for
|
// constructs the AABB tree and the internal search tree for
|
||||||
// efficient distance queries.
|
// efficient distance queries.
|
||||||
Tree tree(boost::make_transform_iterator(boost::edges(graph).first,
|
Tree tree(boost::edges(graph).first,boost::edges(graph).second,graph);
|
||||||
boost::bind(&std::make_pair<const HalfedgeGraph*, edge_descriptor>,
|
|
||||||
&graph, _1)),
|
|
||||||
boost::make_transform_iterator(boost::edges(graph).second,
|
|
||||||
boost::bind(&std::make_pair<const HalfedgeGraph*, edge_descriptor>,
|
|
||||||
&graph, _1)));
|
|
||||||
tree.accelerate_distance_queries();
|
tree.accelerate_distance_queries();
|
||||||
|
|
||||||
// counts #intersections with a triangle query
|
// counts #intersections with a triangle query
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue