revert dirty commit 60628

This commit is contained in:
Sébastien Loriot 2011-01-07 10:37:54 +00:00
parent 99dda59784
commit ace9c87934
9 changed files with 6 additions and 130 deletions

View File

@ -41,27 +41,12 @@ namespace CartesianKernelFunctors {
class Angle_2
{
typedef typename K::Point_2 Point_2;
typedef typename K::Vector_2 Vector_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 <typename K>

View File

@ -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<Angle, FT>::type
angleC2(const FT &ux, const FT &uy,
const FT &vx, const FT &vy)
{
return enum_cast<Angle>(CGAL_NTS sign(ux*vx + uy*vy));
}
template < class FT >
inline
typename Same_uncertainty_nt<Angle, FT>::type
@ -439,17 +430,6 @@ angleC2(const FT &px, const FT &py,
return enum_cast<Angle>(CGAL_NTS sign((px-qx)*(rx-qx)+(py-qy)*(ry-qy)));
}
template < class FT >
inline
typename Same_uncertainty_nt<Angle, FT>::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<Angle>(CGAL_NTS sign((px-qx)*(rx-sx)+(py-qy)*(ry-sy)));
}
template < class FT >
CGAL_KERNEL_MEDIUM_INLINE
typename Equal_to<FT>::result_type

View File

@ -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<Angle>(CGAL_NTS sign(u * v)); }
{ return enum_cast<Angle>(CGAL_NTS sign(c(q,p) * c(q,r))); }
// FIXME: scalar product
};

View File

@ -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} \\

View File

@ -1,28 +1,13 @@
%\ccHtmlNoRefLinks
\begin{ccRefFunction}{angle}
\ccHtmlNoLinks
\ccFunction{Angle angle(const Vector_2<Kernel>&u,
const Vector_2<Kernel>&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<Kernel>& p,
const Point_2<Kernel>& q,
const Point_2<Kernel>& 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<Kernel>& p,
const Point_2<Kernel>& q,
const Point_2<Kernel>& r,
const Point_2<Kernel>& 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<Kernel>& p,

View File

@ -49,15 +49,6 @@ operator!=(const Point_2<K> &p, const Origin& o)
return p != Point_2<K>(o);
}
template < class K >
inline
Angle
angle(const Vector_2<K> &u,
const Vector_2<K> &v)
{
return internal::angle(u, v, K());
}
template < class K >
inline
Angle
@ -68,17 +59,6 @@ angle(const Point_2<K> &p,
return internal::angle(p, q, r, K());
}
template < class K >
inline
Angle
angle(const Point_2<K> &p,
const Point_2<K> &q,
const Point_2<K> &r,
const Point_2<K> &s)
{
return internal::angle(p, q, r, s, K());
}
template < class K >
inline
typename K::Boolean

View File

@ -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

View File

@ -32,23 +32,12 @@ _test_angle(const R&)
typedef CGAL::Point_2<R> Point_2;
typedef CGAL::Point_3<R> Point_3;
typedef CGAL::Vector_2<R> Vector_2;
typedef CGAL::Vector_3<R> 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);

View File

@ -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);