From ace9c8793475c6a6bb3d1961a552eb5f0639447c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 7 Jan 2011 10:37:54 +0000 Subject: [PATCH] revert dirty commit 60628 --- .../include/CGAL/Cartesian/function_objects.h | 17 +--------------- .../include/CGAL/predicates/kernel_ftC2.h | 20 ------------------- .../CGAL/Homogeneous/function_objects.h | 13 +----------- .../doc_tex/Kernel_23_ref/Kernel_Angle_2.tex | 16 +++------------ Kernel_23/doc_tex/Kernel_23_ref/angle.tex | 17 +--------------- .../include/CGAL/Kernel/global_functions_2.h | 20 ------------------- .../CGAL/Kernel/global_functions_internal_2.h | 20 ------------------- .../test/Kernel_23/include/CGAL/_test_angle.h | 11 ---------- .../test/Kernel_23/include/CGAL/_test_new_2.h | 2 -- 9 files changed, 6 insertions(+), 130 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index ae5ba565f61..f4ec5137e55 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -40,28 +40,13 @@ namespace CartesianKernelFunctors { template class Angle_2 { - typedef typename K::Point_2 Point_2; - typedef typename K::Vector_2 Vector_2; + typedef typename K::Point_2 Point_2; public: typedef typename K::Angle result_type; - result_type - operator()(const Vector_2& u, const Vector_2& v) const - { return angleC2(u.x(), u.y(), v.x(), v.y()); } - result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return angleC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } - - result_type - operator()(const Point_2& p, const Point_2& q, - const Point_2& r, const Point_2& s) const - { - return angleC2(p.x(), p.y(), - q.x(), q.y(), - r.x(), r.y(), - s.x(), s.y()); - } }; template diff --git a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h index 67ef5102bdd..b818a745c92 100644 --- a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h +++ b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h @@ -420,15 +420,6 @@ orientationC2(const FT &ux, const FT &uy, const FT &vx, const FT &vy) return sign_of_determinant(ux, uy, vx, vy); } -template < class FT > -inline -typename Same_uncertainty_nt::type -angleC2(const FT &ux, const FT &uy, - const FT &vx, const FT &vy) -{ - return enum_cast(CGAL_NTS sign(ux*vx + uy*vy)); -} - template < class FT > inline typename Same_uncertainty_nt::type @@ -439,17 +430,6 @@ angleC2(const FT &px, const FT &py, return enum_cast(CGAL_NTS sign((px-qx)*(rx-qx)+(py-qy)*(ry-qy))); } -template < class FT > -inline -typename Same_uncertainty_nt::type -angleC2(const FT &px, const FT &py, - const FT &qx, const FT &qy, - const FT &rx, const FT &ry, - const FT &sx, const FT &sy) -{ - return enum_cast(CGAL_NTS sign((px-qx)*(rx-sx)+(py-qy)*(ry-sy))); -} - template < class FT > CGAL_KERNEL_MEDIUM_INLINE typename Equal_to::result_type diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index 8eb1217af51..89ccb4a9931 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -56,7 +56,6 @@ namespace HomogeneousKernelFunctors { class Angle_2 { typedef typename K::Point_2 Point_2; - typedef typename K::Vector_2 Vector_2; typedef typename K::Construct_vector_2 Construct_vector_2; Construct_vector_2 c; public: @@ -67,17 +66,7 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const - { return operator()(c(q,p), c(q,r)); } - - result_type - operator()(const Point_2& p, const Point_2& q, - const Point_2& r, const Point_2& s) const - { return operator()(c(q,p), c(s,r)); } - - result_type - operator()(const Vector_2& u, const Vector_2& v) const - { return enum_cast(CGAL_NTS sign(u * v)); } - + { return enum_cast(CGAL_NTS sign(c(q,p) * c(q,r))); } // FIXME: scalar product }; diff --git a/Kernel_23/doc_tex/Kernel_23_ref/Kernel_Angle_2.tex b/Kernel_23/doc_tex/Kernel_23_ref/Kernel_Angle_2.tex index 98c7186c446..5fcf48603fa 100644 --- a/Kernel_23/doc_tex/Kernel_23_ref/Kernel_Angle_2.tex +++ b/Kernel_23/doc_tex/Kernel_23_ref/Kernel_Angle_2.tex @@ -5,25 +5,15 @@ A model for this must provide: \ccCreationVariable{fo} -\ccMemberFunction{Angle operator()(const Kernel::Vector_2&u, - const Kernel::Vector_2&v);} -{returns \ccStyle{OBTUSE}, \ccStyle{RIGHT} or \ccStyle{ACUTE} depending -on the angle formed by the two vectors $u$ and $v$.} - \ccMemberFunction{Angle operator()(const Kernel::Point_2&p, const Kernel::Point_2&q, const Kernel::Point_2&r);} {returns \ccStyle{OBTUSE}, \ccStyle{RIGHT} or \ccStyle{ACUTE} depending on the angle formed by the three points $p$, $q$, $r$ ($q$ being the vertex of -the angle). The returned value is the same as \ccc{operator()(p - q, r - q)}.} +the angle).} -\ccMemberFunction{Angle operator()(const Kernel::Point_2&p, - const Kernel::Point_2&q, - const Kernel::Point_2&r, - const Kernel::Point_2&s);} -{returns \ccStyle{OBTUSE}, \ccStyle{RIGHT} or \ccStyle{ACUTE} depending -on the angle formed by the two vectors $pq$, $rs$. The returned value is -the same as \ccc{operator()(q - p, s - r)}.} +\ccRefines +\ccc{AdaptableFunctor} (with three arguments) \ccSeeAlso \ccRefIdfierPage{CGAL::angle} \\ diff --git a/Kernel_23/doc_tex/Kernel_23_ref/angle.tex b/Kernel_23/doc_tex/Kernel_23_ref/angle.tex index dbc6dd75016..6ce1538344a 100644 --- a/Kernel_23/doc_tex/Kernel_23_ref/angle.tex +++ b/Kernel_23/doc_tex/Kernel_23_ref/angle.tex @@ -1,28 +1,13 @@ %\ccHtmlNoRefLinks \begin{ccRefFunction}{angle} -\ccHtmlNoLinks -\ccFunction{Angle angle(const Vector_2&u, - const Vector_2&v);} -{returns \ccStyle{OBTUSE}, \ccStyle{RIGHT} or \ccStyle{ACUTE} depending -on the angle formed by the two vectors $u$ and $v$.} - \ccHtmlNoLinks \ccFunction{Angle angle(const Point_2& p, const Point_2& q, const Point_2& r);} {returns \ccStyle{OBTUSE}, \ccStyle{RIGHT} or \ccStyle{ACUTE} depending on the angle formed by the three points $p$, $q$, $r$ ($q$ being the vertex of -the angle). The returned value is the same as \ccc{angle(p - q, r - q)}.} - -\ccHtmlNoLinks -\ccFunction{Angle angle(const Point_2& p, - const Point_2& q, - const Point_2& r, - const Point_2& s);} -{returns \ccStyle{OBTUSE}, \ccStyle{RIGHT} or \ccStyle{ACUTE} depending -on the angle formed by the two vectors $pq$, $rs$. The returned value is -the same as \ccc{angle(q - p, s - r)}.} +the angle).} \ccHtmlNoLinks \ccFunction{Angle angle(const Point_3& p, diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_2.h b/Kernel_23/include/CGAL/Kernel/global_functions_2.h index b96a25e3010..c26beb4f5fc 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_2.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_2.h @@ -49,15 +49,6 @@ operator!=(const Point_2 &p, const Origin& o) return p != Point_2(o); } -template < class K > -inline -Angle -angle(const Vector_2 &u, - const Vector_2 &v) -{ - return internal::angle(u, v, K()); -} - template < class K > inline Angle @@ -68,17 +59,6 @@ angle(const Point_2 &p, return internal::angle(p, q, r, K()); } -template < class K > -inline -Angle -angle(const Point_2 &p, - const Point_2 &q, - const Point_2 &r, - const Point_2 &s) -{ - return internal::angle(p, q, r, s, K()); -} - template < class K > inline typename K::Boolean diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h b/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h index 913abd1b4eb..53eefb23e45 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h @@ -40,15 +40,6 @@ namespace CGAL { namespace internal { -template < class K > -inline -typename K::Angle -angle(const typename K::Vector_2 &u, - const typename K::Vector_2 &v, const K& k) -{ - return k.angle_2_object()(u, v); -} - template < class K > inline typename K::Angle @@ -59,17 +50,6 @@ angle(const typename K::Point_2 &p, return k.angle_2_object()(p, q, r); } -template < class K > -inline -typename K::Angle -angle(const typename K::Point_2 &p, - const typename K::Point_2 &q, - const typename K::Point_2 &r, - const typename K::Point_2 &s, const K& k) -{ - return k.angle_2_object()(p, q, r, s); -} - template < class K > inline typename K::Boolean diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_angle.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_angle.h index cbe53f8f78a..2d78befcddb 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_angle.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_angle.h @@ -32,23 +32,12 @@ _test_angle(const R&) typedef CGAL::Point_2 Point_2; typedef CGAL::Point_3 Point_3; - typedef CGAL::Vector_2 Vector_2; - typedef CGAL::Vector_3 Vector_3; - Point_2 p(RT(2),RT(1)); Point_2 q(RT(5),RT(4)); Point_2 r(RT(5),RT(10)); - Point_2 s(RT0, RT0); - - Vector_2 qp = p - q; - Vector_2 qr = r - q; assert( CGAL::angle( p, q, r ) == CGAL::OBTUSE ); - assert( CGAL::angle( qp , qr ) == CGAL::OBTUSE ); - assert( CGAL::angle( q, p, q, r ) == CGAL::OBTUSE ); assert( CGAL::angle( r, p, q ) == CGAL::ACUTE ); - assert( CGAL::angle( p, s, q , r) == CGAL::OBTUSE ); - assert( CGAL::angle( p, r, s , q) == CGAL::ACUTE ); Point_2 e0( RT1, RT0); Point_2 e1( RT0, RT1); diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h index 6110c53e416..a189ef0d0e4 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h @@ -611,8 +611,6 @@ test_new_2(const R& rep) typename R::Angle_2 angle = rep.angle_2_object(); Angle tmp58 = angle(p2,p3,p4); - tmp58 = angle(p1, p2, p3, p4); - tmp58 = angle(v2, v3); use(v1); use(v4); use(r1); use(d4); use(d5);