From 1ff8f2ce62427dda03d641132ba623788dd4f3be Mon Sep 17 00:00:00 2001 From: Mariette Yvinec Date: Mon, 9 Apr 2001 16:41:04 +0000 Subject: [PATCH] remove List of new_vertices from insertion in Constrained_Delaunay_triangulation_2.h Constrained_triangulation_2.h --- .../Constrained_Delaunay_triangulation_2.h | 18 ++------------ .../CGAL/Constrained_triangulation_2.h | 24 ++++--------------- 2 files changed, 6 insertions(+), 36 deletions(-) diff --git a/Packages/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h b/Packages/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h index 9cbcf2ecaf4..8ec00f615c2 100644 --- a/Packages/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h +++ b/Packages/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h @@ -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:: 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:: -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); } diff --git a/Packages/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Packages/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 11fa235c25a..9e42533dd50 100644 --- a/Packages/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Packages/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -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:: 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:: -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:: 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;