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
|
||||
\ccCreationVariable{p}
|
||||
|
||||
\ccConstructor{AABB_HalfedgeGraph_segment_primitive(Id id)}
|
||||
{Constructs a primitive, the datum triangle is the one corresponding to \ccc{id}.
|
||||
HalfedgeGraph used in boost graph free functions is the default constructed one. This constructor is tailored for a \ccc{HalfedgeGraph}
|
||||
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
|
||||
the corresponding segment and reference point.}
|
||||
|
||||
\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>}.}
|
||||
\ccConstructor{
|
||||
template <class Iterator>
|
||||
AABB_HalfedgeGraph_segment_primitive(Iterator it,const HalfedgeGraph& graph)}
|
||||
{Constructs a primitive. The \ccc{value_type} of \ccc{Iterator} must be \ccc{Id}.
|
||||
The example below gives a way to call this constructor the insert-by-range method of the class \ccc{CGAL::AABB_tree<Traits>}.}
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
|
|
|||
|
|
@ -42,25 +42,27 @@ Class \ccRefName\ is a static data structure for efficient intersection and dist
|
|||
\ccCreationVariable{tree}
|
||||
|
||||
\ccConstructor{AABB_tree();}{Constructs an empty tree.}
|
||||
\ccConstructor{template < class InputIterator>
|
||||
\ccConstructor{template < class InputIterator, class ... T>
|
||||
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
|
||||
|
||||
\ccMethod{template < class InputIterator>
|
||||
\ccMethod{template < class InputIterator, class ... T>
|
||||
void rebuild(InputIterator begin,
|
||||
InputIterator beyond);}{Clears the current tree and rebuilds it from scratch. See constructor above for the parameters. }
|
||||
\ccGlue
|
||||
InputIterator beyond,
|
||||
T ... t);}{Equivalent to calling \ccc{clear()} followed by \ccc{insert(first,last,t...)}.}
|
||||
|
||||
\ccMethod{void clear();}{Clears the AABB tree. }
|
||||
|
||||
\ccGlue
|
||||
\ccMethod{template <class InputIterator>
|
||||
void insert(InputIterator begin, InputIterator beyond);}
|
||||
{Add a sequence of primitives to the set of primitive of the AABB
|
||||
tree. Type \ccc{InputIterator} can be any const iterator such that \ccc{Primitive}
|
||||
has a constructor taking an InputIterator as argument.}
|
||||
\ccGlue
|
||||
|
||||
\ccMethod{template <class InputIterator, class ... T>
|
||||
void insert(InputIterator begin, InputIterator beyond, T ... t);}
|
||||
{Add a sequence of primitives to the set of primitives of the AABB
|
||||
tree. Type \ccc{InputIterator} is any iterator and parameter pack \ccc{T} any types such that \ccc{Primitive}
|
||||
has a constructor with the following signature: \ccc{Primitive(InputIterator, T...)}.}
|
||||
|
||||
\ccMethod{void insert(const Primitive p);}
|
||||
{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
|
||||
// efficient distance queries.
|
||||
Tree tree(boost::make_transform_iterator(boost::edges(graph).first,
|
||||
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 tree(boost::edges(graph).first,boost::edges(graph).second,graph);
|
||||
tree.accelerate_distance_queries();
|
||||
|
||||
// counts #intersections with a triangle query
|
||||
|
|
|
|||
Loading…
Reference in New Issue