mirror of https://github.com/CGAL/cgal
Replace CGAL::Triple by boost::tuple
This commit is contained in:
parent
a5f006da60
commit
0e682daf9a
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include <CGAL/utility.h>
|
#include <CGAL/utility.h>
|
||||||
#include <CGAL/Cartesian/predicates_on_points_2.h>
|
#include <CGAL/Cartesian/predicates_on_points_2.h>
|
||||||
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
|
||||||
CGAL_BEGIN_NAMESPACE
|
CGAL_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
@ -38,7 +39,7 @@ class CircleC2
|
||||||
typedef typename R_::Point_2 Point_2;
|
typedef typename R_::Point_2 Point_2;
|
||||||
typedef typename R_::Orientation Orientation;
|
typedef typename R_::Orientation Orientation;
|
||||||
|
|
||||||
typedef Triple<Point_2, FT, Orientation> Rep;
|
typedef boost::tuple<Point_2, FT, Orientation> Rep;
|
||||||
typedef typename R_::template Handle<Rep>::type Base;
|
typedef typename R_::template Handle<Rep>::type Base;
|
||||||
|
|
||||||
Base base;
|
Base base;
|
||||||
|
|
@ -62,17 +63,17 @@ public:
|
||||||
|
|
||||||
const Point_2 & center() const
|
const Point_2 & center() const
|
||||||
{
|
{
|
||||||
return get(base).first;
|
return get(base).get<0>();
|
||||||
}
|
}
|
||||||
|
|
||||||
const FT & squared_radius() const
|
const FT & squared_radius() const
|
||||||
{
|
{
|
||||||
return get(base).second;
|
return get(base).get<1>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Orientation orientation() const
|
Orientation orientation() const
|
||||||
{
|
{
|
||||||
return get(base).third;
|
return get(base).get<2>();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#include <CGAL/utility.h>
|
#include <CGAL/utility.h>
|
||||||
#include <CGAL/Handle_for.h>
|
#include <CGAL/Handle_for.h>
|
||||||
#include <CGAL/Interval_nt.h>
|
#include <CGAL/Interval_nt.h>
|
||||||
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
|
||||||
CGAL_BEGIN_NAMESPACE
|
CGAL_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
@ -39,7 +40,7 @@ class SphereC3
|
||||||
typedef typename R_::Sphere_3 Sphere_3;
|
typedef typename R_::Sphere_3 Sphere_3;
|
||||||
typedef typename R_::Circle_3 Circle_3;
|
typedef typename R_::Circle_3 Circle_3;
|
||||||
|
|
||||||
typedef Triple<Point_3, FT, Orientation> Rep;
|
typedef boost::tuple<Point_3, FT, Orientation> Rep;
|
||||||
typedef typename R_::template Handle<Rep>::type Base;
|
typedef typename R_::template Handle<Rep>::type Base;
|
||||||
|
|
||||||
Base base;
|
Base base;
|
||||||
|
|
@ -106,17 +107,17 @@ public:
|
||||||
|
|
||||||
const Point_3 & center() const
|
const Point_3 & center() const
|
||||||
{
|
{
|
||||||
return get(base).first;
|
return get(base).get<0>();
|
||||||
}
|
}
|
||||||
const FT & squared_radius() const
|
const FT & squared_radius() const
|
||||||
{
|
{
|
||||||
// Returns the square of the radius (instead of the radius itself,
|
// Returns the square of the radius (instead of the radius itself,
|
||||||
// which would require square roots)
|
// which would require square roots)
|
||||||
return get(base).second;
|
return get(base).get<1>();
|
||||||
}
|
}
|
||||||
Orientation orientation() const
|
Orientation orientation() const
|
||||||
{
|
{
|
||||||
return get(base).third;
|
return get(base).get<2>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// A circle is degenerate if its (squared) radius is null or negative
|
// A circle is degenerate if its (squared) radius is null or negative
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
#include <CGAL/utility.h>
|
#include <CGAL/utility.h>
|
||||||
#include <CGAL/Interval_nt.h>
|
#include <CGAL/Interval_nt.h>
|
||||||
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
|
||||||
CGAL_BEGIN_NAMESPACE
|
CGAL_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
@ -38,7 +39,7 @@ class CircleH2
|
||||||
typedef typename R_::RT RT;
|
typedef typename R_::RT RT;
|
||||||
typedef typename R_::Point_2 Point_2;
|
typedef typename R_::Point_2 Point_2;
|
||||||
|
|
||||||
typedef Triple<Point_2, FT, Orientation> Rep;
|
typedef boost::tuple<Point_2, FT, Orientation> Rep;
|
||||||
typedef typename R_::template Handle<Rep>::type Base;
|
typedef typename R_::template Handle<Rep>::type Base;
|
||||||
|
|
||||||
Base base;
|
Base base;
|
||||||
|
|
@ -116,13 +117,13 @@ template <class R>
|
||||||
inline
|
inline
|
||||||
const typename CircleH2<R>::Point_2 &
|
const typename CircleH2<R>::Point_2 &
|
||||||
CircleH2<R>::center() const
|
CircleH2<R>::center() const
|
||||||
{ return get(base).first; }
|
{ return get(base).get<0>(); }
|
||||||
|
|
||||||
template <class R>
|
template <class R>
|
||||||
inline
|
inline
|
||||||
const typename CircleH2<R>::FT &
|
const typename CircleH2<R>::FT &
|
||||||
CircleH2<R>::squared_radius() const
|
CircleH2<R>::squared_radius() const
|
||||||
{ return get(base).second; }
|
{ return get(base).get<1>(); }
|
||||||
|
|
||||||
template <class R>
|
template <class R>
|
||||||
CGAL_KERNEL_INLINE
|
CGAL_KERNEL_INLINE
|
||||||
|
|
@ -138,7 +139,7 @@ template <class R>
|
||||||
inline
|
inline
|
||||||
Orientation
|
Orientation
|
||||||
CircleH2<R>::orientation() const
|
CircleH2<R>::orientation() const
|
||||||
{ return get(base).third; }
|
{ return get(base).get<2>(); }
|
||||||
|
|
||||||
template <class R>
|
template <class R>
|
||||||
CGAL_KERNEL_INLINE
|
CGAL_KERNEL_INLINE
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#include <CGAL/utility.h>
|
#include <CGAL/utility.h>
|
||||||
#include <CGAL/Interval_nt.h>
|
#include <CGAL/Interval_nt.h>
|
||||||
#include <CGAL/Homogeneous/predicates_on_pointsH3.h>
|
#include <CGAL/Homogeneous/predicates_on_pointsH3.h>
|
||||||
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
|
||||||
CGAL_BEGIN_NAMESPACE
|
CGAL_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
@ -37,7 +38,7 @@ class SphereH3
|
||||||
typedef typename R_::FT FT;
|
typedef typename R_::FT FT;
|
||||||
typedef typename R_::Point_3 Point_3;
|
typedef typename R_::Point_3 Point_3;
|
||||||
|
|
||||||
typedef Triple<Point_3, FT, Orientation> Rep;
|
typedef boost::tuple<Point_3, FT, Orientation> Rep;
|
||||||
typedef typename R_::template Handle<Rep>::type Base;
|
typedef typename R_::template Handle<Rep>::type Base;
|
||||||
|
|
||||||
Base base;
|
Base base;
|
||||||
|
|
@ -180,19 +181,19 @@ template <class R>
|
||||||
inline
|
inline
|
||||||
const typename SphereH3<R>::Point_3 &
|
const typename SphereH3<R>::Point_3 &
|
||||||
SphereH3<R>::center() const
|
SphereH3<R>::center() const
|
||||||
{ return get(base).first; }
|
{ return get(base).get<0>(); }
|
||||||
|
|
||||||
template <class R>
|
template <class R>
|
||||||
inline
|
inline
|
||||||
const typename SphereH3<R>::FT &
|
const typename SphereH3<R>::FT &
|
||||||
SphereH3<R>::squared_radius() const
|
SphereH3<R>::squared_radius() const
|
||||||
{ return get(base).second; }
|
{ return get(base).get<1>(); }
|
||||||
|
|
||||||
template <class R>
|
template <class R>
|
||||||
inline
|
inline
|
||||||
Orientation
|
Orientation
|
||||||
SphereH3<R>::orientation() const
|
SphereH3<R>::orientation() const
|
||||||
{ return get(base).third; }
|
{ return get(base).get<2>(); }
|
||||||
|
|
||||||
template <class R>
|
template <class R>
|
||||||
inline
|
inline
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue