diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h index aa262e81e8c..744ea488699 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h @@ -23,7 +23,7 @@ #ifndef CGAL_APOLLONIUS_GRAPH_2_H #define CGAL_APOLLONIUS_GRAPH_2_H -//#define CGAL_APOLLONIUS_GRAPH_IS_HIDDEN_THREE_ARGUMENTS 1 +#define CGAL_APOLLONIUS_GRAPH_PSEUDO_CIRCLE_DESIGN 1 #include @@ -775,28 +775,10 @@ public: } protected: - typedef Boolean_tag - Hidden_predicate_tag; // wrappers for the geometric predicates // checks is q is contained inside p - bool is_hidden(const Site_2 &p, - const Site_2 &q) const; - - // returns true if q is hidden by the sites p1 and p2 - inline - bool is_hidden(const Site_2 &p1, const Site_2 &p2, - const Site_2 &q, Tag_false) const - { - return false; - } - - inline - bool is_hidden(const Site_2 &p1, const Site_2 &p2, - const Site_2 &q, Tag_true) const - { - return geom_traits().is_hidden_2_object()(p1, p2, q); - } + bool is_hidden(const Site_2 &p, const Site_2 &q) const; // returns: // ON_POSITIVE_SIDE if q is closer to p1 diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h index 6cd01506a12..c15ff52d769 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h @@ -490,29 +490,6 @@ insert_third(const Site_2& p) return v1; } -#ifdef CGAL_APOLLONIUS_GRAPH_IS_HIDDEN_THREE_ARGUMENTS - if ( Geom_traits::Is_hidden_2::Has_three_argument_operator ) { - if ( is_hidden(v1->site(), v2->site(), p, Hidden_predicate_tag()) ) { - // p is hidden by both v1 and v2 - v1->add_hidden_site(p); - v2->add_hidden_site(p); - return Vertex_handle(); - } else if ( is_hidden(p, v1->site(), v2->site(), Hidden_predicate_tag()) ) { - // v2 is hidden by both v1 and p - v1->add_hidden_site(v2->site()); - v2->add_hidden_site(v2->site()); - v2->set_site(p); - return v2; - } else if ( is_hidden(v2->site(), p, v1->site(), Hidden_predicate_tag()) ) { - // v1 is hidden by both v2 and p - v1->add_hidden_site(v1->site()); - v2->add_hidden_site(v1->site()); - v1->set_site(p); - return v1; - } - } -#endif - Conflict_type ct = finite_edge_conflict_type_degenerated(v1->site(), v2->site(), p); @@ -524,7 +501,6 @@ insert_third(const Site_2& p) } -#ifndef CGAL_APOLLONIUS_GRAPH_IS_HIDDEN_THREE_ARGUMENTS Conflict_type ct1 = finite_edge_conflict_type_degenerated(v1->site(), p, v2->site()); @@ -534,7 +510,7 @@ insert_third(const Site_2& p) if ( ct == NO_CONFLICT && ct1 == NO_CONFLICT && ct2 == NO_CONFLICT ) { return Vertex_handle(); } -#endif + Vertex_handle v = this->_tds.insert_dim_up(infinite_vertex()); v->set_site(p); @@ -573,11 +549,6 @@ insert_third(const Site_2& p) } } else { CGAL_assertion( ct == BOTH_VERTICES ); -#ifdef CGAL_APOLLONIUS_GRAPH_IS_HIDDEN_THREE_ARGUMENTS - Conflict_type ct1 = - finite_edge_conflict_type_degenerated(v1->site(), p, v2->site()); -#endif - Edge_circulator ec = ( ct1 == INTERIOR ) ? incident_edges(v2) : incident_edges(v1); while ( true ) { @@ -652,32 +623,15 @@ insert(const Site_2& p, Vertex_handle vnear) do { e = *ec; -#ifdef CGAL_APOLLONIUS_GRAPH_IS_HIDDEN_THREE_ARGUMENTS - if ( Geom_traits::Is_hidden_2::Has_three_argument_operator ) { - Vertex_handle v1( e.first->vertex(ccw(e.second)) ); - Vertex_handle v2( e.first->vertex( cw(e.second)) ); - if ( !is_infinite(v1) && !is_infinite(v2) && - is_hidden(v1->site(), v2->site(), p, Hidden_predicate_tag()) ) { - v1->add_hidden_site(p); - v2->add_hidden_site(p); - return Vertex_handle(); - } - } -#endif - interior_in_conflict = edge_interior(e, p, false); if ( interior_in_conflict ) { break; } ++ec; } while ( ec != ec_start ); -#ifdef CGAL_APOLLONIUS_GRAPH_IS_HIDDEN_THREE_ARGUMENTS if ( !interior_in_conflict ) { return Vertex_handle(); } -#else - CGAL_assertion( interior_in_conflict ); -#endif return insert_degree_2(e, p); } diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h index ed4bc028485..ecdcdab5c7a 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h @@ -72,8 +72,6 @@ public: typedef bool result_type; typedef Site_2 argument_type; - enum { Has_three_argument_operator = false }; - inline bool operator()(const Site_2 &p, const Site_2 &q) const { #ifdef AG2_PROFILE_PREDICATES ag2_predicate_profiler::is_trivial_counter++; diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_filtered_traits_2.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_filtered_traits_2.h index e5661c872fa..ad15b023e6a 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_filtered_traits_2.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_filtered_traits_2.h @@ -289,14 +289,9 @@ public: Orientation_2; - struct Is_hidden_2 - : public Filtered_predicate - { - enum { - Has_three_argument_operator = - EK_Is_hidden_2::Has_three_argument_operator - }; - }; + typedef + Filtered_predicate + Is_hidden_2; typedef Filtered_predicate