From 4527058121cd576356d9f8155d0cebdea6b8bcf4 Mon Sep 17 00:00:00 2001 From: Pedro Machado Manhaes de Castro Date: Thu, 26 Jun 2008 14:26:49 +0000 Subject: [PATCH] Fixing Lazy for Circle_3 --- Kernel_23/include/CGAL/Circle_3.h | 3 +++ Kernel_23/include/CGAL/Kernel/function_objects.h | 13 +++++++++++++ Kernel_23/test/Kernel_23/Cartesian.cpp | 2 +- Kernel_23/test/Kernel_23/Lazy_kernel.cpp | 2 ++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Kernel_23/include/CGAL/Circle_3.h b/Kernel_23/include/CGAL/Circle_3.h index dd3b43f1401..97128fa3046 100644 --- a/Kernel_23/include/CGAL/Circle_3.h +++ b/Kernel_23/include/CGAL/Circle_3.h @@ -78,6 +78,9 @@ public: Circle_3() {} + Circle_3(const Sphere_3& s, const Plane_3& p, int a) + : Rep(typename R::Construct_circle_3()(s,p,a)) {} + Circle_3(const Point_3& c, const FT& sr, const Plane_3& p) : Rep(typename R::Construct_circle_3()(c,sr,p)) {} diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 4684fadfbc4..e669d50c9ca 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -805,6 +805,11 @@ namespace CommonKernelFunctors { const Sphere_3& s) const { return Rep(p, s); } + Rep + operator() (Return_base_tag, const Plane_3& p, + const Sphere_3& s, int a) const + { return Rep(p, s, a); } + Circle_3 operator()(const Point_3& p, const FT& sr, const Plane_3& plane) const @@ -831,6 +836,14 @@ namespace CommonKernelFunctors { Circle_3 operator() (const Sphere_3& s, const Plane_3& p) const { return this->operator()(Return_base_tag(), p, s); } + + Circle_3 + operator() (const Plane_3& p, const Sphere_3& s, int a) const + { return this->operator()(Return_base_tag(), p, s, a); } + + Circle_3 + operator() (const Sphere_3& s, const Plane_3& p, int a) const + { return this->operator()(Return_base_tag(), p, s, a); } }; diff --git a/Kernel_23/test/Kernel_23/Cartesian.cpp b/Kernel_23/test/Kernel_23/Cartesian.cpp index aee54fb0be2..1d444d04aa4 100644 --- a/Kernel_23/test/Kernel_23/Cartesian.cpp +++ b/Kernel_23/test/Kernel_23/Cartesian.cpp @@ -59,7 +59,7 @@ main() std::cout << "Testing 3d with Cartesian> :"; std::cout << std::endl; _test_3( Cls() ); - _test_cls_circle_3( Cls() ); // Only for Cartesian + _test_cls_circle_3( Cls() ); std::cout << "Testing new 2d with Cartesian> :"; std::cout << std::endl; diff --git a/Kernel_23/test/Kernel_23/Lazy_kernel.cpp b/Kernel_23/test/Kernel_23/Lazy_kernel.cpp index 452c04e54cf..6c597ea2183 100644 --- a/Kernel_23/test/Kernel_23/Lazy_kernel.cpp +++ b/Kernel_23/test/Kernel_23/Lazy_kernel.cpp @@ -40,6 +40,7 @@ #include "CGAL/_test_fct_coplanar_3.h" #include "CGAL/_test_cls_iso_cuboid_3.h" #include "CGAL/_test_angle.h" +#include "CGAL/_test_cls_circle_3.h" #include "CGAL/_test_mf_plane_3_to_2d.h" @@ -59,6 +60,7 @@ main() std::cout << "Testing 3d with Lazy_kernel>> :"; std::cout << std::endl; _test_3( Cls() ); + _test_cls_circle_3( Cls() ); std::cout << "Testing new 2d with Lazy_kernel>> :"; std::cout << std::endl;