From 3bbdcd43b4827dade1fba03494fdba5b9bb8f412 Mon Sep 17 00:00:00 2001 From: Julien Hazebrouck Date: Wed, 24 Aug 2005 12:33:02 +0000 Subject: [PATCH] remove an obsolete method : nearest_intersection_to_right --- .../include/CGAL/Circular_kernel.h | 7 -- .../function_objects_polynomial_circular.h | 16 ---- .../internal_functions_on_circular_arc_2.h | 83 ------------------- .../CGAL/Filtered_hexagon_curved_kernel.h | 7 -- .../hexagon_filtered_predicates.h | 21 ----- 5 files changed, 134 deletions(-) diff --git a/Packages/Curved_kernel/include/CGAL/Circular_kernel.h b/Packages/Curved_kernel/include/CGAL/Circular_kernel.h index c3073941a0d..0dcb59946b4 100644 --- a/Packages/Curved_kernel/include/CGAL/Circular_kernel.h +++ b/Packages/Curved_kernel/include/CGAL/Circular_kernel.h @@ -134,10 +134,6 @@ struct Curved_kernel // Construct_min_vertex_2 and Construct_max_vertex_2 should be added - // to be removed - typedef CircularFunctors::Nearest_intersection_to_right_2 - Nearest_intersection_to_right_2; - Get_equation get_equation_object() const { return Get_equation(); } @@ -186,9 +182,6 @@ struct Curved_kernel construct_intersections_2_object() const { return Construct_intersections_2(); } - Nearest_intersection_to_right_2 - nearest_intersection_to_right_2_object() const - { return Nearest_intersection_to_right_2(); } Split_2 split_2_object() const diff --git a/Packages/Curved_kernel/include/CGAL/Curved_kernel/function_objects_polynomial_circular.h b/Packages/Curved_kernel/include/CGAL/Curved_kernel/function_objects_polynomial_circular.h index f2d95a66a4d..82aaf279b41 100644 --- a/Packages/Curved_kernel/include/CGAL/Curved_kernel/function_objects_polynomial_circular.h +++ b/Packages/Curved_kernel/include/CGAL/Curved_kernel/function_objects_polynomial_circular.h @@ -328,22 +328,6 @@ namespace CircularFunctors { }; - template < class CK > - class Nearest_intersection_to_right_2 - { - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef typename CK::Circular_arc_endpoint_2 Circular_arc_endpoint_2; - - public: - typedef bool result_type; - - result_type - operator()(const Circular_arc_2 &A1, const Circular_arc_2 &A2, - const Circular_arc_endpoint_2 &pt, - Circular_arc_endpoint_2 &p1, Circular_arc_endpoint_2 &p2) const - { return nearest_intersection_to_right(A1, A2, pt, p1, p2); } - - }; template < class CK > class Split_2 diff --git a/Packages/Curved_kernel/include/CGAL/Curved_kernel/internal_functions_on_circular_arc_2.h b/Packages/Curved_kernel/include/CGAL/Curved_kernel/internal_functions_on_circular_arc_2.h index ad4a03ea09d..b768a55fe5a 100644 --- a/Packages/Curved_kernel/include/CGAL/Curved_kernel/internal_functions_on_circular_arc_2.h +++ b/Packages/Curved_kernel/include/CGAL/Curved_kernel/internal_functions_on_circular_arc_2.h @@ -623,89 +623,6 @@ namespace CircularFunctors { } - template < class CK > - bool - nearest_intersection_to_right(const typename CK::Circular_arc_2 &a1, - const typename CK::Circular_arc_2 &a2, - const typename CK::Circular_arc_endpoint_2 &pt, - typename CK::Circular_arc_endpoint_2 &p1, - typename CK::Circular_arc_endpoint_2 &p2) - { - typedef typename CK::Circular_arc_endpoint_2 Circular_arc_endpoint_2; - - CGAL_kernel_precondition(a1.is_x_monotone()); - CGAL_kernel_precondition(a2.is_x_monotone()); - - // Overlapping curves. - if (a1.supporting_circle() == a2.supporting_circle()) { - // The ranges need to overlap in order for the curves to overlap. - if (compare_x(a1.left(), a2.right()) > 0 || - compare_x(a2.left(), a1.right()) > 0) - return false; - - // They both need to be on the same upper/lower part. - if (a1.on_upper_part() != a2.on_upper_part()) { - // But they could share the right vertical tangent point. - if (a1.right() == a2.right() && - compare_x(pt, a1.right()) < 0) { - p1 = p2 = a1.right(); - return true; - } - // Or they could share the left vertical tangent point. - if (a1.left() == a2.left() && - compare_x(pt, a1.left()) < 0) { - p1 = p2 = a1.left(); - return true; - } - return false; - } - - // We know they overlap, determine the extremities of the common subcurve - // TODO : We should use std::max and std::min, but they require less_x_2. - const Circular_arc_endpoint_2 & tmp2 = compare_x(a1.right(), a2.right()) - < 0 ? a1.right() : a2.right(); - - // Now we need to compare that with pt. - if (compare_x(pt, tmp2) != SMALLER) - return false; - p2 = tmp2; - const Circular_arc_endpoint_2 & tmp1 = - compare_x(a1.left(), a2.left()) > 0 ? a1.left() : a2.left(); - if (compare_x(pt, tmp1) != SMALLER) { - p1 = pt; - return true; - } - p1 = tmp1; - return true; - } - - // We need to check that the supporting circles - // do intersect before going further. - if (! do_intersect(a1.supporting_circle(), - a2.supporting_circle())) { - return false; - } - - // Get the two intersection points of the supporting circles. - Circular_arc_endpoint_2 left (a1.supporting_circle(), a2.supporting_circle(), true); - Circular_arc_endpoint_2 right(a1.supporting_circle(), a2.supporting_circle(), false); - - // We also need to check that these intersection points are on the arc. - if (has_on(a1, left) && - has_on(a2, left) && - compare_xy(left, pt) > 0) { - p1 = p2 = left; - return true; - } - if (has_on(a1, right) && - has_on(a2, right) && - compare_xy(right, pt) > 0) { - p1 = p2 = right; - return true; - } - // no intersection. - return false; - } template < class CK > bool diff --git a/Packages/Curved_kernel/include/CGAL/Filtered_hexagon_curved_kernel.h b/Packages/Curved_kernel/include/CGAL/Filtered_hexagon_curved_kernel.h index 23ba17299a5..daff34550d6 100644 --- a/Packages/Curved_kernel/include/CGAL/Filtered_hexagon_curved_kernel.h +++ b/Packages/Curved_kernel/include/CGAL/Filtered_hexagon_curved_kernel.h @@ -49,10 +49,6 @@ template // Construct_min_vertex_2 and Construct_max_vertex_2 should be added - // to be removed - - typedef CGALi::Nearest_intersection_to_right_2 - Nearest_intersection_to_right_2; @@ -105,9 +101,6 @@ template construct_intersections_2_object() const { return Construct_intersections_2(); } - Nearest_intersection_to_right_2 - nearest_intersection_to_right_2_object() const - { return Nearest_intersection_to_right_2(); } Split_2 split_2_object() const diff --git a/Packages/Curved_kernel/include/CGAL/Filtered_hexagon_curved_kernel/hexagon_filtered_predicates.h b/Packages/Curved_kernel/include/CGAL/Filtered_hexagon_curved_kernel/hexagon_filtered_predicates.h index 379db600746..c33769049f6 100644 --- a/Packages/Curved_kernel/include/CGAL/Filtered_hexagon_curved_kernel/hexagon_filtered_predicates.h +++ b/Packages/Curved_kernel/include/CGAL/Filtered_hexagon_curved_kernel/hexagon_filtered_predicates.h @@ -345,27 +345,6 @@ class Do_overlap_2 }; - template < class HK > - class Nearest_intersection_to_right_2 - { - - typedef typename HK::Curved_kernel CK; - typedef typename HK::Circular_arc_2 Circular_arc_2; - typedef typename HK::Circular_arc_endpoint_2 Circular_arc_endpoint_2; - - public: - typedef bool result_type; - - result_type - operator()(const Circular_arc_2 &A1, const Circular_arc_2 &A2, - const Circular_arc_endpoint_2 &pt, - Circular_arc_endpoint_2 &p1, Circular_arc_endpoint_2 &p2) const - { return CK().nearest_intersection_to_right_2_object()(A1.arc(), A2.arc(), pt, p1, p2); } - - }; - - - template < class HK > class Split_2 {