mirror of https://github.com/CGAL/cgal
Merge pull request #1142 from maxGimeno/Fix_for_511-GF
Improve the CDT constructors
This commit is contained in:
commit
c46a29cc8d
|
|
@ -108,9 +108,9 @@ Constrained_Delaunay_triangulation_2(const
|
|||
Constrained_Delaunay_triangulation_2& cdt1);
|
||||
|
||||
/*!
|
||||
A templated constructor which introduces and builds
|
||||
a constrained triangulation with constraints in the range
|
||||
`[first,last)`.
|
||||
Builds a constrained triangulation with constraints
|
||||
in the range `[first,last)` by calling
|
||||
`insert_constraints(first, last)`.
|
||||
\tparam ConstraintIterator must be an `InputIterator` with the value type `std::pair<Point,Point>` or `Segment`.
|
||||
*/
|
||||
template<class ConstraintIterator> Constrained_Delaunay_triangulation_2(
|
||||
|
|
|
|||
|
|
@ -120,14 +120,11 @@ public:
|
|||
Constrained_Delaunay_triangulation_2(const CDt& cdt)
|
||||
: Ctr(cdt) {}
|
||||
|
||||
Constrained_Delaunay_triangulation_2(List_constraints& lc,
|
||||
Constrained_Delaunay_triangulation_2(const List_constraints& lc,
|
||||
const Geom_traits& gt=Geom_traits())
|
||||
: Ctr(gt)
|
||||
{
|
||||
typename List_constraints::iterator itc = lc.begin();
|
||||
for( ; itc != lc.end(); ++itc) {
|
||||
insert((*itc).first, (*itc).second);
|
||||
}
|
||||
{
|
||||
insert_constraints(lc.begin(), lc.end());
|
||||
CGAL_triangulation_postcondition( is_valid() );
|
||||
}
|
||||
|
||||
|
|
@ -137,9 +134,7 @@ public:
|
|||
const Geom_traits& gt=Geom_traits() )
|
||||
: Ctr(gt)
|
||||
{
|
||||
for ( ; it != last; it++) {
|
||||
insert((*it).first, (*it).second);
|
||||
}
|
||||
insert_constraints(it, last);
|
||||
CGAL_triangulation_postcondition( is_valid() );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ public:
|
|||
}
|
||||
|
||||
|
||||
Constrained_triangulation_plus_2(std::list<std::pair<Point,Point> > constraints,
|
||||
Constrained_triangulation_plus_2(const std::list<std::pair<Point,Point> > &constraints,
|
||||
const Geom_traits& gt=Geom_traits() )
|
||||
: Triangulation(gt)
|
||||
, hierarchy(Vh_less_xy(this))
|
||||
|
|
|
|||
Loading…
Reference in New Issue