mirror of https://github.com/CGAL/cgal
unify API
This commit is contained in:
parent
999b9a861a
commit
6b129f3ad0
|
|
@ -111,7 +111,7 @@ Constrained_Delaunay_triangulation_2& cdt1);
|
|||
A templated constructor which introduces and builds
|
||||
a constrained triangulation with constrained edges in the range
|
||||
`[first,last)`.
|
||||
\tparam InputIterator must be an input iterator with the value type `Constraint`.
|
||||
\tparam InputIterator must be an input iterator with the value type `std::pair<Point,Point>`.
|
||||
*/
|
||||
template<class InputIterator> Constrained_Delaunay_triangulation_2(
|
||||
InputIterator first,
|
||||
|
|
@ -186,7 +186,7 @@ Once endpoints have been inserted, the segments are inserted in the order of the
|
|||
using the vertex handles of its endpoints
|
||||
|
||||
\return the number of inserted points.
|
||||
\tparam ConstraintIterator must be an input iterator with `Constraint` or `Segment_2` as value type.
|
||||
\tparam ConstraintIterator must be an input iterator with `std::pair<Point,Point>` or `Segment_2` as value type.
|
||||
*/
|
||||
template <class ConstraintIterator>
|
||||
std::size_t insert_constraints(ConstraintIterator first, ConstraintIterator beyond);
|
||||
|
|
@ -194,7 +194,7 @@ std::size_t insert_constraints(ConstraintIterator first, ConstraintIterator beyo
|
|||
/*!
|
||||
Same as above except that each constraints is given as a pair of indices of the points
|
||||
in the range [points_first, points_beyond). The indices must go from 0 to `std::distance(points_first, points_beyond)`
|
||||
\tparam PointIterator is an input iterator with `Point_2` as value type.
|
||||
\tparam PointIterator is an input iterator with `Point` as value type.
|
||||
\tparam IndicesIterator is an input iterator with `std::pair<Int, Int>` where `Int` is an integral type implicitly convertible to `std::size_t`
|
||||
*/
|
||||
template <class PointIterator, class IndicesIterator>
|
||||
|
|
@ -204,7 +204,7 @@ std::size_t insert_constraints(PointIterator points_first, PointIterator points_
|
|||
/*!
|
||||
Inserts the line segment between the points `c.first` and `c.second` as a constrained edge in the triangulation.
|
||||
*/
|
||||
void push_back(const Constraint& c);
|
||||
void push_back(const std::pair<Point,Point>& c);
|
||||
|
||||
/*!
|
||||
Inserts the line segment whose endpoints are the vertices `va` and
|
||||
|
|
@ -212,6 +212,22 @@ Inserts the line segment whose endpoints are the vertices `va` and
|
|||
*/
|
||||
void insert_constraint(Vertex_handle va, Vertex_handle vb);
|
||||
|
||||
/*!
|
||||
Inserts a polyline defined by the points in the range `[first,last)`.
|
||||
|
||||
\tparam PointIterator must be an `InputIterator` with the value type `Point`.
|
||||
*/
|
||||
template < class PointIterator>
|
||||
void insert_constraint(PointIterator first, PointIterator last);
|
||||
|
||||
|
||||
/*!
|
||||
Inserts the polygon.
|
||||
*/
|
||||
template <typename Polygon_2>
|
||||
void insert_constraint(const Polygon_2& polygon);
|
||||
|
||||
|
||||
/*!
|
||||
Removes vertex v.
|
||||
\pre Vertex `v` is not incident to a constrained edge.
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ A constrained triangulation is a triangulation of a set of points
|
|||
which has to include among its edges
|
||||
a given set of polylines
|
||||
joining the points. The given polylines are
|
||||
called <I>constraints</I> and the corresponding
|
||||
edges in the triangulation are called <I>constrained edges</I>.
|
||||
called *constraints* and the corresponding
|
||||
edges in the triangulation are called *constrained edges* or *sub-constraints*.
|
||||
|
||||
The endpoints of constrained edges are of course vertices of the
|
||||
triangulation. However the triangulation may include
|
||||
|
|
@ -57,23 +57,22 @@ is a proper intersection point of two
|
|||
constraints. A single constraint intersecting other
|
||||
constraints will then appear as the union of several
|
||||
constrained edges of the triangulation.
|
||||
The two versions dealing with intersecting constraints, slightly differ
|
||||
in the way intersecting constraints are dealt with.
|
||||
There are two ways to deal with intersecting constraints.
|
||||
<UL>
|
||||
<LI>One of them is
|
||||
designed to be robust when predicates are evaluated exactly but
|
||||
<LI>The first one is robust when predicates are evaluated exactly but
|
||||
constructions (i. e. intersection computations) are
|
||||
approximate.
|
||||
<LI>The other one is designed to be used
|
||||
with an exact arithmetic (meaning exact
|
||||
evaluation of predicates and exact computation of intersections.)
|
||||
This last version finds its full efficiency when used in conjunction
|
||||
with a constraint hierarchy data structure
|
||||
as provided in the class
|
||||
`Polylne_constrained_triangulation_2`. See
|
||||
Section \ref Section_2D_Triangulations_Constrained_Plus.
|
||||
<LI>The second one should be used with exact arithmetic (meaning exact
|
||||
evaluation of predicates and exact computation of intersections.)
|
||||
</UL>
|
||||
</UL>
|
||||
In order to retrieve the constrained edges of a constraint, or
|
||||
the constraints overlapping with a constrained edge, we provide
|
||||
the class `Constrained_triangulation_plus_2`. This class maintains
|
||||
a constraint hierarchy data structure. See
|
||||
Section \ref Section_2D_Triangulations_Constrained_Plus for details.
|
||||
This class should also be used when doing exact intersection computations
|
||||
as it avoids the cascading of intersection computations.
|
||||
|
||||
\image html constraints.png
|
||||
\image latex constraints.png
|
||||
|
|
@ -277,22 +276,18 @@ are removed and new ones are created.
|
|||
void insert_constraint(const Vertex_handle & va, const Vertex_handle & vb);
|
||||
|
||||
/*!
|
||||
Inserts the polyline defined by the iterator range `[begin,end)`.
|
||||
\tparam InputIterator must be an input iterator with value type `Point`.
|
||||
Inserts a polyline defined by the points in the range `[first,last)`.
|
||||
|
||||
\tparam PointIterator must be an `InputIterator` with the value type `Point`.
|
||||
*/
|
||||
template <typename InputIterator>
|
||||
void insert_constraint(InputIterator begin, InputIterator end);
|
||||
template < class PointIterator>
|
||||
void insert_constraint(PointIterator first, PointIterator last);
|
||||
|
||||
|
||||
/*!
|
||||
Inserts the polyline defined by the iterator range `range`.
|
||||
\tparam IteratorRange must be an iterator range with value type `Point`.
|
||||
*/
|
||||
template <typename IteratorRange>
|
||||
void insert_constraint(IteratorRange range);
|
||||
|
||||
/*!
|
||||
Inserts the polygon.
|
||||
Inserts the polygon.
|
||||
*/
|
||||
template <typename Polygon_2>
|
||||
void insert_constraint(const Polygon_2& polygon);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace CGAL {
|
|||
\ingroup PkgTriangulation2TriangulationClasses
|
||||
|
||||
The class `Constrained_triangulation_plus_2`
|
||||
implements a constrained triangulation where the constraints are polylines.
|
||||
It maintains an additional data structure, called the constraint hierarchy,
|
||||
that keeps track of the input constraints and of their refinement
|
||||
implements a constrained triangulation that
|
||||
maintains an additional data structure, called the constraint hierarchy,
|
||||
which keeps track of the input constraints and of their refinement
|
||||
in the triangulation.
|
||||
|
||||
The class `Constrained_triangulation_plus_2<Tr>`
|
||||
|
|
@ -225,17 +225,18 @@ void insert_constraint(Vertex_handle va, Vertex_handle vb);
|
|||
Inserts a polyline defined by the points in the range `[first,last)`.
|
||||
Returns the constraint id.
|
||||
|
||||
\tparam InputIterator must be an input iterator with the value type `Point`.
|
||||
\tparam PointIterator must be an `InputIterator` with the value type `Point`.
|
||||
*/
|
||||
template < class InputIterator>
|
||||
Constraint_id insert_constraint(InputIterator first, InputIterator last);
|
||||
template < class PointIterator>
|
||||
Constraint_id insert_constraint(PointIterator first, PointIterator last);
|
||||
|
||||
/*!
|
||||
Inserts the polyline defined by the iterator range `range`.
|
||||
\tparam IteratorRange must be an iterator range with value type `Point`.
|
||||
Inserts the polygon. Returns the constraint id.
|
||||
|
||||
*/
|
||||
template <typename IteratorRange>
|
||||
void insert_constraint(IteratorRange range);
|
||||
template < class Polygon_2>
|
||||
Constraint_id insert_constraint(const Polygon_2& polygon);
|
||||
|
||||
|
||||
/*!
|
||||
Removes the constraint `cid`, without removing the points from the triangulation.
|
||||
|
|
|
|||
|
|
@ -820,8 +820,7 @@ There are two ways to deal with intersecting constraints.
|
|||
<UL>
|
||||
<LI>The first one is robust when predicates are evaluated exactly but
|
||||
constructions (i. e. intersection computations) are approximate.
|
||||
<LI>The second one is designed to be used
|
||||
with exact arithmetic (meaning exact
|
||||
<LI>The second one should be used with exact arithmetic (meaning exact
|
||||
evaluation of predicates and exact computation of intersections.)
|
||||
</UL>
|
||||
</UL>
|
||||
|
|
|
|||
|
|
@ -426,6 +426,8 @@ public:
|
|||
segment_indices.end() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <class OutputItFaces, class OutputItBoundaryEdges>
|
||||
std::pair<OutputItFaces,OutputItBoundaryEdges>
|
||||
get_conflicts_and_boundary(const Point &p,
|
||||
|
|
|
|||
Loading…
Reference in New Issue