From b4afba2e6637cd6ebdfc7a9e091fcb8efd1cb6bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 16 Oct 2007 15:00:59 +0000 Subject: [PATCH] Add circular_arc_on_reference_sphere_3, but must remove Sphere_with_radius_3 from SK: --- .../CGAL/Circle_on_reference_sphere_3.h | 3 + .../CGAL/Circular_arc_on_reference_sphere_3.h | 32 ++++--- .../include/CGAL/Circular_kernel_3/Circle_3.h | 14 ++- .../Circle_on_reference_sphere_3.h | 2 + .../CGAL/Circular_kernel_3/Circular_arc_3.h | 4 +- .../Circular_kernel_3/Sphere_with_radius_3.h | 3 +- ...tion_objects_polynomial_reference_sphere.h | 92 ++++++++++++++++++- .../function_objects_polynomial_sphere.h | 38 ++++++-- .../CGAL/Circular_kernel_3/interface_macros.h | 1 + ...nternal_function_has_on_spherical_kernel.h | 39 ++++++++ .../include/CGAL/Simple_spherical_kernel_3.h | 2 +- .../include/CGAL/Sphere_with_radius_3.h | 4 + .../include/CGAL/Spherical_kernel_3.h | 16 ++-- 13 files changed, 212 insertions(+), 38 deletions(-) diff --git a/Circular_kernel_3/include/CGAL/Circle_on_reference_sphere_3.h b/Circular_kernel_3/include/CGAL/Circle_on_reference_sphere_3.h index 8efd3a7d7bb..b46af7bc54f 100644 --- a/Circular_kernel_3/include/CGAL/Circle_on_reference_sphere_3.h +++ b/Circular_kernel_3/include/CGAL/Circle_on_reference_sphere_3.h @@ -29,6 +29,9 @@ public: return *this; } + Circle_on_reference_sphere_3() + :RCircle_on_reference_sphere_3(){} + Circle_on_reference_sphere_3(const RCircle_on_reference_sphere_3& p) :RCircle_on_reference_sphere_3(p){} diff --git a/Circular_kernel_3/include/CGAL/Circular_arc_on_reference_sphere_3.h b/Circular_kernel_3/include/CGAL/Circular_arc_on_reference_sphere_3.h index a1aae332695..21c91179ebc 100644 --- a/Circular_kernel_3/include/CGAL/Circular_arc_on_reference_sphere_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_arc_on_reference_sphere_3.h @@ -1,12 +1,15 @@ #ifndef CGAL_CIRCULAR_ARC_ON_REFERENCE_SPHERE_3_H #define CGAL_CIRCULAR_ARC_ON_REFERENCE_SPHERE_3_H +//~ #include +//~ #include +//~ #include namespace CGAL { template class Circular_arc_on_reference_sphere_3 //~ : public SK::Kernel_base::Circular_arc_on_reference_sphere_3, public CGAL::Circular_arc_3 - : public SK::Kernel_base::Circular_arc_on_reference_sphere_3, public SK::Circular_arc_3 + : public SK::Kernel_base::Circular_arc_on_reference_sphere_3, public CGAL::Circular_arc_3 { typedef typename SK::RT RT; @@ -14,10 +17,10 @@ namespace CGAL { typedef typename SK::Line_3 Line_3; typedef typename SK::Point_3 Point_3; typedef typename SK::Plane_3 Plane_3; - typedef typename SK::Circle_3 Circle_3; - typedef typename SK::Sphere_3 Sphere_3; + typedef typename SK::Circle_on_reference_sphere_3 Circle_3; + typedef typename SK::Sphere_with_radius_3 Sphere_3; typedef typename SK::Segment_3 Segment_3; - typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; + typedef typename SK::Circular_arc_point_on_reference_sphere_3 Circular_arc_point_3; typedef typename SK::Kernel_base::Circular_arc_on_reference_sphere_3 RCircular_arc_on_reference_sphere_3; typedef typename CGAL::Circular_arc_3 Circular_arc_3; @@ -40,52 +43,51 @@ namespace CGAL { {} Circular_arc_on_reference_sphere_3() - : Circular_arc_3() + : RCircular_arc_on_reference_sphere_3(typename R::Construct_circular_arc_on_reference_sphere_3()()) {} Circular_arc_on_reference_sphere_3(const Circle_3& c, const Circular_arc_point_3& s, const Circular_arc_point_3& t) - : Circular_arc_3(c,s,t){} + : RCircular_arc_on_reference_sphere_3(typename R::Construct_circular_arc_on_reference_sphere_3()(c,s,t)){} Circular_arc_on_reference_sphere_3(const Circle_3& c, const Point_3& s, const Circular_arc_point_3& t) - :Circular_arc_3(c,s,t){} + :RCircular_arc_on_reference_sphere_3(typename R::Construct_circular_arc_on_reference_sphere_3()(c,s,t)){} Circular_arc_on_reference_sphere_3(const Circle_3& c, const Circular_arc_point_3& s, const Point_3& t) - : Circular_arc_3(c,s,t){} + : RCircular_arc_on_reference_sphere_3(typename R::Construct_circular_arc_on_reference_sphere_3()(c,s,t)){} Circular_arc_on_reference_sphere_3(const Circle_3& c, const Point_3& s, const Point_3& t) - : Circular_arc_3(c,s,t){} + : RCircular_arc_on_reference_sphere_3(typename R::Construct_circular_arc_on_reference_sphere_3()(c,s,t)){} Circular_arc_on_reference_sphere_3(const Circle_3& c) - : Circular_arc_3(c){} + : RCircular_arc_on_reference_sphere_3(typename R::Construct_circular_arc_on_reference_sphere_3()(c)){} Circular_arc_on_reference_sphere_3(const Circle_3 &c, const Sphere_3 &s1, bool less_xyz_s1, const Sphere_3 &s2, bool less_xyz_s2) - : Circular_arc_3(c,s1,less_xyz_s1,s2,less_xyz_s2){} + : RCircular_arc_on_reference_sphere_3(typename R::Construct_circular_arc_on_reference_sphere_3()(c,s1,less_xyz_s1,s2,less_xyz_s2)){} Circular_arc_on_reference_sphere_3(const Sphere_3 &s1, bool less_xyz_s1, const Sphere_3 &s2, bool less_xyz_s2, const Circle_3 &c) - : Circular_arc_3(s1,less_xyz_s1,s2,less_xyz_s2,c){} + : RCircular_arc_on_reference_sphere_3(typename R::Construct_circular_arc_on_reference_sphere_3()(s1,less_xyz_s1,s2,less_xyz_s2,c)){} Circular_arc_on_reference_sphere_3(const Circle_3 &c, const Plane_3 &p1, bool less_xyz_p1, const Plane_3 &p2, bool less_xyz_p2) - : Circular_arc_3(c,p1,less_xyz_p1,p2,less_xyz_p2){} + : RCircular_arc_on_reference_sphere_3(typename R::Construct_circular_arc_on_reference_sphere_3()(c,p1,less_xyz_p1,p2,less_xyz_p2)){} Circular_arc_on_reference_sphere_3(const Plane_3 &p1, bool less_xyz_p1, const Plane_3 &p2, bool less_xyz_p2, const Circle_3 &c) - : Circular_arc_3(p1,less_xyz_p1,p2,less_xyz_p2,c) - {} + : RCircular_arc_on_reference_sphere_3(typename R::Construct_circular_arc_on_reference_sphere_3()(p1,less_xyz_p1,p2,less_xyz_p2,c)){} typename Qualified_result_of ::type diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circle_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circle_3.h index 4d3306c7690..526120d0ae0 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circle_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circle_3.h @@ -56,6 +56,9 @@ namespace CGAL { Base base; public: + typedef Sphere_3 Diametral_sphere; + typedef Plane_3 Supporting_plane; + Circle_representation_3() {} Circle_representation_3(const Sphere_3& S1,const Sphere_3& S2):base(S1,S2){} @@ -101,7 +104,8 @@ namespace CGAL { } Sphere_3 diametral_sphere() const { - return Sphere_3(center(),squared_radius()); + //~ return Sphere_3(center(),squared_radius()); + return Sphere_3(CGAL::Sphere_3(center(),squared_radius())); } }; @@ -122,6 +126,8 @@ namespace CGAL { typedef typename SK::template Handle::type Base; Base base; public: + typedef const Sphere_3& Diametral_sphere; + typedef const Plane_3& Supporting_plane; Circle_representation_3() {} @@ -235,11 +241,13 @@ namespace CGAL { Circle_3(const Sphere_3 &s1, const Sphere_3 &s2):base(s1,s2){} - const Plane_3& supporting_plane() const { return base.supporting_plane(); } + //~ const Plane_3& supporting_plane() const { return base.supporting_plane(); } + typename Container::Supporting_plane supporting_plane() const { return base.supporting_plane(); } const Sphere_3& supporting_sphere() const { return base.supporting_sphere(); } Point_3 center() const { return base.center(); } FT squared_radius() const { return base.squared_radius(); } - const Sphere_3& diametral_sphere() const { return base.diametral_sphere(); } + //~ const Sphere_3& diametral_sphere() const { return base.diametral_sphere(); } + typename Container::Diametral_sphere diametral_sphere() const { return base.diametral_sphere(); } FT area_divided_by_pi() const { return squared_radius(); diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circle_on_reference_sphere_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circle_on_reference_sphere_3.h index a21d353dd80..e05d2c62c64 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circle_on_reference_sphere_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circle_on_reference_sphere_3.h @@ -25,6 +25,8 @@ namespace CGAL { public: + Circle_on_reference_sphere_3():Circle_3(){} + Circle_on_reference_sphere_3(const FT& _r,const Point_3& _c,const Sphere_3& ref):Circle_3(Sphere_3(_r,_c),ref){ _nature=CGAL::classify_one_circle(*this); #warning TRY WITH FLAG ONLY_SK_ALGEBRA diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h index dcb43bca6b5..de8a7771636 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h @@ -31,7 +31,6 @@ #include #include -#include namespace CGAL { @@ -52,7 +51,7 @@ namespace CGAL { private: const Sphere_3& get_ref_sphere(const typename SK::Circle_on_reference_sphere_3& C){return C.reference_sphere();} - Sphere_3 get_ref_sphere(const typename SK::Circle_3& C){return Sphere_3();} + Sphere_3 get_ref_sphere(const typename SK::Circle_3& C){CGAL_assertion(false);} typedef Triple Rep; @@ -72,7 +71,6 @@ namespace CGAL { public: const Sphere_3& reference_sphere(){ - #warning put a compiling warning so that no Circular_arc_3 instantiates this function return get_ref_sphere(get(base).first); }; diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Sphere_with_radius_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Sphere_with_radius_3.h index f5ec183d71f..a2b0a6da0a3 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Sphere_with_radius_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Sphere_with_radius_3.h @@ -19,7 +19,8 @@ namespace CGAL { typedef typename SK::Point_3 Point_3; Sphere_with_radius_3():Sphere_3(){}; Sphere_with_radius_3(const FT& _r,const Point_3& _c):Sphere_3(_c,_r*_r),hrad(_r){}; - const FT& radius() const {return CGAL::get(hrad);} + Sphere_with_radius_3(const Sphere_3& S):Sphere_3(S),hrad(-1){} + const FT& radius() const {CGAL_precondition(CGAL::get(hrad)!=-1); return CGAL::get(hrad);} }; } // namespace CGALi diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_reference_sphere.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_reference_sphere.h index 7a43e6c6350..a347e5e952d 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_reference_sphere.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_reference_sphere.h @@ -112,7 +112,7 @@ namespace SphericalFunctors { template class Compute_reference_sphere_3: Has_qrt{ typedef typename SK::Circle_on_reference_sphere_3 Circle_on_reference_sphere_3; - + typedef typename SK::Circular_arc_on_reference_sphere_3 Circular_arc_on_reference_sphere_3; public: typedef typename SK::Sphere_with_radius_3 result_type; @@ -217,6 +217,87 @@ namespace SphericalFunctors { //CONSTRUCTIONS + template < class SK > + class Construct_circular_arc_on_reference_sphere_3 + { + + typedef typename SK::Line_3 Line_3; + typedef typename SK::Point_3 Point_3; + typedef typename SK::Segment_3 Segment_3; + typedef typename SK::Sphere_3 Sphere_3; + typedef typename SK::Plane_3 Plane_3; + typedef typename SK::Line_arc_3 Line_arc_3; + typedef typename SK::Circular_arc_point_on_reference_sphere_3 Circular_arc_point_on_reference_sphere_3; + typedef typename SK::Circle_on_reference_sphere_3 Circle_on_reference_sphere_3; + typedef typename SK::Sphere_with_radius_3 Sphere_with_radius_3; + typedef typename SK::Circular_arc_on_reference_sphere_3 Circular_arc_on_reference_sphere_3; + typedef typename SK::Kernel_base::Circular_arc_on_reference_sphere_3 RCircular_arc_on_reference_sphere_3; + typedef typename Circular_arc_on_reference_sphere_3::Rep Rep; + + public: + typedef Circular_arc_on_reference_sphere_3 result_type; + typedef Arity_tag<3> Arity; // It is not true that each constructor has + // 3 operands, maybe we should remove this + + result_type + operator()(void) const + { return Rep(); } + + result_type + operator()(const Circle_on_reference_sphere_3 &c) const + { return Rep(c); } + + result_type + operator()(const Circle_on_reference_sphere_3 &l, + const Circular_arc_point_on_reference_sphere_3 &s, + const Circular_arc_point_on_reference_sphere_3 &t) const + { return Rep(l,s,t); } + + result_type + operator()(const Circle_on_reference_sphere_3 &l, + const Point_3 &s, + const Circular_arc_point_on_reference_sphere_3 &t) const + { return Rep(l,s,t); } + + result_type + operator()(const Circle_on_reference_sphere_3 &l, + const Circular_arc_point_on_reference_sphere_3 &s, + const Point_3 &t) const + { return Rep(l,s,t); } + + result_type + operator()(const Circle_on_reference_sphere_3 &l, + const Point_3 &s, + const Point_3 &t) const + { return Rep(l,s,t); } + + result_type + operator()(const Circle_on_reference_sphere_3 &c, + const Sphere_with_radius_3 &s1, bool less_xyz_s1, + const Sphere_with_radius_3 &s2, bool less_xyz_s2) const + { return Rep(c,s1,less_xyz_s1,s2,less_xyz_s2); } + + result_type + operator()(const Sphere_with_radius_3 &s1, bool less_xyz_s1, + const Sphere_with_radius_3 &s2, bool less_xyz_s2, + const Circle_on_reference_sphere_3 &c) const + { return Rep(c,s1,less_xyz_s1,s2,less_xyz_s2); } + + result_type + operator()(const Circle_on_reference_sphere_3 &c, + const Plane_3 &p1, bool less_xyz_p1, + const Plane_3 &p2, bool less_xyz_p2) const + { return Rep(c,p1,less_xyz_p1,p2,less_xyz_p2); } + + result_type + operator()(const Plane_3 &p1, bool less_xyz_p1, + const Plane_3 &p2, bool less_xyz_p2, + const Circle_on_reference_sphere_3 &c) const + { return Rep(c,p1,less_xyz_p1,p2,less_xyz_p2); } + }; + + + template < class SK > class Construct_circle_on_reference_sphere_3 { @@ -228,7 +309,10 @@ namespace SphericalFunctors { typedef Circle_on_reference_sphere_3 result_type; typedef Arity_tag<1> Arity; - + result_type + operator()() + { return Rep();} + result_type operator()(const typename SK::FT& _r,const typename SK::Point_3& _c,const typename SK::Sphere_with_radius_3& S) { return Rep(_r,_c,S);} @@ -257,6 +341,10 @@ namespace SphericalFunctors { result_type operator()(const typename SK::FT& _r,const typename SK::Point_3& _c) { return Rep(_r,_c);} + + result_type + operator()(const CGAL::Sphere_3& S) + { return Rep(S);} }; diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h index b1e5542fce9..12672773f97 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h @@ -588,17 +588,17 @@ template < class SK > \ { typedef typename SK::Line_3 Line_3; - typedef typename SK::Circle_3 Circle_3; typedef typename SK::Point_3 Point_3; typedef typename SK::Segment_3 Segment_3; typedef typename SK::Sphere_3 Sphere_3; typedef typename SK::Plane_3 Plane_3; - typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef typename SK::Line_arc_3 Line_arc_3; + + typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; + typedef typename SK::Circle_3 Circle_3; typedef typename SK::Circular_arc_3 Circular_arc_3; typedef typename SK::Kernel_base::Circular_arc_3 RCircular_arc_3; typedef typename Circular_arc_3::Rep Rep; - public: typedef Circular_arc_3 result_type; typedef Arity_tag<3> Arity; // It is not true that each constructor has @@ -659,7 +659,7 @@ template < class SK > \ const Plane_3 &p2, bool less_xyz_p2, const Circle_3 &c) const { return Rep(c,p1,less_xyz_p1,p2,less_xyz_p2); } - + }; template @@ -786,6 +786,7 @@ template < class SK > \ typedef typename SK::Circular_arc_point_on_reference_sphere_3 Circular_arc_point_on_reference_sphere_3; typedef typename SK::Circular_arc_3 Circular_arc_3; typedef typename SK::Circle_3 Circle_3; + typedef typename SK::Circle_on_reference_sphere_3 Circle_on_reference_sphere_3; public: @@ -800,14 +801,22 @@ template < class SK > \ operator()(const Sphere_3 &a, const Point_3 &p) const { return has_on(a, p); } + result_type + operator()(const Sphere_with_radius_3 &a, const Point_3 &p) const + { return has_on(static_cast(a), p); } + result_type operator()(const Point_3 &p, const Sphere_3 &a) const { return false; } - + + result_type + operator()(const Point_3 &p, const Sphere_with_radius_3 &a) const + { return false; } + result_type operator()(const Sphere_3 &a, const Circular_arc_point_3 &p) const { return has_on(a, p); } - + result_type operator()(const Sphere_with_radius_3 &a, const Circular_arc_point_on_reference_sphere_3 &p) const { return (*this)(static_cast(a),static_cast(p)); } @@ -815,6 +824,11 @@ template < class SK > \ result_type operator()(const Circular_arc_point_3 &p, const Sphere_3 &a) const { return false; } + + result_type + operator()(const Circular_arc_point_3 &p, const Sphere_with_radius_3 &a) const + { return false; } + result_type operator()(const Plane_3 &a, const Point_3 &p) const @@ -851,6 +865,10 @@ template < class SK > \ result_type operator()(const Circle_3 &a, const Point_3 &p) const { return has_on(a, p); } + + result_type + operator()(const Circle_on_reference_sphere_3 &a, const Point_3 &p) const + { return has_on(a, p); } result_type operator()(const Point_3 &p, const Circle_3 &a) const @@ -859,6 +877,10 @@ template < class SK > \ result_type operator()(const Circle_3 &a, const Circular_arc_point_3 &p) const { return has_on(a, p); } + + result_type + operator()(const Circle_on_reference_sphere_3& a, const Circular_arc_point_on_reference_sphere_3 &p) const + { return has_on(a, p); } result_type operator()(const Circular_arc_point_3 &p, const Circle_3 &a) const @@ -868,6 +890,10 @@ template < class SK > \ operator()(const Sphere_3 &a, const Circle_3 &p) const { return has_on(a, p); } + result_type + operator()(const Sphere_with_radius_3 &a, const Circle_3 &p) const + { return has_on(static_cast(a), p); } + result_type operator()(const Circle_3 &p, const Sphere_3 &a) const { return false; } diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/interface_macros.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/interface_macros.h index 94e1f6888d0..ed54baa1c8c 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/interface_macros.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/interface_macros.h @@ -53,6 +53,7 @@ CGAL_Spherical_Kernel_cons(Construct_theta_rep, construct_theta_rep_object) CGAL_Spherical_Kernel_cons(Construct_circular_arc_point_on_reference_sphere_3, construct_circular_arc_point_on_reference_sphere_3_object) CGAL_Spherical_Kernel_cons(Construct_circle_on_reference_sphere_3,construct_circle_on_reference_sphere_3_object) + CGAL_Spherical_Kernel_cons(Construct_circular_arc_on_reference_sphere_3,construct_circular_arc_on_reference_sphere_3) CGAL_Spherical_Kernel_cons(Get_equation, get_equation_object) CGAL_Spherical_Kernel_cons(Construct_circular_arc_point_3, construct_circular_arc_point_3_object) diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h index 075c8340b4b..ae565166ddd 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h @@ -40,6 +40,16 @@ namespace CGAL { return a.has_on_boundary(p); } + template + inline + bool + has_on(const typename SK::Sphere_with_radius_3 &a, + const typename SK::Point_3 &p) + { + //~ return a.rep().has_on_boundary(p); + return a.has_on_boundary(p); + } + template inline bool @@ -51,6 +61,14 @@ namespace CGAL { Equation equation = get_equation(a); return (Algebraic_kernel().sign_at_object()(equation,p.rep().coordinates()) == ZERO); } + + template + inline + bool + has_on(const typename SK::Sphere_with_radius_3 &a, + const typename SK::Circular_arc_point_on_reference_sphere_3 &p){ + return has_on(static_cast(a),static_cast(p)); + } /* template inline @@ -116,6 +134,27 @@ namespace CGAL { has_on(a.supporting_plane(),p); } + //duplicated code + template + inline + bool + has_on(const typename SK::Circle_on_reference_sphere_3 &a, + const typename SK::Point_3 &p) + { + return has_on(a.diametral_sphere(),p) && + has_on(a.supporting_plane(),p); + } + + template + inline + bool + has_on(const typename SK::Circle_on_reference_sphere_3 &a, + const typename SK::Circular_arc_point_on_reference_sphere_3 &p) + { + return has_on(a.diametral_sphere(),p) && + has_on(a.supporting_plane(),p); + } + template inline bool diff --git a/Circular_kernel_3/include/CGAL/Simple_spherical_kernel_3.h b/Circular_kernel_3/include/CGAL/Simple_spherical_kernel_3.h index bf60109a060..e864c5eea23 100644 --- a/Circular_kernel_3/include/CGAL/Simple_spherical_kernel_3.h +++ b/Circular_kernel_3/include/CGAL/Simple_spherical_kernel_3.h @@ -73,7 +73,7 @@ namespace CGAL { typedef CGALi::Sphere_with_radius_3 Sphere_with_radius_3; typedef CGALi::Circular_arc_3 Circular_arc_3; typedef CGALi::Circle_on_reference_sphere_3 Circle_on_reference_sphere_3; - typedef CGALi::Circular_arc_3 Circular_arc_on_reference_sphere_3; + typedef CGALi::Circular_arc_3 Circular_arc_on_reference_sphere_3; // The mecanism that allows to specify reference-counting or not. template < typename T > diff --git a/Circular_kernel_3/include/CGAL/Sphere_with_radius_3.h b/Circular_kernel_3/include/CGAL/Sphere_with_radius_3.h index 5978d5941c5..0e129d61ddf 100644 --- a/Circular_kernel_3/include/CGAL/Sphere_with_radius_3.h +++ b/Circular_kernel_3/include/CGAL/Sphere_with_radius_3.h @@ -34,6 +34,10 @@ namespace CGAL { Sphere_with_radius_3(const FT& _r,const Point_3& _c) : RSphere_with_radius_3(typename R::Construct_sphere_with_radius_3()(_r,_c)) {} + + Sphere_with_radius_3(const CGAL::Sphere_3& S) + : RSphere_with_radius_3(typename R::Construct_sphere_with_radius_3()(S)) + {} typename Qualified_result_of ::type diff --git a/Circular_kernel_3/include/CGAL/Spherical_kernel_3.h b/Circular_kernel_3/include/CGAL/Spherical_kernel_3.h index ee59058ef47..df1069c0efa 100644 --- a/Circular_kernel_3/include/CGAL/Spherical_kernel_3.h +++ b/Circular_kernel_3/include/CGAL/Spherical_kernel_3.h @@ -35,23 +35,23 @@ #include #include -#include - -#include -#include - #include #include #include #include +#include +#include + #include #include #include #include +#include + #include #include @@ -75,10 +75,12 @@ namespace CGAL { typedef CGALi::Line_arc_3 Line_arc_3; typedef CGALi::Circular_arc_3 Circular_arc_3; typedef CGALi::Circular_arc_point_on_reference_sphere_3 Circular_arc_point_on_reference_sphere_3; - typedef CGALi::Circular_arc_3 Circular_arc_on_reference_sphere_3; + typedef CGALi::Circle_on_reference_sphere_3 Circle_on_reference_sphere_3; + //~ typedef CGALi::Circular_arc_3 Circular_arc_on_reference_sphere_3; + typedef CGALi::Circular_arc_3,CGAL::Circular_arc_point_on_reference_sphere_3 > Circular_arc_on_reference_sphere_3; typedef CGALi::Theta_rep Theta_rep; typedef CGALi::Sphere_with_radius_3 Sphere_with_radius_3; - typedef CGALi::Circle_on_reference_sphere_3 Circle_on_reference_sphere_3; + // The mecanism that allows to specify reference-counting or not. template < typename T >