diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_hv_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_hv_2.h deleted file mode 100644 index 195da389712..00000000000 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_hv_2.h +++ /dev/null @@ -1,473 +0,0 @@ -#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_FILTERED_TRAITS_BASE_HV_2_H -#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_FILTERED_TRAITS_BASE_HV_2_H - -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include - -namespace CGAL { - - -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// the filtered Traits class -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- - -template -class Segment_Delaunay_graph_Linf_hv_filtered_traits_base_2 - : public Segment_Delaunay_graph_Linf_filtered_traits_base_2 - -{ -private: - typedef - Segment_Delaunay_graph_Linf_hv_filtered_traits_base_2< - CK_t, CK_MTag, - EK_t, EK_MTag, - FK_t, FK_MTag, - C2E_t, C2F_t, - ITag> Self; - - typedef - Segment_Delaunay_graph_Linf_filtered_traits_base_2 - Base; - - typedef Segment_Delaunay_graph_Linf_hv_traits_base_2 CK_traits; - typedef Segment_Delaunay_graph_Linf_hv_traits_base_2 FK_traits; - typedef Segment_Delaunay_graph_Linf_hv_traits_base_2 EK_traits; - - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2 CK; - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2 FK; - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Kernel_wrapper_2 EK; - - typedef - CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter C2E; - typedef - CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter C2F; - - typedef - Cartesian_converter > F2C_t; - typedef - CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter F2C; - - typedef - Cartesian_converter > E2C_t; - typedef - CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Cartesian_converter E2C; - - // Types for the construction kernel - typedef typename CK::Point_2 CK_Point_2; - typedef typename CK::Line_2 CK_Line_2; - typedef typename CK::Segment_2 CK_Segment_2; - typedef typename CK::Ray_2 CK_Ray_2; - typedef typename CK::Direction_2 CK_Direction_2; - - typedef typename CK::Site_2 CK_Site_2; - - typedef typename CK::FT CK_FT; - typedef typename CK::RT CK_RT; - - // Types for the exact kernel - typedef typename EK::Point_2 EK_Point_2; - typedef typename EK::Line_2 EK_Line_2; - typedef typename EK::Segment_2 EK_Segment_2; - typedef typename EK::Ray_2 EK_Ray_2; - typedef typename EK::Direction_2 EK_Direction_2; - - typedef typename EK::Site_2 EK_Site_2; - - typedef typename EK::FT EK_FT; - typedef typename EK::RT EK_RT; - - // Types for the filtering kernel - typedef typename FK::Point_2 FK_Point_2; - typedef typename FK::Line_2 FK_Line_2; - typedef typename FK::Segment_2 FK_Segment_2; - typedef typename FK::Ray_2 FK_Ray_2; - typedef typename FK::Direction_2 FK_Direction_2; - - typedef typename FK::Site_2 FK_Site_2; - - typedef typename FK::FT FK_FT; - typedef typename FK::RT FK_RT; - -public: - //----------------------------------------------------------------------- - // TYPE DEFINITIONS - //----------------------------------------------------------------------- - - // BASIC TYPES - //------------ - typedef CK_t R; - typedef CK_MTag Method_tag; - typedef ITag Intersections_tag; - - typedef CK_t Construction_kernel; - typedef FK_t Filtering_kernel; - typedef EK_t Exact_kernel; - - typedef CK_traits Construction_traits; - typedef FK_traits Filtering_traits; - typedef EK_traits Exact_traits; - - typedef CK_MTag Construction_traits_method_tag; - typedef FK_MTag Filtering_traits_method_tag; - typedef EK_MTag Exact_traits_method_tag; - - typedef typename CK::Point_2 Point_2; - typedef typename CK::Line_2 Line_2; - typedef typename CK::Segment_2 Segment_2; - typedef typename CK::Ray_2 Ray_2; - typedef typename CK::Direction_2 Direction_2; - typedef typename CK::Comparison_result Comparison_result; - // typedef typename CK::Circle_2 Circle_2; - typedef typename CK::Site_2 Site_2; - - typedef typename CK::Object_2 Object_2; - - typedef typename CK::FT FT; - typedef typename CK::RT RT; - - typedef typename CK::Rep_tag Rep_tag; - -protected: - typedef - typename Base::Arrangement_enum - Arrangement_enum; - -private: - typedef typename CK_traits::Construct_svd_vertex_2 - CK_Construct_svd_vertex_2; - - typedef typename FK_traits::Construct_svd_vertex_2 - FK_Construct_svd_vertex_2; - - typedef typename EK_traits::Construct_svd_vertex_2 - EK_Construct_svd_vertex_2; - - - //typedef typename CK_traits::Construct_sdg_bisector_2 - //CK_Construct_sdg_bisector_2; - - //typedef typename FK_traits::Construct_sdg_bisector_2 - //FK_Construct_sdg_bisector_2; - - //typedef typename EK_traits::Construct_sdg_bisector_2 - //EK_Construct_sdg_bisector_2; - -public: - // OBJECT CONSTRUCTION & ASSIGNMENT - //--------------------------------- - typedef typename CK::Construct_object_2 Construct_object_2; - typedef typename CK::Assign_2 Assign_2; - - // CONSTRUCTIONS - //-------------- - // vertex, bisector, and Voronoi circle - typedef - Filtered_construction - Construct_svd_vertex_2; - - //typedef - //Filtered_construction - //Construct_sdg_bisector_2; - - // typedef typename CK::Construct_site_2 Construct_site_2; - - // typedef typename CK_traits::Construct_sdg_circle_2 - // Construct_sdg_circle_2; - -private: - // PREDICATES FOR THE TWO KERNELS - //------------------------------- -#if 1 - // Predicates for the filtering kernel - typedef typename FK_traits::Compare_x_2 FK_Compare_x_2; - typedef typename FK_traits::Compare_y_2 FK_Compare_y_2; - typedef typename FK_traits::Orientation_2 FK_Orientation_2; - typedef typename FK_traits::Equal_2 FK_Equal_2; - typedef typename FK_traits::Are_parallel_2 FK_Are_parallel_2; - - typedef typename FK_traits::Oriented_side_of_bisector_2 - FK_Oriented_side_of_bisector_2; - - typedef typename FK_traits::Vertex_conflict_2 FK_Vertex_conflict_2; - - typedef typename FK_traits::Finite_edge_interior_conflict_2 - FK_Finite_edge_interior_conflict_2; - - typedef typename FK_traits::Infinite_edge_interior_conflict_2 - FK_Infinite_edge_interior_conflict_2; - - typedef typename FK_traits::Is_degenerate_edge_2 - FK_Is_degenerate_edge_2; - - typedef typename FK_traits::Arrangement_type_2 FK_Arrangement_type_2; - typedef typename FK_traits::Oriented_side_2 FK_Oriented_side_2; - - // Predicates for the exact kernel - typedef typename EK_traits::Compare_x_2 EK_Compare_x_2; - typedef typename EK_traits::Compare_y_2 EK_Compare_y_2; - typedef typename EK_traits::Orientation_2 EK_Orientation_2; - typedef typename EK_traits::Equal_2 EK_Equal_2; - typedef typename EK_traits::Are_parallel_2 EK_Are_parallel_2; - - typedef typename EK_traits::Oriented_side_of_bisector_2 - EK_Oriented_side_of_bisector_2; - - typedef typename EK_traits::Vertex_conflict_2 EK_Vertex_conflict_2; - - typedef typename EK_traits::Finite_edge_interior_conflict_2 - EK_Finite_edge_interior_conflict_2; - - typedef typename EK_traits::Infinite_edge_interior_conflict_2 - EK_Infinite_edge_interior_conflict_2; - - typedef typename EK_traits::Is_degenerate_edge_2 - EK_Is_degenerate_edge_2; - - typedef typename EK_traits::Arrangement_type_2 EK_Arrangement_type_2; - typedef typename EK_traits::Oriented_side_2 EK_Oriented_side_2; - -#else - // Predicates for the filtering kernel - typedef Sdg_compare_x_2 FK_Compare_x_2; - typedef Sdg_compare_y_2 FK_Compare_y_2; - typedef Sdg_orientation_C2 FK_Orientation_2; - typedef Sdg_are_same_points_C2 FK_Equal_2; - typedef Sdg_are_parallel_C2 FK_Are_parallel_2; - - typedef Sdg_oriented_side_of_bisector_C2 - FK_Oriented_side_of_bisector_2; - - typedef Sdg_incircle_2 FK_Vertex_conflict_2; - - typedef Sdg_finite_edge_interior_2 - FK_Finite_edge_interior_conflict_2; - - typedef Sdg_infinite_edge_interior_2 - FK_Infinite_edge_interior_conflict_2; - - typedef Sdg_is_degenerate_edge_C2 FK_Is_degenerate_edge_2; - typedef Sdg_arrangement_type_C2 FK_Arrangement_type_2; - typedef Sdg_oriented_side_C2 FK_Oriented_side_2; - - // Predicates for the exact kernel - typedef Sdg_compare_x_2 EK_Compare_x_2; - typedef Sdg_compare_y_2 EK_Compare_y_2; - typedef Sdg_orientation_C2 EK_Orientation_2; - typedef Sdg_are_same_points_C2 EK_Equal_2; - typedef Sdg_are_parallel_C2 EK_Are_parallel_2; - - typedef Sdg_oriented_side_of_bisector_C2 - EK_Oriented_side_of_bisector_2; - - typedef Sdg_incircle_2 EK_Vertex_conflict_2; - - typedef Sdg_finite_edge_interior_2 - EK_Finite_edge_interior_conflict_2; - - typedef Sdg_infinite_edge_interior_2 - EK_Infinite_edge_interior_conflict_2; - - typedef Sdg_is_degenerate_edge_C2 EK_Is_degenerate_edge_2; - typedef Sdg_arrangement_type_C2 EK_Arrangement_type_2; - typedef Sdg_oriented_side_C2 EK_Oriented_side_2; -#endif - -public: - // PREDICATES - //----------- - //typedef - //Filtered_predicate - //Compare_x_2; - - //typedef - //Filtered_predicate - //Compare_y_2; - - //typedef - //Filtered_predicate - //Orientation_2; - - //typedef - //Filtered_predicate - //Equal_2; - - //typedef - //Filtered_predicate - //Are_parallel_2; - - typedef - Filtered_predicate - Oriented_side_of_bisector_2; - - typedef - Filtered_predicate - Vertex_conflict_2; - - typedef - Filtered_predicate - Finite_edge_interior_conflict_2; - - typedef - Filtered_predicate - Infinite_edge_interior_conflict_2; - - //typedef - //Filtered_predicate - //Is_degenerate_edge_2; - -private: - typedef - Filtered_predicate - Arrangement_type_2_base; - -public: - struct Arrangement_type_2 - : public Arrangement_type_2_base, public Arrangement_enum - {}; - - typedef - Filtered_predicate - Oriented_side_2; - -public: - //----------------------------------------------------------------------- - // ACCESS TO OBJECTS - //----------------------------------------------------------------------- - - // OBJECT CONSTRUCTION & ASSIGNMENT - //--------------------------------- - Assign_2 - assign_2_object() const { - return Assign_2(); - } - - Construct_object_2 - construct_object_2_object() const { - return Construct_object_2(); - } - - // CONSTRUCTIONS - //-------------- - Construct_svd_vertex_2 - construct_svd_vertex_2_object() const { - return Construct_svd_vertex_2(); - } - - //Construct_sdg_bisector_2 - //construct_sdg_bisector_2_object() const { - // return Construct_sdg_bisector_2(); - //} - - /* - Construct_site_2 - construct_site_2_object() const { - return Construct_site_2(); - } - */ - - /* - Construct_sdg_circle_2 - construct_sdg_circle_2_object() const { - return Construct_sdg_circle_2(); - } - */ - - // PREDICATES - //----------- - //Compare_x_2 - //compare_x_2_object() const { - // return Compare_x_2(); - //} - - //Compare_y_2 - //compare_y_2_object() const { - // return Compare_y_2(); - //} - - //Orientation_2 - //orientation_2_object() const { - // return Orientation_2(); - //} - - //Equal_2 - //equal_2_object() const { - // return Equal_2(); - //} - - //Are_parallel_2 - //are_parallel_2_object() const { - // return Are_parallel_2(); - //} - - Oriented_side_of_bisector_2 - oriented_side_of_bisector_2_object() const { - return Oriented_side_of_bisector_2(); - } - - Vertex_conflict_2 - vertex_conflict_2_object() const { - return Vertex_conflict_2(); - } - - Finite_edge_interior_conflict_2 - finite_edge_interior_conflict_2_object() const { - return Finite_edge_interior_conflict_2(); - } - - Infinite_edge_interior_conflict_2 - infinite_edge_interior_conflict_2_object() const { - return Infinite_edge_interior_conflict_2(); - } - - //Is_degenerate_edge_2 - //is_degenerate_edge_2_object() const { - // return Is_degenerate_edge_2(); - //} - - //Arrangement_type_2 - //arrangement_type_2_object() const { - // return Arrangement_type_2(); - //} - - Oriented_side_2 - oriented_side_2_object() const { - return Oriented_side_2(); - } -}; - - - -} //namespace CGAL - -#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_FILTERED_TRAITS_BASE_HV_2_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_hv_C2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_hv_C2.h deleted file mode 100644 index 1d5e1995672..00000000000 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_hv_C2.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_PREDICATES_HV_C2_H -#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_PREDICATES_HV_C2_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_PREDICATES_HV_C2_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_hv_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_hv_2.h deleted file mode 100644 index 56014b2fbd7..00000000000 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_hv_2.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_TRAITS_BASE_HV_2_H -#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_TRAITS_BASE_HV_2_H - -#include -#include -#include -#include - -namespace CGAL { - -//----------------------------------------------------------------------- -// the Traits class -//----------------------------------------------------------------------- - -template -class Segment_Delaunay_graph_Linf_hv_traits_base_2 - : public Segment_Delaunay_graph_Linf_traits_base_2 -{ -public: - //----------------------------------------------------------------------- - // TYPE DEFINITIONS - //----------------------------------------------------------------------- - - // BASIC TYPES - //------------ - - typedef Segment_Delaunay_graph_Linf_traits_base_2 Base; - - typedef typename Base::Kernel Kernel; - typedef Kernel K; - - typedef - CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HV_2_NS::Vertex_conflict_C2 - Vertex_conflict_2; - - typedef - CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HV_2_NS::Finite_edge_interior_conflict_C2 - Finite_edge_interior_conflict_2; - - typedef - CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HV_2_NS::Infinite_edge_interior_conflict_C2 - Infinite_edge_interior_conflict_2; - -public: - //----------------------------------------------------------------------- - // ACCESS TO OBJECTS - //----------------------------------------------------------------------- - - Vertex_conflict_2 - vertex_conflict_2_object() const { - return Vertex_conflict_2(); - } - - Finite_edge_interior_conflict_2 - finite_edge_interior_conflict_2_object() const { - return Finite_edge_interior_conflict_2(); - } - - Infinite_edge_interior_conflict_2 - infinite_edge_interior_conflict_2_object() const { - return Infinite_edge_interior_conflict_2(); - } - -}; - -} //namespace CGAL - -#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_TRAITS_BASE_HV_2_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/basic_hv.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/basic_hv.h deleted file mode 100644 index 3b9763c18b8..00000000000 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/basic_hv.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_BASIC_HV_H -#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_BASIC_HV_H - -#include - -#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HV_2_NS \ - CGAL::SegmentDelaunayGraphLinf_2_hv - -#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_BASIC_HV_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/hv/Finite_edge_interior_conflict_C2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/hv/Finite_edge_interior_conflict_C2.h deleted file mode 100644 index 78e293add69..00000000000 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/hv/Finite_edge_interior_conflict_C2.h +++ /dev/null @@ -1,971 +0,0 @@ - -#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_HV_FINITE_EDGE_INTERIOR_CONFLICT_C2_H -#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_HV_FINITE_EDGE_INTERIOR_CONFLICT_C2_H - -#include -#include -#include -#include -#include - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4800) // complaint about performance where we can't do anything -#endif - -namespace CGAL { - -namespace SegmentDelaunayGraphLinf_2_hv { - -//----------------------------------------------------------------------------- - -template -class Finite_edge_interior_conflict_C2 - : public SegmentDelaunayGraphLinf_2::Basic_predicates_C2 -{ -public: - - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::Basic_predicates_C2 - Base; - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS:: - Voronoi_vertex_C2 - Voronoi_vertex_2; - - typedef typename Base::Point_2 Point_2; - typedef typename Base::Segment_2 Segment_2; - typedef typename Base::Line_2 Line_2; - typedef typename Base::Site_2 Site_2; - typedef typename Base::FT FT; - typedef typename Base::RT RT; - - typedef typename Base::Comparison_result Comparison_result; - typedef typename Base::Sign Sign; - typedef typename Base::Orientation Orientation; - typedef typename Base::Oriented_side Oriented_side; - typedef typename Base::Boolean Boolean; - - typedef typename Base::Homogeneous_point_2 Homogeneous_point_2; - - - using Base::opposite_line; - using Base::compute_supporting_line; - using Base::oriented_side_of_line; - using Base::compare_linf_distances_to_line; - using Base::compare_linf_distances_to_lines; - using Base::compute_linf_perpendicular; - //using Base::projection_on_line; - using Base::compute_linf_projection_hom; - using Base::compute_linf_projection_nonhom; - using Base::compute_vertical_projection; - using Base::compute_horizontal_projection; - using Base::intersects_segment_interior_bbox; - using Base::intersects_segment_positive_of_wedge; - using Base::intersects_segment_negative_of_wedge; - using Base::intersects_segment_interior_inf_box; - using Base::intersects_segment_interior_inf_wedge_sp; - - -private: - typedef typename Base::Compare_x_2 Compare_x_2_points; - typedef typename Base::Compare_y_2 Compare_y_2_points; - - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Are_same_points_C2 - Are_same_points_2; - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Are_same_segments_C2 - Are_same_segments_2; - - typedef typename K::Intersections_tag ITag; - -private: - Are_same_points_2 same_points; - Are_same_segments_2 same_segments; - - Compare_x_2_points cmpx; - Compare_y_2_points cmpy; - -private: - - //-------------------------------------------------------------------- - //-------------------------------------------------------------------- - //-------------------------------------------------------------------- - - Boolean - is_interior_in_conflict_both(const Site_2& p, const Site_2& q, - const Site_2& r, const Site_2& s, - const Site_2& t, Method_tag tag) const - { - Boolean in_conflict(false); - - if ( p.is_point() && q.is_point() ) { - in_conflict = is_interior_in_conflict_both_pp(p, q, r, s, t, tag); - - } else if ( p.is_segment() && q.is_segment() ) { - - in_conflict = is_interior_in_conflict_both_ss(p, q, r, s, t, tag); - - } else if ( p.is_point() && q.is_segment() ) { - - in_conflict = is_interior_in_conflict_both_ps(p, q, r, s, t, tag); - - } else { // p is a segment and q is a point - - in_conflict = is_interior_in_conflict_both_sp(p, q, r, s, t, tag); - } - - return in_conflict; - } - - //-------------------------------------------------------------------- - - bool - is_interior_in_conflict_both_pp(const Site_2& sp, const Site_2& sq, - const Site_2& r, const Site_2& s, - const Site_2& t, Method_tag ) const - { - CGAL_precondition( sp.is_point() && sq.is_point() ); - - Point_2 p = sp.point(), q = sq.point(); - - if ( t.is_point() ) { return true; } - - // here t is a segment - Line_2 lt = compute_supporting_line(t.supporting_site()); - - Oriented_side op, oq; - - if ( same_points(sp, t.source_site()) || - same_points(sp, t.target_site()) ) { - op = ON_ORIENTED_BOUNDARY; - } else { - op = oriented_side_of_line(lt, p); - } - - if ( same_points(sq, t.source_site()) || - same_points(sq, t.target_site()) ) { - oq = ON_ORIENTED_BOUNDARY; - } else { - oq = oriented_side_of_line(lt, q); - } - - - if ((op == ON_POSITIVE_SIDE && oq == ON_NEGATIVE_SIDE) || - (op == ON_NEGATIVE_SIDE && oq == ON_POSITIVE_SIDE) || - (op == ON_ORIENTED_BOUNDARY || oq == ON_ORIENTED_BOUNDARY)) { - return true; - } - - Comparison_result res = - compare_linf_distances_to_line(lt, p, q); - - if ( res == EQUAL ) { return true; } - - Voronoi_vertex_2 vpqr(sp, sq, r); - Voronoi_vertex_2 vqps(sq, sp, s); - - - Line_2 lperp; - if ( res == SMALLER ) { - // p is closer to lt than q - lperp = compute_linf_perpendicular(lt, p); - } else { - // q is closer to lt than p - lperp = compute_linf_perpendicular(lt, q); - } - - Oriented_side opqr = vpqr.oriented_side(lperp); - Oriented_side oqps = vqps.oriented_side(lperp); - - return ( opqr == oqps ); - } - - //-------------------------------------------------------------------- - - bool - is_interior_in_conflict_both_ss(const Site_2& p, const Site_2& q, - const Site_2& , const Site_2& , - const Site_2& , Method_tag) const - { - CGAL_precondition( p.is_segment() && q.is_segment() ); - return true; - } - - //-------------------------------------------------------------------- - - Boolean - is_interior_in_conflict_both_ps(const Site_2& p, const Site_2& q, - const Site_2& r, const Site_2& s, - const Site_2& t, Method_tag tag) const - { - CGAL_precondition( p.is_point() && q.is_segment() ); - - if ( same_points(p, q.source_site()) || - same_points(p, q.target_site()) ) { - return false; - } - - if ( t.is_point() ) { - return is_interior_in_conflict_both_ps_p(p, q, r, s, t, tag); - } - return is_interior_in_conflict_both_ps_s(p, q, r, s, t, tag); - } - - //-------------------------------------------------------------------- - - Boolean - is_interior_in_conflict_both_ps_p(const Site_2& p, const Site_2& q, - const Site_2& r, const Site_2& s, - const Site_2& t, Method_tag ) const - { - CGAL_precondition( t.is_point() ); - - Line_2 lq = compute_supporting_line(q.supporting_site()); - - Comparison_result res = - compare_linf_distances_to_line(lq, p.point(), t.point()); - - //if ( res != SMALLER ) { return true; } - if (certainly( res != SMALLER ) ) { return true; } - if (! is_certain( res != SMALLER ) ) { return indeterminate(); } - - Voronoi_vertex_2 vpqr(p, q, r); - Voronoi_vertex_2 vqps(q, p, s); - - Line_2 lperp = compute_linf_perpendicular(lq, p.point()); - - Oriented_side opqr = vpqr.oriented_side(lperp); - Oriented_side oqps = vqps.oriented_side(lperp); - - return (opqr == oqps); - } - - //-------------------------------------------------------------------- - - bool check_if_exact(const Site_2&, const Tag_false&) const - { - return true; - } - - bool check_if_exact(const Site_2& t1, const Tag_true&) const - { - return t1.is_input(); - } - - Boolean - is_interior_in_conflict_both_ps_s(const Site_2& sp, const Site_2& sq, - const Site_2& r, const Site_2& s, - const Site_2& st, Method_tag ) const - { - CGAL_precondition( st.is_segment() ); - Point_2 p = sp.point(); - // Segment_2 q = sq.segment(), t = st.segment(); - - Line_2 lq = compute_supporting_line(sq.supporting_site()); - - if ( oriented_side_of_line(lq, p) == ON_NEGATIVE_SIDE ) { - lq = opposite_line(lq); - } - - if ( same_points(sp, st.source_site()) || - same_points(sp, st.target_site()) ) { - - Line_2 lqperp = compute_linf_perpendicular(lq, p); - - Voronoi_vertex_2 vpqr(sp, sq, r); - Voronoi_vertex_2 vqps(sq, sp, s); - - Oriented_side opqr = vpqr.oriented_side(lqperp); - Oriented_side oqps = vqps.oriented_side(lqperp); - - CGAL_SDG_DEBUG( std::cout << "debug endpt case computing ondifparabarcs" << std::endl; ); - Boolean on_different_parabola_arcs = - ((opqr == ON_NEGATIVE_SIDE) & (oqps == ON_POSITIVE_SIDE)) | - ((opqr == ON_POSITIVE_SIDE) & (oqps == ON_NEGATIVE_SIDE)); - - //if ( !on_different_parabola_arcs ) { return true; } - if (certainly( !on_different_parabola_arcs ) ) { return true; } - if (! is_certain( !on_different_parabola_arcs ) ) { return indeterminate(); } - - Site_2 t1; - if ( same_points(sp, st.source_site()) ) { - t1 = st.target_site(); - } else { - t1 = st.source_site(); - } - - Oriented_side o_t1; - - if ( same_points(t1, sq.source_site()) || - same_points(t1, sq.target_site()) ) { - o_t1 = ON_ORIENTED_BOUNDARY; - } else if ( !check_if_exact(t1, ITag()) && - ( same_segments(t1.supporting_site(0), - sq.supporting_site()) || - same_segments(t1.supporting_site(1), - sq.supporting_site()) ) ) { - o_t1 = ON_ORIENTED_BOUNDARY; - } else { - o_t1 = oriented_side_of_line(lq, t1.point()); - } - - if ( o_t1 == ON_NEGATIVE_SIDE ) { - return true; - } - - Comparison_result res = - compare_linf_distances_to_line(lq, p, t1.point()); - - return ( res == LARGER ); - } - - Line_2 lt = compute_supporting_line(st.supporting_site()); - - if ( oriented_side_of_line(lt, p) == ON_NEGATIVE_SIDE ) { - lt = opposite_line(lt); - } - - Comparison_result res = - CGAL::compare(lt.a() * lq.b(), lt.b() * lq.a()); - bool are_parallel = (res == EQUAL); - - if ( are_parallel ) { - Sign sgn = CGAL::sign(lt.a() * lq.a() + lt.b() * lq.b()); - bool have_opposite_directions = (sgn == NEGATIVE); - if ( have_opposite_directions ) { lq = opposite_line(lq); } - - if ( oriented_side_of_line(lq, p) == oriented_side_of_line(lt, p) ) { - return true; - } - - if ( have_opposite_directions ) { - lq = opposite_line(lq); - } - } - - Line_2 l = compute_linf_perpendicular(lt, p); - - Voronoi_vertex_2 vpqr(sp, sq, r); - Voronoi_vertex_2 vqps(sq, sp, s); - - Oriented_side o_l_pqr = vpqr.oriented_side(l); - Oriented_side o_l_qps = vqps.oriented_side(l); - if (certainly( (o_l_pqr == ON_POSITIVE_SIDE) & - (o_l_qps == ON_NEGATIVE_SIDE) ) ) - return false; - if (certainly( (o_l_pqr == ON_NEGATIVE_SIDE) & - (o_l_qps == ON_POSITIVE_SIDE) ) ) - return true; - if (! is_certain((o_l_pqr == -o_l_qps) & (o_l_pqr != ZERO))) - return indeterminate(); - - //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - //>>>>>>>>>> HERE I NEED TO CHECK THE BOUNDARY CASES <<<<<< - //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - Line_2 lqperp = compute_linf_perpendicular(lq, p); - - Oriented_side opqr = vpqr.oriented_side(lqperp); - Oriented_side oqps = vqps.oriented_side(lqperp); - - CGAL_SDG_DEBUG( std::cout << "debug computing ondifparabarcs" << std::endl; ); - - Boolean on_different_parabola_arcs = (opqr == -oqps) & (opqr != ZERO); - - // if ( !on_different_parabola_arcs ) { return true; } - if (certainly( !on_different_parabola_arcs ) ) { return true; } - if (! is_certain( !on_different_parabola_arcs ) ) { return indeterminate(); } - - Homogeneous_point_2 pv = compute_linf_projection_hom(lq, p); - Homogeneous_point_2 hp(p); - - pv = Base::midpoint(pv, hp); - - Oriented_side o_l_pv = oriented_side_of_line(l, pv); - - CGAL_assertion( o_l_pv != ON_ORIENTED_BOUNDARY ); - - CGAL_assertion( o_l_pqr != ON_ORIENTED_BOUNDARY || - o_l_qps != ON_ORIENTED_BOUNDARY ); - - if ( o_l_pqr == ON_ORIENTED_BOUNDARY ) { - return ( o_l_qps == o_l_pv ); - } else { - return ( o_l_pqr == o_l_pv ); - } - - } - - //-------------------------------------------------------------------- - - Boolean - is_interior_in_conflict_both_sp(const Site_2& p, const Site_2& q, - const Site_2& r, const Site_2& s, - const Site_2& t, Method_tag tag) const - { - return is_interior_in_conflict_both_ps(q, p, s, r, t, tag); - } - - - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - - bool - is_interior_in_conflict_touch(const Site_2& p, const Site_2& q, - const Site_2& r, const Site_2& s, - const Site_2& t, Method_tag tag) const - { - // checks if interior of voronoi edge is in conflict if both extrema - // of the voronoi edge touch the corresponding circles. - // return true if interior is in conflict; false otherwise - if ( t.is_segment() ) { return false; } - -#if 1 - CGAL_assertion( p.is_segment() || q.is_segment() ); - - Voronoi_vertex_2 vpqr(p, q, r); - Voronoi_vertex_2 vqps(q, p, s); - - if ( vpqr.incircle_no_easy(s) == ZERO && - vqps.incircle_no_easy(r) == ZERO ) { - return false; - } - - if ( p.is_segment() && q.is_segment() ) { - return true; - } -#else - // OLD CODE: buggy if the edge is degenerate - if ( (p.is_point() && q.is_point()) || - (p.is_segment() && q.is_segment()) ) { - return true; - } -#endif - - if ( p.is_point() && q.is_segment() ) { - Line_2 lq = compute_supporting_line(q.supporting_site()); - - Comparison_result res = - compare_linf_distances_to_line(lq, p.point(), t.point()); - - return (res != SMALLER); - } - - return is_interior_in_conflict_touch(q, p, s, r, t, tag); - } - - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - - - bool - is_interior_in_conflict_none(const Site_2& p, const Site_2& q, - const Site_2& r, const Site_2& s, - const Site_2& t, Method_tag tag) const - { - if ( t.is_segment() ) { return false; } - - bool in_conflict(false); - - if ( p.is_point() && q.is_point() ) { - in_conflict = is_interior_in_conflict_none_pp(p, q, r, s, t, tag); - } else if ( p.is_point() && q.is_segment() ) { - in_conflict = is_interior_in_conflict_none_ps(p, q, r, s, t, tag); - } else if ( p.is_segment() && q.is_point() ) { - in_conflict = is_interior_in_conflict_none_sp(p, q, r, s, t, tag); - } else { // both p and q are segments - in_conflict = is_interior_in_conflict_none_ss(p, q, r, s, t, tag); - } - - return in_conflict; - } - - //------------------------------------------------------------------------ - - - bool - is_interior_in_conflict_none_pp(const Site_2& p, const Site_2& q, - const Site_2& , const Site_2& , - const Site_2& t, Method_tag ) const - { - CGAL_precondition( p.is_point() && q.is_point() && t.is_point() ); - return false; - } - - //------------------------------------------------------------------------ - - bool - is_interior_in_conflict_none_ps(const Site_2& sp, const Site_2& sq, - const Site_2& r, const Site_2& s, - const Site_2& st, Method_tag ) const - { - CGAL_precondition( sp.is_point() && sq.is_segment() && st.is_point() ); - - if ( same_points(sp, sq.source_site()) || - same_points(sp, sq.target_site()) ) { - return false; - } - - Line_2 lq = compute_supporting_line(sq.supporting_site()); - - Voronoi_vertex_2 vpqr(sp, sq, r); - Voronoi_vertex_2 vqps(sq, sp, s); - - Point_2 p = sp.point(), t = st.point(); - - Line_2 lperp = compute_linf_perpendicular(lq, t); - - Oriented_side op = oriented_side_of_line(lq, p); - Oriented_side ot = oriented_side_of_line(lq, t); - - bool on_same_side = - ((op == ON_POSITIVE_SIDE && ot == ON_POSITIVE_SIDE) || - (op == ON_NEGATIVE_SIDE && ot == ON_NEGATIVE_SIDE)); - - Comparison_result res = - compare_linf_distances_to_line(lq, t, p); - - Oriented_side opqr = vpqr.oriented_side(lperp); - Oriented_side oqps = vqps.oriented_side(lperp); - - bool on_different_side = - ((opqr == ON_POSITIVE_SIDE && oqps == ON_NEGATIVE_SIDE) || - (opqr == ON_NEGATIVE_SIDE && oqps == ON_POSITIVE_SIDE)); - - return ( on_same_side && (res == SMALLER) && on_different_side ); - } - - //------------------------------------------------------------------------ - - bool - is_interior_in_conflict_none_sp(const Site_2& p, const Site_2& q, - const Site_2& r, const Site_2& s, - const Site_2& t, Method_tag tag) const - { - return is_interior_in_conflict_none_ps(q, p, s, r, t, tag); - } - - //------------------------------------------------------------------------ - - bool - is_interior_in_conflict_none_ss(const Site_2& p, const Site_2& q, - const Site_2& r, const Site_2& s, - const Site_2& t, Method_tag ) const - { - CGAL_precondition( p.is_segment() && q.is_segment() && t.is_point() ); - - Voronoi_vertex_2 vpqr(p, q, r); - Voronoi_vertex_2 vqps(q, p, s); - - Line_2 lp = compute_supporting_line(p.supporting_site()); - Line_2 lq = compute_supporting_line(q.supporting_site()); - - // first orient lp according to its Voronoi vertices - if ( vpqr.is_degenerate_Voronoi_circle() ) { - Site_2 tpqr = Site_2::construct_site_2(vpqr.degenerate_point()); - - if ( same_points(tpqr, p.source_site()) || - same_points(tpqr, p.target_site()) ) { - if ( vqps.oriented_side(lp) != ON_POSITIVE_SIDE ) { - lp = opposite_line(lp); - } - } - } else { - if ( vpqr.oriented_side(lp) != ON_POSITIVE_SIDE ) { - lp = opposite_line(lp); - } - } -#if 0 // OLD CODE - if ( ( vpqr.is_degenerate_Voronoi_circle() && - same_points(vpqr.degenerate_point(), p.source_site()) ) || - ( vpqr.is_degenerate_Voronoi_circle() && - same_points(vpqr.degenerate_point(), p.target_site()) ) ) { - if ( vqps.oriented_side(lp) != ON_POSITIVE_SIDE ) { - lp = opposite_line(lp); - } - } else { - if ( vpqr.oriented_side(lp) != ON_POSITIVE_SIDE ) { - lp = opposite_line(lp); - } - } -#endif - - // then orient lq according to its Voronoi vertices - if ( vpqr.is_degenerate_Voronoi_circle() ) { - Site_2 tpqr = Site_2::construct_site_2(vpqr.degenerate_point()); - - if ( same_points(tpqr, q.source_site()) || - same_points(tpqr, q.target_site()) ) { - if ( vqps.oriented_side(lq) != ON_POSITIVE_SIDE ) { - lq = opposite_line(lq); - } - } - } else { - if ( vpqr.oriented_side(lq) != ON_POSITIVE_SIDE ) { - lq = opposite_line(lq); - } - } -#if 0 // OLD CODE - if ( ( vpqr.is_degenerate_Voronoi_circle() && - same_points(vpqr.degenerate_point(), q.source_site()) ) || - ( vpqr.is_degenerate_Voronoi_circle() && - same_points(vpqr.degenerate_point(), q.target_site()) ) ) { - if ( vqps.oriented_side(lq) != ON_POSITIVE_SIDE ) { - lq = opposite_line(lq); - } - } else { - if ( vpqr.oriented_side(lq) != ON_POSITIVE_SIDE ) { - lq = opposite_line(lq); - } - } -#endif - - Point_2 tp = t.point(); - - // check if t is on the same side as the Voronoi vertices - Oriented_side ot_lp = oriented_side_of_line(lp, tp); - Oriented_side ot_lq = oriented_side_of_line(lq, tp); - - if ( ot_lp != ON_POSITIVE_SIDE || ot_lq != ON_POSITIVE_SIDE ) { - return false; - } - - Line_2 lperp; - - Comparison_result res = - compare_linf_distances_to_lines(tp, lp, lq); - - if ( res == SMALLER ) { - lperp = compute_linf_perpendicular(lp, tp); - } else { - lperp = compute_linf_perpendicular(lq, tp); - } - - CGAL_precondition( ot_lp != ON_ORIENTED_BOUNDARY && - ot_lq != ON_ORIENTED_BOUNDARY ); - - // check of lperp separates the two Voronoi vertices - Oriented_side opqr_perp = vpqr.oriented_side(lperp); - Oriented_side oqps_perp = vqps.oriented_side(lperp); - - bool on_different_side = - (opqr_perp == ON_POSITIVE_SIDE && - oqps_perp == ON_NEGATIVE_SIDE) || - (opqr_perp == ON_NEGATIVE_SIDE && - oqps_perp == ON_POSITIVE_SIDE); - - return ( on_different_side ); - } - - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - -public: - typedef Boolean result_type; - typedef Site_2 argument_type; - - Boolean operator()(const Site_2& p, const Site_2& q, const Site_2& r, - const Site_2& s, const Site_2& t, Sign sgn) const - { - Boolean retval; - CGAL_SDG_DEBUG( - std::cout << "debug finite-edge-int-cf entering (p,q,r,s,t,sgn)= " - << p << ' ' << q << ' ' << r << ' ' << s << ' ' << t - << ' ' << sgn << std::endl; ); - if ( sgn == POSITIVE ) { - retval = is_interior_in_conflict_none(p, q, r, s, t, Method_tag()); - } else if ( sgn == NEGATIVE ) { - retval = is_interior_in_conflict_both(p, q, r, s, t, Method_tag()); - } else { - retval = is_interior_in_conflict_touch(p, q, r, s, t, Method_tag()); - } - CGAL_SDG_DEBUG( std::cout << - "debug finite-edge-int-cf with (p,q,r,s,t,sgn)= " - << p << ' ' << q << ' ' << r << ' ' << s << ' ' << t - << ' ' << sgn << " returns " << retval << std::endl; ); - return retval; - } - - - // philaris: tocheck - Boolean operator()(const Site_2& p, const Site_2& q, const Site_2& r, - const Site_2& t, Sign sgn) const - { - CGAL_SDG_DEBUG( - std::cout << "debug finite-edge-int-cf entering (p,q,r,t,sgn)= (" - << p << ") (" << q << ") (" << r << " (r not ignored)) (" - << t << ") " - << sgn << std::endl; ); - - /* - if ( t.is_point() ) { - return ( sgn == NEGATIVE ); - } - */ - - // if p, q, t are points, then return (sgn == NEGATIVE) - if (t.is_point() and p.is_point() and q.is_point()) { - CGAL_SDG_DEBUG( std::cout << - "debug finite-edge-int-cf with (p,q,r,t,sgn)= (" - << p << ") (" << q << ") (" << r << " ) (" - << t << ") " - << sgn << " returns " << (sgn==NEGATIVE) << std::endl; ); - return ( sgn == NEGATIVE ); - } - - if (t.is_point() and (sgn == NEGATIVE)) { - CGAL_SDG_DEBUG( std::cout << - "debug finite-edge-int-cf with (p,q,r,t,sgn)= (" - << p << ") (" << q << ") (" << r << ") (" - << t << ") " - << sgn << " returns " << true << std::endl; ); - return true; - } - - // here and on, t is a segment - // or t is a point and sgn != NEGATIVE - - if ( sgn != NEGATIVE ) { - // philaris: tocheck - - // philaris: here, I assert that sgn is never zero - // tocheck - CGAL_assertion( sgn == POSITIVE ); - - CGAL_assertion( p.is_point() or q.is_point() ); - CGAL_assertion( p.is_segment() or q.is_segment() ); - - CGAL_assertion(t.is_point()); - - if ( p.is_point() and q.is_segment() ) { - if (same_points(p, q.source_site()) or - same_points(p, q.target_site()) ) { - CGAL_SDG_DEBUG( std::cout << - "debug finite-edge-int-cf with (p,q,r,t,sgn)= (" - << p << ") (" << q << ") (" << r << ") (" - << t << ") " - << sgn << " returns " << false << std::endl; ); - return false; - } - } // end of case where p is point and q is segment - - if ( p.is_segment() and q.is_point() ) { - if (same_points(q, p.source_site()) or - same_points(q, p.target_site()) ) { - CGAL_SDG_DEBUG( std::cout << - "debug finite-edge-int-cf with (p,q,r,t,sgn)= (" - << p << ") (" << q << ") (" << r << ") (" - << t << ") " - << sgn << " returns " << false << std::endl; ); - return false; - } - } // end of case where q is point and p is segment - - CGAL_SDG_DEBUG( std::cout << - "debug finite-edge-int-cf with (p,q,r,t,sgn)= (" - << p << ") (" << q << ") (" << r << ") (" - << t << ") " - << sgn << " returns " << false << std::endl; ); - - return false; - } - - // here and on, sgn == NEGATIVE - - if ( p.is_segment() or q.is_segment() ) { - // philaris: p and q are consecutive on convex hull - // therefore, one of them is a point and the other is a segment - CGAL_assertion( p.is_point() or q.is_point() ); - - // philaris: - - CGAL_assertion( p.is_point() ? - ((not same_points(p, q.source_site())) and - (not same_points(p, q.target_site()))) : - ((not same_points(q, p.source_site())) and - (not same_points(q, p.target_site()))) - ) ; - - //sandeep: if t is segment and it not intersects the wedge - //as defined by s and p in the basic predicate - //intersects_segment_interior_inf_wedge_sp - // then return false - if (t.is_segment()) { - bool result; - - if (p.is_point()) { - //p may be end point of t - if ( same_points(p,t.source_site()) - or same_points(p,t.target_site()) ) { - CGAL_SDG_DEBUG( - std::cout - << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= (" - << p << ") (" << q << ") (" << r << ") (" - << t << ") " - << sgn << " returns " << true << std::endl; ); - return true; - } else { - result = intersects_segment_interior_inf_wedge_sp(q,p,t); - } - } else { // p is segment and q is point - //q may be endpoint of t - if ( same_points(q,t.source_site()) - or same_points(q,t.target_site())) { - CGAL_SDG_DEBUG( std::cout - << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= (" - << p << ") (" << q << ") (" << r << ") (" - << t << ") " - << sgn << " returns " << true << std::endl; ); - return true; - } else { - result = intersects_segment_interior_inf_wedge_sp(p,q,t); - } - } - - if (result == false) { - CGAL_SDG_DEBUG( std::cout - << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= (" - << p << ") (" << q << ") (" << r << ") (" - << t << ") " - << sgn << " returns " << false << std::endl; ); - return false; - } - }//end of t is segment - - // philaris: tocheck - CGAL_SDG_DEBUG( std::cout - << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= (" - << p << ") (" << q << ") (" << r << ") (" - << t << ") " - << sgn << " returns " << true << std::endl; ); - // philaris: always return true - return true; - } - - // here p and q are points and s is a segment - - bool p_is_endpoint = - same_points(p, t.source_site()) || same_points(p, t.target_site()); - bool q_is_endpoint = - same_points(q, t.source_site()) || same_points(q, t.target_site()); - - // philaris: change for Linf - if ((cmpx(p.point(), q.point()) == EQUAL) or - (cmpy(p.point(), q.point()) == EQUAL) ) { - // if p or q have one same coordinate, behave like in L2 - return ( p_is_endpoint && q_is_endpoint ); - } else { - // philaris: tocheck - CGAL_assertion(sgn == NEGATIVE); - CGAL_SDG_DEBUG( std::cout - << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= (" - << p << ") (" << q << ") (" << r << ") (" - << t << ") " - << sgn << " returns " << true << std::endl; ); - return true; - } - } - - Boolean operator()(const Site_2& p, const Site_2& q, const Site_2& t, - Sign sgn) const - { - CGAL_SDG_DEBUG( - std::cout << "debug finite-edge-int-cf entering (p,q,t,sgn)= " - << p << ' ' << q << ' ' << t << ' ' - << "(sgn " << sgn << " not ignored)" << std::endl; ); - - CGAL_assertion( not ( p.is_segment() and q.is_segment()) ); - - if ( p.is_segment() or q.is_segment() ) { - if (p.is_point()) { - CGAL_assertion( same_points(p, q.source_site()) or - same_points(p, q.target_site()) ) ; - } else { - CGAL_assertion( same_points(q, p.source_site()) or - same_points(q, p.target_site()) ) ; - } - CGAL_SDG_DEBUG( - std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= " - << p << ' ' << q << ' ' << t << ' ' - << "(sgn " << sgn << " not ignored)" << " returns " - << false << std::endl; ); - return false; - } // end of case: any of p, q is a segment - - CGAL_SDG_DEBUG( - std::cout << "debug tocheck here p, q points" << std::endl; ); - - // both p and q are points - if ( t.is_point() ) { - // philaris: adaptation as follows: - // predicate: position of t related to bbox(p, q) - - Comparison_result cmpxpt = cmpx(p.point(), t.point()); - Comparison_result cmpxtq = cmpx(t.point(), q.point()); - Comparison_result cmpypt = cmpy(p.point(), t.point()); - Comparison_result cmpytq = cmpy(t.point(), q.point()); - - //Sign s1 = -sign_of( cmpxpt * cmpxtq + cmpypt * cmpytq ); - Sign s1 = CGAL::compare(0, cmpxpt * cmpxtq + cmpypt * cmpytq); - - CGAL_assertion( s1 != ZERO ); - - CGAL_SDG_DEBUG( std::cout << "debug finite-edge-int-cf (p,q,t)= " - << p << ' ' << q << ' ' << t - << " s1= " << s1 << std::endl; ); - - CGAL_SDG_DEBUG( - std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= " - << p << ' ' << q << ' ' << t << ' ' - << "(sgn " << sgn << " not ignored)" << " returns " - << ( s1 == NEGATIVE ) << std::endl; ); - - return ( s1 == NEGATIVE ); - } - - CGAL_SDG_DEBUG( std::cout << "debug tocheck" << std::endl; ); - - bool bp = - same_points(p, t.source_site()) || same_points(p, t.target_site()); - bool bq = - same_points(q, t.source_site()) || same_points(q, t.target_site()); - - Comparison_result cmpxpq = cmpx(p.point(), q.point()); - Comparison_result cmpypq = cmpy(p.point(), q.point()); - - if ((cmpxpq == EQUAL) or (cmpypq == EQUAL)) { - CGAL_SDG_DEBUG( - std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= " - << p << ' ' << q << ' ' << t << ' ' - << "(sgn " << sgn << " not ignored)" << " returns " - << ( bp && bq ) << std::endl; ); - return ( bp && bq ); - } else { - // check if interior of segment has non-empty intersection - // with the bounding box of p, q - Boolean retval = intersects_segment_interior_bbox(t, p, q); - CGAL_SDG_DEBUG( - std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= " - << p << ' ' << q << ' ' << t << ' ' - << "(sgn " << sgn << " not ignored)" << " returns " - << retval << std::endl; ); - return retval; - } - } - -}; - - -//----------------------------------------------------------------------------- - -} //namespace SegmentDelaunayGraphLinf_2_hv - -} //namespace CGAL - - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - - -#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_HV_FINITE_EDGE_INTERIOR_CONFLICT_C2_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/hv/Infinite_edge_interior_conflict_C2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/hv/Infinite_edge_interior_conflict_C2.h deleted file mode 100644 index 547cc7640b2..00000000000 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/hv/Infinite_edge_interior_conflict_C2.h +++ /dev/null @@ -1,385 +0,0 @@ - -#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_HV_INFINITE_EDGE_INTERIOR_CONFLICT_C2_H -#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_HV_INFINITE_EDGE_INTERIOR_CONFLICT_C2_H - -#include -//#include -#include -#include -#include - -namespace CGAL { - -namespace SegmentDelaunayGraphLinf_2_hv { - -//----------------------------------------------------------------------------- - -template -class Infinite_edge_interior_conflict_C2 - : public CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::Basic_predicates_C2 -{ -public: - - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS::Basic_predicates_C2 - Base; - - typedef typename K::Site_2 Site_2; - typedef typename K::Point_2 Point_2; - typedef typename K::RT RT; - typedef typename K::Boolean Boolean; - - typedef typename K::Compare_x_2 Compare_x_2; - typedef typename K::Compare_y_2 Compare_y_2; - - Compare_x_2 cmpx; - Compare_y_2 cmpy; - - typedef Boolean result_type; - struct argument_type {}; - -private: - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Are_same_points_C2 - Are_same_points_2; - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Are_same_segments_C2 - Are_same_segments_2; - - Are_same_points_2 same_points; - Are_same_segments_2 same_segments; - - typedef Orientation_Linf_2 Orientation_Linf_2_Type; - - Orientation_Linf_2_Type or_linf; - - using Base::bounded_side_of_bbox; - using Base::compute_line_from_to; - using Base::oriented_side_of_line; - using Base::compute_supporting_line; - using Base::compute_vertical_projection; - using Base::compute_horizontal_projection; - using Base::compute_linf_projection_nonhom; - - typedef typename Base::Line_2 Line_2; - -public: - Boolean operator()(const Site_2& q, const Site_2& s, const Site_2& r, - const Site_2& t, Sign sgn) const - { - - CGAL_SDG_DEBUG( - std::cout << "debug infinite-edge-int-cf entering (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << std::endl;); - - if ( t.is_segment() ) { - if (q.is_point() and s.is_point() and r.is_point()) { - if (sgn == NEGATIVE) { - CGAL_SDG_DEBUG(std::cout << "debug return tocheck" << std::endl;); - if (same_points(q, t.source_site()) or - same_points(q, t.target_site()) ) { - // this works because endpoints of a segment are - // inserted before its interior - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << false << std::endl;); - return false; - } else { - - // here q is point - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf tocheck (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << true << std::endl;); - return true; - } - } - } // end of case where q, s, r are all points - - CGAL_SDG_DEBUG(std::cout - << "debug tocheck q,s,r not all points" << std::endl;); - - if (sgn == NEGATIVE) { - CGAL_SDG_DEBUG(std::cout - << "debug not all pts return true tocheck" << std::endl;); - - if (q.is_point()) { - CGAL_assertion( - not (same_points(q, t.source_site()) or - same_points(q, t.target_site()) ) ); - - //CGAL_assertion(false); - - // philaris: tocheck more - - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf tocheck (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << true << std::endl;); - - return true; - - } - - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf tocheck (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << true << std::endl;); - - return true; - } - - // philaris: tocheck - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf tocheck (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << false << std::endl;); - return false; - } // end of case where t is segment - - // here and below, t is always a point - - if ( q.is_segment() ) { - - // philaris: difference from L2 here; - // in L2, r and s are endpoints of q - // in Linf they still have to be points, but - // they do not have to be endpoints of q - // (this has to be checked) - CGAL_assertion(s.is_point() and r.is_point()); - - // in this case r and s must be endpoints of q - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << ( sgn == NEGATIVE ) << std::endl;); - return ( sgn == NEGATIVE ); - } - - // here and below both q and t are points - - if ( s.is_point() && r.is_point() && same_points(s, r) ) { - // MK::ERROR: write this code using the compare_x_2 and - // compare_y_2 predicates instead of computing the inner - // product... - // philaris: adaptation to Linf - - CGAL_SDG_DEBUG(std::cout << - "debug infcf s=r and is point" << std::endl;); - - Comparison_result cmpxst = cmpx(s.point(), t.point()); - Comparison_result cmpxtq = cmpx(t.point(), q.point()); - Comparison_result cmpyst = cmpy(s.point(), t.point()); - Comparison_result cmpytq = cmpy(t.point(), q.point()); - - //Sign sgn1 = -sign_of( cmpxst * cmpxtq + cmpyst * cmpytq ); - Sign sgn1 = CGAL::compare(0, cmpxst * cmpxtq + cmpyst * cmpytq); - - CGAL_assertion( sgn1 != ZERO ); - - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << (sgn1 == POSITIVE) << std::endl;); - return (sgn1 == POSITIVE); - } - - // still here, both q and t are points - - if ( s.is_segment() && r.is_segment() && same_segments(s, r) ) { - CGAL_SDG_DEBUG(std::cout << - "debug infcf s=r and is segment" << std::endl;); - - if ( same_points(q, s.source_site()) or - same_points(q, s.target_site()) ) { - // here point q is endpoint of segment s - Site_2 ss; - if ( same_points(q, s.source_site()) ) { - ss = s.target_site(); - } else { - ss = s.source_site(); - } - // MK::ERROR: write this code using the compare_x_2 and - // compare_y_2 predicates instead of computing the inner - // product... - // philaris: adaptation to Linf - - Comparison_result cmpxst = cmpx(ss.point(), t.point()); - Comparison_result cmpxtq = cmpx(t.point(), q.point()); - Comparison_result cmpyst = cmpy(ss.point(), t.point()); - Comparison_result cmpytq = cmpy(t.point(), q.point()); - - //Sign sgn1 = -sign_of( cmpxst * cmpxtq + cmpyst * cmpytq ); - Sign sgn1 = CGAL::compare(0, cmpxst * cmpxtq + cmpyst * cmpytq); - - CGAL_assertion( sgn1 != ZERO ); - - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << (sgn1 == POSITIVE) << std::endl;); - - return (sgn1 == POSITIVE); - } - } - - // philaris: here there is significant difference of Linf - // with relation to L2 - - // q is on the Linf convex hull with neighbors (in this hull) - // s and r - - // here q is a point and s is different from r - - if (sgn == NEGATIVE) { - CGAL_SDG_DEBUG(std::cout << - "debug infinite-edge-int-cf special NEG" << std::endl;); - CGAL_SDG_DEBUG(std::cout << "debug infcf special (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << std::endl;); - - if (s.is_point() and r.is_point()) { - if ((bounded_side_of_bbox( - q.point(), s.point(), t.point()) == ON_BOUNDED_SIDE) and - (bounded_side_of_bbox( - q.point(), r.point(), t.point()) == ON_BOUNDED_SIDE)) - { - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << false << std::endl;); - return false; - // otherwise, it will return true later - } - } else { - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << true << std::endl;); - return true; - } - } else if (sgn == POSITIVE) { - // philaris: I assert that s and r are either both points - // or both segments - CGAL_assertion( (s.is_point() and r.is_point()) or - (s.is_segment() and r.is_segment()) ) ; - CGAL_SDG_DEBUG( - std::cout << "debug infinite-edge-int-cf special POS" - << std::endl;); - if (s.is_point() and r.is_point()) { - // philaris: I assert that sqt and rqt are monotone - - CGAL_assertion( - or_linf(s.point(), q.point(), t.point()) == - DEGENERATE ); - - CGAL_assertion( - or_linf(r.point(), q.point(), t.point()) == - DEGENERATE ); - - if ((bounded_side_of_bbox( - t.point(), s.point(), q.point()) == - ON_BOUNDED_SIDE) and - (bounded_side_of_bbox( - t.point(), r.point(), q.point()) == - ON_BOUNDED_SIDE)) - { - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << true << std::endl;); - return true; - // otherwise it will return false later - } - } else { - // here s and r are both segments - - // philaris: I assert that q is an endpoint of both s and r - - CGAL_assertion( - same_points(q, s.source_site()) or - same_points(q, s.target_site()) - ); - - CGAL_assertion( - same_points(q, r.source_site()) or - same_points(q, r.target_site()) - ); - - // Since s and r are different, the infinite vertices - // (q,s,inf) and (q,inf,r) of the Voronoi diagram - // have the following property: - // if they are connected, their line has +-45 deg slope - // and this line goes through point q. - // This line is Linf-perpendicular to both s and r. - // Since q is not in conflict with any of (q,s,inf), - // (q,inf,r), it is enough to check if t is in the - // infinite box with corner q containing neither - // of these: (q,s,inf), (q,inf,r), any point of s, r. - - Point_2 otherpnt = - (same_points(q, s.source_site())) ? - s.segment().target(): - s.segment().source(); - - CGAL_assertion( - or_linf(t.point(), q.point(), otherpnt) == - DEGENERATE ); - - Bounded_side bside = - bounded_side_of_bbox(t.point(), otherpnt, q.point()); - - CGAL_assertion(bside != ON_BOUNDARY); - - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << (bside == ON_BOUNDED_SIDE) << std::endl;); - return (bside == ON_BOUNDED_SIDE); - - } - } - // here it might be sgn == ZERO - - CGAL_SDG_DEBUG( - std::cout - << "debug infinite-edge-int-cf with (q,s,r,t,sgn)= " - << q << ' ' << s << ' ' << r << ' ' << t - << ' ' << sgn << " returns " - << ( sgn == NEGATIVE ) << std::endl;); - return ( sgn == NEGATIVE ); - } - -}; - - -//----------------------------------------------------------------------------- - -} //namespace SegmentDelaunayGraphLinf_2_hv - -} //namespace CGAL - -#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_HV_INFINITE_EDGE_INTERIOR_CONFLICT_C2_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/hv/Vertex_conflict_C2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/hv/Vertex_conflict_C2.h deleted file mode 100644 index 66f489e2a12..00000000000 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/hv/Vertex_conflict_C2.h +++ /dev/null @@ -1,763 +0,0 @@ - -#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_HV_VERTEX_CONFLICT_C2_H -#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_HV_VERTEX_CONFLICT_C2_H - -#include -#include -#include -#include -#include -#include - -namespace CGAL { - -namespace SegmentDelaunayGraphLinf_2_hv { - -//--------------------------------------------------------------------- - -template -class Vertex_conflict_C2 - : public SegmentDelaunayGraphLinf_2::Basic_predicates_C2 -{ -private: - - typedef SegmentDelaunayGraphLinf_2::Basic_predicates_C2 Base; - using Base::compute_supporting_line; - using Base::oriented_side_of_line; - using Base::compute_linf_perpendicular; - using Base::compute_line_from_to; - using Base::compute_horizontal_side_line; - using Base::compute_vertical_side_line; - using Base::compute_perpendicular; - using Base::compute_cw_perpendicular; - using Base::compute_horizontal_projection; - using Base::compute_vertical_projection; - using Base::intersects_segment_interior_inf_box; - using Base::intersects_segment_positive_of_wedge; - using Base::intersects_segment_negative_of_wedge; - using Base::is_site_h_or_v; - - typedef typename Base::Line_2 Line_2; - - typedef typename K::Point_2 Point_2; - typedef typename K::Segment_2 Segment_2; - typedef typename K::Site_2 Site_2; - typedef typename K::FT FT; - typedef typename K::RT RT; - //typedef typename K::Orientation Orientation; - typedef CGAL::OrientationLinf OrientationLinf; - typedef typename K::Sign Sign; - - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_NS:: - Voronoi_vertex_C2 - Voronoi_vertex_2; - - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Are_same_points_C2 - Are_same_points_2; - typedef CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Are_same_segments_C2 - Are_same_segments_2; - - typedef typename K::Intersections_tag ITag; - - // the orientation Linf predicate for three points - typedef Orientation_Linf_2 Orientation_Linf_points_2; - - typedef typename K::Compare_x_2 Compare_x_2; - typedef typename K::Compare_y_2 Compare_y_2; - - Compare_x_2 cmpx; - Compare_y_2 cmpy; - Orientation_Linf_points_2 orientation_linf; - - -private: - Are_same_points_2 same_points; - Are_same_segments_2 same_segments; - - bool is_on_common_support(const Site_2& s1, const Site_2& s2, - const Point_2& p) const - { - CGAL_precondition( !s1.is_input() && !s2.is_input() ); - - if ( same_segments(s1.supporting_site(0), - s2.supporting_site(0)) || - same_segments(s1.supporting_site(0), - s2.supporting_site(1)) ) { - Site_2 support = s1.supporting_site(0); - Site_2 tp = Site_2::construct_site_2(p); - - return ( same_points(support.source_site(), tp) || - same_points(support.target_site(), tp) ); - } else if ( same_segments(s1.supporting_site(1), - s2.supporting_site(1)) || - same_segments(s1.supporting_site(1), - s2.supporting_site(0)) ) { - Site_2 support = s1.supporting_site(1); - Site_2 tp = Site_2::construct_site_2(p); - - return ( same_points(support.source_site(), tp) || - same_points(support.target_site(), tp) ); - } - return false; - } - - bool have_common_support(const Site_2& p, const Site_2& q) const - { - CGAL_precondition( !p.is_input() && !q.is_input() ); - - return - same_segments(p.supporting_site(0), q.supporting_site(0)) || - same_segments(p.supporting_site(0), q.supporting_site(1)) || - same_segments(p.supporting_site(1), q.supporting_site(1)) || - same_segments(p.supporting_site(1), q.supporting_site(0)); - } - - bool have_common_support(const Site_2& s, const Point_2& p1, - const Point_2& p2) const - { - CGAL_precondition( !s.is_input() ); - - Site_2 t = Site_2::construct_site_2(p1, p2); - - return ( same_segments(s.supporting_site(0), t) || - same_segments(s.supporting_site(1), t) ); - } - -private: - Sign incircle_ppp(const Site_2& p, const Site_2& q, - const Site_2& t, const Tag_false&) const - { - Point_2 pp = p.point(), qp = q.point(), tp = t.point(); - - // MK::ERROR: here I should call a kernel object, not a - // function...; actually here (and everywhere in this class) - // use the orientation predicate for sites; it does some - // geometric filtering... - // philaris: I think we call an object now - OrientationLinf o = orientation_linf(pp, qp, tp); - - if ( o != DEGENERATE ) { - return (o == LEFT_TURN) ? POSITIVE : NEGATIVE; - } - - // here orientation Linf is degenerate - - // return NEGATIVE if t is strictly inside the bounding box - // of p and q, otherwise return POSITIVE; - // ZERO is not possible (because t should not be equal - // to either p or q) - - Comparison_result cmpxpt = cmpx(pp, tp); - Comparison_result cmpxtq = cmpx(tp, qp); - Comparison_result cmpypt = cmpy(pp, tp); - Comparison_result cmpytq = cmpy(tp, qp); - - //Sign s = -sign_of( cmpxpt * cmpxtq + cmpypt * cmpytq ); - Sign s = CGAL::compare(0, cmpxpt * cmpxtq + cmpypt * cmpytq); - - CGAL_assertion( s != ZERO ); - - return s; - } - - Sign incircle_ppp(const Site_2& p, const Site_2& q, - const Site_2& t, const Tag_true&) const - { - Orientation o = DEGENERATE; // the initialization was done in - // order a compiler warning - - // do some geometric filtering... - bool p_exact = p.is_input(); - bool q_exact = q.is_input(); - bool t_exact = t.is_input(); - bool filtered = false; - // the following if-statement does the gometric filtering... - // maybe it is not so important since this will only be - // activated if a lot of intersection points appear on the - // convex hull - if ( !p_exact || !q_exact || !t_exact ) { - if ( !p_exact && !q_exact && !t_exact ) { - if ( have_common_support(p, q) && - have_common_support(q, t) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( !p_exact && !q_exact && t_exact ) { - if ( is_on_common_support(p, q, t.point()) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( !p_exact && q_exact && !t_exact ) { - if ( is_on_common_support(p, t, q.point()) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( p_exact && !q_exact && !t_exact ) { - if ( is_on_common_support(t, q, p.point()) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( !p_exact && q_exact && t_exact ) { - if ( have_common_support(p, q.point(), t.point()) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( p_exact && !q_exact && t_exact ) { - if ( have_common_support(q, p.point(), t.point()) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( p_exact && q_exact && !t_exact ) { - if ( have_common_support(t, p.point(), q.point()) ) { - o = COLLINEAR; - filtered = true; - } - } - } - - Point_2 pp = p.point(), qp = q.point(), tp = t.point(); - - if ( !filtered ) { - // MK::ERROR: here I should call a kernel object, not a - // function...; actually here (and everywhere in this class) - // use the orientation predicate for sites; it does some - // geometric filtering... - // philaris: I think we call an object now - o = orientation_linf(pp, qp, tp); - } - - if ( o != DEGENERATE ) { - return (o == LEFT_TURN) ? POSITIVE : NEGATIVE; - } - - // here orientation Linf is degenerate - - // return NEGATIVE if t is strictly inside the bounding box - // of p and q, otherwise return POSITIVE; - // ZERO is not possible (because t should not be equal - // to either p or q) - - Comparison_result cmpxpt = cmpx(pp, tp); - Comparison_result cmpxtq = cmpx(tp, qp); - Comparison_result cmpypt = cmpy(pp, tp); - Comparison_result cmpytq = cmpy(tp, qp); - - //Sign s = -sign_of( cmpxpt * cmpxtq + cmpypt * cmpytq ); - Sign s = CGAL::compare(0, cmpxpt * cmpxtq + cmpypt * cmpytq); - - CGAL_assertion( s != ZERO ); - - return s; - } - - - Sign incircle_p(const Site_2& p, const Site_2& q, - const Site_2& t) const - { - CGAL_precondition( t.is_point() ); - - if ( p.is_point() && q.is_point() ) { - -#if 1 - return incircle_ppp(p, q, t, ITag()); - -#else - Orientation o = DEGENERATE; // the initialization was done in - // order a compiler warning - - // do some geometric filtering... - bool p_exact = p.is_input(); - bool q_exact = q.is_input(); - bool t_exact = t.is_input(); - bool filtered = false; - // the following if-statement does the gometric filtering... - // maybe it is not so important since this will only be - // activated if a lot of intersection points appear on the - // convex hull - if ( !p_exact || !q_exact || !t_exact ) { - if ( !p_exact && !q_exact && !t_exact ) { - if ( have_common_support(p, q) && - have_common_support(q, t) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( !p_exact && !q_exact && t_exact ) { - if ( is_on_common_support(p, q, t.point()) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( !p_exact && q_exact && !t_exact ) { - if ( is_on_common_support(p, t, q.point()) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( p_exact && !q_exact && !t_exact ) { - if ( is_on_common_support(t, q, p.point()) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( !p_exact && q_exact && t_exact ) { - if ( have_common_support(p, q.point(), t.point()) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( p_exact && !q_exact && t_exact ) { - if ( have_common_support(q, p.point(), t.point()) ) { - o = COLLINEAR; - filtered = true; - } - } else if ( p_exact && q_exact && !t_exact ) { - if ( have_common_support(t, p.point(), q.point()) ) { - o = COLLINEAR; - filtered = true; - } - } - } - - Point_2 pp = p.point(), qp = q.point(), tp = t.point(); - - if ( !filtered ) { - // MK::ERROR: here I should call a kernel object, not a - // function...; actually here (and everywhere in this class) - // use the orientation predicate for sites; it does some - // geometric filtering... - // philaris: I think we call an object now - o = orientation_linf(pp, qp, tp); - } - - if ( o != DEGENERATE ) { - return (o == LEFT_TURN) ? POSITIVE : NEGATIVE; - } - - // here orientation Linf is degenerate - - // return NEGATIVE if t is strictly inside the bounding box - // of p and q, otherwise return POSITIVE; - // ZERO is not possible (because t should not be equal - // to either p or q) - - Comparison_result cmpxpt = cmpx(pp, tp); - Comparison_result cmpxtq = cmpx(tp, qp); - Comparison_result cmpypt = cmpy(pp, tp); - Comparison_result cmpytq = cmpy(tp, qp); - - //Sign s = -sign_of( cmpxpt * cmpxtq + cmpypt * cmpytq ); - Sign s = CGAL::compare(0, cmpxpt * cmpxtq + cmpypt * cmpytq); - - CGAL_assertion( s != ZERO ); - - return s; -#endif - } - - // here the pair of p, q contains a point and a segment - - CGAL_assertion( p.is_point() || q.is_point() ); - - CGAL_SDG_DEBUG( std::cout << "debug incircle_p of p=" << p - << " q=" << q << " t=" << t << std::endl; ); - - // philaris: here, for Linf there are differences from L2 - - if ((q.is_segment() and is_site_h_or_v(q)) or - (p.is_segment() and is_site_h_or_v(p)) ) { - // the case of horizontal or vertical segment is the same - // as in L2 - Orientation o; - if ( p.is_point() && q.is_segment() ) { - CGAL_assertion( same_points(p, q.source_site()) or - same_points(p, q.target_site()) ); - Point_2 pq = same_points(p, q.source_site()) ? q.target() : q.source(); - o = orientation_linf(p.point(), pq, t.point()); - } else { // p is a segment and q is a point - CGAL_assertion( same_points(q, p.source_site()) or - same_points(q, p.target_site()) ); - Point_2 pp = same_points(q, p.source_site()) ? p.target() : p.source(); - o = orientation_linf(pp, q.point(), t.point()); - } - if ( CGAL::is_certain(o == RIGHT_TURN) ) { - CGAL_SDG_DEBUG(std::cout << "debug incircle_p about to return " - << (CGAL::get_certain( o == RIGHT_TURN ) ? NEGATIVE : POSITIVE) - << std::endl ;); - return CGAL::get_certain( o == RIGHT_TURN ) ? NEGATIVE : POSITIVE; - } - return CGAL::Uncertain::indeterminate(); - } - //Sandeep: Added to avoid compiler warning - CGAL_assertion(false); - CGAL_SDG_DEBUG(std::cout - << "sandeep: debug incircle_p should not reach here " - << NEGATIVE - << std::endl ;); - return NEGATIVE; - } - - //----------------------------------------------------------------------- - - // philaris: here Linf is very different from L2 - Sign incircle_pps(const Site_2& p, const Site_2& q, - const Site_2& t) const - { - CGAL_precondition( p.is_point() && q.is_point() ); - - CGAL_SDG_DEBUG(std::cout << "debug incircle_pps p=" << p - << " q=" << q << " t=" << t << std::endl; ); - - bool is_p_tsrc = same_points(p, t.source_site()); - bool is_p_ttrg = same_points(p, t.target_site()); - - bool is_q_tsrc = same_points(q, t.source_site()); - bool is_q_ttrg = same_points(q, t.target_site()); - - bool is_p_on_t = is_p_tsrc || is_p_ttrg; - bool is_q_on_t = is_q_tsrc || is_q_ttrg; - - if ( is_p_on_t && is_q_on_t ) { - // if t is the segment joining p and q then t must be a vertex - // on the convex hull - return NEGATIVE; - } else { - // here, neither p nor q is on t - if (is_site_h_or_v(t)) { - // here segment is horizontal or vertical; - // there are similarities with L2 case here - - if ( is_p_on_t ) { - // p is an endpoint of t - // in this case the p,q,oo vertex is destroyed only if the - // other endpoint of t is beyond - Point_2 pt = is_p_tsrc ? t.target() : t.source(); - Orientation o = CGAL::orientation(p.point(), q.point(), pt); - CGAL_SDG_DEBUG(std::cout << "debug incircle_pps p is endp of t: " - << "p = " << p << ", q = " << q << ", t = " << t - << " o = " << o << std::endl; ); - return (o == RIGHT_TURN) ? NEGATIVE : POSITIVE; - } else if ( is_q_on_t ) { - Point_2 pt = is_q_tsrc ? t.target() : t.source(); - Orientation o = CGAL::orientation(p.point(), q.point(), pt); - CGAL_SDG_DEBUG(std::cout << "debug incircle_pps q is endp of t: " - << "p = " << p << ", q = " << q << ", t = " << t - << " o = " << o << std::endl; ); - return (o == RIGHT_TURN) ? NEGATIVE : POSITIVE; - } else { - // We immediately return POSITIVE here. - // This only works because the segment t is hor. or ver. ! - // If t is neither hor. or ver., we have a more complicated - // decision procedure (see below). - // since we insert endpoints of segments first, p and q cannot - // be consecutive points on the convex hull, because of the - // endpoints of t - return POSITIVE; - } - } - } // end of case where neither p nor q is on t - //Sandeep: Added to avoid compiler warning - CGAL_assertion(false); - CGAL_SDG_DEBUG(std::cout << "sandeep: debug incircle_pps should not reach here " - << NEGATIVE - << std::endl ;); - return NEGATIVE; - } // end of incircle_pps - - - Sign incircle_sps(const Site_2& p, const Site_2& q, - const Site_2& t) const - { - CGAL_precondition( p.is_segment() && q.is_point() ); - - CGAL_SDG_DEBUG(std::cout << "debug incircle_sps p=" << p - << " q=" << q << " t=" << t << std::endl; ); - - bool is_q_tsrc = same_points(q, t.source_site()); - bool is_q_ttrg = same_points(q, t.target_site()); - - bool is_q_on_t = is_q_tsrc or is_q_ttrg; - - bool is_q_psrc = same_points(q, p.source_site()); - bool is_q_ptrg = same_points(q, p.target_site()); - - bool is_q_on_p = is_q_psrc or is_q_ptrg; - - - if ( is_q_on_t and is_q_on_p) { - CGAL_SDG_DEBUG(std::cout << "debug incircle_sps " - << "is_q_on_t and is_q_on_p" << std::endl; ); - - Point_2 pp = same_points(q, p.source_site()) ? p.target() : p.source(); - Point_2 pt = is_q_tsrc ? t.target() : t.source(); - - Orientation o = orientation_linf(pp, q.point(), pt); - - CGAL_SDG_DEBUG(std::cout << "debug incircle_sps or( " - << pp << ", " << q.point() << ", " << pt << " ) = " - << o << std::endl; ); - - if (o == DEGENERATE) { - - Line_2 lpq = compute_line_from_to(pp, q.point()); - Line_2 lperp = compute_linf_perpendicular(lpq, q.point()); - - Oriented_side os = oriented_side_of_line(lperp, pt); - - CGAL_assertion( os != ON_ORIENTED_BOUNDARY ); - - if (os == ON_NEGATIVE_SIDE) { - CGAL_SDG_DEBUG(std::cout << "debug incircle_sps degen os=NEG_SIDE " - << "returns POS" << std::endl; ); - return POSITIVE; - } else { // here os == ON_POSITIVE_SIDE - // here, we must make a refinement, based on turn - Orientation or_l2 = CGAL::orientation(pp, q.point(), pt); - - CGAL_assertion( or_l2 != COLLINEAR ); - - CGAL_SDG_DEBUG(std::cout << "debug incircle_sps degen os=POS_SIDE " - << "returns " - << ((or_l2 == RIGHT_TURN)? NEGATIVE : POSITIVE) - << std::endl; ); - - return (or_l2 == RIGHT_TURN)? NEGATIVE : POSITIVE; - } - - } - - return (o == RIGHT_TURN) ? NEGATIVE : POSITIVE; - } else { - // philaris: serious difference for Linf here, related to L2 - - if ( is_site_h_or_v(p) ) { - return POSITIVE; - } - } // end of case where q is not on t - //Sandeep: Added to avoid compiler warning - CGAL_assertion(false); - CGAL_SDG_DEBUG(std::cout << "sandeep: debug incircle_sps should not reach here " - << NEGATIVE - << std::endl ;); - return NEGATIVE; - } // end of function incircle_sps - - - Sign incircle_pss(const Site_2& p, const Site_2& q, - const Site_2& t) const - { - CGAL_precondition( p.is_point() && q.is_segment() ); - - CGAL_SDG_DEBUG(std::cout << "debug incircle_pss (pqt) = (" << - p << ") (" << q << ") (" << t << ")" << std::endl; ); - - bool is_p_tsrc = same_points(p, t.source_site()); - bool is_p_ttrg = same_points(p, t.target_site()); - - bool is_p_on_t = is_p_tsrc or is_p_ttrg; - - bool is_p_qsrc = same_points(p, q.source_site()); - bool is_p_qtrg = same_points(p, q.target_site()); - - bool is_p_on_q = is_p_qsrc or is_p_qtrg; - - if ( is_p_on_t and is_p_on_q ) { - - CGAL_SDG_DEBUG(std::cout << "debug incircle_pss " - << "is_p_on_t and is_p_on_q" << std::endl; ); - - Point_2 pq = same_points(p, q.source_site()) ? q.target() : q.source(); - Point_2 pt = is_p_tsrc ? t.target() : t.source(); - - Orientation o = orientation_linf(p.point(), pq, pt); - - if (o == DEGENERATE) { - - Line_2 lpq = compute_line_from_to(pq, p.point()); - Line_2 lperp = compute_linf_perpendicular(lpq, p.point()); - - Oriented_side os = oriented_side_of_line(lperp, pt); - - CGAL_assertion( os != ON_ORIENTED_BOUNDARY ); - - if (os == ON_NEGATIVE_SIDE) { - CGAL_SDG_DEBUG(std::cout << "debug incircle_pss degen os=NEG_SIDE " - << "returns POS" << std::endl; ); - return POSITIVE; - } else { // here os == ON_POSITIVE_SIDE - // here, we must make a refinement, based on turn - Orientation or_l2 = CGAL::orientation(p.point(), pq, pt); - - CGAL_assertion( or_l2 != COLLINEAR ); - - CGAL_SDG_DEBUG(std::cout << "debug incircle_pss degen os=POS_SIDE " - << "returns " - << ((or_l2 == RIGHT_TURN)? NEGATIVE : POSITIVE) - << std::endl; ); - - return (or_l2 == RIGHT_TURN)? NEGATIVE : POSITIVE; - } - } - - CGAL_SDG_DEBUG(std::cout << "debug incircle_pss or( " - << p.point() << ", " << pq << ", " << pt << " ) = " - << o << std::endl; ); - - return (o == RIGHT_TURN) ? NEGATIVE : POSITIVE; - } else { - // philaris: serious difference for Linf here, related to L2 - - if ( is_site_h_or_v(q) ) { - return POSITIVE; - } - } // end of case where p is not on t - //Sandeep: Added to avoid compiler warning - CGAL_assertion(false); - CGAL_SDG_DEBUG(std::cout << "sandeep: debug incircle_pss should not reach here " - << NEGATIVE - << std::endl ;); - return NEGATIVE; - } // end of function incircle_pss - - - Sign incircle_s(const Site_2& p, const Site_2& q, - const Site_2& t) const - { - CGAL_precondition( t.is_segment() ); - - if ( p.is_point() && q.is_point() ) { - return incircle_pps(p, q, t); - } else if ( p.is_point() && q.is_segment() ) { - return incircle_pss(p, q, t); - } else { // p is a segment and q is a point - return incircle_sps(p, q, t); - } - } - - -public: - typedef Site_2 argument_type; - typedef Sign result_type; - - - Sign operator()(const Site_2& p, const Site_2& q, - const Site_2& r, const Site_2& t) const - { - - CGAL_SDG_DEBUG(std::cout - << "debug: Vertex_conflict entering (pqrt)= (" - << p << ") (" << q << ") (" << r << ") (" << t << ")" - << std::endl; ); - - -#ifdef CGAL_PROFILE - // In case CGAL profile is called then output the sites in case of - // a filter failure - if ( Algebraic_structure_traits::Is_exact::value ) { - int np = 0; - if ( p.is_point() ) ++np; - if ( q.is_point() ) ++np; - if ( r.is_point() ) ++np; - std::string suffix("-failure-log.cin"); - std::string fname; - if ( np == 3 ) { - fname = "ppp"; - } else if ( np == 2 ) { - fname = "pps"; - } else if ( np == 1 ) { - fname = "pss"; - } else { - fname = "sss"; - } - fname += suffix; - std::ofstream ofs(fname.c_str(), std::ios_base::app); - ofs.precision(16); - ofs << p << std::endl; - ofs << q << std::endl; - ofs << r << std::endl; - ofs << t << std::endl; - ofs << "=======" << std::endl; - ofs.close(); - } -#endif - - Voronoi_vertex_2 v(p, q, r); - -#ifndef CGAL_NO_ASSERTIONS - CGAL_SDG_DEBUG( - Point_2 temppt = v.point(); - std::cout - << "debug Voronoi_vertex_2 v=" << temppt << std::endl; ); -#endif - - Sign retval = v.incircle(t); - - CGAL_SDG_DEBUG(std::cout - << "debug: Vertex_conflict (pqrt)= (" - << p << ") (" << q << ") (" - << r << ") (" << t << ") returns " << retval - << std::endl; ); - - return retval; - } - - - Sign operator()(const Site_2& p, const Site_2& q, - const Site_2& t) const - { - CGAL_SDG_DEBUG(std::cout << "debug: Vertex_conflict (pqt)= (" - << p << ") (" << q << ") (" << t << ")" - << std::endl; ); - -#ifdef CGAL_PROFILE - // In case CGAL profile is called then output the sites in case of - // a filter failure - if ( Algebraic_structure_traits::Is_exact::value ) { - std::ofstream ofs("failure-log.cin", std::ios_base::app); - ofs.precision(16); - ofs << p << std::endl; ); - ofs << q << std::endl; ); - ofs << t << std::endl; ); - ofs << "=======" << std::endl; ); - ofs.close(); - } -#endif - - CGAL_assertion( !(p.is_segment() && q.is_segment()) ); - - // philaris: the assertion that the point is endpoint of - // the segment is not true in Linf (in contrast with L2) - /* - if ( p.is_point() && q.is_segment() ) { - // p must be an endpoint of q - CGAL_assertion( same_points(p, q.source_site()) || - same_points(p, q.target_site()) ); - } else if ( p.is_segment() && q.is_point() ) { - // q must be an endpoint of p - CGAL_assertion( same_points(p.source_site(), q) || - same_points(p.target_site(), q) ); - } - */ - - Sign retval; - - if ( t.is_point() ) { - // return incircle_p(p, q, t); - retval = incircle_p(q, p, t); - } else { - // MK::ERROR: do geometric filtering when orientation is called. - // return incircle_s(p, q, t); - retval = incircle_s(q, p, t); - } - - CGAL_SDG_DEBUG(std::cout << "debug: Vertex_conflict (pqt)= (" - << p << ") (" << q << ") (" << t << ")" - << " returns " << retval << std::endl; ); - return retval; - } - - -}; - -//--------------------------------------------------------------------- - -} //namespace SegmentDelaunayGraphLinf_2_hv - -} //namespace CGAL - -#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_HV_VERTEX_CONFLICT_C2_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hv_filtered_traits_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hv_filtered_traits_2.h deleted file mode 100644 index 4de79324048..00000000000 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hv_filtered_traits_2.h +++ /dev/null @@ -1,229 +0,0 @@ - -#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HV_FILTERED_TRAITS_2_H -#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HV_FILTERED_TRAITS_2_H - -#include - -#include -#include - -// includes for the default parameters of the filtered traits -#ifdef CGAL_USE_GMP -#include -#else -#include -#include -#endif - -#include -#include -#include -#include - -namespace CGAL { - -#define SDG2_INS CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Internal - -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// the filtered Traits classes -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- - -// this traits class does support intersecting segments -template, -#else - class EK = Simple_cartesian< Quotient >, -#endif - class EK_MTag = Field_tag, - class FK = Simple_cartesian< Interval_nt >, - class FK_MTag = Field_with_sqrt_tag, - class C2E = Cartesian_converter, - class C2F = - Cartesian_converter > > -struct Segment_Delaunay_graph_Linf_hv_filtered_traits_2 - : public Segment_Delaunay_graph_Linf_hv_filtered_traits_base_2 -{ -public: - Segment_Delaunay_graph_Linf_hv_filtered_traits_2() { - SDG2_INS::Concept_check_tags(); - SDG2_INS::Concept_check_tags(); - SDG2_INS::Concept_check_tags(); - } -}; - - -template -struct Segment_Delaunay_graph_Linf_hv_filtered_traits_2 - : public Segment_Delaunay_graph_Linf_hv_filtered_traits_base_2 - -{ -public: - Segment_Delaunay_graph_Linf_hv_filtered_traits_2() { - SDG2_INS::Concept_check_tags(); - SDG2_INS::Concept_check_tags(); - } -}; - -template -struct Segment_Delaunay_graph_Linf_hv_filtered_traits_2 - : public Segment_Delaunay_graph_Linf_hv_filtered_traits_base_2 -{ -public: - Segment_Delaunay_graph_Linf_hv_filtered_traits_2() { - SDG2_INS::Concept_check_tags(); - SDG2_INS::Concept_check_tags(); - } -}; - -template -struct Segment_Delaunay_graph_Linf_hv_filtered_traits_2 - : public Segment_Delaunay_graph_Linf_hv_filtered_traits_base_2 -{ -public: - Segment_Delaunay_graph_Linf_hv_filtered_traits_2() { - SDG2_INS::Concept_check_tags(); - SDG2_INS::Concept_check_tags(); - } -}; - -template -struct Segment_Delaunay_graph_Linf_hv_filtered_traits_2 - : public Segment_Delaunay_graph_Linf_hv_filtered_traits_base_2 -{ -public: - Segment_Delaunay_graph_Linf_hv_filtered_traits_2() { - SDG2_INS::Concept_check_tags(); - } -}; - -template -struct Segment_Delaunay_graph_Linf_hv_filtered_traits_2 - : public Segment_Delaunay_graph_Linf_hv_filtered_traits_base_2 - -{ -public: - Segment_Delaunay_graph_Linf_hv_filtered_traits_2() { - SDG2_INS::Concept_check_tags(); - } -}; - -template -struct Segment_Delaunay_graph_Linf_hv_filtered_traits_2 - : public Segment_Delaunay_graph_Linf_hv_filtered_traits_base_2< - CK, Integral_domain_without_division_tag, - EK, Integral_domain_without_division_tag, - FK, FK_MTag, - C2E, C2F, - Tag_true> -{ -public: - Segment_Delaunay_graph_Linf_hv_filtered_traits_2() { - SDG2_INS::Concept_check_tags(); - } -}; - -template -struct Segment_Delaunay_graph_Linf_hv_filtered_traits_2 - : public Segment_Delaunay_graph_Linf_hv_filtered_traits_base_2< - CK, Integral_domain_without_division_tag, - EK, Integral_domain_without_division_tag, - FK, Integral_domain_without_division_tag, - C2E, C2F, - Tag_true> -{}; - -//========================================================================= - - -// this traits class does NOT support intersecting segments -template, -#else - class EK = Simple_cartesian< MP_Float >, -#endif - class EK_MTag = Integral_domain_without_division_tag, - class FK = Simple_cartesian< Interval_nt >, - class FK_MTag = Field_with_sqrt_tag, - class C2E = Cartesian_converter, - class C2F = - Cartesian_converter > > -struct Segment_Delaunay_graph_Linf_hv_filtered_traits_without_intersections_2 - : public Segment_Delaunay_graph_Linf_hv_filtered_traits_base_2 -{ - Segment_Delaunay_graph_Linf_hv_filtered_traits_without_intersections_2() { - SDG2_INS::Concept_check_tags_wi(); - SDG2_INS::Concept_check_tags_wi(); - SDG2_INS::Concept_check_tags_wi(); - } -}; - -#undef SDG2_INS - -} //namespace CGAL - -#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_FILTERED_TRAITS_2_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hv_traits_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hv_traits_2.h deleted file mode 100644 index 3fbee7c74c8..00000000000 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hv_traits_2.h +++ /dev/null @@ -1,146 +0,0 @@ - -#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HV_TRAITS_2_H -#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HV_TRAITS_2_H - - -#include - -#include - -#include -#include - - -namespace CGAL { - -//----------------------------------------------------------------------- -// the Traits classes -//----------------------------------------------------------------------- - -// this traits class does support intersecting segments - -// the following definition is okay when giving Field_with_sqrt_tag -// for all other tags I need a specialization -template::Algebraic_category - /*Field_tag*/> -struct Segment_Delaunay_graph_Linf_hv_traits_2 - : public Segment_Delaunay_graph_Linf_hv_traits_base_2 {}; - -template -struct Segment_Delaunay_graph_Linf_hv_traits_2 - : public Segment_Delaunay_graph_Linf_hv_traits_base_2 {}; - -template -struct Segment_Delaunay_graph_Linf_hv_traits_2 - : public Segment_Delaunay_graph_Linf_hv_traits_base_2 {}; - -template -struct Segment_Delaunay_graph_Linf_hv_traits_2 - : public Segment_Delaunay_graph_Linf_hv_traits_base_2 {}; - - -// Concept checking -template -struct Segment_Delaunay_graph_Linf_hv_traits_2 - : public Segment_Delaunay_graph_Linf_hv_traits_base_2 -{ - Segment_Delaunay_graph_Linf_hv_traits_2() { - THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag - ( R() ); - } -}; - -template -struct Segment_Delaunay_graph_Linf_hv_traits_2 - : public Segment_Delaunay_graph_Linf_hv_traits_base_2 -{ - Segment_Delaunay_graph_Linf_hv_traits_2() { - THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag - ( R() ); - } -}; - -// Specializations for filtered_kernel -template -struct Segment_Delaunay_graph_Linf_hv_traits_2,Field_tag> - : public - Segment_Delaunay_graph_filtered_traits_2::Exact_kernel, - Field_tag, - typename Filtered_kernel::Approximate_kernel, - Field_with_sqrt_tag> -{}; - -template -struct Segment_Delaunay_graph_Linf_hv_traits_2,Field_with_sqrt_tag> - : public - Segment_Delaunay_graph_filtered_traits_2::Exact_kernel, - Field_tag, - typename Filtered_kernel::Approximate_kernel, - Field_with_sqrt_tag> -{}; - -//========================================================================= - -// this traits class does NOT support intersecting segments -template::Algebraic_category - /*Integral_domain_without_division_tag*/> -struct Segment_Delaunay_graph_Linf_hv_traits_without_intersections_2 - : public Segment_Delaunay_graph_Linf_hv_traits_base_2 {}; - -template -struct Segment_Delaunay_graph_Linf_hv_traits_without_intersections_2 - : public Segment_Delaunay_graph_Linf_hv_traits_base_2 -{ - Segment_Delaunay_graph_Linf_hv_traits_without_intersections_2() { - THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag - ( R() ); - } -}; - -template -struct -Segment_Delaunay_graph_Linf_hv_traits_without_intersections_2 - : public Segment_Delaunay_graph_Linf_hv_traits_base_2 -{ - Segment_Delaunay_graph_Linf_hv_traits_without_intersections_2() { - THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag - ( R() ); - } -}; - - -// Specialization for filtered_kernel -template -struct -Segment_Delaunay_graph_Linf_hv_traits_without_intersections_2, - Integral_domain_without_division_tag> - : public - Segment_Delaunay_graph_filtered_traits_without_intersections_2::Exact_kernel, - Integral_domain_without_division_tag, - typename Filtered_kernel::Approximate_kernel, - Field_with_sqrt_tag> -{}; - -template -struct -Segment_Delaunay_graph_Linf_hv_traits_without_intersections_2, - Field_with_sqrt_tag> - : public - Segment_Delaunay_graph_filtered_traits_without_intersections_2::Exact_kernel, - Integral_domain_without_division_tag, - typename Filtered_kernel::Approximate_kernel, - Field_with_sqrt_tag> -{}; - -} //namespace CGAL - -#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_TRAITS_2_H