remove List of new_vertices from

insertion in
Constrained_Delaunay_triangulation_2.h
Constrained_triangulation_2.h
This commit is contained in:
Mariette Yvinec 2001-04-09 16:41:04 +00:00
parent fd0c6f3367
commit 1ff8f2ce62
2 changed files with 6 additions and 36 deletions

View File

@ -115,9 +115,6 @@ public:
void insert(const Point & a, const Point & b);
void insert(Vertex_handle va, Vertex_handle vb);
void insert(Vertex_handle va,
Vertex_handle vb,
List_vertices & new_vertices);
Vertex_handle push_back(const Point& a);
void push_back(const Constraint& c);
@ -422,28 +419,17 @@ insert(const Point & a, const Point & b)
{
Vertex_handle va= insert(a);
Vertex_handle vb= insert(b);
List_vertices new_vertices;
insert(va, vb, new_vertices);
insert(va,vb);
}
template < class Gt, class Tds >
inline void
Constrained_Delaunay_triangulation_2<Gt,Tds>::
insert(Vertex_handle va, Vertex_handle vb)
{
List_vertices new_vertices;
insert(va, vb, new_vertices);
}
template < class Gt, class Tds >
inline void
Constrained_Delaunay_triangulation_2<Gt,Tds>::
insert(Vertex_handle va, Vertex_handle vb, List_vertices& new_vertices)
{
List_edges new_edges;
Ctr::insert(va,vb,new_vertices,new_edges);
Ctr::insert(va,vb,new_edges);
propagating_flip(new_edges);
flip_around(new_vertices);
}

View File

@ -113,12 +113,8 @@ public:
void insert(Point a, Point b);
void insert(Vertex_handle va,
Vertex_handle vb);
void insert(Vertex_handle va,
Vertex_handle vb,
List_vertices& new_vertices);
void insert(Vertex_handle va,
Vertex_handle vb,
List_vertices& new_vertices,
List_edges& new_edges);
Vertex_handle push_back(const Point& a);
@ -251,33 +247,22 @@ insert(Point a, Point b)
// the triangles crossed by ab and creates new ones
// if a vertex vc of t lies on segment ab,
// constraint ab is replaced by the
// two constraints ac and cb, and vc is included in the list new_vertices
// two constraints ac and cb,
// apart from the insertion of a and b, the algorithm runs in time
// proportionnal to the number of removed triangles
{
Vertex_handle va= insert(a);
Vertex_handle vb= insert(b);
List_vertices new_vertices;
insert(va, vb, new_vertices);
insert(va,vb);
}
template < class Gt, class Tds >
inline void
Constrained_triangulation_2<Gt,Tds>::
insert(Vertex_handle va, Vertex_handle vb)
{
List_vertices& new_vertices;
insert(va, vb, new_vertices);
}
template < class Gt, class Tds >
inline void
Constrained_triangulation_2<Gt,Tds>::
insert(Vertex_handle va, Vertex_handle vb, List_vertices& new_vertices)
{
List_edges new_edges;
insert(va, vb, new_vertices, new_edges);
insert(va, vb, new_edges);
}
template < class Gt, class Tds >
@ -285,15 +270,14 @@ inline void
Constrained_triangulation_2<Gt,Tds>::
insert(Vertex_handle va,
Vertex_handle vb,
List_vertices& new_vertices,
List_edges& new_edges)
// the new_edges created by the insertion of (va,vb)
// are listed in new_edges
// to help in Constrained_Delaunay_triangulation_2
{
Vertex_handle vaa = va;
while (vaa != vb) {
Vertex_handle vbb = insert_part(va,vb,vaa,new_edges);
new_vertices.push_back(vbb);
vaa=vbb;
}
return;