From 2bbfe86fe206df05c7857028e79b3abf8f22adbb Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 10 Apr 2019 14:14:47 +0200 Subject: [PATCH] Remove unused code --- .../doc/Partition_2/CGAL/Partition_traits_2.h | 18 ------- .../Concepts/OptimalConvexPartitionTraits_2.h | 52 ------------------- .../Partition_2/Vertex_visibility_graph_2.h | 16 ------ .../Vertex_visibility_graph_2_impl.h | 31 ----------- Partition_2/include/CGAL/Partition_traits_2.h | 13 +---- .../include/CGAL/Partition_traits_adapter_2.h | 16 ------ 6 files changed, 1 insertion(+), 145 deletions(-) diff --git a/Partition_2/doc/Partition_2/CGAL/Partition_traits_2.h b/Partition_2/doc/Partition_2/CGAL/Partition_traits_2.h index 5677ddd2732..ba6fef55ed5 100644 --- a/Partition_2/doc/Partition_2/CGAL/Partition_traits_2.h +++ b/Partition_2/doc/Partition_2/CGAL/Partition_traits_2.h @@ -36,15 +36,6 @@ public: */ typedef R::Line_2 Line_2; -/*! - -*/ -typedef R::Segment_2 Segment_2; - -/*! - -*/ -typedef R::Ray_2 Ray_2; /*! @@ -81,15 +72,6 @@ typedef R::Compare_x_2 Compare_x_2; */ typedef R::Construct_line_2 Construct_line_2; -/*! - -*/ -typedef R::Construct_ray_2 Construct_ray_2; - -/*! - -*/ -typedef R::Construct_segment_2 Construct_segment_2; /*! diff --git a/Partition_2/doc/Partition_2/Concepts/OptimalConvexPartitionTraits_2.h b/Partition_2/doc/Partition_2/Concepts/OptimalConvexPartitionTraits_2.h index 75b8650c179..6dc4a84528e 100644 --- a/Partition_2/doc/Partition_2/Concepts/OptimalConvexPartitionTraits_2.h +++ b/Partition_2/doc/Partition_2/Concepts/OptimalConvexPartitionTraits_2.h @@ -23,34 +23,6 @@ public: /// `PartitionTraits_2`, the following types are required: /// @{ -/*! -A segment type -*/ -typedef unspecified_type Segment_2; - -/*! -A ray type -*/ -typedef unspecified_type Ray_2; - -/*! -A general object type that can be either a point or a segment -*/ -typedef unspecified_type Object_2; - -/*! -Function object type that provides -`Segment_2 operator()(Point_2 p, Point_2 q)`, which constructs and -returns the segment defined by the points \f$ p\f$ and \f$ q\f$. -*/ -typedef unspecified_type Construct_segment_2; - -/*! -Function object type that provides -`Ray_2 operator()(Point_2 p, Point_2 q)`, which constructs and returns -the ray from point \f$ p\f$ through point \f$ q\f$. -*/ -typedef unspecified_type Construct_ray_2; /*! Predicate object type that @@ -73,21 +45,6 @@ and `r`. Note that `false` should be returned if */ typedef unspecified_type Are_stritcly_ordered_along_line_2; -/*! -Function object type that provides -`Object_2 operator()(Segment_2 s1, Segment_2 s2)` that returns -the intersection of two segments (which may be either a segment or -a point). -*/ -typedef unspecified_type Intersect_2; - -/*! -Function object type that provides -`bool operator()(Segment_2 s1, Object_2 o)` that returns -`true` if `o` is a segment and assigns the value of `o` -to `s1`; returns `false` otherwise. -*/ -typedef unspecified_type Assign_2; /// @} @@ -113,15 +70,6 @@ OptimalConvexPartitionTraits_2(OptimalConvexPartitionTraits_2 tr); */ Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line_2_object() const; -/*! - -*/ -Construct_segment_2 construct_segment_2_object() const; - -/*! - -*/ -Construct_ray_2 construct_ray_2_object() const; /*! diff --git a/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2.h b/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2.h index 9c079980975..906b4c952b4 100644 --- a/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2.h +++ b/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2.h @@ -68,7 +68,6 @@ #include #include #include -#include #include #include #include @@ -87,8 +86,6 @@ private: typedef Vertex_visibility_graph_2 Self; typedef typename Traits::Point_2 Point_2; typedef typename Traits::Segment_2 Segment_2; - typedef typename Traits::Ray_2 Ray_2; - typedef typename Traits::Object_2 Object_2; typedef typename Traits::Left_turn_2 Left_turn_2; typedef typename Traits::Less_xy_2 Less_xy_2; typedef typename Traits::Orientation_2 Orientation_2; @@ -96,11 +93,6 @@ private: Collinear_are_ordered_along_line_2; typedef typename Traits::Are_strictly_ordered_along_line_2 Are_strictly_ordered_along_line_2; - // typedef typename Traits::Construct_segment_2 - // Construct_segment_2; - // typedef typename Traits::Construct_ray_2 Construct_ray_2; - // typedef typename Traits::Intersect_2 Intersect_2; - // typedef typename Traits::Assign_2 Assign_2; typedef CGAL::Segment_less_yx_2 Segment_less_yx_2; typedef Rotation_tree_2 Tree; @@ -140,10 +132,6 @@ public: are_strictly_ordered_along_line_2( traits.are_strictly_ordered_along_line_2_object()), less_xy_2(traits.less_xy_2_object()), - // construct_segment_2(traits.construct_segment_2_object()), - //construct_ray_2(traits.construct_ray_2_object()), - //intersect_2(traits.intersect_2_object()), - //assign_2(traits.assign_2_object()), edges(Point_pair_compare(traits)) { build(first, beyond, traits); @@ -421,10 +409,6 @@ private: Collinear_are_ordered_along_line_2 collinear_ordered_2; Are_strictly_ordered_along_line_2 are_strictly_ordered_along_line_2; Less_xy_2 less_xy_2; - // Construct_segment_2 construct_segment_2; - // Construct_ray_2 construct_ray_2; - //Intersect_2 intersect_2; - // Assign_2 assign_2; Edge_set edges; }; diff --git a/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h b/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h index fd38b55d1c1..19a14ca7bef 100644 --- a/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h +++ b/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h @@ -523,36 +523,6 @@ void Vertex_visibility_graph_2::update_visibility( // if it were closer to p than q when looking from p to q, q would // not be visible. - #if 0 - Segment_2 next_seg = construct_segment_2(*(*p_it).second.second, - *next_v_p); - Ray_2 ray = construct_ray_2((*p_it).first, (*q_it).first); - Segment_2 i_seg; - Point_2 i_point; - - Object_2 next_result = intersect_2(next_seg, ray); - - if (assign_2(i_point, next_result)) - { - if (collinear_ordered_2((*p_it).first, (*q_it).first, i_point)) - { - (*p_it).second.second = (*q_it).second.first; - } - } - else if (assign_2(i_seg, next_result)) - { - if (collinear_ordered_2((*p_it).first,(*q_it).first,i_seg.source()) && - collinear_ordered_2((*p_it).first,(*q_it).first,i_seg.target())) - { - (*p_it).second.second = (*q_it).second.first; - } - - } - else - { - (*p_it).second.second = (*q_it).second.first; - } -#else // Segment ab and Ray pq Point_2 a = *(*p_it).second.second; Point_2 b = *next_v_p; @@ -595,7 +565,6 @@ void Vertex_visibility_graph_2::update_visibility( if(change){ (*p_it).second.second = (*q_it).second.first; } -#endif } else // p sees what q sees { diff --git a/Partition_2/include/CGAL/Partition_traits_2.h b/Partition_2/include/CGAL/Partition_traits_2.h index aa576e26149..eae022b6fc6 100644 --- a/Partition_2/include/CGAL/Partition_traits_2.h +++ b/Partition_2/include/CGAL/Partition_traits_2.h @@ -45,7 +45,7 @@ class Partition_traits_2 : public Partition_traits_2_base typedef CGAL::Polygon_2 Polygon_2; typedef typename Kernel::Less_yx_2 Less_yx_2; typedef typename Kernel::Less_xy_2 Less_xy_2; - typedef typename Kernel::Left_turn_2 Left_turn_2; + typedef typename Kernel::Left_turn_2 Left_turn_2; typedef typename Kernel::Orientation_2 Orientation_2; typedef typename Kernel::Compare_y_2 Compare_y_2; typedef typename Kernel::Compare_x_2 Compare_x_2; @@ -59,14 +59,10 @@ class Partition_traits_2 : public Partition_traits_2_base typedef typename Kernel::Is_horizontal_2 Is_horizontal_2; // needed by visibility graph and thus by optimal convex - typedef typename Kernel::Ray_2 Ray_2; typedef typename Kernel::Collinear_are_ordered_along_line_2 Collinear_are_ordered_along_line_2; typedef typename Kernel::Are_strictly_ordered_along_line_2 Are_strictly_ordered_along_line_2; - typedef typename Kernel::Intersect_2 Intersect_2; - typedef typename Kernel::Assign_2 Assign_2; - typedef typename Kernel::Object_2 Object_2; // needed by approx_convex (for constrained triangulation) // and optimal convex (for vis. graph) @@ -112,13 +108,6 @@ class Partition_traits_2 : public Partition_traits_2_base is_y_monotone_2_object(const Self& traits) const { return Is_y_monotone_2(traits); } - Intersect_2 - intersect_2_object() const - { return Intersect_2(); } - - Assign_2 - assign_2_object() const - { return Assign_2(); } }; } diff --git a/Partition_2/include/CGAL/Partition_traits_adapter_2.h b/Partition_2/include/CGAL/Partition_traits_adapter_2.h index 2c1100d499a..1563b8b373c 100644 --- a/Partition_2/include/CGAL/Partition_traits_adapter_2.h +++ b/Partition_2/include/CGAL/Partition_traits_adapter_2.h @@ -139,13 +139,9 @@ public: typedef typename Kernel::Is_horizontal_2 Is_horizontal_2; // needed by visibility graph and thus by optimal convex - typedef typename Kernel::Ray_2 Ray_2; typedef Pmap_collinear_are_ordered_along_line_2 Collinear_are_ordered_along_line_2; typedef Pmap_fct Are_strictly_ordered_along_line_2; - typedef typename Kernel::Intersect_2 Intersect_2; - typedef typename Kernel::Assign_2 Assign_2; - typedef typename Kernel::Object_2 Object_2; // needed by approx_convex (for constrained triangulation) // and optimal convex (for vis. graph) @@ -154,7 +150,6 @@ public: // needed by optimal convex (for vis. graph) typedef Pmap_fct Construct_segment_2; - typedef Pmap_fct Construct_ray_2; Equal_2 equal_2_object() const @@ -198,10 +193,6 @@ public: construct_segment_2_object() const { return Construct_segment_2(); } - Construct_ray_2 - construct_ray_2_object() const - { return Construct_ray_2(); } - Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line_2_object() const { return Collinear_are_ordered_along_line_2(ppmap,static_cast(this)->collinear_are_ordered_along_line_2_object()); } @@ -224,13 +215,6 @@ public: { return Is_y_monotone_2(traits); } - Intersect_2 - intersect_2_object() const - { return Intersect_2(); } - - Assign_2 - assign_2_object() const - { return Assign_2(); } };