From 0ce9d35d32616b0e0bbc68f099b032ddd6e911e7 Mon Sep 17 00:00:00 2001 From: Pedro Machado Manhaes de Castro Date: Tue, 16 Sep 2008 12:45:08 +0000 Subject: [PATCH] Construct_supporting_plane => Construct_plane, Construct_diametral_sphere => Construct_sphere --- Kernel_23/include/CGAL/Circle_3.h | 14 +++---- .../include/CGAL/Kernel/function_objects.h | 37 +++++++++---------- .../include/CGAL/Kernel/interface_macros.h | 2 - 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/Kernel_23/include/CGAL/Circle_3.h b/Kernel_23/include/CGAL/Circle_3.h index 191ff6bb6bf..b79ab4ef371 100644 --- a/Kernel_23/include/CGAL/Circle_3.h +++ b/Kernel_23/include/CGAL/Circle_3.h @@ -102,29 +102,27 @@ public: : Rep(r) {} typename Qualified_result_of - ::type - //const Sphere_3 & + ::type diametral_sphere() const { - return typename R::Construct_diametral_sphere_3()(*this); + return typename R::Construct_sphere_3()(*this); } Point_3 center() const { - return typename R::Construct_diametral_sphere_3()(*this).center(); + return typename R::Construct_sphere_3()(*this).center(); } FT squared_radius() const { - return typename R::Construct_diametral_sphere_3()(*this).squared_radius(); + return typename R::Construct_sphere_3()(*this).squared_radius(); } typename Qualified_result_of - ::type - //const Plane_3 & + ::type supporting_plane() const { - return typename R::Construct_supporting_plane_3()(*this); + return typename R::Construct_plane_3()(*this); } Bbox_3 bbox() const diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 22d6795053c..a33b633e878 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -820,21 +820,6 @@ namespace CommonKernelFunctors { { return this->operator()(Return_base_tag(), p1, p2, p3); } }; - - template - class Construct_diametral_sphere_3 - { - typedef typename K::Sphere_3 Sphere_3; - typedef typename K::Circle_3 Circle_3; - - public: - typedef Sphere_3 result_type; - - Sphere_3 - operator() (const Circle_3 & c) const - { return c.rep().diametral_sphere(); } - }; - template class Construct_iso_cuboid_3 { @@ -1199,6 +1184,7 @@ namespace CommonKernelFunctors { typedef typename K::Ray_3 Ray_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Plane_3 Plane_3; + typedef typename K::Circle_3 Circle_3; typedef typename Plane_3::Rep Rep; public: typedef Plane_3 result_type; @@ -1231,6 +1217,9 @@ namespace CommonKernelFunctors { operator()(Return_base_tag, const Segment_3& s, const Point_3& p) const { return Rep(s, p); } + Rep // Plane_3 + operator()(Return_base_tag, const Circle_3 & c) const + { return c.rep().supporting_plane(); } Plane_3 operator()(const RT& a, const RT& b, const RT& c, const RT& d) const @@ -1259,6 +1248,11 @@ namespace CommonKernelFunctors { Plane_3 operator()(const Segment_3& s, const Point_3& p) const { return this->operator()(Return_base_tag(), s, p); } + + Plane_3 + operator()(const Circle_3 & c) const + { return this->operator()(Return_base_tag(), c); } + }; template @@ -1552,6 +1546,7 @@ namespace CommonKernelFunctors { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Sphere_3 Sphere_3; + typedef typename K::Circle_3 Circle_3; typedef typename Sphere_3::Rep Rep; public: typedef Sphere_3 result_type; @@ -1581,6 +1576,9 @@ namespace CommonKernelFunctors { Orientation orientation = COUNTERCLOCKWISE) const { return Rep(center, orientation); } + Rep + operator() (Return_base_tag, const Circle_3 & c) const + { return c.rep().diametral_sphere(); } Sphere_3 operator()( const Point_3& center, const FT& squared_radius, @@ -1606,6 +1604,11 @@ namespace CommonKernelFunctors { operator()( const Point_3& center, Orientation orientation = COUNTERCLOCKWISE) const { return this->operator()(Return_base_tag(), center, orientation); } + + Sphere_3 + operator() (const Circle_3 & c) const + { return this->operator()(Return_base_tag(), c); } + }; template @@ -1613,7 +1616,6 @@ namespace CommonKernelFunctors { { typedef typename K::Triangle_3 Triangle_3; typedef typename K::Plane_3 Plane_3; - typedef typename K::Circle_3 Circle_3; public: typedef Plane_3 result_type; @@ -1621,9 +1623,6 @@ namespace CommonKernelFunctors { operator()( const Triangle_3& t) const { return t.rep().supporting_plane(); } - Plane_3 - operator()(const Circle_3 & c) const - { return c.rep().supporting_plane(); } }; template diff --git a/Kernel_23/include/CGAL/Kernel/interface_macros.h b/Kernel_23/include/CGAL/Kernel/interface_macros.h index 1510c60cd9c..d4070633d98 100644 --- a/Kernel_23/include/CGAL/Kernel/interface_macros.h +++ b/Kernel_23/include/CGAL/Kernel/interface_macros.h @@ -275,8 +275,6 @@ CGAL_Kernel_cons(Construct_circumcenter_3, construct_circumcenter_3_object) CGAL_Kernel_cons(Construct_cross_product_vector_3, construct_cross_product_vector_3_object) -CGAL_Kernel_cons(Construct_diametral_sphere_3, - construct_diametral_sphere_3_object) CGAL_Kernel_cons(Construct_direction_2, construct_direction_2_object) CGAL_Kernel_cons(Construct_direction_3,