Allow propagation of Uncertain-ty in more places, to reduce the number of exceptions.

- Use K::Bool_type, K::Orientation... instead of bool, CGAL::Orientation...
- More functions around Uncertain<> : make_certain(), extract_singleton(),
                                      possible conversions tightenning.

Many conversions still remain, e.g. for switch and if statements, &&, ||...
This commit is contained in:
Sylvain Pion 2008-07-16 13:45:13 +00:00
parent a30e08123b
commit 173ef7c590
31 changed files with 610 additions and 515 deletions

View File

@ -36,6 +36,7 @@ class CircleC2
typedef typename R_::RT RT;
typedef typename R_::Circle_2 Circle_2;
typedef typename R_::Point_2 Point_2;
typedef typename R_::Orientation Orientation;
typedef Triple<Point_2, FT, Orientation> Rep;
typedef typename R_::template Handle<Rep>::type Base;

View File

@ -66,8 +66,8 @@ public:
DirectionC3(const FT &x, const FT &y, const FT &z)
: base(CGALi::make_array(x, y, z)) {}
bool operator==(const DirectionC3 &d) const;
bool operator!=(const DirectionC3 &d) const;
typename R::Bool_type operator==(const DirectionC3 &d) const;
typename R::Bool_type operator!=(const DirectionC3 &d) const;
Vector_3 to_vector() const;
Vector_3 vector() const { return to_vector(); }
@ -105,7 +105,7 @@ public:
template < class R >
inline
bool
typename R::Bool_type
DirectionC3<R>::operator==(const DirectionC3<R> &d) const
{
if (CGAL::identical(base, d.base))
@ -115,7 +115,7 @@ DirectionC3<R>::operator==(const DirectionC3<R> &d) const
template < class R >
inline
bool
typename R::Bool_type
DirectionC3<R>::operator!=(const DirectionC3<R> &d) const
{
return !(*this == d);

View File

@ -105,8 +105,8 @@ public:
Construct_point_3()(max_hx/hw, max_hy/hw, max_hz/hw));
}
bool operator==(const Iso_cuboidC3& s) const;
bool operator!=(const Iso_cuboidC3& s) const;
typename R::Bool_type operator==(const Iso_cuboidC3& s) const;
typename R::Bool_type operator!=(const Iso_cuboidC3& s) const;
const Point_3 & min BOOST_PREVENT_MACRO_SUBSTITUTION () const
{
@ -125,11 +125,11 @@ public:
}
Bounded_side bounded_side(const Point_3& p) const;
bool has_on(const Point_3& p) const;
bool has_on_boundary(const Point_3& p) const;
bool has_on_bounded_side(const Point_3& p) const;
bool has_on_unbounded_side(const Point_3& p) const;
bool is_degenerate() const;
typename R::Bool_type has_on(const Point_3& p) const;
typename R::Bool_type has_on_boundary(const Point_3& p) const;
typename R::Bool_type has_on_bounded_side(const Point_3& p) const;
typename R::Bool_type has_on_unbounded_side(const Point_3& p) const;
typename R::Bool_type is_degenerate() const;
const FT & xmin() const;
const FT & ymin() const;
const FT & zmin() const;
@ -144,7 +144,7 @@ public:
template < class R >
CGAL_KERNEL_INLINE
bool
typename R::Bool_type
Iso_cuboidC3<R>::operator==(const Iso_cuboidC3<R>& r) const
{ // FIXME : predicate
if (CGAL::identical(base, r.base))
@ -154,7 +154,7 @@ Iso_cuboidC3<R>::operator==(const Iso_cuboidC3<R>& r) const
template < class R >
inline
bool
typename R::Bool_type
Iso_cuboidC3<R>::operator!=(const Iso_cuboidC3<R>& r) const
{
return !(*this == r);
@ -287,7 +287,7 @@ bounded_side(const typename Iso_cuboidC3<R>::Point_3& p) const
template < class R >
inline
bool
typename R::Bool_type
Iso_cuboidC3<R>::
has_on_boundary(const typename Iso_cuboidC3<R>::Point_3& p) const
{
@ -296,7 +296,7 @@ has_on_boundary(const typename Iso_cuboidC3<R>::Point_3& p) const
template < class R >
inline
bool
typename R::Bool_type
Iso_cuboidC3<R>::
has_on(const typename Iso_cuboidC3<R>::Point_3& p) const
{
@ -305,7 +305,7 @@ has_on(const typename Iso_cuboidC3<R>::Point_3& p) const
template < class R >
inline
bool
typename R::Bool_type
Iso_cuboidC3<R>::
has_on_bounded_side(const typename Iso_cuboidC3<R>::Point_3& p) const
{
@ -314,7 +314,7 @@ has_on_bounded_side(const typename Iso_cuboidC3<R>::Point_3& p) const
template < class R >
CGAL_KERNEL_INLINE
bool
typename R::Bool_type
Iso_cuboidC3<R>::
has_on_unbounded_side(const typename Iso_cuboidC3<R>::Point_3& p)
const
@ -324,7 +324,7 @@ has_on_unbounded_side(const typename Iso_cuboidC3<R>::Point_3& p)
template < class R >
CGAL_KERNEL_INLINE
bool
typename R::Bool_type
Iso_cuboidC3<R>::is_degenerate() const
{ // FIXME : predicate
return (this->min)().hx() == (this->max)().hx()

View File

@ -55,8 +55,8 @@ public:
LineC2(const FT &a, const FT &b, const FT &c)
: base(CGALi::make_array(a, b, c)) {}
bool operator==(const LineC2 &l) const;
bool operator!=(const LineC2 &l) const;
typename R_::Bool_type operator==(const LineC2 &l) const;
typename R_::Bool_type operator!=(const LineC2 &l) const;
const FT & a() const
{
@ -75,7 +75,7 @@ public:
template < class R >
CGAL_KERNEL_INLINE
bool
typename R::Bool_type
LineC2<R>::operator==(const LineC2<R> &l) const
{
if (CGAL::identical(base, l.base))
@ -85,7 +85,7 @@ LineC2<R>::operator==(const LineC2<R> &l) const
template < class R >
inline
bool
typename R::Bool_type
LineC2<R>::operator!=(const LineC2<R> &l) const
{
return ! (*this == l);

View File

@ -79,8 +79,8 @@ public:
PlaneC3(const Ray_3 &r, const Point_3 &p)
{ *this = plane_from_points(r.start(), r.second_point(), p); }
bool operator==(const PlaneC3 &p) const;
bool operator!=(const PlaneC3 &p) const;
typename R::Bool_type operator==(const PlaneC3 &p) const;
typename R::Bool_type operator!=(const PlaneC3 &p) const;
const FT & a() const
{
@ -114,19 +114,19 @@ public:
Point_2 to_2d(const Point_3 &p) const;
Point_3 to_3d(const Point_2 &p) const;
Oriented_side oriented_side(const Point_3 &p) const;
bool has_on_positive_side(const Point_3 &l) const;
bool has_on_negative_side(const Point_3 &l) const;
bool has_on(const Point_3 &p) const
typename R::Oriented_side oriented_side(const Point_3 &p) const;
typename R::Bool_type has_on_positive_side(const Point_3 &l) const;
typename R::Bool_type has_on_negative_side(const Point_3 &l) const;
typename R::Bool_type has_on(const Point_3 &p) const
{
return oriented_side(p) == ON_ORIENTED_BOUNDARY;
}
bool has_on(const Line_3 &l) const
typename R::Bool_type has_on(const Line_3 &l) const
{
return has_on(l.point())
&& has_on(l.point() + l.direction().to_vector());
}
bool has_on(const Circle_3 &circle) const
typename R::Bool_type has_on(const Circle_3 &circle) const
{
if(circle.squared_radius() != FT(0)) {
const Plane_3& p = circle.supporting_plane();
@ -145,12 +145,12 @@ public:
} else return has_on(circle.center());
}
bool is_degenerate() const;
typename R::Bool_type is_degenerate() const;
};
template < class R >
CGAL_KERNEL_INLINE
bool
typename R::Bool_type
PlaneC3<R>::operator==(const PlaneC3<R> &p) const
{
if (CGAL::identical(base, p.base))
@ -160,7 +160,7 @@ PlaneC3<R>::operator==(const PlaneC3<R> &p) const
template < class R >
inline
bool
typename R::Bool_type
PlaneC3<R>::operator!=(const PlaneC3<R> &p) const
{
return !(*this == p);
@ -268,7 +268,7 @@ PlaneC3<R>::opposite() const
template < class R >
inline
Oriented_side
typename R::Oriented_side
PlaneC3<R>::
oriented_side(const typename PlaneC3<R>::Point_3 &p) const
{
@ -277,7 +277,7 @@ oriented_side(const typename PlaneC3<R>::Point_3 &p) const
template < class R >
inline
bool
typename R::Bool_type
PlaneC3<R>::
has_on_positive_side(const typename PlaneC3<R>::Point_3 &p) const
{
@ -286,7 +286,7 @@ has_on_positive_side(const typename PlaneC3<R>::Point_3 &p) const
template < class R >
inline
bool
typename R::Bool_type
PlaneC3<R>::
has_on_negative_side(const typename PlaneC3<R>::Point_3 &p) const
{
@ -295,7 +295,7 @@ has_on_negative_side(const typename PlaneC3<R>::Point_3 &p) const
template < class R >
inline
bool
typename R::Bool_type
PlaneC3<R>::
is_degenerate() const
{ // FIXME : predicate

View File

@ -89,11 +89,11 @@ public:
return base.cartesian_end();
}
bool operator==(const PointC2 &p) const
typename R_::Bool_type operator==(const PointC2 &p) const
{
return base == p.base;
}
bool operator!=(const PointC2 &p) const
typename R_::Bool_type operator!=(const PointC2 &p) const
{
return !(*this == p);
}

View File

@ -63,7 +63,7 @@ public:
return get(base).e1;
}
bool is_degenerate() const
typename R_::Bool_type is_degenerate() const
{
return source() == second_point();
}

View File

@ -61,8 +61,8 @@ public:
RayC3(const Point_3 &sp, const Line_3 &l)
: base(sp, sp + l.to_vector()) {}
bool operator==(const RayC3 &r) const;
bool operator!=(const RayC3 &r) const;
typename R::Bool_type operator==(const RayC3 &r) const;
typename R::Bool_type operator!=(const RayC3 &r) const;
const Point_3 & source() const
{
@ -79,14 +79,14 @@ public:
Line_3 supporting_line() const;
Ray_3 opposite() const;
bool is_degenerate() const;
bool has_on(const Point_3 &p) const;
bool collinear_has_on(const Point_3 &p) const;
typename R::Bool_type is_degenerate() const;
typename R::Bool_type has_on(const Point_3 &p) const;
typename R::Bool_type collinear_has_on(const Point_3 &p) const;
};
template < class R >
inline
bool
typename R::Bool_type
RayC3<R>::operator==(const RayC3<R> &r) const
{
if (CGAL::identical(base, r.base))
@ -96,7 +96,7 @@ RayC3<R>::operator==(const RayC3<R> &r) const
template < class R >
inline
bool
typename R::Bool_type
RayC3<R>::operator!=(const RayC3<R> &r) const
{
return !(*this == r);
@ -146,7 +146,7 @@ RayC3<R>::opposite() const
}
template < class R >
bool
typename R::Bool_type
RayC3<R>::
has_on(const typename RayC3<R>::Point_3 &p) const
{
@ -157,7 +157,7 @@ has_on(const typename RayC3<R>::Point_3 &p) const
template < class R >
inline
bool
typename R::Bool_type
RayC3<R>::is_degenerate() const
{
return source() == second_point();
@ -165,21 +165,21 @@ RayC3<R>::is_degenerate() const
template < class R >
inline
bool
typename R::Bool_type
RayC3<R>::
collinear_has_on(const typename RayC3<R>::Point_3 &p) const
{
CGAL_kernel_exactness_precondition( collinear(source(), p, second_point()) );
Comparison_result cx = compare_x(source(), second_point());
typename R::Comparison_result cx = compare_x(source(), second_point());
if (cx != EQUAL)
return cx != compare_x(p, source());
Comparison_result cy = compare_y(source(), second_point());
typename R::Comparison_result cy = compare_y(source(), second_point());
if (cy != EQUAL)
return cy != compare_y(p, source());
Comparison_result cz = compare_z(source(), second_point());
typename R::Comparison_result cz = compare_z(source(), second_point());
if (cz != EQUAL)
return cz != compare_z(p, source());

View File

@ -62,7 +62,7 @@ public:
SphereC3(const Point_3 &p, const Point_3 &q,
const Point_3 &r, const Point_3 &s)
{
Orientation orient = CGAL::orientation(p, q, r, s);
Orientation orient = make_certain(CGAL::orientation(p, q, r, s));
Point_3 center = circumcenter(p, q, r, s);
FT squared_radius = squared_distance(p, center);
@ -101,8 +101,8 @@ public:
base = Rep(center, FT(0), o);
}
bool operator==(const SphereC3 &) const;
bool operator!=(const SphereC3 &) const;
typename R::Bool_type operator==(const SphereC3 &) const;
typename R::Bool_type operator!=(const SphereC3 &) const;
const Point_3 & center() const
{
@ -120,30 +120,30 @@ public:
}
// A circle is degenerate if its (squared) radius is null or negative
bool is_degenerate() const;
typename R::Bool_type is_degenerate() const;
// Returns a circle with opposite orientation
Sphere_3 opposite() const;
Oriented_side oriented_side(const Point_3 &p) const;
typename R_::Oriented_side oriented_side(const Point_3 &p) const;
//! precond: ! x.is_degenerate() (when available)
// Returns R::ON_POSITIVE_SIDE, R::ON_ORIENTED_BOUNDARY or
// R::ON_NEGATIVE_SIDE
bool has_on(const Circle_3 &p) const;
bool has_on_boundary(const Point_3 &p) const;
bool has_on_positive_side(const Point_3 &p) const;
bool has_on_negative_side(const Point_3 &p) const;
typename R::Bool_type has_on(const Circle_3 &p) const;
typename R::Bool_type has_on_boundary(const Point_3 &p) const;
typename R::Bool_type has_on_positive_side(const Point_3 &p) const;
typename R::Bool_type has_on_negative_side(const Point_3 &p) const;
Bounded_side bounded_side(const Point_3 &p) const;
typename R_::Bounded_side bounded_side(const Point_3 &p) const;
//! precond: ! x.is_degenerate() (when available)
// Returns R::ON_BOUNDED_SIDE, R::ON_BOUNDARY or R::ON_UNBOUNDED_SIDE
bool has_on_bounded_side(const Point_3 &p) const;
bool has_on_unbounded_side(const Point_3 &p) const;
typename R::Bool_type has_on_bounded_side(const Point_3 &p) const;
typename R::Bool_type has_on_unbounded_side(const Point_3 &p) const;
};
template < class R >
CGAL_KERNEL_INLINE
bool
typename R::Bool_type
SphereC3<R>::operator==(const SphereC3<R> &t) const
{
if (CGAL::identical(base, t.base))
@ -155,7 +155,7 @@ SphereC3<R>::operator==(const SphereC3<R> &t) const
template < class R >
inline
bool
typename R::Bool_type
SphereC3<R>::operator!=(const SphereC3<R> &t) const
{
return !(*this == t);
@ -163,28 +163,26 @@ SphereC3<R>::operator!=(const SphereC3<R> &t) const
template < class R >
CGAL_KERNEL_MEDIUM_INLINE
Oriented_side
typename R::Oriented_side
SphereC3<R>::
oriented_side(const typename SphereC3<R>::Point_3 &p) const
{
return Oriented_side(bounded_side(p) * orientation());
return enum_cast<Oriented_side>(bounded_side(p)) * orientation();
}
template < class R >
CGAL_KERNEL_INLINE
Bounded_side
typename R::Bounded_side
SphereC3<R>::
bounded_side(const typename SphereC3<R>::Point_3 &p) const
{
// FIXME: it's a predicate...
return Bounded_side((Comparison_result)
CGAL_NTS compare(squared_radius(),
return enum_cast<Bounded_side>(compare(squared_radius(),
squared_distance(center(), p)));
}
template < class R >
inline
bool
typename R::Bool_type
SphereC3<R>::
has_on(const typename SphereC3<R>::Circle_3 &c) const
{
@ -200,7 +198,7 @@ has_on(const typename SphereC3<R>::Circle_3 &c) const
template < class R >
inline
bool
typename R::Bool_type
SphereC3<R>::
has_on_boundary(const typename SphereC3<R>::Point_3 &p) const
{
@ -213,7 +211,7 @@ has_on_boundary(const typename SphereC3<R>::Point_3 &p) const
template < class R >
CGAL_KERNEL_INLINE
bool
typename R::Bool_type
SphereC3<R>::
has_on_negative_side(const typename SphereC3<R>::Point_3 &p) const
{
@ -226,7 +224,7 @@ has_on_negative_side(const typename SphereC3<R>::Point_3 &p) const
template < class R >
CGAL_KERNEL_INLINE
bool
typename R::Bool_type
SphereC3<R>::
has_on_positive_side(const typename SphereC3<R>::Point_3 &p) const
{
@ -239,7 +237,7 @@ has_on_positive_side(const typename SphereC3<R>::Point_3 &p) const
template < class R >
inline
bool
typename R::Bool_type
SphereC3<R>::
has_on_bounded_side(const typename SphereC3<R>::Point_3 &p) const
{
@ -251,7 +249,7 @@ has_on_bounded_side(const typename SphereC3<R>::Point_3 &p) const
template < class R >
inline
bool
typename R::Bool_type
SphereC3<R>::
has_on_unbounded_side(const typename SphereC3<R>::Point_3 &p) const
{
@ -263,7 +261,7 @@ has_on_unbounded_side(const typename SphereC3<R>::Point_3 &p) const
template < class R >
inline
bool
typename R::Bool_type
SphereC3<R>::
is_degenerate() const
{

View File

@ -56,24 +56,24 @@ public:
const Point_3 & vertex(int i) const;
const Point_3 & operator[](int i) const;
bool operator==(const TetrahedronC3 &t) const;
bool operator!=(const TetrahedronC3 &t) const;
typename R::Bool_type operator==(const TetrahedronC3 &t) const;
typename R::Bool_type operator!=(const TetrahedronC3 &t) const;
Orientation orientation() const;
Oriented_side oriented_side(const Point_3 &p) const;
Bounded_side bounded_side(const Point_3 &p) const;
typename R::Orientation orientation() const;
typename R::Oriented_side oriented_side(const Point_3 &p) const;
typename R::Bounded_side bounded_side(const Point_3 &p) const;
bool has_on_boundary(const Point_3 &p) const;
bool has_on_positive_side(const Point_3 &p) const;
bool has_on_negative_side(const Point_3 &p) const;
bool has_on_bounded_side(const Point_3 &p) const;
bool has_on_unbounded_side(const Point_3 &p) const;
typename R::Bool_type has_on_boundary(const Point_3 &p) const;
typename R::Bool_type has_on_positive_side(const Point_3 &p) const;
typename R::Bool_type has_on_negative_side(const Point_3 &p) const;
typename R::Bool_type has_on_bounded_side(const Point_3 &p) const;
typename R::Bool_type has_on_unbounded_side(const Point_3 &p) const;
bool is_degenerate() const;
typename R::Bool_type is_degenerate() const;
};
template < class R >
bool
typename R::Bool_type
TetrahedronC3<R>::
operator==(const TetrahedronC3<R> &t) const
{
@ -101,7 +101,7 @@ operator==(const TetrahedronC3<R> &t) const
template < class R >
inline
bool
typename R::Bool_type
TetrahedronC3<R>::
operator!=(const TetrahedronC3<R> &t) const
{
@ -134,7 +134,7 @@ operator[](int i) const
}
template < class R >
Orientation
typename R::Orientation
TetrahedronC3<R>::
orientation() const
{
@ -143,20 +143,20 @@ orientation() const
}
template < class R >
Oriented_side
typename R::Oriented_side
TetrahedronC3<R>::
oriented_side(const typename TetrahedronC3<R>::Point_3 &p) const
{
Orientation o = orientation();
typename R::Orientation o = orientation();
if (o != ZERO)
return Oriented_side(o * bounded_side(p));
return enum_cast<Oriented_side>(bounded_side(p)) * o;
CGAL_kernel_assertion (!is_degenerate());
return ON_ORIENTED_BOUNDARY;
}
template < class R >
Bounded_side
typename R::Bounded_side
TetrahedronC3<R>::
bounded_side(const typename TetrahedronC3<R>::Point_3 &p) const
{
@ -166,7 +166,7 @@ bounded_side(const typename TetrahedronC3<R>::Point_3 &p) const
template < class R >
inline
bool
typename R::Bool_type
TetrahedronC3<R>::has_on_boundary
(const typename TetrahedronC3<R>::Point_3 &p) const
{
@ -175,7 +175,7 @@ TetrahedronC3<R>::has_on_boundary
template < class R >
inline
bool
typename R::Bool_type
TetrahedronC3<R>::has_on_positive_side
(const typename TetrahedronC3<R>::Point_3 &p) const
{
@ -184,7 +184,7 @@ TetrahedronC3<R>::has_on_positive_side
template < class R >
inline
bool
typename R::Bool_type
TetrahedronC3<R>::has_on_negative_side
(const typename TetrahedronC3<R>::Point_3 &p) const
{
@ -193,7 +193,7 @@ TetrahedronC3<R>::has_on_negative_side
template < class R >
inline
bool
typename R::Bool_type
TetrahedronC3<R>::has_on_bounded_side
(const typename TetrahedronC3<R>::Point_3 &p) const
{
@ -202,7 +202,7 @@ TetrahedronC3<R>::has_on_bounded_side
template < class R >
inline
bool
typename R::Bool_type
TetrahedronC3<R>::has_on_unbounded_side
(const typename TetrahedronC3<R>::Point_3 &p) const
{
@ -211,7 +211,7 @@ TetrahedronC3<R>::has_on_unbounded_side
template < class R >
inline
bool
typename R::Bool_type
TetrahedronC3<R>::is_degenerate() const
{
return orientation() == COPLANAR;

View File

@ -337,13 +337,13 @@ namespace CartesianKernelFunctors {
{
const Point_2 & source = r.source();
const Point_2 & second = r.second_point();
switch(compare_x(source, second)) {
switch(make_certain(compare_x(source, second))) {
case SMALLER:
return compare_x(source, p) != LARGER;
case LARGER:
return compare_x(p, source) != LARGER;
default:
switch(compare_y(source, second)){
switch(make_certain(compare_y(source, second))){
case SMALLER:
return compare_y(source, p) != LARGER;
case LARGER:
@ -3996,7 +3996,7 @@ namespace CartesianKernelFunctors {
result_type
operator()( const Circle_2& c, const Point_2& p) const
{ return Oriented_side(c.bounded_side(p) * c.orientation()); }
{ return enum_cast<Oriented_side>(c.bounded_side(p)) * c.orientation(); }
result_type
operator()( const Line_2& l, const Point_2& p) const

View File

@ -28,7 +28,7 @@ CGAL_BEGIN_NAMESPACE
template < class K >
inline
bool
typename K::Bool_type
equal_direction(const DirectionC2<K> &d1,
const DirectionC2<K> &d2)
{
@ -37,7 +37,7 @@ equal_direction(const DirectionC2<K> &d1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_angle_with_x_axis(const DirectionC2<K> &d1,
const DirectionC2<K> &d2)
{

View File

@ -30,7 +30,7 @@ CGAL_BEGIN_NAMESPACE
template < class K >
inline
Oriented_side
typename K::Oriented_side
side_of_oriented_plane(const PlaneC3<K> &h,
const PointC3<K> &p)
{
@ -40,7 +40,7 @@ side_of_oriented_plane(const PlaneC3<K> &h,
template < class K >
inline
bool
typename K::Bool_type
equal_plane(const PlaneC3<K> &h, const PlaneC3<K> &p)
{
return equal_planeC3(h.a(), h.b(), h.c(), h.d(),

View File

@ -310,7 +310,7 @@ compare_slopesC2(const FT &l1a, const FT &l1b, const FT &l2a, const FT &l2b)
if (l1_sign < l2_sign) return SMALLER;
if (l1_sign > l2_sign) return LARGER;
if (l1_sign > 0)
if (l1_sign > ZERO)
return CGAL_NTS compare ( CGAL_NTS abs(l1a * l2b),
CGAL_NTS abs(l2a * l1b) );
@ -362,7 +362,7 @@ compare_slopesC2(const FT &s1_src_x, const FT &s1_src_y, const FT &s1_tgt_x,
if (s1_sign < s2_sign) return SMALLER;
if (s1_sign > s2_sign) return LARGER;
if (s1_sign > 0)
if (s1_sign > ZERO)
return CGAL_NTS compare( CGAL_NTS abs(s1_ydiff * s2_xdiff),
CGAL_NTS abs(s2_ydiff * s1_xdiff));

View File

@ -157,8 +157,8 @@ Filtered_predicate<EP,AP,C2E,C2A,Protection>::
CGAL_PROFILER(std::string("calls to : ") + std::string(CGAL_PRETTY_FUNCTION));
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(args)...);
if (! is_indeterminate(res))
return res;
if (is_singleton(res))
return extract_singleton(res);
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
@ -179,8 +179,8 @@ Filtered_predicate<EP,AP,C2E,C2A,Protection>::
CGAL_PROFILER(std::string("calls to : ") + std::string(CGAL_PRETTY_FUNCTION));
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(a1));
if (! is_indeterminate(res))
return res;
if (is_singleton(res))
return extract_singleton(res);
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
@ -199,8 +199,8 @@ Filtered_predicate<EP,AP,C2E,C2A,Protection>::
CGAL_PROFILER(std::string("calls to : ") + std::string(CGAL_PRETTY_FUNCTION));
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(a1), c2a(a2));
if (! is_indeterminate(res))
return res;
if (is_singleton(res))
return extract_singleton(res);
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ")+ std::string(CGAL_PRETTY_FUNCTION));
@ -219,8 +219,8 @@ Filtered_predicate<EP,AP,C2E,C2A,Protection>::
CGAL_PROFILER(std::string("calls to : ") + std::string(CGAL_PRETTY_FUNCTION));
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(a1), c2a(a2), c2a(a3));
if (! is_indeterminate(res))
return res;
if (is_singleton(res))
return extract_singleton(res);
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
@ -239,8 +239,8 @@ Filtered_predicate<EP,AP,C2E,C2A,Protection>::
CGAL_PROFILER(std::string("calls to : ") + std::string(CGAL_PRETTY_FUNCTION));
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4));
if (! is_indeterminate(res))
return res;
if (is_singleton(res))
return extract_singleton(res);
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
@ -260,8 +260,8 @@ Filtered_predicate<EP,AP,C2E,C2A,Protection>::
CGAL_PROFILER(std::string("calls to : ") + std::string(CGAL_PRETTY_FUNCTION));
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5));
if (! is_indeterminate(res))
return res;
if (is_singleton(res))
return extract_singleton(res);
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
@ -281,8 +281,8 @@ Filtered_predicate<EP,AP,C2E,C2A,Protection>::
CGAL_PROFILER(std::string("calls to : ") + std::string(CGAL_PRETTY_FUNCTION));
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6));
if (! is_indeterminate(res))
return res;
if (is_singleton(res))
return extract_singleton(res);
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
@ -304,8 +304,8 @@ Filtered_predicate<EP,AP,C2E,C2A,Protection>::
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
c2a(a7));
if (! is_indeterminate(res))
return res;
if (is_singleton(res))
return extract_singleton(res);
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
@ -327,8 +327,8 @@ Filtered_predicate<EP,AP,C2E,C2A,Protection>::
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
c2a(a7), c2a(a8));
if (! is_indeterminate(res))
return res;
if (is_singleton(res))
return extract_singleton(res);
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
@ -352,8 +352,8 @@ Filtered_predicate<EP,AP,C2E,C2A,Protection>::
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
c2a(a7), c2a(a8), c2a(a9));
if (! is_indeterminate(res))
return res;
if (is_singleton(res))
return extract_singleton(res);
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
@ -377,8 +377,8 @@ Filtered_predicate<EP,AP,C2E,C2A,Protection>::
Protect_FPU_rounding<Protection> P;
Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6),
c2a(a7), c2a(a8), c2a(a9), c2a(a10));
if (! is_indeterminate(res))
return res;
if (is_singleton(res))
return extract_singleton(res);
}
catch (Interval_nt_advanced::unsafe_comparison) {}
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));

View File

@ -80,6 +80,22 @@ public:
typedef CGAL::Lazy_exact_nt<typename Exact_kernel::FT> FT;
typedef FT RT;
// FIXME : Document these typedefs !
typedef typename Same_uncertainty_nt<bool, FT>::type
Bool_type;
typedef typename Same_uncertainty_nt<CGAL::Sign, FT>::type
Sign;
typedef typename Same_uncertainty_nt<CGAL::Comparison_result, FT>::type
Comparison_result;
typedef typename Same_uncertainty_nt<CGAL::Orientation, FT>::type
Orientation;
typedef typename Same_uncertainty_nt<CGAL::Oriented_side, FT>::type
Oriented_side;
typedef typename Same_uncertainty_nt<CGAL::Bounded_side, FT>::type
Bounded_side;
typedef typename Same_uncertainty_nt<CGAL::Angle, FT>::type
Angle;
typedef CGAL::Object Object_2;
typedef CGAL::Object Object_3;

View File

@ -107,18 +107,39 @@ public:
T inf() const { return _i; }
T sup() const { return _s; }
// NB : conversion to bool might be too risky
// (boost::tribool uses something else).
operator T() const
bool is_singleton() const { return _i == _s; }
T make_certain() const
{
if (_i == _s)
if (is_singleton())
return _i;
//++failures;
++Uncertain<bool>::number_of_failures(); // reasonnable ?
++Uncertain<bool>::number_of_failures();
throw Uncertain_conversion_exception(
"undecidable conversion of CGAL::Uncertain<T>");
}
#if 1 // Comment out in order to spot some unwanted conversions.
// NB : the general conversion to bool might be too risky.
// boost::tribool uses a more restricted conversion (see below).
operator T() const
{
return make_certain();
}
#else
private:
struct dummy {
void nonnull() {};
};
typedef void (dummy::*safe_bool)();
public:
operator safe_bool() const
{
return make_certain() ? &dummy::nonnull : 0;
}
#endif
static unsigned & number_of_failures() { return failures; }
static Uncertain indeterminate();
@ -148,9 +169,33 @@ T sup(Uncertain<T> i)
}
// possibly() declarations (needed as used in the assertions)
// ----------------------------------------------------------
inline bool possibly(bool b);
inline
bool possibly(Uncertain<bool> c);
// Basic functions
// ---------------
template < typename T >
inline
bool is_singleton(Uncertain<T> a)
{
return a.is_singleton();
}
template < typename T >
inline
T extract_singleton(Uncertain<T> a)
{
CGAL_assertion(is_singleton(a));
return a.inf();
}
template < typename T >
inline
Uncertain<T>
@ -170,14 +215,30 @@ template < typename T >
inline
bool is_indeterminate(Uncertain<T> a)
{
return a.inf() != a.sup();
return ! a.is_singleton();
}
template < typename T >
// certainly/possibly
// ------------------
inline bool certainly(bool b) { return b; }
inline bool possibly(bool b) { return b; }
inline
bool is_singleton(Uncertain<T> a)
bool certainly(Uncertain<bool> c)
{
return a.inf() == a.sup();
if (is_singleton(c))
return extract_singleton(c);
return false;
}
inline
bool possibly(Uncertain<bool> c)
{
if (is_singleton(c))
return extract_singleton(c);
return true;
}
@ -394,6 +455,26 @@ Uncertain<T> make_uncertain(Uncertain<T> t)
}
// make_certain() : Forcing a cast to certain (possibly throwing).
// This is meant to be used only in cases where we cannot easily propagate the
// uncertainty, such as when used in a switch statement (code may later be
// revisited to do things in a better way).
template < typename T >
inline
T make_certain(T t)
{
return t;
}
template < typename T >
inline
T make_certain(Uncertain<T> t)
{
return t.make_certain();
}
// opposite
template < typename T > // should be constrained only for enums.
inline
@ -404,7 +485,6 @@ Uncertain<T> operator-(Uncertain<T> u)
// "sign" multiplication.
// Should be constrained only for "sign" enums, useless for bool.
// Well, Uncertain<> should probably be split into Uncertain_bool (std::bool_set) and Uncertain_enum<>.
template < typename T >
Uncertain<T> operator*(Uncertain<T> a, Uncertain<T> b)
{
@ -451,6 +531,20 @@ Uncertain<T> operator*(Uncertain<T> a, Uncertain<T> b)
}
}
template < typename T >
inline
Uncertain<T> operator*(T a, Uncertain<T> b)
{
return Uncertain<T>(a) * b;
}
template < typename T >
inline
Uncertain<T> operator*(Uncertain<T> a, T b)
{
return a * Uncertain<T>(b);
}
// enum_cast overload
#ifdef CGAL_CFG_MATCHING_BUG_5
@ -474,28 +568,6 @@ Uncertain<T> enum_cast(Uncertain<U> u)
#endif
// Additional goodies
inline bool certainly(bool b) { return b; }
inline bool possibly(bool b) { return b; }
inline
bool certainly(Uncertain<bool> c)
{
if (is_indeterminate(c))
return false;
else return static_cast<bool>(c);
}
inline
bool possibly(Uncertain<bool> c)
{
if (is_indeterminate(c))
return true;
else return static_cast<bool>(c);
}
CGAL_END_NAMESPACE
#endif // CGAL_UNCERTAIN_H

View File

@ -33,6 +33,7 @@
#include <CGAL/Line_2.h>
#include <CGAL/Line_2_Line_2_intersection.h>
#include <CGAL/Object.h>
#include <CGAL/Uncertain.h>
CGAL_BEGIN_NAMESPACE
@ -75,7 +76,7 @@ bool seg_seg_do_intersect_crossing(
const typename K::Point_2 &p3, const typename K::Point_2 &p4,
const K& k)
{
switch (k.orientation_2_object()(p1,p2,p3)) {
switch (make_certain(k.orientation_2_object()(p1,p2,p3))) {
case LEFT_TURN:
return ! (k.orientation_2_object()(p3,p4,p2) == RIGHT_TURN); // right_turn(p3,p4,p2);
case RIGHT_TURN:
@ -94,7 +95,7 @@ bool seg_seg_do_intersect_contained(
const typename K::Point_2 &p3, const typename K::Point_2 &p4,
const K& k)
{
switch (k.orientation_2_object()(p1,p2,p3)) {
switch (make_certain(k.orientation_2_object()(p1,p2,p3))) {
case LEFT_TURN:
return ! (k.orientation_2_object()(p1,p2,p4) == LEFT_TURN); // left_turn(p1,p2,p4);
case RIGHT_TURN:
@ -143,15 +144,15 @@ do_intersect(const typename K::Segment_2 &seg1,
}
if (less_xy(A1,A2)) {
if (less_xy(B1,B2)) {
switch(compare_xy(A1,B1)) {
switch(make_certain(compare_xy(A1,B1))) {
case SMALLER:
switch(compare_xy(A2,B1)) {
switch(make_certain(compare_xy(A2,B1))) {
case SMALLER:
return false;
case EQUAL:
return true;
case LARGER:
switch(compare_xy(A2,B2)) {
switch(make_certain(compare_xy(A2,B2))) {
case SMALLER:
return seg_seg_do_intersect_crossing(A1,A2,B1,B2, k);
case EQUAL:
@ -163,13 +164,13 @@ do_intersect(const typename K::Segment_2 &seg1,
case EQUAL:
return true;
case LARGER:
switch(compare_xy(B2,A1)) {
switch(make_certain(compare_xy(B2,A1))) {
case SMALLER:
return false;
case EQUAL:
return true;
case LARGER:
switch(compare_xy(B2,A2)) {
switch(make_certain(compare_xy(B2,A2))) {
case SMALLER:
return seg_seg_do_intersect_crossing(B1,B2,A1,A2, k);
case EQUAL:
@ -180,15 +181,15 @@ do_intersect(const typename K::Segment_2 &seg1,
}
}
} else {
switch(compare_xy(A1,B2)) {
switch(make_certain(compare_xy(A1,B2))) {
case SMALLER:
switch(compare_xy(A2,B2)) {
switch(make_certain(compare_xy(A2,B2))) {
case SMALLER:
return false;
case EQUAL:
return true;
case LARGER:
switch(compare_xy(A2,B1)) {
switch(make_certain(compare_xy(A2,B1))) {
case SMALLER:
return seg_seg_do_intersect_crossing(A1,A2,B2,B1, k);
case EQUAL:
@ -200,13 +201,13 @@ do_intersect(const typename K::Segment_2 &seg1,
case EQUAL:
return true;
case LARGER:
switch(compare_xy(B1,A1)) {
switch(make_certain(compare_xy(B1,A1))) {
case SMALLER:
return false;
case EQUAL:
return true;
case LARGER:
switch(compare_xy(B1,A2)) {
switch(make_certain(compare_xy(B1,A2))) {
case SMALLER:
return seg_seg_do_intersect_crossing(B2,B1,A1,A2, k);
case EQUAL:
@ -219,15 +220,15 @@ do_intersect(const typename K::Segment_2 &seg1,
}
} else {
if (less_xy(B1,B2)) {
switch(compare_xy(A2,B1)) {
switch(make_certain(compare_xy(A2,B1))) {
case SMALLER:
switch(compare_xy(A1,B1)) {
switch(make_certain(compare_xy(A1,B1))) {
case SMALLER:
return false;
case EQUAL:
return true;
case LARGER:
switch(compare_xy(A1,B2)) {
switch(make_certain(compare_xy(A1,B2))) {
case SMALLER:
return seg_seg_do_intersect_crossing(A2,A1,B1,B2, k);
case EQUAL:
@ -239,13 +240,13 @@ do_intersect(const typename K::Segment_2 &seg1,
case EQUAL:
return true;
case LARGER:
switch(compare_xy(B2,A2)) {
switch(make_certain(compare_xy(B2,A2))) {
case SMALLER:
return false;
case EQUAL:
return true;
case LARGER:
switch(compare_xy(B2,A1)) {
switch(make_certain(compare_xy(B2,A1))) {
case SMALLER:
return seg_seg_do_intersect_crossing(B1,B2,A2,A1, k);
case EQUAL:
@ -256,15 +257,15 @@ do_intersect(const typename K::Segment_2 &seg1,
}
}
} else {
switch(compare_xy(A2,B2)) {
switch(make_certain(compare_xy(A2,B2))) {
case SMALLER:
switch(compare_xy(A1,B2)) {
switch(make_certain(compare_xy(A1,B2))) {
case SMALLER:
return false;
case EQUAL:
return true;
case LARGER:
switch(compare_xy(A1,B1)) {
switch(make_certain(compare_xy(A1,B1))) {
case SMALLER:
return seg_seg_do_intersect_crossing(A2,A1,B2,B1, k);
case EQUAL:
@ -276,13 +277,13 @@ do_intersect(const typename K::Segment_2 &seg1,
case EQUAL:
return true;
case LARGER:
switch(compare_xy(B1,A2)) {
switch(make_certain(compare_xy(B1,A2))) {
case SMALLER:
return false;
case EQUAL:
return true;
case LARGER:
switch(compare_xy(B1,A1)) {
switch(make_certain(compare_xy(B1,A1))) {
case SMALLER:
return seg_seg_do_intersect_crossing(B2,B1,A2,A1, k);
case EQUAL:

View File

@ -32,7 +32,8 @@ namespace CGALi {
// This code is not optimized:
template <class K>
bool do_intersect(const typename K::Triangle_3 &tr,
typename K::Bool_type
do_intersect(const typename K::Triangle_3 &tr,
const typename K::Tetrahedron_3 &tet,
const K & k)
{
@ -58,7 +59,8 @@ bool do_intersect(const typename K::Triangle_3 &tr,
template <class K>
inline
bool do_intersect(const typename K::Tetrahedron_3 &tet,
typename K::Bool_type
do_intersect(const typename K::Tetrahedron_3 &tet,
const typename K::Triangle_3 &tr,
const K & k)
{

View File

@ -21,6 +21,8 @@
#ifndef CGAL_TRIANGLE_3_TRIANGLE_3_DO_INTERSECT_H
#define CGAL_TRIANGLE_3_TRIANGLE_3_DO_INTERSECT_H
#include <CGAL/Uncertain.h>
CGAL_BEGIN_NAMESPACE
namespace CGALi {
@ -192,11 +194,11 @@ bool do_intersect_coplanar(const typename K::Triangle_3 &t1,
template <class K>
bool do_intersect(const typename K::Triangle_3 &t1,
typename K::Bool_type
do_intersect(const typename K::Triangle_3 &t1,
const typename K::Triangle_3 &t2,
const K & k)
{
CGAL_kernel_precondition( ! k.is_degenerate_3_object() (t1) );
CGAL_kernel_precondition( ! k.is_degenerate_3_object() (t2) );
@ -223,9 +225,9 @@ bool do_intersect(const typename K::Triangle_3 &t1,
const Point_3 * t_max1;
// Compute distance signs of p, q and r to the plane of triangle(a,b,c)
const Orientation dp = orientation(a,b,c,p);
const Orientation dq = orientation(a,b,c,q);
const Orientation dr = orientation(a,b,c,r);
const Orientation dp = make_certain(orientation(a,b,c,p));
const Orientation dq = make_certain(orientation(a,b,c,q));
const Orientation dr = make_certain(orientation(a,b,c,r));
switch ( dp ) {
@ -332,9 +334,9 @@ bool do_intersect(const typename K::Triangle_3 &t1,
const Point_3 * t_max2;
// Compute distance signs of a, b and c to the plane of triangle(p,q,r)
const Orientation da = orientation(p,q,r,a);
const Orientation db = orientation(p,q,r,b);
const Orientation dc = orientation(p,q,r,c);
const Orientation da = make_certain(orientation(p,q,r,a));
const Orientation db = make_certain(orientation(p,q,r,b));
const Orientation dc = make_certain(orientation(p,q,r,c));
switch ( da ) {
@ -444,7 +446,8 @@ bool do_intersect(const typename K::Triangle_3 &t1,
template <class K>
inline bool do_intersect(const Triangle_3<K> &t1,
inline typename K::Bool_type
do_intersect(const Triangle_3<K> &t1,
const Triangle_3<K> &t2)
{
return typename K::Do_intersect_3()(t1,t2);

View File

@ -108,41 +108,43 @@ public:
Orientation orientation() const
{
return R().orientation_2_object()(*this);
// This make_certain(), the uncertain orientation of circles, the orientation
// of circles, are all yucky.
return make_certain(R().orientation_2_object()(*this));
}
Bounded_side
typename R::Bounded_side
bounded_side(const Point_2 &p) const
{
return R().bounded_side_2_object()(*this, p);
}
Oriented_side
typename R::Oriented_side
oriented_side(const Point_2 &p) const
{
return R().oriented_side_2_object()(*this, p);
}
bool
typename R::Bool_type
has_on_boundary(const Point_2 &p) const
{
return bounded_side(p) == ON_BOUNDARY;
}
bool
typename R::Bool_type
has_on_bounded_side(const Point_2 &p) const
{
return bounded_side(p) == ON_BOUNDED_SIDE;
}
bool
typename R::Bool_type
has_on_unbounded_side(const Point_2 &p) const
{
return bounded_side(p) == ON_UNBOUNDED_SIDE;
}
bool
typename R::Bool_type
has_on_negative_side(const Point_2 &p) const
{
if (orientation() == COUNTERCLOCKWISE)
@ -150,7 +152,7 @@ public:
return has_on_bounded_side(p);
}
bool
typename R::Bool_type
has_on_positive_side(const Point_2 &p) const
{
if (orientation() == COUNTERCLOCKWISE)
@ -158,7 +160,7 @@ public:
return has_on_unbounded_side(p);
}
bool
typename R::Bool_type
is_degenerate() const
{
return CGAL_NTS is_zero(squared_radius());
@ -179,13 +181,13 @@ public:
return R().construct_bbox_2_object()(*this);
}
bool
typename R::Bool_type
operator==(const Circle_2 &c) const
{
return R().equal_2_object()(*this, c);
}
bool
typename R::Bool_type
operator!=(const Circle_2 &c) const
{
return !(*this == c);

View File

@ -85,7 +85,7 @@ public:
Direction_2(const RT &x, const RT &y)
: RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), x,y)) {}
bool
typename R::Bool_type
counterclockwise_in_between(const Direction_2 &d1,
const Direction_2 &d2) const
{
@ -116,28 +116,28 @@ public:
return (i==0) ? dx() : dy();
}
bool
typename R::Bool_type
operator<(const Direction_2 &d) const
{
return R().compare_angle_with_x_axis_2_object()(*this, d) == SMALLER;
}
bool
typename R::Bool_type
operator>(const Direction_2 &d) const
{
return d < *this;
}
bool
typename R::Bool_type
operator>=(const Direction_2 &d) const
{
return R().compare_angle_with_x_axis_2_object()(*this, d) != SMALLER;
}
bool
typename R::Bool_type
operator<=(const Direction_2 &d) const
{
return R().compare_angle_with_x_axis_2_object()(*this, d) != LARGER;
@ -159,13 +159,13 @@ public:
return this->vector();
}
bool
typename R::Bool_type
operator==(const Direction_2& d) const
{
return R().equal_2_object()(*this, d);
}
bool
typename R::Bool_type
operator!=(const Direction_2& d) const
{
return !(*this == d);

View File

@ -673,7 +673,7 @@ namespace CommonKernelFunctors {
typename K::Orientation_2 orientation;
typename K::Compute_squared_distance_2 squared_distance;
typename K::Construct_circumcenter_2 circumcenter;
Orientation orient = orientation(p, q, r);
typename K::Orientation orient = orientation(p, q, r);
CGAL_kernel_precondition( orient != COLLINEAR);
Point_2 center = circumcenter(p, q, r);
@ -2667,7 +2667,7 @@ namespace CommonKernelFunctors {
result_type
operator()(const Point_2& r, const Point_2& p, const Point_2& q) const
{
Orientation ori = o(r, p, q);
typename K::Orientation ori = o(r, p, q);
if ( ori == LEFT_TURN )
return true;
else if ( ori == RIGHT_TURN )

View File

@ -36,14 +36,14 @@
CGAL_BEGIN_NAMESPACE
template < class K >
bool
typename K::Bool_type
operator==(const Point_2<K> &p, const Origin& o)
{
return p == Point_2<K>(o);
}
template < class K >
bool
typename K::Bool_type
operator!=(const Point_2<K> &p, const Origin& o)
{
return p != Point_2<K>(o);
@ -61,7 +61,7 @@ angle(const Point_2<K> &p,
template < class K >
inline
bool
typename K::Bool_type
are_ordered_along_line(const Point_2<K> &p,
const Point_2<K> &q,
const Point_2<K> &r)
@ -71,7 +71,7 @@ are_ordered_along_line(const Point_2<K> &p,
template < class K >
inline
bool
typename K::Bool_type
are_strictly_ordered_along_line(const Point_2<K> &p,
const Point_2<K> &q,
const Point_2<K> &r)
@ -221,7 +221,7 @@ circumcenter(const Triangle_2<K> &t)
template < class K >
inline
bool
typename K::Bool_type
collinear(const Point_2<K> &p, const Point_2<K> &q, const Point_2<K> &r)
{
return CGALi::collinear(p, q, r, K());
@ -229,7 +229,7 @@ collinear(const Point_2<K> &p, const Point_2<K> &q, const Point_2<K> &r)
template < class K >
inline
bool
typename K::Bool_type
collinear_are_ordered_along_line(const Point_2<K> &p,
const Point_2<K> &q,
const Point_2<K> &r)
@ -239,7 +239,7 @@ collinear_are_ordered_along_line(const Point_2<K> &p,
template < class K >
inline
bool
typename K::Bool_type
collinear_are_strictly_ordered_along_line(const Point_2<K> &p,
const Point_2<K> &q,
const Point_2<K> &r)
@ -249,7 +249,7 @@ collinear_are_strictly_ordered_along_line(const Point_2<K> &p,
template < typename K >
inline
Comparison_result
typename K::Comparison_result
compare_angle_with_x_axis(const Direction_2<K>& d1,
const Direction_2<K>& d2)
{
@ -258,7 +258,7 @@ compare_angle_with_x_axis(const Direction_2<K>& d1,
template <class K >
inline
Comparison_result
typename K::Comparison_result
compare_distance_to_point(const Point_2<K>& p,
const Point_2<K>& q,
const Point_2<K>& r)
@ -268,7 +268,7 @@ compare_distance_to_point(const Point_2<K>& p,
template <class K >
inline
Comparison_result
typename K::Comparison_result
compare_squared_distance(const Point_2<K>& p,
const Point_2<K>& q,
const typename K::FT& d2)
@ -278,7 +278,7 @@ compare_squared_distance(const Point_2<K>& p,
template <class K>
inline
Comparison_result
typename K::Comparison_result
compare_signed_distance_to_line(const Point_2<K>& p,
const Point_2<K>& q,
const Point_2<K>& r,
@ -289,7 +289,7 @@ compare_signed_distance_to_line(const Point_2<K>& p,
template <class K>
inline
Comparison_result
typename K::Comparison_result
compare_signed_distance_to_line(const Line_2<K>& l,
const Point_2<K>& p,
const Point_2<K>& q)
@ -300,7 +300,7 @@ compare_signed_distance_to_line(const Line_2<K>& l,
/* FIXME : Undocumented, obsolete...
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_lexicographically_xy(const Point_2<K> &p,
const Point_2<K> &q)
{
@ -310,7 +310,7 @@ compare_lexicographically_xy(const Point_2<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_slopes(const Line_2<K> &l1, const Line_2<K> &l2)
{
return CGALi::compare_slopes(l1, l2, K());
@ -318,7 +318,7 @@ compare_slopes(const Line_2<K> &l1, const Line_2<K> &l2)
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_slopes(const Segment_2<K> &s1, const Segment_2<K> &s2)
{
return CGALi::compare_slopes(s1, s2, K());
@ -326,7 +326,7 @@ compare_slopes(const Segment_2<K> &s1, const Segment_2<K> &s2)
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::compare_x(p, q, K());
@ -334,7 +334,7 @@ compare_x(const Point_2<K> &p, const Point_2<K> &q)
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x(const Point_2<K>& p,
const Line_2<K>& l1,
const Line_2<K>& l2)
@ -344,7 +344,7 @@ compare_x(const Point_2<K>& p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x(const Line_2<K> &l,
const Line_2<K> &h1,
const Line_2<K> &h2)
@ -354,7 +354,7 @@ compare_x(const Line_2<K> &l,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x(const Line_2<K> &l1,
const Line_2<K> &h1,
const Line_2<K> &l2,
@ -365,7 +365,7 @@ compare_x(const Line_2<K> &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x_at_y(const Point_2<K>& p, const Line_2<K>& h)
{
return CGALi::compare_x_at_y(p, h, K());
@ -374,7 +374,7 @@ compare_x_at_y(const Point_2<K>& p, const Line_2<K>& h)
/* Undocumented
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x_at_y(const Point_2<K>& p, const Segment_2<K>& s)
{
return CGALi::compare_x_at_y(p, s, K());
@ -383,7 +383,7 @@ compare_x_at_y(const Point_2<K>& p, const Segment_2<K>& s)
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x_at_y(const Point_2<K> &p,
const Line_2<K> &h1,
const Line_2<K> &h2)
@ -393,7 +393,7 @@ compare_x_at_y(const Point_2<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x_at_y(const Line_2<K> &l1,
const Line_2<K> &l2,
const Line_2<K> &h)
@ -403,7 +403,7 @@ compare_x_at_y(const Line_2<K> &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x_at_y(const Line_2<K> &l1,
const Line_2<K> &l2,
const Line_2<K> &h1,
@ -414,7 +414,7 @@ compare_x_at_y(const Line_2<K> &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_xy(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::compare_xy(p, q, K());
@ -422,7 +422,7 @@ compare_xy(const Point_2<K> &p, const Point_2<K> &q)
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::compare_y(p, q, K());
@ -430,7 +430,7 @@ compare_y(const Point_2<K> &p, const Point_2<K> &q)
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y(const Point_2<K> &p,
const Line_2<K> &l1,
const Line_2<K> &l2)
@ -440,7 +440,7 @@ compare_y(const Point_2<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y(const Line_2<K> &l1,
const Line_2<K> &l2,
const Line_2<K> &h1,
@ -451,7 +451,7 @@ compare_y(const Line_2<K> &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y(const Line_2<K> &l,
const Line_2<K> &h1,
const Line_2<K> &h2)
@ -461,7 +461,7 @@ compare_y(const Line_2<K> &l,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const Point_2<K> &p, const Segment_2<K> &s)
{
return CGALi::compare_y_at_x(p, s, K());
@ -469,7 +469,7 @@ compare_y_at_x(const Point_2<K> &p, const Segment_2<K> &s)
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const Point_2<K> &p,
const Segment_2<K> &s1,
const Segment_2<K> &s2)
@ -479,7 +479,7 @@ compare_y_at_x(const Point_2<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const Point_2<K> &p, const Line_2<K> &h)
{
return CGALi::compare_y_at_x(p, h, K());
@ -487,7 +487,7 @@ compare_y_at_x(const Point_2<K> &p, const Line_2<K> &h)
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const Point_2<K> &p,
const Line_2<K> &h1,
const Line_2<K> &h2)
@ -497,7 +497,7 @@ compare_y_at_x(const Point_2<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const Line_2<K> &l1,
const Line_2<K> &l2,
const Line_2<K> &h)
@ -507,7 +507,7 @@ compare_y_at_x(const Line_2<K> &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const Line_2<K> &l1,
const Line_2<K> &l2,
const Line_2<K> &h1,
@ -518,7 +518,7 @@ compare_y_at_x(const Line_2<K> &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_yx(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::compare_yx(p, q, K());
@ -534,7 +534,7 @@ determinant(const Vector_2<K> &v0, const Vector_2<K> &v1)
template <class K>
inline
bool
typename K::Bool_type
has_larger_distance_to_point(const Point_2<K>& p,
const Point_2<K>& q,
const Point_2<K>& r)
@ -544,7 +544,7 @@ has_larger_distance_to_point(const Point_2<K>& p,
template <class K>
inline
bool
typename K::Bool_type
has_smaller_distance_to_point(const Point_2<K>& p,
const Point_2<K>& q,
const Point_2<K>& r)
@ -554,7 +554,7 @@ has_smaller_distance_to_point(const Point_2<K>& p,
template <class K>
inline
bool
typename K::Bool_type
has_smaller_signed_distance_to_line(const Line_2<K>& l,
const Point_2<K>& p,
const Point_2<K>& q)
@ -564,7 +564,7 @@ has_smaller_signed_distance_to_line(const Line_2<K>& l,
template <class K>
inline
bool
typename K::Bool_type
has_larger_signed_distance_to_line(const Line_2<K>& l,
const Point_2<K>& p,
const Point_2<K>& q)
@ -574,7 +574,7 @@ has_larger_signed_distance_to_line(const Line_2<K>& l,
template <class K>
inline
bool
typename K::Bool_type
has_larger_signed_distance_to_line(const Point_2<K>& p,
const Point_2<K>& q,
const Point_2<K>& r,
@ -585,7 +585,7 @@ has_larger_signed_distance_to_line(const Point_2<K>& p,
template <class K>
inline
bool
typename K::Bool_type
has_smaller_signed_distance_to_line(const Point_2<K>& p,
const Point_2<K>& q,
const Point_2<K>& r,
@ -596,7 +596,7 @@ has_smaller_signed_distance_to_line(const Point_2<K>& p,
template < class K >
inline
bool
typename K::Bool_type
left_turn(const Point_2<K> &p, const Point_2<K> &q, const Point_2<K> &r)
{
return CGALi::left_turn(p, q, r, K());
@ -604,7 +604,7 @@ left_turn(const Point_2<K> &p, const Point_2<K> &q, const Point_2<K> &r)
template < class K >
inline
bool
typename K::Bool_type
less_x(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::less_x(p, q, K());
@ -612,7 +612,7 @@ less_x(const Point_2<K> &p, const Point_2<K> &q)
template < class K >
inline
bool
typename K::Bool_type
less_y(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::less_y(p, q, K());
@ -620,7 +620,7 @@ less_y(const Point_2<K> &p, const Point_2<K> &q)
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xy_larger(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::lexicographically_xy_larger(p, q, K());
@ -628,7 +628,7 @@ lexicographically_xy_larger(const Point_2<K> &p, const Point_2<K> &q)
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xy_larger_or_equal(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::lexicographically_xy_larger_or_equal(p, q, K());
@ -636,7 +636,7 @@ lexicographically_xy_larger_or_equal(const Point_2<K> &p, const Point_2<K> &q)
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xy_smaller(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::lexicographically_xy_smaller(p, q, K());
@ -644,7 +644,7 @@ lexicographically_xy_smaller(const Point_2<K> &p, const Point_2<K> &q)
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xy_smaller_or_equal(const Point_2<K> &p,
const Point_2<K> &q)
{
@ -653,7 +653,7 @@ lexicographically_xy_smaller_or_equal(const Point_2<K> &p,
template < class K >
inline
bool
typename K::Bool_type
lexicographically_yx_smaller(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::lexicographically_yx_smaller(p, q, K());
@ -661,7 +661,7 @@ lexicographically_yx_smaller(const Point_2<K> &p, const Point_2<K> &q)
template < class K >
inline
bool
typename K::Bool_type
lexicographically_yx_smaller_or_equal(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::lexicographically_yx_smaller_or_equal(p, q, K());
@ -670,7 +670,7 @@ lexicographically_yx_smaller_or_equal(const Point_2<K> &p, const Point_2<K> &q)
// FIXME : Undocumented
template < class K >
inline
bool
typename K::Bool_type
lexicographically_yx_larger(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::lexicographically_yx_larger(p, q, K());
@ -679,7 +679,7 @@ lexicographically_yx_larger(const Point_2<K> &p, const Point_2<K> &q)
// FIXME : Undocumented
template < class K >
inline
bool
typename K::Bool_type
lexicographically_yx_larger_or_equal(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::lexicographically_yx_larger_or_equal(p, q, K());
@ -713,73 +713,73 @@ min_vertex(const Iso_rectangle_2<K> &ir)
// They have no counter part with the kernel argument...
template < class K >
inline
bool
typename K::Bool_type
operator<(const Direction_2<K>& d1, const Direction_2<K>& d2)
{ return compare_angle_with_x_axis(d1, d2) == SMALLER; }
template < class K >
inline
bool
typename K::Bool_type
operator>(const Direction_2<K>& d1, const Direction_2<K>& d2)
{ return compare_angle_with_x_axis(d1, d2) == LARGER; }
template < class K >
inline
bool
typename K::Bool_type
operator>=(const Direction_2<K>& d1, const Direction_2<K>& d2)
{ return compare_angle_with_x_axis(d1, d2) != SMALLER; }
template < class K >
inline
bool
typename K::Bool_type
operator<=(const Direction_2<K>& d1, const Direction_2<K>& d2)
{ return compare_angle_with_x_axis(d1, d2) != LARGER; }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Point_2<K>& p, const Point_2<K>& q)
{ return K().equal_2_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Point_2<K>& p, const Point_2<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator<(const Point_2<K>& p, const Point_2<K>& q)
{ return K().less_xy_2_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator>(const Point_2<K>& p, const Point_2<K>& q)
{ return K().less_xy_2_object()(q, p); }
template < class K >
inline
bool
typename K::Bool_type
operator<=(const Point_2<K>& p, const Point_2<K>& q)
{ return ! K().less_xy_2_object()(q, p); }
template < class K >
inline
bool
typename K::Bool_type
operator>=(const Point_2<K>& p, const Point_2<K>& q)
{ return ! K().less_xy_2_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Vector_2<K>& v, const Vector_2<K>& w)
{ return K().equal_2_object()(v, w); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Vector_2<K>& v, const Vector_2<K>& w)
{ return ! (v == w); }
@ -887,7 +887,7 @@ operator-(const Origin &o, const Point_2<K> &q)
template <typename K>
inline
Orientation
typename K::Orientation
orientation(const Point_2<K> &p, const Point_2<K> &q, const Point_2<K> &r)
{
return CGALi::orientation(p, q, r, K());
@ -895,7 +895,7 @@ orientation(const Point_2<K> &p, const Point_2<K> &q, const Point_2<K> &r)
template <typename K>
inline
Orientation
typename K::Orientation
orientation(const Vector_2<K> &u, const Vector_2<K> &v)
{
return CGALi::orientation(u, v, K());
@ -905,7 +905,7 @@ orientation(const Vector_2<K> &u, const Vector_2<K> &v)
template <typename K>
inline
bool
typename K::Bool_type
right_turn(const Point_2<K> &p, const Point_2<K> &q, const Point_2<K> &r)
{
return CGALi::right_turn(p, q, r, K());
@ -913,7 +913,7 @@ right_turn(const Point_2<K> &p, const Point_2<K> &q, const Point_2<K> &r)
template <class K>
inline
Bounded_side
typename K::Bounded_side
side_of_bounded_circle(const Point_2<K> &p,
const Point_2<K> &q,
const Point_2<K> &r,
@ -924,7 +924,7 @@ side_of_bounded_circle(const Point_2<K> &p,
template <class K>
inline
Bounded_side
typename K::Bounded_side
side_of_bounded_circle(const Point_2<K> &p,
const Point_2<K> &q,
const Point_2<K> &r)
@ -934,7 +934,7 @@ side_of_bounded_circle(const Point_2<K> &p,
template <class K>
inline
Oriented_side
typename K::Oriented_side
side_of_oriented_circle(const Point_2<K> &p,
const Point_2<K> &q,
const Point_2<K> &r,
@ -961,7 +961,7 @@ squared_radius(const Point_2<K>& p, const Point_2<K>& q, const Point_2<K>& r)
template < class K >
inline
bool
typename K::Bool_type
x_equal(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::x_equal(p, q, K());
@ -969,7 +969,7 @@ x_equal(const Point_2<K> &p, const Point_2<K> &q)
template < class K >
inline
bool
typename K::Bool_type
y_equal(const Point_2<K> &p, const Point_2<K> &q)
{
return CGALi::y_equal(p, q, K());

View File

@ -43,7 +43,7 @@ angle(const Point_3<K> &p, const Point_3<K> &q, const Point_3<K> &r)
template < typename K >
inline
bool
typename K::Bool_type
are_negative_oriented(const Point_3<K>& p, const Point_3<K>& q,
const Point_3<K>& r, const Point_3<K>& s)
{
@ -52,7 +52,7 @@ are_negative_oriented(const Point_3<K>& p, const Point_3<K>& q,
template < class K >
inline
bool
typename K::Bool_type
are_ordered_along_line(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r)
@ -62,7 +62,7 @@ are_ordered_along_line(const Point_3<K> &p,
template < typename K >
inline
bool
typename K::Bool_type
are_positive_oriented(const Point_3<K>& p, const Point_3<K>& q,
const Point_3<K>& r, const Point_3<K>& s)
{
@ -71,7 +71,7 @@ are_positive_oriented(const Point_3<K>& p, const Point_3<K>& q,
template < class K >
inline
bool
typename K::Bool_type
are_strictly_ordered_along_line(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r)
@ -234,7 +234,7 @@ circumcenter(const Triangle_3<K> &t)
template < class K >
inline
bool
typename K::Bool_type
collinear(const Point_3<K> &p, const Point_3<K> &q, const Point_3<K> &r)
{
return CGALi::collinear(p, q, r, K());
@ -242,7 +242,7 @@ collinear(const Point_3<K> &p, const Point_3<K> &q, const Point_3<K> &r)
template < class K >
inline
bool
typename K::Bool_type
collinear_are_ordered_along_line(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r)
@ -252,7 +252,7 @@ collinear_are_ordered_along_line(const Point_3<K> &p,
template < class K >
inline
bool
typename K::Bool_type
collinear_are_strictly_ordered_along_line(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r)
@ -262,7 +262,7 @@ collinear_are_strictly_ordered_along_line(const Point_3<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_distance_to_point(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r)
@ -272,7 +272,7 @@ compare_distance_to_point(const Point_3<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_squared_distance(const Point_3<K> &p,
const Point_3<K> &q,
const typename K::FT &d2)
@ -282,7 +282,7 @@ compare_squared_distance(const Point_3<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_squared_radius(const Point_3<K> &p,
const Point_3<K> &q,
const typename K::FT &sr)
@ -292,7 +292,7 @@ compare_squared_radius(const Point_3<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_squared_radius(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r,
@ -303,7 +303,7 @@ compare_squared_radius(const Point_3<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_squared_radius(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r,
@ -315,7 +315,7 @@ compare_squared_radius(const Point_3<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_lexicographically_xyz(const Point_3<K> &p,
const Point_3<K> &q)
{
@ -324,7 +324,7 @@ compare_lexicographically_xyz(const Point_3<K> &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_signed_distance_to_plane(const Plane_3<K> &h,
const Point_3<K> &p,
const Point_3<K> &q)
@ -334,7 +334,7 @@ compare_signed_distance_to_plane(const Plane_3<K> &h,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_signed_distance_to_plane(const Point_3<K> &hp,
const Point_3<K> &hq,
const Point_3<K> &hr,
@ -346,7 +346,7 @@ compare_signed_distance_to_plane(const Point_3<K> &hp,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x(const Point_3<K> &p, const Point_3<K> &q)
{
return CGALi::compare_x(p, q, K());
@ -354,7 +354,7 @@ compare_x(const Point_3<K> &p, const Point_3<K> &q)
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y(const Point_3<K> &p, const Point_3<K> &q)
{
return CGALi::compare_y(p, q, K());
@ -362,7 +362,7 @@ compare_y(const Point_3<K> &p, const Point_3<K> &q)
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_z(const Point_3<K> &p, const Point_3<K> &q)
{
return CGALi::compare_z(p, q, K());
@ -370,7 +370,7 @@ compare_z(const Point_3<K> &p, const Point_3<K> &q)
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_xyz(const Point_3<K> &p, const Point_3<K> &q)
{
return CGALi::compare_xyz(p, q, K());
@ -378,7 +378,7 @@ compare_xyz(const Point_3<K> &p, const Point_3<K> &q)
template < class K >
inline
bool
typename K::Bool_type
coplanar(const Point_3<K> &p, const Point_3<K> &q,
const Point_3<K> &r, const Point_3<K> &s)
{
@ -388,7 +388,7 @@ coplanar(const Point_3<K> &p, const Point_3<K> &q,
template < class K >
inline
Orientation
typename K::Orientation
coplanar_orientation(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r,
@ -399,7 +399,7 @@ coplanar_orientation(const Point_3<K> &p,
template < class K >
inline
Orientation
typename K::Orientation
coplanar_orientation(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r)
@ -409,7 +409,7 @@ coplanar_orientation(const Point_3<K> &p,
template < class K >
inline
Bounded_side
typename K::Bounded_side
coplanar_side_of_bounded_circle(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r,
@ -445,7 +445,7 @@ equidistant_line(const Point_3<K> &p, const Point_3<K> &q, const Point_3<K> &r)
template < class K >
inline
bool
typename K::Bool_type
has_larger_distance_to_point(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r)
@ -455,7 +455,7 @@ has_larger_distance_to_point(const Point_3<K> &p,
template < class K >
inline
bool
typename K::Bool_type
has_larger_signed_distance_to_plane(const Point_3<K> &hp,
const Point_3<K> &hq,
const Point_3<K> &hr,
@ -467,7 +467,7 @@ has_larger_signed_distance_to_plane(const Point_3<K> &hp,
template < class K >
inline
bool
typename K::Bool_type
has_larger_signed_distance_to_plane(const Plane_3<K> &h,
const Point_3<K> &p,
const Point_3<K> &q)
@ -477,7 +477,7 @@ has_larger_signed_distance_to_plane(const Plane_3<K> &h,
template < class K >
inline
bool
typename K::Bool_type
has_smaller_distance_to_point(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r)
@ -487,7 +487,7 @@ has_smaller_distance_to_point(const Point_3<K> &p,
template < class K >
inline
bool
typename K::Bool_type
has_smaller_signed_distance_to_plane(const Point_3<K> &hp,
const Point_3<K> &hq,
const Point_3<K> &hr,
@ -499,7 +499,7 @@ has_smaller_signed_distance_to_plane(const Point_3<K> &hp,
template < class K >
inline
bool
typename K::Bool_type
has_smaller_signed_distance_to_plane(const Plane_3<K> &h,
const Point_3<K> &p,
const Point_3<K> &q)
@ -509,7 +509,7 @@ has_smaller_signed_distance_to_plane(const Plane_3<K> &h,
template < class K >
inline
bool
typename K::Bool_type
less_x(const Point_3<K> &p, const Point_3<K> &q)
{
return CGALi::less_x(p, q, K());
@ -517,7 +517,7 @@ less_x(const Point_3<K> &p, const Point_3<K> &q)
template < class K >
inline
bool
typename K::Bool_type
less_y(const Point_3<K> &p, const Point_3<K> &q)
{
return CGALi::less_y(p, q, K());
@ -525,7 +525,7 @@ less_y(const Point_3<K> &p, const Point_3<K> &q)
template < class K >
inline
bool
typename K::Bool_type
less_z(const Point_3<K> &p, const Point_3<K> &q)
{
return CGALi::less_z(p, q, K());
@ -533,7 +533,7 @@ less_z(const Point_3<K> &p, const Point_3<K> &q)
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xyz_smaller(const Point_3<K> &p, const Point_3<K> &q)
{
return CGALi::lexicographically_xyz_smaller(p, q, K());
@ -541,7 +541,7 @@ lexicographically_xyz_smaller(const Point_3<K> &p, const Point_3<K> &q)
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xyz_smaller_or_equal(const Point_3<K> &p,
const Point_3<K> &q)
{
@ -583,182 +583,182 @@ normal(const Point_3<K> &p, const Point_3<K> &q, const Point_3<K> &r)
// FIXME TODO : what to do with the operators ?
template < class K >
inline
bool
typename K::Bool_type
operator==(const Point_3<K>& p, const Point_3<K>& q)
{ return K().equal_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Point_3<K>& p, const Point_3<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Point_3<K>& p, const Origin& o)
{ return K().equal_3_object()(p, Point_3<K>(o)); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Point_3<K>& p, const Origin& o)
{ return ! (p == o); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Iso_cuboid_3<K>& p, const Iso_cuboid_3<K>& q)
{ return K().equal_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Iso_cuboid_3<K>& p, const Iso_cuboid_3<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Plane_3<K>& p, const Plane_3<K>& q)
{ return K().equal_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Plane_3<K>& p, const Plane_3<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Segment_3<K>& p, const Segment_3<K>& q)
{ return K().equal_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Segment_3<K>& p, const Segment_3<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Line_3<K>& p, const Line_3<K>& q)
{ return K().equal_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Line_3<K>& p, const Line_3<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Ray_3<K>& p, const Ray_3<K>& q)
{ return K().equal_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Ray_3<K>& p, const Ray_3<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Triangle_3<K>& p, const Triangle_3<K>& q)
{ return K().equal_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Triangle_3<K>& p, const Triangle_3<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Tetrahedron_3<K>& p, const Tetrahedron_3<K>& q)
{ return K().equal_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Tetrahedron_3<K>& p, const Tetrahedron_3<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Direction_3<K>& p, const Direction_3<K>& q)
{ return K().equal_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Direction_3<K>& p, const Direction_3<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Sphere_3<K>& p, const Sphere_3<K>& q)
{ return K().equal_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Sphere_3<K>& p, const Sphere_3<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Vector_3<K>& p, const Vector_3<K>& q)
{ return K().equal_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Vector_3<K>& p, const Vector_3<K>& q)
{ return ! (p == q); }
template < class K >
inline
bool
typename K::Bool_type
operator==(const Vector_3<K>& p, const Null_vector& o)
{ return K().equal_3_object()(p, Vector_3<K>(o)); }
template < class K >
inline
bool
typename K::Bool_type
operator!=(const Vector_3<K>& p, const Null_vector& o)
{ return ! (p == o); }
template < class K >
inline
bool
typename K::Bool_type
operator<(const Point_3<K>& p, const Point_3<K>& q)
{ return K().less_xyz_3_object()(p, q); }
template < class K >
inline
bool
typename K::Bool_type
operator>(const Point_3<K>& p, const Point_3<K>& q)
{ return K().less_xyz_3_object()(q, p); }
template < class K >
inline
bool
typename K::Bool_type
operator<=(const Point_3<K>& p, const Point_3<K>& q)
{ return ! K().less_xyz_3_object()(q, p); }
template < class K >
inline
bool
typename K::Bool_type
operator>=(const Point_3<K>& p, const Point_3<K>& q)
{ return ! K().less_xyz_3_object()(p, q); }
@ -867,7 +867,7 @@ operator-(const Origin &o, const Point_3<K> &q)
template <class K >
inline
Orientation
typename K::Orientation
orientation(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r,
@ -878,7 +878,7 @@ orientation(const Point_3<K> &p,
template <class K >
inline
Orientation
typename K::Orientation
orientation(const Vector_3<K> &u, const Vector_3<K> &v, const Vector_3<K> &w)
{
return CGALi::orientation(u, v, w, K());
@ -915,7 +915,7 @@ radical_plane(const Sphere_3<K> &s1,
template <class K >
inline
Bounded_side
typename K::Bounded_side
side_of_bounded_sphere(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &test)
@ -925,7 +925,7 @@ side_of_bounded_sphere(const Point_3<K> &p,
template <class K >
inline
Bounded_side
typename K::Bounded_side
side_of_bounded_sphere(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r,
@ -936,7 +936,7 @@ side_of_bounded_sphere(const Point_3<K> &p,
template <class K >
inline
Bounded_side
typename K::Bounded_side
side_of_bounded_sphere(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r,
@ -948,7 +948,7 @@ side_of_bounded_sphere(const Point_3<K> &p,
template <class K >
inline
Oriented_side
typename K::Oriented_side
side_of_oriented_sphere(const Point_3<K> &p,
const Point_3<K> &q,
const Point_3<K> &r,
@ -1010,7 +1010,7 @@ volume(const Point_3<K> &p, const Point_3<K> &q,
template < class K >
inline
bool
typename K::Bool_type
x_equal(const Point_3<K> &p, const Point_3<K> &q)
{
return CGALi::x_equal(p, q, K());
@ -1018,7 +1018,7 @@ x_equal(const Point_3<K> &p, const Point_3<K> &q)
template < class K >
inline
bool
typename K::Bool_type
y_equal(const Point_3<K> &p, const Point_3<K> &q)
{
return CGALi::y_equal(p, q, K());
@ -1026,7 +1026,7 @@ y_equal(const Point_3<K> &p, const Point_3<K> &q)
template < class K >
inline
bool
typename K::Bool_type
z_equal(const Point_3<K> &p, const Point_3<K> &q)
{
return CGALi::z_equal(p, q, K());

View File

@ -47,7 +47,7 @@ angle(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
are_ordered_along_line(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::Point_2 &r, const K& k)
@ -57,7 +57,7 @@ are_ordered_along_line(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
are_strictly_ordered_along_line(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::Point_2 &r,
@ -213,7 +213,7 @@ circumcenter(const typename K::Triangle_2 &t, const K& k)
template < class K >
inline
bool
typename K::Bool_type
collinear(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::Point_2 &r, const K& k)
@ -223,7 +223,7 @@ collinear(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
collinear_are_ordered_along_line(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::Point_2 &r,
@ -234,7 +234,7 @@ collinear_are_ordered_along_line(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
collinear_are_strictly_ordered_along_line(
const typename K::Point_2 &p,
const typename K::Point_2 &q,
@ -245,7 +245,7 @@ collinear_are_strictly_ordered_along_line(
template < typename K >
inline
Comparison_result
typename K::Comparison_result
compare_angle_with_x_axis(const typename K::Direction_2& d1,
const typename K::Direction_2& d2,
const K& k)
@ -255,7 +255,7 @@ compare_angle_with_x_axis(const typename K::Direction_2& d1,
template <class K >
inline
Comparison_result
typename K::Comparison_result
compare_distance_to_point(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::Point_2 &r, const K& k)
@ -265,7 +265,7 @@ compare_distance_to_point(const typename K::Point_2 &p,
template <class K >
inline
Comparison_result
typename K::Comparison_result
compare_squared_distance(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::FT &d2, const K& k)
@ -275,7 +275,7 @@ compare_squared_distance(const typename K::Point_2 &p,
template <class K>
inline
Comparison_result
typename K::Comparison_result
compare_signed_distance_to_line(const typename K::Point_2& p,
const typename K::Point_2& q,
const typename K::Point_2& r,
@ -289,7 +289,7 @@ compare_signed_distance_to_line(const typename K::Point_2& p,
template <class K>
inline
Comparison_result
typename K::Comparison_result
compare_signed_distance_to_line(const typename K::Line_2& l,
const typename K::Point_2& p,
const typename K::Point_2& q,
@ -302,7 +302,7 @@ compare_signed_distance_to_line(const typename K::Line_2& l,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_slopes(const typename K::Line_2 &l1,
const typename K::Line_2 &l2, const K& k)
{
@ -311,7 +311,7 @@ compare_slopes(const typename K::Line_2 &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_slopes(const typename K::Segment_2 &s1,
const typename K::Segment_2 &s2, const K& k)
{
@ -320,7 +320,7 @@ compare_slopes(const typename K::Segment_2 &s1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x(const typename K::Point_2 &p,
const typename K::Point_2 &q, const K& k)
{
@ -329,7 +329,7 @@ compare_x(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x(const typename K::Point_2 &p,
const typename K::Line_2 &l1,
const typename K::Line_2 &l2, const K& k)
@ -339,7 +339,7 @@ compare_x(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x(const typename K::Line_2 &l,
const typename K::Line_2 &h1,
const typename K::Line_2 &h2, const K& k)
@ -349,7 +349,7 @@ compare_x(const typename K::Line_2 &l,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x(const typename K::Line_2 &l1,
const typename K::Line_2 &h1,
const typename K::Line_2 &l2,
@ -360,7 +360,7 @@ compare_x(const typename K::Line_2 &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x_at_y(const typename K::Point_2& p,
const typename K::Line_2& h, const K& k)
{
@ -370,7 +370,7 @@ compare_x_at_y(const typename K::Point_2& p,
/* Undocumented
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const typename K::Point_2 &p,
const typename K::Segment_2 &s, const K& k)
{
@ -380,7 +380,7 @@ compare_y_at_x(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x_at_y(const typename K::Point_2 &p,
const typename K::Line_2 &h1,
const typename K::Line_2 &h2, const K& k)
@ -390,7 +390,7 @@ compare_x_at_y(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x_at_y(const typename K::Line_2 &l1,
const typename K::Line_2 &l2,
const typename K::Line_2 &h, const K& k)
@ -400,7 +400,7 @@ compare_x_at_y(const typename K::Line_2 &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x_at_y(const typename K::Line_2 &l1,
const typename K::Line_2 &l2,
const typename K::Line_2 &h1,
@ -411,7 +411,7 @@ compare_x_at_y(const typename K::Line_2 &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_xy(const typename K::Point_2 &p,
const typename K::Point_2 &q, const K& k)
{
@ -420,7 +420,7 @@ compare_xy(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_yx(const typename K::Point_2 &p,
const typename K::Point_2 &q, const K& k)
{
@ -429,7 +429,7 @@ compare_yx(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y(const typename K::Point_2 &p,
const typename K::Point_2 &q, const K& k)
{
@ -438,7 +438,7 @@ compare_y(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y(const typename K::Point_2 &p,
const typename K::Line_2 &l1,
const typename K::Line_2 &l2, const K& k)
@ -448,7 +448,7 @@ compare_y(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y(const typename K::Line_2 &l1,
const typename K::Line_2 &l2,
const typename K::Line_2 &h1,
@ -459,7 +459,7 @@ compare_y(const typename K::Line_2 &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y(const typename K::Line_2 &l,
const typename K::Line_2 &h1,
const typename K::Line_2 &h2, const K& k)
@ -469,7 +469,7 @@ compare_y(const typename K::Line_2 &l,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const typename K::Point_2 &p,
const typename K::Segment_2 &s, const K& k)
{
@ -478,7 +478,7 @@ compare_y_at_x(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const typename K::Point_2 &p,
const typename K::Segment_2 &s1,
const typename K::Segment_2 &s2, const K& k)
@ -488,7 +488,7 @@ compare_y_at_x(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const typename K::Point_2 &p,
const typename K::Line_2 &l, const K& k)
{
@ -497,7 +497,7 @@ compare_y_at_x(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const typename K::Point_2 &p,
const typename K::Line_2 &h1,
const typename K::Line_2 &h2, const K& k)
@ -507,7 +507,7 @@ compare_y_at_x(const typename K::Point_2 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const typename K::Line_2 &l1,
const typename K::Line_2 &l2,
const typename K::Line_2 &h, const K& k)
@ -517,7 +517,7 @@ compare_y_at_x(const typename K::Line_2 &l1,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y_at_x(const typename K::Line_2 &l1,
const typename K::Line_2 &l2,
const typename K::Line_2 &h1,
@ -537,7 +537,7 @@ determinant(const typename K::Vector_2 &v0,
template <class K>
inline
bool
typename K::Bool_type
has_larger_distance_to_point(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::Point_2 &r,
@ -548,7 +548,7 @@ has_larger_distance_to_point(const typename K::Point_2 &p,
template <class K>
inline
bool
typename K::Bool_type
has_smaller_distance_to_point(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::Point_2 &r,
@ -559,7 +559,7 @@ has_smaller_distance_to_point(const typename K::Point_2 &p,
template <class K>
inline
bool
typename K::Bool_type
has_smaller_signed_distance_to_line(const typename K::Line_2& l,
const typename K::Point_2& p,
const typename K::Point_2& q,
@ -570,7 +570,7 @@ has_smaller_signed_distance_to_line(const typename K::Line_2& l,
template <class K>
inline
bool
typename K::Bool_type
has_larger_signed_distance_to_line(const typename K::Line_2& l,
const typename K::Point_2& p,
const typename K::Point_2& q,
@ -581,7 +581,7 @@ has_larger_signed_distance_to_line(const typename K::Line_2& l,
template <class K>
inline
bool
typename K::Bool_type
has_larger_signed_distance_to_line(const typename K::Point_2& p,
const typename K::Point_2& q,
const typename K::Point_2& r,
@ -593,7 +593,7 @@ has_larger_signed_distance_to_line(const typename K::Point_2& p,
template <class K>
inline
bool
typename K::Bool_type
has_smaller_signed_distance_to_line(const typename K::Point_2& p,
const typename K::Point_2& q,
const typename K::Point_2& r,
@ -605,7 +605,7 @@ has_smaller_signed_distance_to_line(const typename K::Point_2& p,
template < class K >
inline
bool
typename K::Bool_type
left_turn(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::Point_2 &r, const K& k)
@ -615,7 +615,7 @@ left_turn(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
less_x(const typename K::Point_2 &p,
const typename K::Point_2 &q, const K& k)
{
@ -624,7 +624,7 @@ less_x(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
less_y(const typename K::Point_2 &p,
const typename K::Point_2 &q, const K& k)
{
@ -633,7 +633,7 @@ less_y(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xy_larger(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const K& k)
@ -643,7 +643,7 @@ lexicographically_xy_larger(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xy_larger_or_equal(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const K& k)
@ -653,7 +653,7 @@ lexicographically_xy_larger_or_equal(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xy_smaller(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const K& k)
@ -663,7 +663,7 @@ lexicographically_xy_smaller(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xy_smaller_or_equal(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const K& k)
@ -673,7 +673,7 @@ lexicographically_xy_smaller_or_equal(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
lexicographically_yx_smaller(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const K& k)
@ -683,7 +683,7 @@ lexicographically_yx_smaller(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
lexicographically_yx_smaller_or_equal(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const K& k)
@ -694,7 +694,7 @@ lexicographically_yx_smaller_or_equal(const typename K::Point_2 &p,
// FIXME : Undocumented
template < class K >
inline
bool
typename K::Bool_type
lexicographically_yx_larger(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const K& k)
@ -705,7 +705,7 @@ lexicographically_yx_larger(const typename K::Point_2 &p,
// FIXME : Undocumented
template < class K >
inline
bool
typename K::Bool_type
lexicographically_yx_larger_or_equal(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const K& k)
@ -759,7 +759,7 @@ orientation(const typename K::Vector_2 &u,
template <typename K>
inline
bool
typename K::Bool_type
parallel(const typename K::Line_2 &l1,
const typename K::Line_2 &l2, const K &k)
{
@ -768,7 +768,7 @@ parallel(const typename K::Line_2 &l1,
template <typename K>
inline
bool
typename K::Bool_type
parallel(const typename K::Ray_2 &r1,
const typename K::Ray_2 &r2, const K &k)
{
@ -777,7 +777,7 @@ parallel(const typename K::Ray_2 &r1,
template <typename K>
inline
bool
typename K::Bool_type
parallel(const typename K::Segment_2 &s1,
const typename K::Segment_2 &s2, const K &k)
{
@ -786,7 +786,7 @@ parallel(const typename K::Segment_2 &s1,
template <typename K>
inline
bool
typename K::Bool_type
right_turn(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::Point_2 &r, const K &k)
@ -847,7 +847,7 @@ squared_radius(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
x_equal(const typename K::Point_2 &p,
const typename K::Point_2 &q, const K &k)
{
@ -856,7 +856,7 @@ x_equal(const typename K::Point_2 &p,
template < class K >
inline
bool
typename K::Bool_type
y_equal(const typename K::Point_2 &p,
const typename K::Point_2 &q, const K &k)
{

View File

@ -43,7 +43,7 @@ angle(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
are_ordered_along_line(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r, const K& k)
@ -53,7 +53,7 @@ are_ordered_along_line(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
are_strictly_ordered_along_line(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -225,7 +225,7 @@ circumcenter(const typename K::Triangle_3 &t, const K& k)
template < class K >
inline
bool
typename K::Bool_type
collinear(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -236,7 +236,7 @@ collinear(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
collinear_are_ordered_along_line(
const typename K::Point_3 &p,
const typename K::Point_3 &q,
@ -248,7 +248,7 @@ collinear_are_ordered_along_line(
template < class K >
inline
bool
typename K::Bool_type
collinear_are_strictly_ordered_along_line(
const typename K::Point_3 &p,
const typename K::Point_3 &q,
@ -260,7 +260,7 @@ collinear_are_strictly_ordered_along_line(
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_distance_to_point(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -271,7 +271,7 @@ compare_distance_to_point(const typename K::Point_3 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_squared_distance(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::FT &d2,
@ -282,7 +282,7 @@ compare_squared_distance(const typename K::Point_3 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_squared_radius(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::FT &sr,
@ -293,7 +293,7 @@ compare_squared_radius(const typename K::Point_3 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_squared_radius(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -305,7 +305,7 @@ compare_squared_radius(const typename K::Point_3 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_squared_radius(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -318,7 +318,7 @@ compare_squared_radius(const typename K::Point_3 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_lexicographically_xyz(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const K& k)
@ -328,7 +328,7 @@ compare_lexicographically_xyz(const typename K::Point_3 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_signed_distance_to_plane(const typename K::Plane_3 &h,
const typename K::Point_3 &p,
const typename K::Point_3 &q,
@ -341,7 +341,7 @@ compare_signed_distance_to_plane(const typename K::Plane_3 &h,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_signed_distance_to_plane(const typename K::Point_3 &hp,
const typename K::Point_3 &hq,
const typename K::Point_3 &hr,
@ -358,7 +358,7 @@ compare_signed_distance_to_plane(const typename K::Point_3 &hp,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_x(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const K &k)
@ -368,7 +368,7 @@ compare_x(const typename K::Point_3 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_y(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const K &k)
@ -378,7 +378,7 @@ compare_y(const typename K::Point_3 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_z(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const K &k)
@ -388,7 +388,7 @@ compare_z(const typename K::Point_3 &p,
template < class K >
inline
Comparison_result
typename K::Comparison_result
compare_xyz(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const K &k)
@ -398,7 +398,7 @@ compare_xyz(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
coplanar(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -409,7 +409,7 @@ coplanar(const typename K::Point_3 &p,
template < class K >
inline
Orientation
typename K::Orientation
coplanar_orientation(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -420,7 +420,7 @@ coplanar_orientation(const typename K::Point_3 &p,
template < class K >
inline
Orientation
typename K::Orientation
coplanar_orientation(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r, const K& k)
@ -430,7 +430,7 @@ coplanar_orientation(const typename K::Point_3 &p,
template < class K >
inline
Bounded_side
typename K::Bounded_side
coplanar_side_of_bounded_circle(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -471,7 +471,7 @@ equidistant_line(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
has_smaller_distance_to_point(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -482,7 +482,7 @@ has_smaller_distance_to_point(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
has_larger_distance_to_point(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -493,7 +493,7 @@ has_larger_distance_to_point(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
has_larger_signed_distance_to_plane(const typename K::Plane_3 &h,
const typename K::Point_3 &p,
const typename K::Point_3 &q,
@ -504,7 +504,7 @@ has_larger_signed_distance_to_plane(const typename K::Plane_3 &h,
template < class K >
inline
bool
typename K::Bool_type
has_larger_signed_distance_to_plane(const typename K::Point_3 &hp,
const typename K::Point_3 &hq,
const typename K::Point_3 &hr,
@ -517,7 +517,7 @@ has_larger_signed_distance_to_plane(const typename K::Point_3 &hp,
template < class K >
inline
bool
typename K::Bool_type
has_smaller_signed_distance_to_plane(const typename K::Plane_3 &h,
const typename K::Point_3 &p,
const typename K::Point_3 &q,
@ -528,7 +528,7 @@ has_smaller_signed_distance_to_plane(const typename K::Plane_3 &h,
template < class K >
inline
bool
typename K::Bool_type
has_smaller_signed_distance_to_plane(const typename K::Point_3 &hp,
const typename K::Point_3 &hq,
const typename K::Point_3 &hr,
@ -541,7 +541,7 @@ has_smaller_signed_distance_to_plane(const typename K::Point_3 &hp,
template < class K >
inline
bool
typename K::Bool_type
less_x(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const K &k)
@ -551,7 +551,7 @@ less_x(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
less_y(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const K &k)
@ -561,7 +561,7 @@ less_y(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
less_z(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const K &k)
@ -571,7 +571,7 @@ less_z(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xyz_smaller(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const K &k)
@ -621,7 +621,7 @@ unit_normal(const typename K::Point_3 &p, const typename K::Point_3 &q, const ty
template <class K >
inline
Orientation
typename K::Orientation
orientation(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -632,7 +632,7 @@ orientation(const typename K::Point_3 &p,
template <class K >
inline
Orientation
typename K::Orientation
orientation(const typename K::Vector_3 &u,
const typename K::Vector_3 &v,
const typename K::Vector_3 &w, const K &k)
@ -660,7 +660,7 @@ orthogonal_vector(const typename K::Plane_3 &p, const K &k)
template <typename K>
inline
bool
typename K::Bool_type
parallel(const typename K::Line_3 &l1,
const typename K::Line_3 &l2, const K &k)
{
@ -669,7 +669,7 @@ parallel(const typename K::Line_3 &l1,
template <typename K>
inline
bool
typename K::Bool_type
parallel(const typename K::Plane_3 &h1,
const typename K::Plane_3 &h2, const K &k)
{
@ -678,7 +678,7 @@ parallel(const typename K::Plane_3 &h1,
template <typename K>
inline
bool
typename K::Bool_type
parallel(const typename K::Ray_3 &r1,
const typename K::Ray_3 &r2, const K &k)
{
@ -687,7 +687,7 @@ parallel(const typename K::Ray_3 &r1,
template <typename K>
inline
bool
typename K::Bool_type
parallel(const typename K::Segment_3 &s1,
const typename K::Segment_3 &s2, const K &k)
{
@ -696,7 +696,7 @@ parallel(const typename K::Segment_3 &s1,
template <class K >
inline
Bounded_side
typename K::Bounded_side
side_of_bounded_sphere(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &test, const K &k)
@ -706,7 +706,7 @@ side_of_bounded_sphere(const typename K::Point_3 &p,
template <class K >
inline
Bounded_side
typename K::Bounded_side
side_of_bounded_sphere(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -717,7 +717,7 @@ side_of_bounded_sphere(const typename K::Point_3 &p,
template <class K >
inline
Bounded_side
typename K::Bounded_side
side_of_bounded_sphere(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -729,7 +729,7 @@ side_of_bounded_sphere(const typename K::Point_3 &p,
template <class K >
inline
Oriented_side
typename K::Oriented_side
side_of_oriented_sphere(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -792,7 +792,7 @@ volume(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
x_equal(const typename K::Point_3 &p,
const typename K::Point_3 &q, const K &k)
{
@ -801,7 +801,7 @@ x_equal(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
y_equal(const typename K::Point_3 &p,
const typename K::Point_3 &q, const K &k)
{
@ -810,7 +810,7 @@ y_equal(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
z_equal(const typename K::Point_3 &p,
const typename K::Point_3 &q, const K &k)
{
@ -822,7 +822,7 @@ z_equal(const typename K::Point_3 &p,
template <typename K>
inline
bool
typename K::Bool_type
are_negative_oriented(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -833,7 +833,7 @@ are_negative_oriented(const typename K::Point_3 &p,
template <typename K>
inline
bool
typename K::Bool_type
are_positive_oriented(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const typename K::Point_3 &r,
@ -844,7 +844,7 @@ are_positive_oriented(const typename K::Point_3 &p,
template < class K >
inline
bool
typename K::Bool_type
lexicographically_xyz_smaller_or_equal(const typename K::Point_3 &p,
const typename K::Point_3 &q,
const K&k)

View File

@ -143,47 +143,47 @@ public:
return R().construct_projected_point_2_object()(*this,p);
}
bool
typename R::Bool_type
is_horizontal() const
{
return R().is_horizontal_2_object()(*this);
}
bool
typename R::Bool_type
is_vertical() const
{
return R().is_vertical_2_object()(*this);
}
bool
typename R::Bool_type
is_degenerate() const
{ return R().is_degenerate_2_object()(*this); }
Oriented_side
typename R::Oriented_side
oriented_side(const Point_2 &p) const
{
return R().oriented_side_2_object()(*this,p);
}
bool
typename R::Bool_type
has_on_boundary(const Point_2 &p) const
{
return oriented_side(p) == ON_ORIENTED_BOUNDARY;
}
bool
typename R::Bool_type
has_on_positive_side(const Point_2 &p) const
{
return oriented_side(p) == ON_POSITIVE_SIDE;
}
bool
typename R::Bool_type
has_on_negative_side(const Point_2 &p) const
{
return oriented_side(p) == ON_NEGATIVE_SIDE;
}
bool
typename R::Bool_type
has_on(const Point_2 &p) const
{
return has_on_boundary(p);
@ -213,13 +213,13 @@ public:
return R().construct_point_2_object()(*this,i);
}
bool
typename R::Bool_type
operator==(const Line_2 &l) const
{
return R().equal_2_object()(*this, l);
}
bool
typename R::Bool_type
operator!=(const Line_2 &l) const
{
return !(*this == l);

View File

@ -108,43 +108,43 @@ public:
return R().construct_opposite_sphere_3_object()(*this);
}
Orientation orientation() const
typename R::Orientation orientation() const
{
return R().orientation_3_object()(*this);
}
Bounded_side
typename R::Bounded_side
bounded_side(const Point_3 &p) const
{
return R().bounded_side_3_object()(*this, p);
}
Oriented_side
typename R::Oriented_side
oriented_side(const Point_3 &p) const
{
return R().oriented_side_3_object()(*this, p);
}
bool
typename R::Bool_type
has_on_boundary(const Point_3 &p) const
{
return R().has_on_boundary_3_object()(*this, p);
//return bounded_side(p) == ON_BOUNDARY;
}
bool
typename R::Bool_type
has_on_bounded_side(const Point_3 &p) const
{
return bounded_side(p) == ON_BOUNDED_SIDE;
}
bool
typename R::Bool_type
has_on_unbounded_side(const Point_3 &p) const
{
return bounded_side(p) == ON_UNBOUNDED_SIDE;
}
bool
typename R::Bool_type
has_on_negative_side(const Point_3 &p) const
{
if (orientation() == COUNTERCLOCKWISE)
@ -152,7 +152,7 @@ public:
return has_on_bounded_side(p);
}
bool
typename R::Bool_type
has_on_positive_side(const Point_3 &p) const
{
if (orientation() == COUNTERCLOCKWISE)
@ -160,7 +160,7 @@ public:
return has_on_unbounded_side(p);
}
bool
typename R::Bool_type
is_degenerate() const
{
return R().is_degenerate_3_object()(*this);

View File

@ -76,31 +76,31 @@ public:
return R().compute_area_2_object()(vertex(0), vertex(1), vertex(2));
}
Orientation
typename R::Orientation
orientation() const
{
return R().orientation_2_object()(vertex(0), vertex(1), vertex(2));
}
Bounded_side
typename R::Bounded_side
bounded_side(const Point_2 &p) const
{
return R().bounded_side_2_object()(*this,p);
}
Oriented_side
typename R::Oriented_side
oriented_side(const Point_2 &p) const
{
return R().oriented_side_2_object()(*this,p);
}
bool
typename R::Bool_type
operator==(const Triangle_2 &t) const
{
return R().equal_2_object()(*this,t);
}
bool
typename R::Bool_type
operator!=(const Triangle_2 &t) const
{
return !(*this == t);
@ -118,37 +118,37 @@ public:
return vertex(i);
}
bool
typename R::Bool_type
has_on_bounded_side(const Point_2 &p) const
{
return bounded_side(p) == ON_BOUNDED_SIDE;
}
bool
typename R::Bool_type
has_on_unbounded_side(const Point_2 &p) const
{
return bounded_side(p) == ON_UNBOUNDED_SIDE;
}
bool
typename R::Bool_type
has_on_boundary(const Point_2 &p) const
{
return bounded_side(p) == ON_BOUNDARY;
}
bool
typename R::Bool_type
has_on_negative_side(const Point_2 &p) const
{
return oriented_side(p) == ON_NEGATIVE_SIDE;
}
bool
typename R::Bool_type
has_on_positive_side(const Point_2 &p) const
{
return oriented_side(p) == ON_POSITIVE_SIDE;
}
bool
typename R::Bool_type
is_degenerate() const
{
return R().collinear_2_object()(vertex(0), vertex(1), vertex(2));

View File

@ -515,7 +515,7 @@ operator<(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
return false;
Uncertain<bool> res = a.approx() < b.approx();
if (is_singleton(res))
return res;
return extract_singleton(res);
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
return a.exact() < b.exact();
}
@ -529,7 +529,7 @@ operator==(const Lazy_exact_nt<ET1>& a, const Lazy_exact_nt<ET2>& b)
return true;
Uncertain<bool> res = a.approx() == b.approx();
if (is_singleton(res))
return res;
return extract_singleton(res);
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
return a.exact() == b.exact();
}
@ -591,7 +591,7 @@ operator>(const Lazy_exact_nt<ET>& a, int b)
CGAL_PROFILER(std::string("calls to : ") + std::string(CGAL_PRETTY_FUNCTION));
Uncertain<bool> res = b < a.approx();
if (is_singleton(res))
return res;
return extract_singleton(res);
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
return b < a.exact();
}
@ -603,7 +603,7 @@ operator==(const Lazy_exact_nt<ET>& a, int b)
CGAL_PROFILER(std::string("calls to : ") + std::string(CGAL_PRETTY_FUNCTION));
Uncertain<bool> res = b == a.approx();
if (is_singleton(res))
return res;
return extract_singleton(res);
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
return b == a.exact();
}
@ -1039,7 +1039,7 @@ template < typename ET > class Real_embeddable_traits< Lazy_exact_nt<ET> >
CGAL_PROFILER(std::string("calls to : ") + std::string(CGAL_PRETTY_FUNCTION));
Uncertain< ::CGAL::Sign> res = CGAL_NTS sign(a.approx());
if (is_singleton(res))
return res;
return extract_singleton(res);
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
return CGAL_NTS sign(a.exact());
}
@ -1056,7 +1056,7 @@ template < typename ET > class Real_embeddable_traits< Lazy_exact_nt<ET> >
return EQUAL;
Uncertain<Comparison_result> res = CGAL_NTS compare(a.approx(), b.approx());
if (is_singleton(res))
return res;
return extract_singleton(res);
CGAL_PROFILER(std::string("failures of : ") + std::string(CGAL_PRETTY_FUNCTION));
return CGAL_NTS compare(a.exact(), b.exact());
}