From 99f1616c26b4220a9da328dfdf714ff87087407c Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Wed, 31 Mar 2010 08:30:30 +0000 Subject: [PATCH] removed code that was trying to insert a site using flips --- .../nox/Segment_Delaunay_graph_nox_2_impl.h | 93 ------------------- .../CGAL/Segment_Delaunay_graph_nox_2.h | 3 - 2 files changed, 96 deletions(-) diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/nox/Segment_Delaunay_graph_nox_2_impl.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/nox/Segment_Delaunay_graph_nox_2_impl.h index ffe35793f06..043d7e6c0ad 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/nox/Segment_Delaunay_graph_nox_2_impl.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/nox/Segment_Delaunay_graph_nox_2_impl.h @@ -255,65 +255,6 @@ insert_third(const Site_2& s, Vertex_handle , Vertex_handle ) // insertion of a point //-------------------------------------------------------------------- - - -template -bool -Segment_Delaunay_graph_nox_2:: -is_flippable(Face_handle f, int i) -{ - // an edge is considered flippable if both its endpoints have degree - // at least 3 - Vertex_handle v1 = f->vertex(ccw(i)); - { - int count = 0; - Vertex_circulator vc = incident_vertices(v1), done(vc); - do { - ++count; - } while ( count < 3 || ++vc != done ); - if ( count < 3 ) return false; - } - - Vertex_handle v2 = f->vertex(cw(i)); - int count = 0; - Vertex_circulator vc = incident_vertices(v2), done(vc); - do { - ++count; - } while ( count < 3 || ++vc != done ); - return count == 3; -} - - -template -void -Segment_Delaunay_graph_nox_2:: -propagating_flip(Face_handle f, int i, const Site_2& t) -{ - if ( !is_flippable(f, i) ) return; - - Face_handle n = f->neighbor(i); - - // Edge esym = sym_edge(f, i); - // if ( is_infinite( esym.first->vertex(esym.second) ) ) { return; } - - Sign s = incircle(n, t); - - if ( s != NEGATIVE ) { return; } - - bool interior_in_conflict = edge_interior(f, i, t, s); - - if ( interior_in_conflict ) { - flip(f, i); - return; - } - - flip(f, i); - propagating_flip(f, i, t); - i = n->index( f->vertex(i) ); - propagating_flip(n, i, t); -} - - template typename Segment_Delaunay_graph_nox_2::Vertex_handle Segment_Delaunay_graph_nox_2:: @@ -497,22 +438,6 @@ insert_point2(const Site_2& t, Vertex_handle vnearest) return insert_degree_2(e, t); } -#ifdef CGAL_SDG_INSERT_WITH_FLIPS - // this is the new vertex - Vertex_handle v = this->_tds.insert_in_face(start_f); - v->set_site(t); - Face_handle f = v->face(); - Face_handle next; - int i; - Face_handle start(f); - do { - i = f->index(v); - next = f->neighbor(ccw(i)); - propagating_flip(f, i, t); - f = next; - } while ( next != start ); - return v; -#else // we are in conflict with a Voronoi vertex; start from that and // find the entire conflict region and then repair the diagram List l; @@ -534,7 +459,6 @@ insert_point2(const Site_2& t, Vertex_handle vnearest) retriangulate_conflict_region(v, l); return v; -#endif } @@ -639,22 +563,6 @@ insert_segment_interior(const Site_2& t, Vertex_handle vnearest) // segments must have a conflict with at least one vertex CGAL_assertion( s == NEGATIVE ); -#ifdef CGAL_SDG_INSERT_WITH_FLIPS - // this is the new vertex - Vertex_handle v = this->_tds.insert_in_face(start_f); - v->set_site(t); - Face_handle f = v->face(); - Face_handle next; - int i; - Face_handle start(f); - do { - i = f->index(v); - next = f->neighbor(ccw(i)); - propagating_flip(f, i, t); - f = next; - } while ( next != start ); - return v; -#else // we are in conflict with a Voronoi vertex; start from that and // find the entire conflict region and then repair the diagram List l; @@ -680,7 +588,6 @@ insert_segment_interior(const Site_2& t, Vertex_handle vnearest) retriangulate_conflict_region(v, l); return v; -#endif } diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_nox_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_nox_2.h index 74de331ff68..a26a9fab6a9 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_nox_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_nox_2.h @@ -1125,9 +1125,6 @@ public: protected: // HELPER METHODS FOR INSERTION //----------------------------- - bool is_flippable(Face_handle f, int i); - void propagating_flip(Face_handle f, int i, const Site_2& t); - void initialize_conflict_region(const Face_handle& f, List& l); void expand_conflict_region(const Face_handle& f, const Site_2& t,