mirror of https://github.com/CGAL/cgal
* Using result_of instead of Qualified_result_of
* limited refactoring in the lazy kernel * still bugs in circular_3 * still specialization problem with iso_rectangle
This commit is contained in:
parent
2672fabe10
commit
0e0a200646
|
|
@ -988,36 +988,35 @@ namespace CartesianKernelFunctors {
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
typedef typename K::Circle_2 Circle_2;
|
typedef typename K::Circle_2 Circle_2;
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
template<class>
|
||||||
|
struct result {
|
||||||
|
typedef FT type;
|
||||||
|
};
|
||||||
|
|
||||||
const result_type&
|
template<typename F>
|
||||||
|
struct result<F(Circle_2)> {
|
||||||
|
typedef const FT& type;
|
||||||
|
};
|
||||||
|
|
||||||
|
const FT&
|
||||||
operator()( const Circle_2& c) const
|
operator()( const Circle_2& c) const
|
||||||
{ return c.rep().squared_radius(); }
|
{ return c.rep().squared_radius(); }
|
||||||
|
|
||||||
result_type
|
FT
|
||||||
operator()( const Point_2& /*p*/) const
|
operator()( const Point_2& /*p*/) const
|
||||||
{ return FT(0); }
|
{ return FT(0); }
|
||||||
|
|
||||||
result_type
|
FT
|
||||||
operator()( const Point_2& p, const Point_2& q) const
|
operator()( const Point_2& p, const Point_2& q) const
|
||||||
{ return squared_radiusC2(p.x(), p.y(), q.x(), q.y()); }
|
{ return squared_radiusC2(p.x(), p.y(), q.x(), q.y()); }
|
||||||
|
|
||||||
result_type
|
FT
|
||||||
operator()( const Point_2& p, const Point_2& q, const Point_2& r) const
|
operator()( const Point_2& p, const Point_2& q, const Point_2& r) const
|
||||||
{ return squared_radiusC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); }
|
{ return squared_radiusC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace CartesianKernelFunctors
|
} //namespace CartesianKernelFunctors
|
||||||
|
|
||||||
#ifndef CGAL_CFG_DONT_OVERLOAD_TOO_MUCH
|
|
||||||
template < typename K>
|
|
||||||
struct Qualified_result_of<CartesianKernelFunctors::Compute_squared_radius_2<K>,
|
|
||||||
typename K::Circle_2>
|
|
||||||
{
|
|
||||||
typedef typename K::FT const & type;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For the non specialized template will do the right thing,
|
// For the non specialized template will do the right thing,
|
||||||
// namely return a copy of an FT
|
// namely return a copy of an FT
|
||||||
|
|
||||||
|
|
@ -1104,22 +1103,22 @@ namespace CartesianKernelFunctors {
|
||||||
|
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_x_2 : Has_qrt
|
class Compute_x_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
typedef typename K::Vector_2 Vector_2;
|
typedef typename K::Vector_2 Vector_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_2& p) const
|
operator()(const Point_2& p) const
|
||||||
{
|
{
|
||||||
return p.rep().x();
|
return p.rep().x();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_2& v) const
|
operator()(const Vector_2& v) const
|
||||||
{
|
{
|
||||||
return v.rep().x();
|
return v.rep().x();
|
||||||
|
|
@ -1127,22 +1126,22 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_x_3 : Has_qrt
|
class Compute_x_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_3& p) const
|
operator()(const Point_3& p) const
|
||||||
{
|
{
|
||||||
return p.rep().x();
|
return p.rep().x();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_3& v) const
|
operator()(const Vector_3& v) const
|
||||||
{
|
{
|
||||||
return v.rep().x();
|
return v.rep().x();
|
||||||
|
|
@ -1151,22 +1150,22 @@ namespace CartesianKernelFunctors {
|
||||||
|
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_y_2 : Has_qrt
|
class Compute_y_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
typedef typename K::Vector_2 Vector_2;
|
typedef typename K::Vector_2 Vector_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_2& p) const
|
operator()(const Point_2& p) const
|
||||||
{
|
{
|
||||||
return p.rep().y();
|
return p.rep().y();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_2& v) const
|
operator()(const Vector_2& v) const
|
||||||
{
|
{
|
||||||
return v.rep().y();
|
return v.rep().y();
|
||||||
|
|
@ -1175,22 +1174,22 @@ namespace CartesianKernelFunctors {
|
||||||
|
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_y_3 : Has_qrt
|
class Compute_y_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_3& p) const
|
operator()(const Point_3& p) const
|
||||||
{
|
{
|
||||||
return p.rep().y();
|
return p.rep().y();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_3& v) const
|
operator()(const Vector_3& v) const
|
||||||
{
|
{
|
||||||
return v.rep().y();
|
return v.rep().y();
|
||||||
|
|
@ -1198,22 +1197,22 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_z_3 : Has_qrt
|
class Compute_z_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_3& p) const
|
operator()(const Point_3& p) const
|
||||||
{
|
{
|
||||||
return p.rep().z();
|
return p.rep().z();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_3& v) const
|
operator()(const Vector_3& v) const
|
||||||
{
|
{
|
||||||
return v.rep().z();
|
return v.rep().z();
|
||||||
|
|
@ -1223,15 +1222,15 @@ namespace CartesianKernelFunctors {
|
||||||
|
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_dx_2 : public Has_qrt
|
class Compute_dx_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Direction_2 Direction_2;
|
typedef typename K::Direction_2 Direction_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Direction_2& d) const
|
operator()(const Direction_2& d) const
|
||||||
{
|
{
|
||||||
return d.rep().dx();
|
return d.rep().dx();
|
||||||
|
|
@ -1239,15 +1238,15 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_dx_3 : public Has_qrt
|
class Compute_dx_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Direction_3 Direction_3;
|
typedef typename K::Direction_3 Direction_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Direction_3& d) const
|
operator()(const Direction_3& d) const
|
||||||
{
|
{
|
||||||
return d.rep().dx();
|
return d.rep().dx();
|
||||||
|
|
@ -1255,15 +1254,15 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_dy_2 : public Has_qrt
|
class Compute_dy_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Direction_2 Direction_2;
|
typedef typename K::Direction_2 Direction_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Direction_2& d) const
|
operator()(const Direction_2& d) const
|
||||||
{
|
{
|
||||||
return d.rep().dy();
|
return d.rep().dy();
|
||||||
|
|
@ -1271,15 +1270,15 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_dy_3 : public Has_qrt
|
class Compute_dy_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Direction_3 Direction_3;
|
typedef typename K::Direction_3 Direction_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Direction_3& d) const
|
operator()(const Direction_3& d) const
|
||||||
{
|
{
|
||||||
return d.rep().dy();
|
return d.rep().dy();
|
||||||
|
|
@ -1287,15 +1286,15 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_dz_3 : public Has_qrt
|
class Compute_dz_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Direction_3 Direction_3;
|
typedef typename K::Direction_3 Direction_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Direction_3& d) const
|
operator()(const Direction_3& d) const
|
||||||
{
|
{
|
||||||
return d.rep().dz();
|
return d.rep().dz();
|
||||||
|
|
@ -1303,68 +1302,68 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hx_2 : public Has_qrt
|
class Compute_hx_2
|
||||||
{
|
|
||||||
typedef typename K::FT FT;
|
|
||||||
typedef typename K::Point_2 Point_2;
|
|
||||||
typedef typename K::Vector_2 Vector_2;
|
|
||||||
|
|
||||||
public:
|
|
||||||
typedef FT result_type;
|
|
||||||
|
|
||||||
const result_type &
|
|
||||||
operator()(const Point_2& p) const
|
|
||||||
{
|
|
||||||
return p.rep().hx();
|
|
||||||
}
|
|
||||||
|
|
||||||
const result_type &
|
|
||||||
operator()(const Vector_2& v) const
|
|
||||||
{
|
|
||||||
return v.rep().hx();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename K>
|
|
||||||
class Compute_hx_3 : public Has_qrt
|
|
||||||
{
|
|
||||||
typedef typename K::FT FT;
|
|
||||||
typedef typename K::Point_3 Point_3;
|
|
||||||
typedef typename K::Vector_3 Vector_3;
|
|
||||||
|
|
||||||
public:
|
|
||||||
typedef FT result_type;
|
|
||||||
|
|
||||||
const result_type &
|
|
||||||
operator()(const Point_3& p) const
|
|
||||||
{
|
|
||||||
return p.rep().hx();
|
|
||||||
}
|
|
||||||
|
|
||||||
const result_type &
|
|
||||||
operator()(const Vector_3& v) const
|
|
||||||
{
|
|
||||||
return v.rep().hx();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename K>
|
|
||||||
class Compute_hy_2 : public Has_qrt
|
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
typedef typename K::Vector_2 Vector_2;
|
typedef typename K::Vector_2 Vector_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
|
operator()(const Point_2& p) const
|
||||||
|
{
|
||||||
|
return p.rep().hx();
|
||||||
|
}
|
||||||
|
|
||||||
|
result_type
|
||||||
|
operator()(const Vector_2& v) const
|
||||||
|
{
|
||||||
|
return v.rep().hx();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename K>
|
||||||
|
class Compute_hx_3
|
||||||
|
{
|
||||||
|
typedef typename K::FT FT;
|
||||||
|
typedef typename K::Point_3 Point_3;
|
||||||
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef const FT& result_type;
|
||||||
|
|
||||||
|
result_type
|
||||||
|
operator()(const Point_3& p) const
|
||||||
|
{
|
||||||
|
return p.rep().hx();
|
||||||
|
}
|
||||||
|
|
||||||
|
result_type
|
||||||
|
operator()(const Vector_3& v) const
|
||||||
|
{
|
||||||
|
return v.rep().hx();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename K>
|
||||||
|
class Compute_hy_2
|
||||||
|
{
|
||||||
|
typedef typename K::FT FT;
|
||||||
|
typedef typename K::Point_2 Point_2;
|
||||||
|
typedef typename K::Vector_2 Vector_2;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef const FT& result_type;
|
||||||
|
|
||||||
|
result_type
|
||||||
operator()(const Point_2& p) const
|
operator()(const Point_2& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hy();
|
return p.rep().hy();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_2& v) const
|
operator()(const Vector_2& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hy();
|
return v.rep().hy();
|
||||||
|
|
@ -1372,22 +1371,22 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hy_3 : public Has_qrt
|
class Compute_hy_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_3& p) const
|
operator()(const Point_3& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hy();
|
return p.rep().hy();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_3& v) const
|
operator()(const Vector_3& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hy();
|
return v.rep().hy();
|
||||||
|
|
@ -1395,22 +1394,22 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hz_3 : public Has_qrt
|
class Compute_hz_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_3& p) const
|
operator()(const Point_3& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hz();
|
return p.rep().hz();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_3& v) const
|
operator()(const Vector_3& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hz();
|
return v.rep().hz();
|
||||||
|
|
@ -1418,22 +1417,22 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hw_2 : public Has_qrt
|
class Compute_hw_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
typedef typename K::Vector_2 Vector_2;
|
typedef typename K::Vector_2 Vector_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_2& p) const
|
operator()(const Point_2& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hw();
|
return p.rep().hw();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_2& v) const
|
operator()(const Vector_2& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hw();
|
return v.rep().hw();
|
||||||
|
|
@ -1441,22 +1440,22 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hw_3 : public Has_qrt
|
class Compute_hw_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_3& p) const
|
operator()(const Point_3& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hw();
|
return p.rep().hw();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_3& v) const
|
operator()(const Vector_3& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hw();
|
return v.rep().hw();
|
||||||
|
|
@ -1465,15 +1464,15 @@ namespace CartesianKernelFunctors {
|
||||||
|
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_xmin_2 : public Has_qrt
|
class Compute_xmin_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Iso_rectangle_2& r) const
|
operator()(const Iso_rectangle_2& r) const
|
||||||
{
|
{
|
||||||
return (r.min)().x();
|
return (r.min)().x();
|
||||||
|
|
@ -1481,15 +1480,15 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_xmax_2 : public Has_qrt
|
class Compute_xmax_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Iso_rectangle_2& r) const
|
operator()(const Iso_rectangle_2& r) const
|
||||||
{
|
{
|
||||||
return (r.max)().x();
|
return (r.max)().x();
|
||||||
|
|
@ -1497,15 +1496,15 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_ymin_2 : public Has_qrt
|
class Compute_ymin_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Iso_rectangle_2& r) const
|
operator()(const Iso_rectangle_2& r) const
|
||||||
{
|
{
|
||||||
return (r.min)().y();
|
return (r.min)().y();
|
||||||
|
|
@ -1513,15 +1512,15 @@ namespace CartesianKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_ymax_2 : public Has_qrt
|
class Compute_ymax_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
typedef const FT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Iso_rectangle_2& r) const
|
operator()(const Iso_rectangle_2& r) const
|
||||||
{
|
{
|
||||||
return (r.max)().y();
|
return (r.max)().y();
|
||||||
|
|
@ -3346,7 +3345,15 @@ namespace CartesianKernelFunctors {
|
||||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||||
typedef typename K::Triangle_2 Triangle_2;
|
typedef typename K::Triangle_2 Triangle_2;
|
||||||
public:
|
public:
|
||||||
typedef Point_2 result_type;
|
template<class>
|
||||||
|
struct result {
|
||||||
|
typedef const Point_2& type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename F>
|
||||||
|
struct result<F(Iso_rectangle_2, int)> {
|
||||||
|
typedef Point_2 type;
|
||||||
|
};
|
||||||
|
|
||||||
const Point_2 &
|
const Point_2 &
|
||||||
operator()( const Segment_2& s, int i) const
|
operator()( const Segment_2& s, int i) const
|
||||||
|
|
@ -3370,22 +3377,6 @@ namespace CartesianKernelFunctors {
|
||||||
|
|
||||||
} //namespace CartesianKernelFunctors
|
} //namespace CartesianKernelFunctors
|
||||||
|
|
||||||
#ifndef CGAL_CFG_DONT_OVERLOAD_TOO_MUCH
|
|
||||||
template < typename K>
|
|
||||||
struct Qualified_result_of<CartesianKernelFunctors::Construct_vertex_2<K>, typename K::Segment_2, int >
|
|
||||||
{
|
|
||||||
typedef typename K::Point_2 const & type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template < typename K>
|
|
||||||
struct Qualified_result_of<CartesianKernelFunctors::Construct_vertex_2<K>, typename K::Triangle_2, int >
|
|
||||||
{
|
|
||||||
typedef typename K::Point_2 const & type;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For Iso_rectangle the non specialized template will do the right thing, namely return a copy of a point
|
|
||||||
|
|
||||||
namespace CartesianKernelFunctors {
|
namespace CartesianKernelFunctors {
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
|
|
|
||||||
|
|
@ -109,33 +109,25 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circular_source_vertex_2(Circular_arc_2)>::type
|
||||||
<typename R::Construct_circular_source_vertex_2,Circular_arc_2>::type
|
|
||||||
//const Circular_arc_point_2 &
|
|
||||||
source() const
|
source() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_source_vertex_2()(*this);
|
return typename R::Construct_circular_source_vertex_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circular_target_vertex_2(Circular_arc_2)>::type
|
||||||
<typename R::Construct_circular_target_vertex_2,Circular_arc_2>::type
|
|
||||||
//const Circular_arc_point_2 &
|
|
||||||
target() const
|
target() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_target_vertex_2()(*this);
|
return typename R::Construct_circular_target_vertex_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circular_min_vertex_2(Circular_arc_2)>::type
|
||||||
<typename R::Construct_circular_min_vertex_2,Circular_arc_2>::type
|
|
||||||
//const Circular_arc_point_2 &
|
|
||||||
left() const
|
left() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_min_vertex_2()(*this);
|
return typename R::Construct_circular_min_vertex_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circular_max_vertex_2(Circular_arc_2)>::type
|
||||||
<typename R::Construct_circular_max_vertex_2,Circular_arc_2>::type
|
|
||||||
//const Circular_arc_point_2 &
|
|
||||||
right() const
|
right() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_max_vertex_2()(*this);
|
return typename R::Construct_circular_max_vertex_2()(*this);
|
||||||
|
|
@ -151,25 +143,19 @@ public:
|
||||||
return typename R::Is_y_monotone_2()(*this);
|
return typename R::Is_y_monotone_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circle_2(Circular_arc_2)>::type
|
||||||
<typename R::Construct_circle_2,Circular_arc_2>::type
|
|
||||||
// const Circle_2 &
|
|
||||||
supporting_circle() const
|
supporting_circle() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circle_2()(*this);
|
return typename R::Construct_circle_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_center_2(Circular_arc_2)>::type
|
||||||
<typename R::Construct_center_2,Circular_arc_2>::type
|
|
||||||
// const Point_2 &
|
|
||||||
center() const
|
center() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_center_2()(*this);
|
return typename R::Construct_center_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Compute_squared_radius_2( Circular_arc_2)>::type
|
||||||
<typename R::Compute_squared_radius_2, Circular_arc_2>::type
|
|
||||||
// const FT &
|
|
||||||
squared_radius() const
|
squared_radius() const
|
||||||
{
|
{
|
||||||
return typename R::Compute_squared_radius_2()(*this);
|
return typename R::Compute_squared_radius_2()(*this);
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@
|
||||||
#ifndef CGAL_CIRCULAR_ARC_POINT_2_H
|
#ifndef CGAL_CIRCULAR_ARC_POINT_2_H
|
||||||
#define CGAL_CIRCULAR_ARC_POINT_2_H
|
#define CGAL_CIRCULAR_ARC_POINT_2_H
|
||||||
|
|
||||||
|
#include <boost/utility/result_of.hpp>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
template < typename CircularKernel >
|
template < typename CircularKernel >
|
||||||
|
|
@ -72,17 +74,15 @@ public:
|
||||||
: RCircular_arc_point_2(typename R::Construct_circular_arc_point_2()(p))
|
: RCircular_arc_point_2(typename R::Construct_circular_arc_point_2()(p))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename
|
||||||
<typename R::Compute_circular_x_2,Circular_arc_point_2>::type
|
boost::result_of<R::Compute_circular_x_2(Circular_arc_point_2)>::type
|
||||||
//const Root_of_2 &
|
|
||||||
x() const
|
x() const
|
||||||
{
|
{
|
||||||
return typename R::Compute_circular_x_2()(*this);
|
return typename R::Compute_circular_x_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename
|
||||||
<typename R::Compute_circular_y_2,Circular_arc_point_2>::type
|
boost::result_of<R::Compute_circular_y_2(Circular_arc_point_2)>::type
|
||||||
//const Root_of_2 &
|
|
||||||
y() const
|
y() const
|
||||||
{
|
{
|
||||||
return typename R::Compute_circular_y_2()(*this);
|
return typename R::Compute_circular_y_2()(*this);
|
||||||
|
|
|
||||||
|
|
@ -37,39 +37,79 @@ namespace CircularFunctors {
|
||||||
template < class CK >
|
template < class CK >
|
||||||
class Construct_circle_2 : public CK::Linear_kernel::Construct_circle_2
|
class Construct_circle_2 : public CK::Linear_kernel::Construct_circle_2
|
||||||
{
|
{
|
||||||
|
CK::Linear_kernel::Construct_circle_2 Base_functor;
|
||||||
|
|
||||||
|
typedef typename CK::Linear_kernel::Construct_circle_2::result_type
|
||||||
|
forwarded_result_type;
|
||||||
|
typedef typename CK::FT FT;
|
||||||
|
typedef typename CK::Linear_kernel::Point_2 Point_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Construct_circle_2() : Base_functor(CK().construct_circle_2_object()) {}
|
||||||
|
|
||||||
|
template<class>
|
||||||
|
struct result {
|
||||||
|
// all forwarded smoothly
|
||||||
|
typedef forwarded_result_type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename F>
|
||||||
|
struct result<F(Circular_arc_2)> {
|
||||||
|
// this one returns a reference
|
||||||
|
typedef const forwared_result_type& type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// forward the functors from Base_functor
|
||||||
|
forwarded_result_type
|
||||||
|
operator()( const Point_2& center, const FT& squared_radius,
|
||||||
|
Orientation orientation = COUNTERCLOCKWISE) const
|
||||||
|
{
|
||||||
|
return Base_functor(center, squared_radius, orientation);
|
||||||
|
}
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
|
operator()( const Point_2& p, const Point_2& q, const Point_2& r) const
|
||||||
|
{
|
||||||
|
return Base_functor(p, q, r);
|
||||||
|
}
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
|
operator()( const Point_2& p, const Point_2& q,
|
||||||
|
Orientation orientation = COUNTERCLOCKWISE) const
|
||||||
|
{
|
||||||
|
return Base_functor(p, q, orientation);
|
||||||
|
}
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
|
operator()( const Point_2& p, const Point_2& q,
|
||||||
|
const FT& bulge) const
|
||||||
|
{
|
||||||
|
return Base_functor(p, q, bulge);
|
||||||
|
}
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
|
operator()( const Point_2& center,
|
||||||
|
Orientation orientation = COUNTERCLOCKWISE) const
|
||||||
|
{
|
||||||
|
return Base_functor(center, orientation);
|
||||||
|
}
|
||||||
|
|
||||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||||
typedef typename CK::Linear_kernel::Construct_circle_2::result_type
|
|
||||||
result_type;
|
|
||||||
|
|
||||||
using CK::Linear_kernel::Construct_circle_2::operator();
|
|
||||||
|
|
||||||
result_type
|
result_type
|
||||||
operator() ( const typename CK::Polynomial_for_circles_2_2 &eq )
|
operator() ( const typename CK::Polynomial_for_circles_2_2 &eq ) {
|
||||||
{
|
return construct_circle_2<CK>(eq);
|
||||||
return construct_circle_2<CK>(eq);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const result_type&
|
const result_type&
|
||||||
operator() (const Circular_arc_2 & a) const
|
operator() (const Circular_arc_2 & a) const {
|
||||||
{
|
return (a.rep().supporting_circle());
|
||||||
return (a.rep().supporting_circle());
|
}
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace CircularFunctors
|
} // namespace CircularFunctors
|
||||||
|
|
||||||
#ifndef CGAL_CFG_DONT_OVERLOAD_TOO_MUCH
|
|
||||||
template < typename K>
|
|
||||||
struct Qualified_result_of<CircularFunctors::Construct_circle_2<K>,
|
|
||||||
typename K::Circular_arc_2>
|
|
||||||
{
|
|
||||||
typedef const typename K::Circle_2 & type;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif // CGAL_CIRCULAR_KERNEL_FUNCTION_OBJECTS_ON_CIRCLE_2_H
|
#endif // CGAL_CIRCULAR_KERNEL_FUNCTION_OBJECTS_ON_CIRCLE_2_H
|
||||||
|
|
|
||||||
|
|
@ -829,17 +829,15 @@ namespace CircularFunctors {
|
||||||
|
|
||||||
|
|
||||||
template <class CK>
|
template <class CK>
|
||||||
class Compute_circular_x_2: Has_qrt
|
class Compute_circular_x_2
|
||||||
{
|
{
|
||||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||||
typedef typename CK::Root_of_2 Root_of_2;
|
typedef typename CK::Root_of_2 Root_of_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
typedef const Root_of_2& result_type;
|
||||||
|
|
||||||
typedef Root_of_2 result_type;
|
result_type operator() (const Circular_arc_point_2 & a) const
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Circular_arc_point_2 & a) const
|
|
||||||
{
|
{
|
||||||
return (a.rep().x());
|
return (a.rep().x());
|
||||||
}
|
}
|
||||||
|
|
@ -847,17 +845,16 @@ namespace CircularFunctors {
|
||||||
|
|
||||||
|
|
||||||
template <class CK>
|
template <class CK>
|
||||||
class Compute_circular_y_2: Has_qrt
|
class Compute_circular_y_2
|
||||||
{
|
{
|
||||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||||
typedef typename CK::Root_of_2 Root_of_2;
|
typedef typename CK::Root_of_2 Root_of_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Root_of_2 result_type;
|
typedef const Root_of_2& result_type;
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Circular_arc_point_2 & a) const
|
result_type operator() (const Circular_arc_point_2 & a) const
|
||||||
{
|
{
|
||||||
return (a.rep().y());
|
return (a.rep().y());
|
||||||
}
|
}
|
||||||
|
|
@ -865,27 +862,21 @@ namespace CircularFunctors {
|
||||||
|
|
||||||
|
|
||||||
template <class CK>
|
template <class CK>
|
||||||
class Construct_circular_min_vertex_2 : Has_qrt
|
class Construct_circular_min_vertex_2
|
||||||
{
|
{
|
||||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
typedef const Circular_arc_point_2 & result_type;
|
||||||
|
|
||||||
typedef Circular_arc_point_2 result_type;
|
result_type operator() (const Circular_arc_2 & a) const
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Circular_arc_2 & a) const
|
|
||||||
{
|
{
|
||||||
// if (a.rep().Cache_minmax == 't')
|
|
||||||
// return (a.rep().source());
|
|
||||||
// if (a.rep().Cache_minmax == 's')
|
|
||||||
// return (a.rep().target());
|
|
||||||
return (a.rep().left());
|
return (a.rep().left());
|
||||||
}
|
}
|
||||||
|
|
||||||
qualified_result_type operator() (const Line_arc_2 & a) const
|
result_type operator() (const Line_arc_2 & a) const
|
||||||
{
|
{
|
||||||
return (a.rep().left());
|
return (a.rep().left());
|
||||||
}
|
}
|
||||||
|
|
@ -893,7 +884,7 @@ namespace CircularFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class CK>
|
template <class CK>
|
||||||
class Construct_circular_max_vertex_2: Has_qrt
|
class Construct_circular_max_vertex_2
|
||||||
{
|
{
|
||||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||||
|
|
@ -901,19 +892,14 @@ namespace CircularFunctors {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Circular_arc_point_2 result_type;
|
typedef const Circular_arc_point_2& result_type;
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Circular_arc_2 & a) const
|
result_type operator() (const Circular_arc_2 & a) const
|
||||||
{
|
{
|
||||||
// if (a.rep().Cache_minmax == 's')
|
|
||||||
// return (a.rep().source());
|
|
||||||
// if (a.rep().Cache_minmax == 't')
|
|
||||||
// return (a.rep().target());
|
|
||||||
return (a.rep().right());
|
return (a.rep().right());
|
||||||
}
|
}
|
||||||
|
|
||||||
qualified_result_type operator() (const Line_arc_2 & a) const
|
result_type operator() (const Line_arc_2 & a) const
|
||||||
{
|
{
|
||||||
return (a.rep().right());
|
return (a.rep().right());
|
||||||
}
|
}
|
||||||
|
|
@ -921,7 +907,7 @@ namespace CircularFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class CK>
|
template <class CK>
|
||||||
class Construct_circular_source_vertex_2: Has_qrt
|
class Construct_circular_source_vertex_2
|
||||||
{
|
{
|
||||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||||
|
|
@ -929,20 +915,19 @@ namespace CircularFunctors {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Circular_arc_point_2 result_type;
|
typedef const Circular_arc_point_2& result_type;
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Circular_arc_2 & a) const
|
result_type operator() (const Circular_arc_2 & a) const
|
||||||
{ return a.rep().source(); }
|
{ return a.rep().source(); }
|
||||||
|
|
||||||
qualified_result_type operator() (const Line_arc_2 & a) const
|
result_type operator() (const Line_arc_2 & a) const
|
||||||
{ return a.rep().source();}
|
{ return a.rep().source();}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <class CK>
|
template <class CK>
|
||||||
class Construct_circular_target_vertex_2: Has_qrt
|
class Construct_circular_target_vertex_2
|
||||||
{
|
{
|
||||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||||
|
|
@ -950,13 +935,12 @@ namespace CircularFunctors {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Circular_arc_point_2 result_type;
|
typedef const Circular_arc_point_2& result_type;
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Circular_arc_2 & a) const
|
result_type operator() (const Circular_arc_2 & a) const
|
||||||
{ return a.rep().target();}
|
{ return a.rep().target();}
|
||||||
|
|
||||||
qualified_result_type operator() (const Line_arc_2 & a) const
|
result_type operator() (const Line_arc_2 & a) const
|
||||||
{ return a.rep().target();}
|
{ return a.rep().target();}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
@ -1194,7 +1178,7 @@ namespace CircularFunctors {
|
||||||
|
|
||||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||||
template <class CK>
|
template <class CK>
|
||||||
class Construct_supporting_circle_2: Has_qrt
|
class Construct_supporting_circle_2
|
||||||
{
|
{
|
||||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||||
typedef typename CK::Circle_2 Circle_2;
|
typedef typename CK::Circle_2 Circle_2;
|
||||||
|
|
@ -1211,7 +1195,7 @@ namespace CircularFunctors {
|
||||||
|
|
||||||
|
|
||||||
template <class CK>
|
template <class CK>
|
||||||
class Construct_supporting_line_2: Has_qrt
|
class Construct_supporting_line_2
|
||||||
{
|
{
|
||||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||||
typedef typename CK::Line_2 Line_2;
|
typedef typename CK::Line_2 Line_2;
|
||||||
|
|
@ -1232,32 +1216,28 @@ namespace CircularFunctors {
|
||||||
class Construct_center_2
|
class Construct_center_2
|
||||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||||
: public CK::Linear_kernel::Construct_center_2
|
: public CK::Linear_kernel::Construct_center_2
|
||||||
#else
|
|
||||||
: public Has_qrt
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
typedef typename CK::Linear_kernel::Construct_center_2::result_type result_type;
|
||||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||||
public:
|
public:
|
||||||
|
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
using CK::Linear_kernel::Construct_center_2::operator();
|
||||||
typedef typename CK::Linear_kernel::Construct_center_2::result_type result_type;
|
#else
|
||||||
using CK::Linear_kernel::Construct_center_2::operator();
|
|
||||||
#else
|
|
||||||
|
|
||||||
typedef typename CK::Linear_kernel LK;
|
typedef typename CK::Linear_kernel LK;
|
||||||
typedef typename LK::Construct_center_2 LK_Construct_center_2;
|
typedef typename LK::Construct_center_2 LK_Construct_center_2;
|
||||||
typedef typename CK::Point_2 Point_2;
|
typedef typename CK::Point_2 Point_2;
|
||||||
typedef typename CK::Circle_2 Circle_2;
|
typedef typename CK::Circle_2 Circle_2;
|
||||||
public:
|
|
||||||
typedef Point_2 result_type;
|
|
||||||
|
|
||||||
const result_type&
|
public:
|
||||||
operator()( const Circle_2& c) const
|
result_type
|
||||||
{ return LK_Construct_center_2()(c); }
|
operator()( const Circle_2& c) const
|
||||||
|
{ return LK_Construct_center_2()(c); }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const result_type&
|
result_type
|
||||||
operator()(const Circular_arc_2& c) const
|
operator()(const Circular_arc_2& c) const
|
||||||
{ return c.rep().center(); }
|
{ return c.rep().center(); }
|
||||||
|
|
||||||
|
|
@ -1265,75 +1245,55 @@ namespace CircularFunctors {
|
||||||
|
|
||||||
template <typename CK>
|
template <typename CK>
|
||||||
class Compute_squared_radius_2
|
class Compute_squared_radius_2
|
||||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
|
||||||
: public CK::Linear_kernel::Compute_squared_radius_2
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private:
|
||||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||||
public:
|
|
||||||
|
|
||||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
|
||||||
typedef typename CK::Linear_kernel::Compute_squared_radius_2::result_type result_type;
|
|
||||||
using CK::Linear_kernel::Compute_squared_radius_2::operator();
|
|
||||||
#else
|
|
||||||
|
|
||||||
typedef typename CK::Linear_kernel LK;
|
typedef typename CK::Linear_kernel LK;
|
||||||
typedef typename LK::Compute_squared_radius_2 LK_Compute_squared_radius_2;
|
typedef typename LK::Compute_squared_radius_2 LK_Compute_squared_radius_2;
|
||||||
typedef typename CK::FT FT;
|
typedef typename CK::FT FT;
|
||||||
typedef typename CK::Point_2 Point_2;
|
typedef typename CK::Point_2 Point_2;
|
||||||
typedef typename CK::Circle_2 Circle_2;
|
typedef typename CK::Circle_2 Circle_2;
|
||||||
|
typedef FT forwarded_result_type;
|
||||||
public:
|
public:
|
||||||
typedef FT result_type;
|
template<typename>
|
||||||
|
struct result {
|
||||||
|
typedef forwarded_result_type type;
|
||||||
|
};
|
||||||
|
|
||||||
const result_type&
|
template<typename F>
|
||||||
|
struct result<F(Circular_arc_2)> {
|
||||||
|
typedef const forwarded_result_type& type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename F>
|
||||||
|
struct result<F(Circle_2)> {
|
||||||
|
typedef const forwarded_result_type& type;
|
||||||
|
};
|
||||||
|
|
||||||
|
const forwarded_result_type&
|
||||||
operator()( const Circle_2& c) const
|
operator()( const Circle_2& c) const
|
||||||
{ return LK_Compute_squared_radius_2()(c); }
|
{ return LK_Compute_squared_radius_2()(c); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()( const Point_2& p) const
|
operator()( const Point_2& p) const
|
||||||
{ return LK_Compute_squared_radius_2()(p); }
|
{ return LK_Compute_squared_radius_2()(p); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()( const Point_2& p, const Point_2& q) const
|
operator()( const Point_2& p, const Point_2& q) const
|
||||||
{ return LK_Compute_squared_radius_2()(p, q); }
|
{ return LK_Compute_squared_radius_2()(p, q); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()( const Point_2& p, const Point_2& q, const Point_2& r) const
|
operator()( const Point_2& p, const Point_2& q, const Point_2& r) const
|
||||||
{ return LK_Compute_squared_radius_2()(p, q, r); }
|
{ return LK_Compute_squared_radius_2()(p, q, r); }
|
||||||
|
|
||||||
#endif
|
const forwarded_result_type&
|
||||||
|
|
||||||
const result_type&
|
|
||||||
operator()(const Circular_arc_2& c) const
|
operator()(const Circular_arc_2& c) const
|
||||||
{ return c.rep().squared_radius(); }
|
{ return c.rep().squared_radius(); }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace CircularFunctors
|
} // namespace CircularFunctors
|
||||||
|
|
||||||
#ifndef CGAL_CFG_DONT_OVERLOAD_TOO_MUCH
|
|
||||||
template < typename K>
|
|
||||||
struct Qualified_result_of<CircularFunctors::Construct_center_2<K>,
|
|
||||||
typename K::Circular_arc_2>
|
|
||||||
{
|
|
||||||
typedef typename K::Point_2 const & type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template < typename K>
|
|
||||||
struct Qualified_result_of<CircularFunctors::Compute_squared_radius_2<K>,
|
|
||||||
typename K::Circular_arc_2>
|
|
||||||
{
|
|
||||||
typedef typename K::FT const & type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template < typename K>
|
|
||||||
struct Qualified_result_of<CircularFunctors::Compute_squared_radius_2<K>,
|
|
||||||
typename K::Circle_2>
|
|
||||||
{
|
|
||||||
typedef typename K::FT const & type;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif // CGAL_CIRCULAR_KERNEL_FUNCTION_OBJECTS_POLYNOMIAL_CIRCULAR_H
|
#endif // CGAL_CIRCULAR_KERNEL_FUNCTION_OBJECTS_POLYNOMIAL_CIRCULAR_H
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@
|
||||||
#ifndef CGAL_LINE_ARC_2_H
|
#ifndef CGAL_LINE_ARC_2_H
|
||||||
#define CGAL_LINE_ARC_2_H
|
#define CGAL_LINE_ARC_2_H
|
||||||
|
|
||||||
|
#include <boost/result_of.hpp>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
template <class CircularKernel>
|
template <class CircularKernel>
|
||||||
|
|
@ -92,33 +94,25 @@ public:
|
||||||
: RLine_arc_2(a)
|
: RLine_arc_2(a)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<R::Construct_circular_source_vertex_2(Line_arc_2)>::type
|
||||||
<typename R::Construct_circular_source_vertex_2,Line_arc_2>::type
|
|
||||||
//const Circular_arc_point_2 &
|
|
||||||
source() const
|
source() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_source_vertex_2()(*this);
|
return typename R::Construct_circular_source_vertex_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost;:result_of<R::Construct_circular_target_vertex_2(Line_arc_2)>::type
|
||||||
<typename R::Construct_circular_target_vertex_2,Line_arc_2>::type
|
|
||||||
//const Circular_arc_point_2 &
|
|
||||||
target() const
|
target() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_target_vertex_2()(*this);
|
return typename R::Construct_circular_target_vertex_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost;:result_of<R::Construct_circular_min_vertex_2(Line_arc_2)>::type
|
||||||
<typename R::Construct_circular_min_vertex_2,Line_arc_2>::type
|
|
||||||
//const Circular_arc_point_2 & left() const
|
|
||||||
left() const
|
left() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_min_vertex_2()(*this);
|
return typename R::Construct_circular_min_vertex_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost;:result_of<R::Construct_circular_max_vertex_2(Line_arc_2)>::type
|
||||||
<typename R::Construct_circular_max_vertex_2,Line_arc_2>::type
|
|
||||||
//const Circular_arc_point_2 & right() const
|
|
||||||
right() const
|
right() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_max_vertex_2()(*this);
|
return typename R::Construct_circular_max_vertex_2()(*this);
|
||||||
|
|
|
||||||
|
|
@ -119,22 +119,19 @@ namespace CGAL {
|
||||||
: RCircular_arc_3(a)
|
: RCircular_arc_3(a)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circular_source_vertex_3(Circular_arc_3)>::type
|
||||||
<typename R::Construct_circular_source_vertex_3,Circular_arc_3>::type
|
|
||||||
source() const
|
source() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_source_vertex_3()(*this);
|
return typename R::Construct_circular_source_vertex_3()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circular_target_vertex_3(Circular_arc_3)>::type
|
||||||
<typename R::Construct_circular_target_vertex_3,Circular_arc_3>::type
|
|
||||||
target() const
|
target() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_target_vertex_3()(*this);
|
return typename R::Construct_circular_target_vertex_3()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circle_3(Circular_arc_3)>::type
|
||||||
<typename R::Construct_circle_3,Circular_arc_3>::type
|
|
||||||
supporting_circle() const
|
supporting_circle() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circle_3()(*this);
|
return typename R::Construct_circle_3()(*this);
|
||||||
|
|
|
||||||
|
|
@ -196,18 +196,15 @@ public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_circular_x_3,Circular_arc_point_3>::type
|
typename boost::result_of<typename R::Compute_circular_x_3(Circular_arc_point_3)>::type
|
||||||
//const Root_of_2 &
|
|
||||||
x() const
|
x() const
|
||||||
{ return typename R::Compute_circular_x_3()(*this);}
|
{ return typename R::Compute_circular_x_3()(*this);}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_circular_y_3,Circular_arc_point_3>::type
|
typename boost::result_of<typename R::Compute_circular_y_3(Circular_arc_point_3)>::type
|
||||||
//const Root_of_2 &
|
|
||||||
y() const
|
y() const
|
||||||
{ return typename R::Compute_circular_y_3()(*this);}
|
{ return typename R::Compute_circular_y_3()(*this);}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_circular_z_3,Circular_arc_point_3>::type
|
typename boost::result_of<typename R::Compute_circular_z_3(Circular_arc_point_3)>::type
|
||||||
//const Root_of_2 &
|
|
||||||
z() const
|
z() const
|
||||||
{ return typename R::Compute_circular_z_3()(*this);}
|
{ return typename R::Compute_circular_z_3()(*this);}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,47 +106,44 @@ template < class SK > \
|
||||||
CGAL_SPHERICAL_KERNEL_MACRO_FUNCTOR_COMPARE_(xyz)
|
CGAL_SPHERICAL_KERNEL_MACRO_FUNCTOR_COMPARE_(xyz)
|
||||||
|
|
||||||
template <class SK>
|
template <class SK>
|
||||||
class Compute_circular_x_3: Has_qrt
|
class Compute_circular_x_3
|
||||||
{
|
{
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef typename SK::Root_of_2 Root_of_2;
|
typedef typename SK::Root_of_2 Root_of_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Root_of_2 result_type;
|
typedef const Root_of_2& result_type;
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Circular_arc_point_3 & a) const
|
result_type operator() (const Circular_arc_point_3 & a) const
|
||||||
{ return (a.rep().x()); }
|
{ return (a.rep().x()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class SK>
|
template <class SK>
|
||||||
class Compute_circular_y_3: Has_qrt
|
class Compute_circular_y_3
|
||||||
{
|
{
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef typename SK::Root_of_2 Root_of_2;
|
typedef typename SK::Root_of_2 Root_of_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Root_of_2 result_type;
|
typedef const Root_of_2& result_type;
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Circular_arc_point_3 & a) const
|
result_type operator() (const Circular_arc_point_3 & a) const
|
||||||
{ return (a.rep().y()); }
|
{ return (a.rep().y()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class SK>
|
template <class SK>
|
||||||
class Compute_circular_z_3: Has_qrt
|
class Compute_circular_z_3
|
||||||
{
|
{
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef typename SK::Root_of_2 Root_of_2;
|
typedef typename SK::Root_of_2 Root_of_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Root_of_2 result_type;
|
typedef const Root_of_2& result_type;
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Circular_arc_point_3 & a) const
|
result_type operator() (const Circular_arc_point_3 & a) const
|
||||||
{ return (a.rep().z()); }
|
{ return (a.rep().z()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -616,89 +613,83 @@ template < class SK > \
|
||||||
|
|
||||||
template <class SK>
|
template <class SK>
|
||||||
class Construct_line_3
|
class Construct_line_3
|
||||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
|
||||||
|
|
||||||
: public SK::Linear_kernel::Construct_line_3
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||||
typedef typename SK::Line_3 Line_3;
|
typedef typename SK::Line_3 Line_3;
|
||||||
|
|
||||||
|
typedef typename SK::Linear_kernel::Construct_line_3::result_type forwarded_result_type;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef typename SK::Linear_kernel::Construct_line_3::result_type
|
|
||||||
result_type;
|
|
||||||
|
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
|
||||||
using SK::Linear_kernel::Construct_line_3::operator();
|
|
||||||
#else
|
|
||||||
|
|
||||||
typedef typename SK::Point_3 Point_3;
|
typedef typename SK::Point_3 Point_3;
|
||||||
typedef typename SK::Direction_3 Direction_3;
|
typedef typename SK::Direction_3 Direction_3;
|
||||||
typedef typename SK::Vector_3 Vector_3;
|
typedef typename SK::Vector_3 Vector_3;
|
||||||
typedef typename SK::Segment_3 Segment_3;
|
typedef typename SK::Segment_3 Segment_3;
|
||||||
typedef typename SK::Ray_3 Ray_3;
|
typedef typename SK::Ray_3 Ray_3;
|
||||||
typedef typename SK::Linear_kernel::Construct_line_3 LK_Construct_line_3;
|
|
||||||
|
|
||||||
result_type
|
template<class>
|
||||||
|
struct result {
|
||||||
|
typedef forwarded_result_type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename F>
|
||||||
|
struct result<F(Line_arc_3)> {
|
||||||
|
typdef const forwarded_result_type& type;
|
||||||
|
};
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
operator()(Return_base_tag, const Point_3& p, const Point_3& q) const
|
operator()(Return_base_tag, const Point_3& p, const Point_3& q) const
|
||||||
{ return LK_Construct_line_3()(p, Vector_3(p, q)); }
|
{ return LK_Construct_line_3()(p, Vector_3(p, q)); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()(Return_base_tag, const Point_3& p, const Direction_3& d) const
|
operator()(Return_base_tag, const Point_3& p, const Direction_3& d) const
|
||||||
{ return operator()(Return_base_tag(), p, Vector_3(d.dx(), d.dy(), d.dz())); }
|
{ return operator()(Return_base_tag(), p, Vector_3(d.dx(), d.dy(), d.dz())); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()(Return_base_tag, const Point_3& p, const Vector_3& v) const
|
operator()(Return_base_tag, const Point_3& p, const Vector_3& v) const
|
||||||
{ return LK_Construct_line_3()(p, v); }
|
{ return LK_Construct_line_3()(p, v); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()(Return_base_tag, const Segment_3& s) const
|
operator()(Return_base_tag, const Segment_3& s) const
|
||||||
{ return LK_Construct_line_3()(s.source(), Vector_3(s.source(), s.target())); }
|
{ return LK_Construct_line_3()(s.source(), Vector_3(s.source(), s.target())); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()(Return_base_tag, const Ray_3& r) const
|
operator()(Return_base_tag, const Ray_3& r) const
|
||||||
{ return LK_Construct_line_3()(r.source(), Vector_3(r.source(), r.second_point())); }
|
{ return LK_Construct_line_3()(r.source(), Vector_3(r.source(), r.second_point())); }
|
||||||
|
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()(const Point_3& p, const Point_3& q) const
|
operator()(const Point_3& p, const Point_3& q) const
|
||||||
{ return this->operator()(Return_base_tag(), p, q); }
|
{ return this->operator()(Return_base_tag(), p, q); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()(const Point_3& p, const Direction_3& d) const
|
operator()(const Point_3& p, const Direction_3& d) const
|
||||||
{ return this->operator()(Return_base_tag(), p, d); }
|
{ return this->operator()(Return_base_tag(), p, d); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()(const Point_3& p, const Vector_3& v) const
|
operator()(const Point_3& p, const Vector_3& v) const
|
||||||
{ return this->operator()(Return_base_tag(), p, v); }
|
{ return this->operator()(Return_base_tag(), p, v); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()(const Segment_3& s) const
|
operator()(const Segment_3& s) const
|
||||||
{ return this->operator()(Return_base_tag(), s); }
|
{ return this->operator()(Return_base_tag(), s); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator()(const Ray_3& r) const
|
operator()(const Ray_3& r) const
|
||||||
{ return this->operator()(Return_base_tag(), r); }
|
{ return this->operator()(Return_base_tag(), r); }
|
||||||
|
|
||||||
|
const forwarded_result_type& operator() (const Line_arc_3 & a) const
|
||||||
#endif
|
|
||||||
qualified_result_type operator() (const Line_arc_3 & a) const
|
|
||||||
{ return (a.rep().supporting_line()); }
|
{ return (a.rep().supporting_line()); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
operator() ( const typename SK::Polynomials_for_line_3 &eq )
|
operator() ( const typename SK::Polynomials_for_line_3 &eq )
|
||||||
{ return SphericalFunctors::construct_line_3<SK>(eq); }
|
{ return SphericalFunctors::construct_line_3<SK>(eq); }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template < class SK >
|
template < class SK >
|
||||||
class Construct_circle_3 : public SK::Linear_kernel::Construct_circle_3
|
class Construct_circle_3
|
||||||
{
|
{
|
||||||
public:
|
typedef typename SK::Linear_kernel::Construct_circle_3 Extended;
|
||||||
|
typedef typename Extended::result_type forwarded_result_type;
|
||||||
typedef typename SK::FT FT;
|
typedef typename SK::FT FT;
|
||||||
typedef typename SK::Point_3 Point_3;
|
typedef typename SK::Point_3 Point_3;
|
||||||
typedef typename SK::Plane_3 Plane_3;
|
typedef typename SK::Plane_3 Plane_3;
|
||||||
|
|
@ -709,17 +700,61 @@ template < class SK > \
|
||||||
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
||||||
typedef typename SK::Kernel_base::Circle_3 RCircle_3;
|
typedef typename SK::Kernel_base::Circle_3 RCircle_3;
|
||||||
typedef typename Circle_3::Rep Rep;
|
typedef typename Circle_3::Rep Rep;
|
||||||
|
public:
|
||||||
|
template<typename>
|
||||||
|
struct result {
|
||||||
|
typedef forwarded_result_type type;
|
||||||
|
};
|
||||||
|
|
||||||
typedef typename SK::Linear_kernel::Construct_circle_3::result_type result_type;
|
template<typename F>
|
||||||
typedef const result_type & qualified_result_type;
|
struct result<F(Circular_arc_3)> {
|
||||||
|
typedef const forwarded_result_type& type;
|
||||||
|
};
|
||||||
|
|
||||||
using SK::Linear_kernel::Construct_circle_3::operator();
|
forwarded_result_type
|
||||||
|
operator()(const Point_3& p, const FT& sr,
|
||||||
|
const Plane_3& plane) const
|
||||||
|
{ return Extended()(p, sr, plane); }
|
||||||
|
|
||||||
result_type
|
forwarded_result_type
|
||||||
|
operator() (const Point_3& p, const FT& sr,
|
||||||
|
const Vector_3& v) const
|
||||||
|
{ return Extended()(p, sr, v); }
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
|
operator() (const Point_3& p, const FT& sr,
|
||||||
|
const Direction_3& d) const
|
||||||
|
{ return Extended()(p, sr, d); }
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
|
operator() (const Sphere_3& s1, const Sphere_3& s2) const
|
||||||
|
{ return Extended()(s1, s2); }
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
|
operator() (const Plane_3& p, const Sphere_3& s) const
|
||||||
|
{ return Extended()(p, s); }
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
|
operator() (const Sphere_3& s, const Plane_3& p) const
|
||||||
|
{ return Extended()(p, s); }
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
|
operator() (const Plane_3& p, const Sphere_3& s, int a) const
|
||||||
|
{ return Extended()(p, s, a); }
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
|
operator() (const Sphere_3& s, const Plane_3& p, int a) const
|
||||||
|
{ return Extended()(p, s, a); }
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
|
operator()( const Point_3& p1, const Point_3& p2, const Point_3& p3) const
|
||||||
|
{ return Extended()(p1, p2, p3); }
|
||||||
|
|
||||||
|
forwarded_result_type
|
||||||
operator() ( const typename SK::Polynomials_for_circle_3 &eq )
|
operator() ( const typename SK::Polynomials_for_circle_3 &eq )
|
||||||
{ return Rep(construct_circle_3<SK>(eq)); }
|
{ return Rep(construct_circle_3<SK>(eq)); }
|
||||||
|
|
||||||
qualified_result_type
|
const forwarded_result_type&
|
||||||
operator() (const Circular_arc_3 & a) const
|
operator() (const Circular_arc_3 & a) const
|
||||||
{ return (a.rep().supporting_circle()); }
|
{ return (a.rep().supporting_circle()); }
|
||||||
|
|
||||||
|
|
@ -881,39 +916,37 @@ template < class SK > \
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class SK>
|
template <class SK>
|
||||||
class Construct_circular_min_vertex_3 : Has_qrt
|
class Construct_circular_min_vertex_3
|
||||||
{
|
{
|
||||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Circular_arc_point_3 result_type;
|
typedef const Circular_arc_point_3& result_type;
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Line_arc_3 & a) const
|
result_type operator() (const Line_arc_3 & a) const
|
||||||
{ return (a.rep().lower_xyz_extremity()); }
|
{ return (a.rep().lower_xyz_extremity()); }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class SK>
|
template <class SK>
|
||||||
class Construct_circular_max_vertex_3 : Has_qrt
|
class Construct_circular_max_vertex_3
|
||||||
{
|
{
|
||||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Circular_arc_point_3 result_type;
|
typedef const Circular_arc_point_3& result_type;
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Line_arc_3 & a) const
|
result_type operator() (const Line_arc_3 & a) const
|
||||||
{ return (a.rep().higher_xyz_extremity()); }
|
{ return (a.rep().higher_xyz_extremity()); }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class SK>
|
template <class SK>
|
||||||
class Construct_circular_source_vertex_3 : Has_qrt
|
class Construct_circular_source_vertex_3
|
||||||
{
|
{
|
||||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||||
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
||||||
|
|
@ -921,19 +954,18 @@ template < class SK > \
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Circular_arc_point_3 result_type;
|
typedef const Circular_arc_point_3& result_type;
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Line_arc_3 & a) const
|
result_type operator() (const Line_arc_3 & a) const
|
||||||
{ return (a.rep().source()); }
|
{ return (a.rep().source()); }
|
||||||
|
|
||||||
qualified_result_type operator() (const Circular_arc_3 & a) const
|
result_type operator() (const Circular_arc_3 & a) const
|
||||||
{ return (a.rep().source()); }
|
{ return (a.rep().source()); }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class SK>
|
template <class SK>
|
||||||
class Construct_circular_target_vertex_3 : Has_qrt
|
class Construct_circular_target_vertex_3
|
||||||
{
|
{
|
||||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
|
|
@ -941,13 +973,12 @@ template < class SK > \
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Circular_arc_point_3 result_type;
|
typedef const Circular_arc_point_3& result_type;
|
||||||
typedef const result_type & qualified_result_type;
|
|
||||||
|
|
||||||
qualified_result_type operator() (const Line_arc_3 & a) const
|
result_type operator() (const Line_arc_3 & a) const
|
||||||
{ return (a.rep().target()); }
|
{ return (a.rep().target()); }
|
||||||
|
|
||||||
qualified_result_type operator() (const Circular_arc_3 & a) const
|
result_type operator() (const Circular_arc_3 & a) const
|
||||||
{ return (a.rep().target()); }
|
{ return (a.rep().target()); }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
@ -1844,20 +1875,6 @@ template < class SK > \
|
||||||
|
|
||||||
} // namespace SphericalFunctors
|
} // namespace SphericalFunctors
|
||||||
|
|
||||||
template < typename K >
|
|
||||||
struct Qualified_result_of<SphericalFunctors::Construct_line_3<K>,
|
|
||||||
typename K::Line_arc_3>
|
|
||||||
{
|
|
||||||
typedef typename K::Line_3 const & type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template < typename K >
|
|
||||||
struct Qualified_result_of<SphericalFunctors::Construct_circle_3<K>,
|
|
||||||
typename K::Circular_arc_3>
|
|
||||||
{
|
|
||||||
typedef typename K::Circle_3 const & type;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif // CGAL_SPHERICAL_KERNEL_FUNCTION_OBJECTS_POLYNOMIAL_SPHERE_H
|
#endif // CGAL_SPHERICAL_KERNEL_FUNCTION_OBJECTS_POLYNOMIAL_SPHERE_H
|
||||||
|
|
|
||||||
|
|
@ -122,36 +122,31 @@ namespace CGAL {
|
||||||
: RLine_arc_3(a)
|
: RLine_arc_3(a)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circular_source_vertex_3(Line_arc_3)>::type
|
||||||
<typename R::Construct_circular_source_vertex_3,Line_arc_3>::type
|
|
||||||
source() const
|
source() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_source_vertex_3()(*this);
|
return typename R::Construct_circular_source_vertex_3()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circular_target_vertex_3(Line_arc_3)>::type
|
||||||
<typename R::Construct_circular_target_vertex_3,Line_arc_3>::type
|
|
||||||
target() const
|
target() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_target_vertex_3()(*this);
|
return typename R::Construct_circular_target_vertex_3()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circular_min_vertex_3(Line_arc_3)>::type
|
||||||
<typename R::Construct_circular_min_vertex_3,Line_arc_3>::type
|
|
||||||
lower_xyz_extremity() const
|
lower_xyz_extremity() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_min_vertex_3()(*this);
|
return typename R::Construct_circular_min_vertex_3()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_circular_max_vertex_3(Line_arc_3)>::type
|
||||||
<typename R::Construct_circular_max_vertex_3,Line_arc_3>::type
|
|
||||||
higher_xyz_extremity() const
|
higher_xyz_extremity() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_circular_max_vertex_3()(*this);
|
return typename R::Construct_circular_max_vertex_3()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of<typename R::Construct_line_3(Line_arc_3)>::type
|
||||||
<typename R::Construct_line_3,Line_arc_3>::type
|
|
||||||
supporting_line() const
|
supporting_line() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_line_3()(*this);
|
return typename R::Construct_line_3()(*this);
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -32,9 +32,39 @@
|
||||||
#include <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h>
|
#include <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h>
|
||||||
#include <CGAL/Lazy.h>
|
#include <CGAL/Lazy.h>
|
||||||
#include <boost/mpl/if.hpp>
|
#include <boost/mpl/if.hpp>
|
||||||
|
#include <boost/mpl/eval_if.hpp>
|
||||||
|
#include <boost/mpl/not.hpp>
|
||||||
|
#include <boost/type_traits/remove_reference.hpp>
|
||||||
|
#include <boost/type_traits/remove_cv.hpp>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace internal {
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
// helper to make result access lazy
|
||||||
|
struct Delayed_void_result {
|
||||||
|
typedef typename T::template result<void>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
struct foobar;
|
||||||
|
|
||||||
|
// goes through the standard process of selecting the right
|
||||||
|
// Lazy_something after the kind of the return type has been
|
||||||
|
// determined
|
||||||
|
template<typename T, typename AK, typename EK, typename Kernel, typename AKC, typename EKC>
|
||||||
|
struct Standard_pick {
|
||||||
|
typedef typename boost::remove_cv< typename boost::remove_reference< T >::type >::type T_;
|
||||||
|
typedef typename boost::mpl::if_< boost::is_same< T_, typename AK::FT >,
|
||||||
|
Lazy_construction_nt<Kernel, AKC, EKC>,
|
||||||
|
typename boost::mpl::if_< boost::is_same< T_, Object >,
|
||||||
|
Lazy_construction_object<Kernel, AKC, EKC>,
|
||||||
|
Lazy_construction<Kernel, AKC, EKC> >::type
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
} // internal
|
||||||
|
|
||||||
// Exact_kernel = exact kernel that will be made lazy
|
// Exact_kernel = exact kernel that will be made lazy
|
||||||
// Kernel = lazy kernel
|
// Kernel = lazy kernel
|
||||||
|
|
||||||
|
|
@ -147,16 +177,22 @@ public:
|
||||||
intersect_with_iterators_2_object)
|
intersect_with_iterators_2_object)
|
||||||
#else
|
#else
|
||||||
#define CGAL_Kernel_cons(C, Cf) \
|
#define CGAL_Kernel_cons(C, Cf) \
|
||||||
typedef typename boost::mpl::if_< boost::is_same<typename Approximate_kernel::C::result_type, typename Approximate_kernel::FT>,\
|
typedef typename boost::mpl::eval_if< boost::mpl::not_< boost::is_same< typename boost::result_of< typename Approximate_kernel::C () >::type, void > >, \
|
||||||
Lazy_construction_nt<Kernel,typename Approximate_kernel::C, typename Exact_kernel::C>,\
|
internal::Standard_pick< typename boost::result_of<typename Approximate_kernel::C () >::type, Approximate_kernel, Exact_kernel, Kernel, typename Approximate_kernel::C, typename Exact_kernel::C >, \
|
||||||
typename boost::mpl::if_<boost::is_same<typename Approximate_kernel::C::result_type, Object >,\
|
internal::Standard_pick< typename boost::mpl::eval_if< boost::is_same< typename boost::result_of< typename Approximate_kernel::C () >::type, void >, \
|
||||||
Lazy_construction_object<Kernel,typename Approximate_kernel::C, typename Exact_kernel::C>,\
|
internal::Delayed_void_result< typename Approximate_kernel::C >, \
|
||||||
Lazy_construction<Kernel,typename Approximate_kernel::C, typename Exact_kernel::C> >::type >::type C; \
|
boost::mpl::identity<void> >::type, \
|
||||||
C Cf() const { return C(); }
|
Approximate_kernel, Exact_kernel, Kernel, typename Approximate_kernel::C, typename Exact_kernel::C > \
|
||||||
|
>::type C; \
|
||||||
|
C Cf() const { return C(); }
|
||||||
|
|
||||||
#endif //CGAL_INTERSECT_WITH_ITERATORS_2
|
#endif //CGAL_INTERSECT_WITH_ITERATORS_2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/Kernel/interface_macros.h>
|
#include <CGAL/Kernel/interface_macros.h>
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1560,15 +1560,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_dx_2 : public Has_qrt
|
class Compute_dx_2
|
||||||
{
|
{
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
typedef typename K::Direction_2 Direction_2;
|
typedef typename K::Direction_2 Direction_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Direction_2& d) const
|
operator()(const Direction_2& d) const
|
||||||
{
|
{
|
||||||
return d.rep().dx();
|
return d.rep().dx();
|
||||||
|
|
@ -1576,15 +1576,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_dx_3 : public Has_qrt
|
class Compute_dx_3
|
||||||
{
|
{
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
typedef typename K::Direction_3 Direction_3;
|
typedef typename K::Direction_3 Direction_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Direction_3& d) const
|
operator()(const Direction_3& d) const
|
||||||
{
|
{
|
||||||
return d.rep().dx();
|
return d.rep().dx();
|
||||||
|
|
@ -1592,15 +1592,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_dy_2 : public Has_qrt
|
class Compute_dy_2
|
||||||
{
|
{
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
typedef typename K::Direction_2 Direction_2;
|
typedef typename K::Direction_2 Direction_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Direction_2& d) const
|
operator()(const Direction_2& d) const
|
||||||
{
|
{
|
||||||
return d.rep().dy();
|
return d.rep().dy();
|
||||||
|
|
@ -1608,15 +1608,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_dy_3 : public Has_qrt
|
class Compute_dy_3
|
||||||
{
|
{
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
typedef typename K::Direction_3 Direction_3;
|
typedef typename K::Direction_3 Direction_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Direction_3& d) const
|
operator()(const Direction_3& d) const
|
||||||
{
|
{
|
||||||
return d.rep().dy();
|
return d.rep().dy();
|
||||||
|
|
@ -1624,15 +1624,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_dz_3 : public Has_qrt
|
class Compute_dz_3
|
||||||
{
|
{
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
typedef typename K::Direction_3 Direction_3;
|
typedef typename K::Direction_3 Direction_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Direction_3& d) const
|
operator()(const Direction_3& d) const
|
||||||
{
|
{
|
||||||
return d.rep().dz();
|
return d.rep().dz();
|
||||||
|
|
@ -1640,7 +1640,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hx_2 : public Has_qrt
|
class Compute_hx_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
|
|
@ -1648,15 +1648,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
typedef typename K::Vector_2 Vector_2;
|
typedef typename K::Vector_2 Vector_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_2& p) const
|
operator()(const Point_2& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hx();
|
return p.rep().hx();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_2& v) const
|
operator()(const Vector_2& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hx();
|
return v.rep().hx();
|
||||||
|
|
@ -1664,7 +1664,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hx_3 : public Has_qrt
|
class Compute_hx_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
|
|
@ -1672,15 +1672,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_3& p) const
|
operator()(const Point_3& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hx();
|
return p.rep().hx();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_3& v) const
|
operator()(const Vector_3& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hx();
|
return v.rep().hx();
|
||||||
|
|
@ -1688,7 +1688,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hy_2 : public Has_qrt
|
class Compute_hy_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
|
|
@ -1696,15 +1696,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
typedef typename K::Vector_2 Vector_2;
|
typedef typename K::Vector_2 Vector_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_2& p) const
|
operator()(const Point_2& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hy();
|
return p.rep().hy();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_2& v) const
|
operator()(const Vector_2& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hy();
|
return v.rep().hy();
|
||||||
|
|
@ -1712,7 +1712,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hy_3 : public Has_qrt
|
class Compute_hy_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
|
|
@ -1720,15 +1720,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT & result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_3& p) const
|
operator()(const Point_3& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hy();
|
return p.rep().hy();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_3& v) const
|
operator()(const Vector_3& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hy();
|
return v.rep().hy();
|
||||||
|
|
@ -1736,7 +1736,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hz_3 : public Has_qrt
|
class Compute_hz_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
|
|
@ -1744,15 +1744,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_3& p) const
|
operator()(const Point_3& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hz();
|
return p.rep().hz();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_3& v) const
|
operator()(const Vector_3& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hz();
|
return v.rep().hz();
|
||||||
|
|
@ -1760,7 +1760,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hw_2 : public Has_qrt
|
class Compute_hw_2
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
|
|
@ -1768,15 +1768,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
typedef typename K::Vector_2 Vector_2;
|
typedef typename K::Vector_2 Vector_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_2& p) const
|
operator()(const Point_2& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hw();
|
return p.rep().hw();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_2& v) const
|
operator()(const Vector_2& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hw();
|
return v.rep().hw();
|
||||||
|
|
@ -1784,7 +1784,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compute_hw_3 : public Has_qrt
|
class Compute_hw_3
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::RT RT;
|
typedef typename K::RT RT;
|
||||||
|
|
@ -1792,15 +1792,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RT result_type;
|
typedef const RT& result_type;
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Point_3& p) const
|
operator()(const Point_3& p) const
|
||||||
{
|
{
|
||||||
return p.rep().hw();
|
return p.rep().hw();
|
||||||
}
|
}
|
||||||
|
|
||||||
const result_type &
|
result_type
|
||||||
operator()(const Vector_3& v) const
|
operator()(const Vector_3& v) const
|
||||||
{
|
{
|
||||||
return v.rep().hw();
|
return v.rep().hw();
|
||||||
|
|
@ -3517,7 +3517,15 @@ namespace HomogeneousKernelFunctors {
|
||||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||||
typedef typename K::Triangle_2 Triangle_2;
|
typedef typename K::Triangle_2 Triangle_2;
|
||||||
public:
|
public:
|
||||||
typedef Point_2 result_type;
|
template<typename>
|
||||||
|
struct result {
|
||||||
|
typedef const Point_2& type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename F>
|
||||||
|
struct result<F(Iso_rectangle_2)> {
|
||||||
|
typedef Point_2 type;
|
||||||
|
};
|
||||||
|
|
||||||
const Point_2 &
|
const Point_2 &
|
||||||
operator()( const Segment_2& s, int i) const
|
operator()( const Segment_2& s, int i) const
|
||||||
|
|
@ -3527,7 +3535,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
operator()( const Triangle_2& t, int i) const
|
operator()( const Triangle_2& t, int i) const
|
||||||
{ return t.rep().vertex(i); }
|
{ return t.rep().vertex(i); }
|
||||||
|
|
||||||
const Point_2
|
Point_2
|
||||||
operator()( const Iso_rectangle_2& r, int i) const
|
operator()( const Iso_rectangle_2& r, int i) const
|
||||||
{
|
{
|
||||||
switch (i%4) {
|
switch (i%4) {
|
||||||
|
|
@ -3547,22 +3555,6 @@ namespace HomogeneousKernelFunctors {
|
||||||
} //namespace HomogeneousKernelFunctors
|
} //namespace HomogeneousKernelFunctors
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_CFG_DONT_OVERLOAD_TOO_MUCH
|
|
||||||
template < typename K>
|
|
||||||
struct Qualified_result_of<HomogeneousKernelFunctors::Construct_vertex_2<K>, typename K::Segment_2, int >
|
|
||||||
{
|
|
||||||
typedef typename K::Point_2 const & type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template < typename K>
|
|
||||||
struct Qualified_result_of<HomogeneousKernelFunctors::Construct_vertex_2<K>, typename K::Triangle_2, int >
|
|
||||||
{
|
|
||||||
typedef typename K::Point_2 const & type;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For Iso_rectangle the non specialized template will do the right thing, namely return a copy of a point
|
|
||||||
|
|
||||||
namespace HomogeneousKernelFunctors {
|
namespace HomogeneousKernelFunctors {
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
|
|
|
||||||
|
|
@ -95,13 +95,13 @@ public:
|
||||||
Circle_2(const Point_2 & center)
|
Circle_2(const Point_2 & center)
|
||||||
: RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, FT(0), COUNTERCLOCKWISE)) {}
|
: RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, FT(0), COUNTERCLOCKWISE)) {}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_center_2,Circle_2>::type
|
typename boost::result_of<typename R::Construct_center_2(Circle_2)>::type
|
||||||
center() const
|
center() const
|
||||||
{
|
{
|
||||||
return R().construct_center_2_object()(*this);
|
return R().construct_center_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_squared_radius_2,Circle_2>::type
|
typename boost::result_of<typename R::Compute_squared_radius_2(Circle_2)>::type
|
||||||
squared_radius() const
|
squared_radius() const
|
||||||
{
|
{
|
||||||
return R().compute_squared_radius_2_object()(*this);
|
return R().compute_squared_radius_2_object()(*this);
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,8 @@ public:
|
||||||
Circle_3(const Rep& r)
|
Circle_3(const Rep& r)
|
||||||
: Rep(r) {}
|
: Rep(r) {}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of
|
||||||
<typename R::Construct_sphere_3, Circle_3>::type
|
<typename R::Construct_sphere_3( Circle_3)>::type
|
||||||
diametral_sphere() const
|
diametral_sphere() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_sphere_3()(*this);
|
return typename R::Construct_sphere_3()(*this);
|
||||||
|
|
@ -118,8 +118,8 @@ public:
|
||||||
return typename R::Construct_sphere_3()(*this).squared_radius();
|
return typename R::Construct_sphere_3()(*this).squared_radius();
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of
|
typename boost::result_of
|
||||||
<typename R::Construct_plane_3, Circle_3>::type
|
<typename R::Construct_plane_3( Circle_3)>::type
|
||||||
supporting_plane() const
|
supporting_plane() const
|
||||||
{
|
{
|
||||||
return typename R::Construct_plane_3()(*this);
|
return typename R::Construct_plane_3()(*this);
|
||||||
|
|
|
||||||
|
|
@ -98,19 +98,19 @@ public:
|
||||||
return R().construct_perpendicular_direction_2_object()(*this,o);
|
return R().construct_perpendicular_direction_2_object()(*this,o);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_dx_2, Direction_2>::type
|
typename boost::result_of<typename R::Compute_dx_2( Direction_2)>::type
|
||||||
dx() const
|
dx() const
|
||||||
{
|
{
|
||||||
return R().compute_dx_2_object()(*this);
|
return R().compute_dx_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_dy_2, Direction_2>::type
|
typename boost::result_of<typename R::Compute_dy_2( Direction_2)>::type
|
||||||
dy() const
|
dy() const
|
||||||
{
|
{
|
||||||
return R().compute_dy_2_object()(*this);
|
return R().compute_dy_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_dx_2, Direction_2>::type
|
typename boost::result_of<typename R::Compute_dx_2( Direction_2)>::type
|
||||||
delta(int i) const
|
delta(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( ( i == 0 ) || ( i == 1 ) );
|
CGAL_kernel_precondition( ( i == 0 ) || ( i == 1 ) );
|
||||||
|
|
|
||||||
|
|
@ -104,25 +104,25 @@ public:
|
||||||
Vector_3 vector() const { return to_vector(); }
|
Vector_3 vector() const { return to_vector(); }
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_dx_3, Direction_3>::type
|
typename boost::result_of<typename R::Compute_dx_3(Direction_3)>::type
|
||||||
dx() const
|
dx() const
|
||||||
{
|
{
|
||||||
return R().compute_dx_3_object()(*this);
|
return R().compute_dx_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_dy_3, Direction_3>::type
|
typename boost::result_of<typename R::Compute_dy_3(Direction_3)>::type
|
||||||
dy() const
|
dy() const
|
||||||
{
|
{
|
||||||
return R().compute_dy_3_object()(*this);
|
return R().compute_dy_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_dz_3, Direction_3>::type
|
typename boost::result_of<typename R::Compute_dz_3(Direction_3)>::type
|
||||||
dz() const
|
dz() const
|
||||||
{
|
{
|
||||||
return R().compute_dz_3_object()(*this);
|
return R().compute_dz_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_dx_3, Direction_3>::type
|
typename boost::result_of<typename R::Compute_dx_3(Direction_3)>::type
|
||||||
delta(int i) const
|
delta(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( i >= 0 && i <= 2 );
|
CGAL_kernel_precondition( i >= 0 && i <= 2 );
|
||||||
|
|
|
||||||
|
|
@ -90,75 +90,67 @@ public:
|
||||||
: Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), min_hx, min_hy, min_hz,
|
: Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), min_hx, min_hy, min_hz,
|
||||||
max_hx, max_hy, max_hz)) {}
|
max_hx, max_hy, max_hz)) {}
|
||||||
|
|
||||||
// TODO FIXME : why is Qrt not working here ?
|
typename boost::result_of<typename R::Construct_min_vertex_3( Iso_cuboid_3 )>::type
|
||||||
// TODO : the Cartesian and Homogeneous functors should be split here
|
|
||||||
// given that the Qrt differs.
|
|
||||||
// (or is the Homogeneous optimization simply not worth it ?)
|
|
||||||
//typename Qualified_result_of<typename R::Construct_min_vertex_3, Iso_cuboid_3 >::type
|
|
||||||
Point_3
|
|
||||||
min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
{
|
{
|
||||||
return R().construct_min_vertex_3_object()(*this);
|
return R().construct_min_vertex_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_max_vertex_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Construct_max_vertex_3( Iso_cuboid_3 )>::type
|
||||||
Point_3
|
|
||||||
max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
{
|
{
|
||||||
return R().construct_max_vertex_3_object()(*this);
|
return R().construct_max_vertex_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_vertex_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Construct_vertex_3( Iso_cuboid_3 )>::type
|
||||||
Point_3
|
|
||||||
vertex(int i) const
|
vertex(int i) const
|
||||||
{
|
{
|
||||||
return R().construct_vertex_3_object()(*this,i);
|
return R().construct_vertex_3_object()(*this,i);
|
||||||
}
|
}
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_vertex_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Construct_vertex_3( Iso_cuboid_3 )>::type
|
||||||
Point_3
|
|
||||||
operator[](int i) const
|
operator[](int i) const
|
||||||
{
|
{
|
||||||
return R().construct_vertex_3_object()(*this,i);
|
return R().construct_vertex_3_object()(*this,i);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_xmin_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Compute_xmin_3( Iso_cuboid_3 )>::type
|
||||||
xmin() const
|
xmin() const
|
||||||
{
|
{
|
||||||
return R().compute_xmin_3_object()(*this);
|
return R().compute_xmin_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_xmax_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Compute_xmax_3( Iso_cuboid_3 )>::type
|
||||||
xmax() const
|
xmax() const
|
||||||
{
|
{
|
||||||
return R().compute_xmax_3_object()(*this);
|
return R().compute_xmax_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_ymin_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Compute_ymin_3( Iso_cuboid_3 )>::type
|
||||||
ymin() const
|
ymin() const
|
||||||
{
|
{
|
||||||
return R().compute_ymin_3_object()(*this);
|
return R().compute_ymin_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_ymax_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Compute_ymax_3( Iso_cuboid_3 )>::type
|
||||||
ymax() const
|
ymax() const
|
||||||
{
|
{
|
||||||
return R().compute_ymax_3_object()(*this);
|
return R().compute_ymax_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_zmin_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Compute_zmin_3( Iso_cuboid_3 )>::type
|
||||||
zmin() const
|
zmin() const
|
||||||
{
|
{
|
||||||
return R().compute_zmin_3_object()(*this);
|
return R().compute_zmin_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_zmax_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Compute_zmax_3( Iso_cuboid_3 )>::type
|
||||||
zmax() const
|
zmax() const
|
||||||
{
|
{
|
||||||
return R().compute_zmax_3_object()(*this);
|
return R().compute_zmax_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_xmin_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Compute_xmin_3( Iso_cuboid_3 )>::type
|
||||||
min_coord(int i) const
|
min_coord(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
|
CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
|
||||||
|
|
@ -170,7 +162,7 @@ public:
|
||||||
return zmin();
|
return zmin();
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_xmax_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Compute_xmax_3( Iso_cuboid_3 )>::type
|
||||||
max_coord(int i) const
|
max_coord(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
|
CGAL_kernel_precondition( i == 0 || i == 1 || i == 2 );
|
||||||
|
|
@ -218,7 +210,7 @@ public:
|
||||||
return R().is_degenerate_3_object()(*this);
|
return R().is_degenerate_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_volume_3, Iso_cuboid_3 >::type
|
typename boost::result_of<typename R::Compute_volume_3( Iso_cuboid_3 )>::type
|
||||||
volume() const
|
volume() const
|
||||||
{
|
{
|
||||||
return R().compute_volume_3_object()(*this);
|
return R().compute_volume_3_object()(*this);
|
||||||
|
|
|
||||||
|
|
@ -87,13 +87,13 @@ public:
|
||||||
: Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), min_hx, min_hy, max_hx, max_hy, hw)) {}
|
: Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), min_hx, min_hy, max_hx, max_hy, hw)) {}
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_min_vertex_2, Iso_rectangle_2 >::type
|
typename boost::result_of<typename R::Construct_min_vertex_2( Iso_rectangle_2 )>::type
|
||||||
min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
{
|
{
|
||||||
return R().construct_min_vertex_2_object()(*this);
|
return R().construct_min_vertex_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_max_vertex_2, Iso_rectangle_2 >::type
|
typename boost::result_of<typename R::Construct_max_vertex_2( Iso_rectangle_2 )>::type
|
||||||
max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
{
|
{
|
||||||
return R().construct_max_vertex_2_object()(*this);
|
return R().construct_max_vertex_2_object()(*this);
|
||||||
|
|
@ -112,43 +112,45 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_vertex_2, Iso_rectangle_2 >::type
|
// typename boost::result_of<typename R::Construct_vertex_2( Iso_rectangle_2, int )>::type
|
||||||
|
Point_2
|
||||||
vertex(int i) const
|
vertex(int i) const
|
||||||
{
|
{
|
||||||
return R().construct_vertex_2_object()(*this,i);
|
return R().construct_vertex_2_object()(*this,i);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_vertex_2, Iso_rectangle_2 >::type
|
// typename boost::result_of<typename R::Construct_vertex_2( Iso_rectangle_2, int )>::type
|
||||||
|
Point_2
|
||||||
operator[](int i) const
|
operator[](int i) const
|
||||||
{
|
{
|
||||||
return R().construct_vertex_2_object()(*this,i);
|
return R().construct_vertex_2_object()(*this,i);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_xmin_2, Iso_rectangle_2 >::type
|
typename boost::result_of<typename R::Compute_xmin_2( Iso_rectangle_2 )>::type
|
||||||
xmin() const
|
xmin() const
|
||||||
{
|
{
|
||||||
return R().compute_xmin_2_object()(*this);
|
return R().compute_xmin_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_xmax_2, Iso_rectangle_2 >::type
|
typename boost::result_of<typename R::Compute_xmax_2( Iso_rectangle_2 )>::type
|
||||||
xmax() const
|
xmax() const
|
||||||
{
|
{
|
||||||
return R().compute_xmax_2_object()(*this);
|
return R().compute_xmax_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_ymin_2, Iso_rectangle_2 >::type
|
typename boost::result_of<typename R::Compute_ymin_2( Iso_rectangle_2 )>::type
|
||||||
ymin() const
|
ymin() const
|
||||||
{
|
{
|
||||||
return R().compute_ymin_2_object()(*this);
|
return R().compute_ymin_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_ymax_2, Iso_rectangle_2 >::type
|
typename boost::result_of<typename R::Compute_ymax_2( Iso_rectangle_2 )>::type
|
||||||
ymax() const
|
ymax() const
|
||||||
{
|
{
|
||||||
return R().compute_ymax_2_object()(*this);
|
return R().compute_ymax_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_xmin_2, Iso_rectangle_2 >::type
|
typename boost::result_of<typename R::Compute_xmin_2( Iso_rectangle_2 )>::type
|
||||||
min_coord(int i) const
|
min_coord(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( i == 0 || i == 1 );
|
CGAL_kernel_precondition( i == 0 || i == 1 );
|
||||||
|
|
@ -158,7 +160,7 @@ public:
|
||||||
return ymin();
|
return ymin();
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_xmin_2, Iso_rectangle_2 >::type
|
typename boost::result_of<typename R::Compute_xmin_2( Iso_rectangle_2 )>::type
|
||||||
max_coord(int i) const
|
max_coord(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( i == 0 || i == 1 );
|
CGAL_kernel_precondition( i == 0 || i == 1 );
|
||||||
|
|
|
||||||
|
|
@ -26,28 +26,38 @@
|
||||||
#define CGAL_KERNEL_TYPE_MAPPER_H
|
#define CGAL_KERNEL_TYPE_MAPPER_H
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/basic.h>
|
||||||
|
#include <boost/type_traits/remove_cv.hpp>
|
||||||
|
#include <boost/type_traits/remove_reference.hpp>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace internal {
|
||||||
|
template<typename T, typename K1, typename K2 >
|
||||||
|
struct Type_mapper_impl {
|
||||||
|
typedef T type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Then we specialize for all kernel objects.
|
||||||
|
#define CGAL_Kernel_obj(X) \
|
||||||
|
template < typename K1, typename K2 > \
|
||||||
|
struct Type_mapper_impl < typename K1::X, K1, K2 > \
|
||||||
|
{ typedef typename K2::X type; };
|
||||||
|
|
||||||
|
#include <CGAL/Kernel/interface_macros.h>
|
||||||
|
|
||||||
|
} // internal
|
||||||
|
|
||||||
// This is a tool to obtain the K2::Point_2 from K1 and K1::Point_2.
|
// This is a tool to obtain the K2::Point_2 from K1 and K1::Point_2.
|
||||||
// Similarly for other kernel types.
|
// Similarly for other kernel types.
|
||||||
|
|
||||||
// TODO : add more specializations ? Use a different mechanism ?
|
// TODO : add more specializations ? Use a different mechanism ?
|
||||||
|
|
||||||
template < typename T, typename K1, typename K2 >
|
template < typename T, typename K1, typename K2 >
|
||||||
struct Type_mapper
|
struct Type_mapper :
|
||||||
{
|
internal::Type_mapper_impl< typename boost::remove_cv<
|
||||||
typedef T type; // By default, assume same type (e.g. Object).
|
typename boost::remove_reference < T >::type
|
||||||
};
|
>::type, K1, K2 >
|
||||||
|
{ };
|
||||||
// Then we specialize for all kernel objects.
|
|
||||||
|
|
||||||
#define CGAL_Kernel_obj(X) \
|
|
||||||
template < typename K1, typename K2 > \
|
|
||||||
struct Type_mapper < typename K1::X, K1, K2 > \
|
|
||||||
{ typedef typename K2::X type; };
|
|
||||||
|
|
||||||
#include <CGAL/Kernel/interface_macros.h>
|
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -766,32 +766,32 @@ namespace CommonKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Construct_center_2 : Has_qrt
|
class Construct_center_2
|
||||||
{
|
{
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
typedef typename K::Circle_2 Circle_2;
|
typedef typename K::Circle_2 Circle_2;
|
||||||
public:
|
public:
|
||||||
typedef Point_2 result_type;
|
typedef const Point_2& result_type;
|
||||||
|
|
||||||
const Point_2 &
|
result_type
|
||||||
operator()(const Circle_2& c) const
|
operator()(const Circle_2& c) const
|
||||||
{ return c.rep().center(); }
|
{ return c.rep().center(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Construct_center_3 : Has_qrt
|
class Construct_center_3
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Sphere_3 Sphere_3;
|
typedef typename K::Sphere_3 Sphere_3;
|
||||||
typedef typename K::Circle_3 Circle_3;
|
typedef typename K::Circle_3 Circle_3;
|
||||||
public:
|
public:
|
||||||
typedef Point_3 result_type;
|
typedef const Point_3& result_type;
|
||||||
|
|
||||||
const Point_3 &
|
result_type
|
||||||
operator()(const Sphere_3& s) const
|
operator()(const Sphere_3& s) const
|
||||||
{ return s.rep().center(); }
|
{ return s.rep().center(); }
|
||||||
|
|
||||||
const Point_3 &
|
result_type
|
||||||
operator()(const Circle_3& c) const
|
operator()(const Circle_3& c) const
|
||||||
{ return c.rep().center(); }
|
{ return c.rep().center(); }
|
||||||
|
|
||||||
|
|
@ -1064,38 +1064,38 @@ namespace CommonKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Construct_max_vertex_2 : Has_qrt
|
class Construct_max_vertex_2
|
||||||
{
|
{
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
typedef typename K::Segment_2 Segment_2;
|
typedef typename K::Segment_2 Segment_2;
|
||||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||||
public:
|
public:
|
||||||
typedef Point_2 result_type;
|
typedef const Point_2& result_type;
|
||||||
|
|
||||||
const Point_2&
|
result_type
|
||||||
operator()(const Iso_rectangle_2& r) const
|
operator()(const Iso_rectangle_2& r) const
|
||||||
{ return (r.rep().max)(); }
|
{ return (r.rep().max)(); }
|
||||||
|
|
||||||
const Point_2&
|
result_type
|
||||||
operator()(const Segment_2& s) const
|
operator()(const Segment_2& s) const
|
||||||
{ return (s.max)(); }
|
{ return (s.max)(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Construct_min_vertex_2 : Has_qrt
|
class Construct_min_vertex_2
|
||||||
{
|
{
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
typedef typename K::Segment_2 Segment_2;
|
typedef typename K::Segment_2 Segment_2;
|
||||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||||
public:
|
public:
|
||||||
typedef Point_2 result_type;
|
typedef const Point_2& result_type;
|
||||||
|
|
||||||
const Point_2&
|
result_type
|
||||||
operator()(const Iso_rectangle_2& r) const
|
operator()(const Iso_rectangle_2& r) const
|
||||||
{ return (r.rep().min)(); }
|
{ return (r.rep().min)(); }
|
||||||
|
|
||||||
const Point_2&
|
result_type
|
||||||
operator()(const Segment_2& s) const
|
operator()(const Segment_2& s) const
|
||||||
{ return (s.min)(); }
|
{ return (s.min)(); }
|
||||||
};
|
};
|
||||||
|
|
@ -1633,83 +1633,83 @@ namespace CommonKernelFunctors {
|
||||||
|
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Construct_source_2 : Has_qrt
|
class Construct_source_2
|
||||||
{
|
{
|
||||||
typedef typename K::Segment_2 Segment_2;
|
typedef typename K::Segment_2 Segment_2;
|
||||||
typedef typename K::Ray_2 Ray_2;
|
typedef typename K::Ray_2 Ray_2;
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
public:
|
public:
|
||||||
typedef Point_2 result_type;
|
typedef const Point_2& result_type;
|
||||||
|
|
||||||
const result_type&
|
result_type
|
||||||
operator()(const Segment_2& s) const
|
operator()(const Segment_2& s) const
|
||||||
{ return s.rep().source(); }
|
{ return s.rep().source(); }
|
||||||
|
|
||||||
const result_type&
|
result_type
|
||||||
operator()(const Ray_2& r) const
|
operator()(const Ray_2& r) const
|
||||||
{ return r.rep().source(); }
|
{ return r.rep().source(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Construct_source_3 : Has_qrt
|
class Construct_source_3
|
||||||
{
|
{
|
||||||
typedef typename K::Segment_3 Segment_3;
|
typedef typename K::Segment_3 Segment_3;
|
||||||
typedef typename K::Ray_3 Ray_3;
|
typedef typename K::Ray_3 Ray_3;
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
public:
|
public:
|
||||||
typedef Point_3 result_type;
|
typedef const Point_3& result_type;
|
||||||
|
|
||||||
const result_type&
|
result_type
|
||||||
operator()(const Segment_3& s) const
|
operator()(const Segment_3& s) const
|
||||||
{ return s.rep().source(); }
|
{ return s.rep().source(); }
|
||||||
|
|
||||||
const result_type&
|
result_type
|
||||||
operator()(const Ray_3& r) const
|
operator()(const Ray_3& r) const
|
||||||
{ return r.rep().source(); }
|
{ return r.rep().source(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Construct_target_2 : Has_qrt
|
class Construct_target_2
|
||||||
{
|
{
|
||||||
typedef typename K::Segment_2 Segment_2;
|
typedef typename K::Segment_2 Segment_2;
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
public:
|
public:
|
||||||
typedef Point_2 result_type;
|
typedef const Point_2& result_type;
|
||||||
|
|
||||||
const result_type&
|
result_type
|
||||||
operator()(const Segment_2& s) const
|
operator()(const Segment_2& s) const
|
||||||
{ return s.rep().target(); }
|
{ return s.rep().target(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Construct_target_3 : Has_qrt
|
class Construct_target_3
|
||||||
{
|
{
|
||||||
typedef typename K::Segment_3 Segment_3;
|
typedef typename K::Segment_3 Segment_3;
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
public:
|
public:
|
||||||
typedef Point_3 result_type;
|
typedef const Point_3& result_type;
|
||||||
|
|
||||||
const result_type&
|
result_type
|
||||||
operator()(const Segment_3& s) const
|
operator()(const Segment_3& s) const
|
||||||
{ return s.rep().target(); }
|
{ return s.rep().target(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Construct_second_point_2 : Has_qrt
|
class Construct_second_point_2
|
||||||
{
|
{
|
||||||
typedef typename K::Ray_2 Ray_2;
|
typedef typename K::Ray_2 Ray_2;
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
public:
|
public:
|
||||||
typedef Point_2 result_type;
|
typedef const Point_2& result_type;
|
||||||
|
|
||||||
const result_type&
|
result_type
|
||||||
operator()(const Ray_2& r) const
|
operator()(const Ray_2& r) const
|
||||||
{ return r.rep().second_point(); }
|
{ return r.rep().second_point(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Construct_second_point_3 // : Has_qrt
|
class Construct_second_point_3
|
||||||
{
|
{
|
||||||
typedef typename K::Ray_3 Ray_3;
|
typedef typename K::Ray_3 Ray_3;
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
|
|
@ -1881,7 +1881,7 @@ namespace CommonKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Construct_vertex_3 : Has_qrt
|
class Construct_vertex_3
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Segment_3 Segment_3;
|
typedef typename K::Segment_3 Segment_3;
|
||||||
|
|
@ -1889,21 +1889,29 @@ namespace CommonKernelFunctors {
|
||||||
typedef typename K::Triangle_3 Triangle_3;
|
typedef typename K::Triangle_3 Triangle_3;
|
||||||
typedef typename K::Tetrahedron_3 Tetrahedron_3;
|
typedef typename K::Tetrahedron_3 Tetrahedron_3;
|
||||||
public:
|
public:
|
||||||
typedef Point_3 result_type;
|
template<typename>
|
||||||
|
struct result {
|
||||||
|
typedef const Point_3& type;
|
||||||
|
};
|
||||||
|
|
||||||
const Point_3 &
|
template<typename T>
|
||||||
|
struct result<T(Iso_cuboid_3)> {
|
||||||
|
typedef Point_3 type;
|
||||||
|
};
|
||||||
|
|
||||||
|
typename result< Construct_vertex_3(Segment_3) >::type
|
||||||
operator()( const Segment_3& s, int i) const
|
operator()( const Segment_3& s, int i) const
|
||||||
{ return s.rep().vertex(i); }
|
{ return s.rep().vertex(i); }
|
||||||
|
|
||||||
const Point_3 &
|
typename result< Construct_vertex_3(Triangle_3) >::type
|
||||||
operator()( const Triangle_3& t, int i) const
|
operator()( const Triangle_3& t, int i) const
|
||||||
{ return t.rep().vertex(i); }
|
{ return t.rep().vertex(i); }
|
||||||
|
|
||||||
Point_3
|
typename result< Construct_vertex_3(Iso_cuboid_3) >::type
|
||||||
operator()( const Iso_cuboid_3& r, int i) const
|
operator()( const Iso_cuboid_3& r, int i) const
|
||||||
{ return r.rep().vertex(i); }
|
{ typename result< Construct_vertex_3(Iso_cuboid_3) >::type asdf; return r.rep().vertex(i); }
|
||||||
|
|
||||||
const Point_3 &
|
typename result< Construct_vertex_3(Tetrahedron_3) >::type
|
||||||
operator()( const Tetrahedron_3& t, int i) const
|
operator()( const Tetrahedron_3& t, int i) const
|
||||||
{ return t.rep().vertex(i); }
|
{ return t.rep().vertex(i); }
|
||||||
};
|
};
|
||||||
|
|
@ -2755,12 +2763,6 @@ namespace CommonKernelFunctors {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace CommonKernelFunctors
|
} // namespace CommonKernelFunctors
|
||||||
|
|
||||||
template <class K>
|
|
||||||
struct Qualified_result_of<CommonKernelFunctors::Construct_vertex_3<K>,Iso_cuboid_3<K> > :
|
|
||||||
qrt_or_not<typename CommonKernelFunctors::Construct_vertex_3<K>,false>
|
|
||||||
{};
|
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
#endif // CGAL_KERNEL_FUNCTION_OBJECTS_H
|
#endif // CGAL_KERNEL_FUNCTION_OBJECTS_H
|
||||||
|
|
|
||||||
|
|
@ -113,25 +113,25 @@ public:
|
||||||
return Direction_3(a(), b(), c());
|
return Direction_3(a(), b(), c());
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_a_3, Plane_3>::type
|
typename boost::result_of<typename R::Compute_a_3( Plane_3)>::type
|
||||||
a() const
|
a() const
|
||||||
{
|
{
|
||||||
return R().compute_a_3_object()(*this);
|
return R().compute_a_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_b_3, Plane_3>::type
|
typename boost::result_of<typename R::Compute_b_3( Plane_3)>::type
|
||||||
b() const
|
b() const
|
||||||
{
|
{
|
||||||
return R().compute_b_3_object()(*this);
|
return R().compute_b_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_c_3, Plane_3>::type
|
typename boost::result_of<typename R::Compute_c_3( Plane_3)>::type
|
||||||
c() const
|
c() const
|
||||||
{
|
{
|
||||||
return R().compute_c_3_object()(*this);
|
return R().compute_c_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_d_3, Plane_3>::type
|
typename boost::result_of<typename R::Compute_d_3( Plane_3)>::type
|
||||||
d() const
|
d() const
|
||||||
{
|
{
|
||||||
return R().compute_d_3_object()(*this);
|
return R().compute_d_3_object()(*this);
|
||||||
|
|
|
||||||
|
|
@ -85,26 +85,26 @@ public:
|
||||||
: RPoint_2(typename R::Construct_point_2()(Return_base_tag(), hx, hy, hw))
|
: RPoint_2(typename R::Construct_point_2()(Return_base_tag(), hx, hy, hw))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_x_2,Point_2>::type
|
typename boost::result_of<typename R::Compute_x_2(Point_2)>::type
|
||||||
x() const
|
x() const
|
||||||
{
|
{
|
||||||
return typename R::Compute_x_2()(*this);
|
return typename R::Compute_x_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_y_2,Point_2>::type
|
typename boost::result_of<typename R::Compute_y_2(Point_2)>::type
|
||||||
y() const
|
y() const
|
||||||
{
|
{
|
||||||
return typename R::Compute_y_2()(*this);
|
return typename R::Compute_y_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_x_2,Point_2>::type
|
typename boost::result_of<typename R::Compute_x_2(Point_2)>::type
|
||||||
cartesian(int i) const
|
cartesian(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( (i == 0) || (i == 1) );
|
CGAL_kernel_precondition( (i == 0) || (i == 1) );
|
||||||
return (i==0) ? x() : y();
|
return (i==0) ? x() : y();
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_x_2,Point_2>::type
|
typename boost::result_of<typename R::Compute_x_2(Point_2)>::type
|
||||||
operator[](int i) const
|
operator[](int i) const
|
||||||
{
|
{
|
||||||
return cartesian(i);
|
return cartesian(i);
|
||||||
|
|
@ -122,19 +122,19 @@ public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hx_2,Point_2>::type
|
typename boost::result_of<typename R::Compute_hx_2(Point_2)>::type
|
||||||
hx() const
|
hx() const
|
||||||
{
|
{
|
||||||
return typename R::Compute_hx_2()(*this);
|
return typename R::Compute_hx_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hy_2,Point_2>::type
|
typename boost::result_of<typename R::Compute_hy_2(Point_2)>::type
|
||||||
hy() const
|
hy() const
|
||||||
{
|
{
|
||||||
return typename R::Compute_hy_2()(*this);
|
return typename R::Compute_hy_2()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hw_2,Point_2>::type
|
typename boost::result_of<typename R::Compute_hw_2(Point_2)>::type
|
||||||
hw() const
|
hw() const
|
||||||
{
|
{
|
||||||
return typename R::Compute_hw_2()(*this);
|
return typename R::Compute_hw_2()(*this);
|
||||||
|
|
@ -145,7 +145,7 @@ public:
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hx_2,Point_2>::type
|
typename boost::result_of<typename R::Compute_hx_2(Point_2)>::type
|
||||||
homogeneous(int i) const
|
homogeneous(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( (i >= 0) || (i <= 2) );
|
CGAL_kernel_precondition( (i >= 0) || (i <= 2) );
|
||||||
|
|
|
||||||
|
|
@ -85,49 +85,49 @@ public:
|
||||||
: Rep(typename R::Construct_point_3()(Return_base_tag(), hx, hy, hz, hw))
|
: Rep(typename R::Construct_point_3()(Return_base_tag(), hx, hy, hz, hw))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_x_3, Point_3>::type
|
typename boost::result_of<typename R::Compute_x_3( Point_3)>::type
|
||||||
x() const
|
x() const
|
||||||
{
|
{
|
||||||
return typename R::Compute_x_3()(*this);
|
return typename R::Compute_x_3()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_y_3, Point_3>::type
|
typename boost::result_of<typename R::Compute_y_3( Point_3)>::type
|
||||||
y() const
|
y() const
|
||||||
{
|
{
|
||||||
return typename R::Compute_y_3()(*this);
|
return typename R::Compute_y_3()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_z_3, Point_3>::type
|
typename boost::result_of<typename R::Compute_z_3( Point_3)>::type
|
||||||
z() const
|
z() const
|
||||||
{
|
{
|
||||||
return typename R::Compute_z_3()(*this);
|
return typename R::Compute_z_3()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hx_3, Point_3>::type
|
typename boost::result_of<typename R::Compute_hx_3( Point_3)>::type
|
||||||
hx() const
|
hx() const
|
||||||
{
|
{
|
||||||
return R().compute_hx_3_object()(*this);
|
return R().compute_hx_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hy_3, Point_3>::type
|
typename boost::result_of<typename R::Compute_hy_3( Point_3)>::type
|
||||||
hy() const
|
hy() const
|
||||||
{
|
{
|
||||||
return R().compute_hy_3_object()(*this);
|
return R().compute_hy_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hz_3, Point_3>::type
|
typename boost::result_of<typename R::Compute_hz_3( Point_3)>::type
|
||||||
hz() const
|
hz() const
|
||||||
{
|
{
|
||||||
return R().compute_hz_3_object()(*this);
|
return R().compute_hz_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hw_3, Point_3>::type
|
typename boost::result_of<typename R::Compute_hw_3( Point_3)>::type
|
||||||
hw() const
|
hw() const
|
||||||
{
|
{
|
||||||
return R().compute_hw_3_object()(*this);
|
return R().compute_hw_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_x_3, Point_3>::type
|
typename boost::result_of<typename R::Compute_x_3( Point_3)>::type
|
||||||
cartesian(int i) const
|
cartesian(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
|
CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
|
||||||
|
|
@ -146,7 +146,7 @@ public:
|
||||||
return hw();
|
return hw();
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_x_3,Point_3>::type
|
typename boost::result_of<typename R::Compute_x_3(Point_3)>::type
|
||||||
operator[](int i) const
|
operator[](int i) const
|
||||||
{
|
{
|
||||||
return cartesian(i);
|
return cartesian(i);
|
||||||
|
|
|
||||||
|
|
@ -86,13 +86,13 @@ public:
|
||||||
: RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, l)) {}
|
: RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, l)) {}
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of<typename R_::Construct_source_2, Ray_2>::type
|
typename boost::result_of<typename R_::Construct_source_2( Ray_2)>::type
|
||||||
source() const
|
source() const
|
||||||
{
|
{
|
||||||
return R().construct_source_2_object()(*this);
|
return R().construct_source_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R_::Construct_second_point_2, Ray_2>::type
|
typename boost::result_of<typename R_::Construct_second_point_2( Ray_2)>::type
|
||||||
second_point() const
|
second_point() const
|
||||||
{
|
{
|
||||||
return R().construct_second_point_2_object()(*this);
|
return R().construct_second_point_2_object()(*this);
|
||||||
|
|
@ -116,7 +116,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of<typename R_::Construct_source_2, Ray_2, int >::type
|
typename boost::result_of<typename R_::Construct_source_2( Ray_2, int )>::type
|
||||||
start() const
|
start() const
|
||||||
{
|
{
|
||||||
return source();
|
return source();
|
||||||
|
|
|
||||||
|
|
@ -105,25 +105,25 @@ public:
|
||||||
bool collinear_has_on(const Point_3 &p) const;
|
bool collinear_has_on(const Point_3 &p) const;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Point_3 point(int i) const // TODO : use Qrt
|
typename boost::result_of<typename R::Construct_point_on_3(Ray_3, int)>::type
|
||||||
|
point(int i) const // TODO : use Qrt
|
||||||
{
|
{
|
||||||
return R().construct_point_on_3_object()(*this, i);
|
return R().construct_point_on_3_object()(*this, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME : Use Qrt
|
typename boost::result_of<typename R::Construct_source_3(Ray_3)>::type
|
||||||
//typename Qualified_result_of<typename R_::Construct_source_3, Ray_3 >::type
|
|
||||||
Point_3
|
|
||||||
source() const
|
source() const
|
||||||
{
|
{
|
||||||
return R().construct_source_3_object()(*this);
|
return R().construct_source_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Point_3 second_point() const // TODO : use Qrt
|
typename boost::result_of<typename R::Construct_second_point_3(Ray_3)>::type
|
||||||
|
second_point() const
|
||||||
{
|
{
|
||||||
return R().construct_second_point_3_object()(*this);
|
return R().construct_second_point_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Point_3 // FIXME : Use Qrt
|
typename boost::result_of<typename R::Construct_source_3(Ray_3)>::type
|
||||||
start() const
|
start() const
|
||||||
{
|
{
|
||||||
return source();
|
return source();
|
||||||
|
|
|
||||||
|
|
@ -76,44 +76,44 @@ public:
|
||||||
Segment_2(const Point_2 &sp, const Point_2 &ep)
|
Segment_2(const Point_2 &sp, const Point_2 &ep)
|
||||||
: RSegment_2(typename R::Construct_segment_2()(Return_base_tag(), sp,ep)) {}
|
: RSegment_2(typename R::Construct_segment_2()(Return_base_tag(), sp,ep)) {}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_source_2, Segment_2>::type
|
typename boost::result_of<typename R::Construct_source_2( Segment_2)>::type
|
||||||
source() const
|
source() const
|
||||||
{
|
{
|
||||||
return R_().construct_source_2_object()(*this);
|
return R_().construct_source_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_target_2, Segment_2>::type
|
typename boost::result_of<typename R::Construct_target_2( Segment_2)>::type
|
||||||
target() const
|
target() const
|
||||||
{
|
{
|
||||||
return R_().construct_target_2_object()(*this);
|
return R_().construct_target_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_source_2, Segment_2>::type
|
typename boost::result_of<typename R::Construct_source_2( Segment_2)>::type
|
||||||
start() const
|
start() const
|
||||||
{
|
{
|
||||||
return source();
|
return source();
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_target_2, Segment_2>::type
|
typename boost::result_of<typename R::Construct_target_2( Segment_2)>::type
|
||||||
end() const
|
end() const
|
||||||
{
|
{
|
||||||
return target();
|
return target();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_min_vertex_2, Segment_2>::type
|
typename boost::result_of<typename R::Construct_min_vertex_2( Segment_2)>::type
|
||||||
min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_max_vertex_2, Segment_2>::type
|
typename boost::result_of<typename R::Construct_max_vertex_2( Segment_2)>::type
|
||||||
max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_vertex_2, Segment_2, int>::type
|
typename boost::result_of<typename R::Construct_vertex_2( Segment_2, int)>::type
|
||||||
vertex(int i) const;
|
vertex(int i) const;
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_vertex_2, Segment_2, int>::type
|
typename boost::result_of<typename R::Construct_vertex_2( Segment_2, int)>::type
|
||||||
point(int i) const;
|
point(int i) const;
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_vertex_2, Segment_2, int>::type
|
typename boost::result_of<typename R::Construct_vertex_2( Segment_2, int)>::type
|
||||||
operator[](int i) const;
|
operator[](int i) const;
|
||||||
|
|
||||||
bool is_horizontal() const;
|
bool is_horizontal() const;
|
||||||
|
|
@ -178,7 +178,7 @@ public:
|
||||||
|
|
||||||
template < class R_ >
|
template < class R_ >
|
||||||
CGAL_KERNEL_INLINE
|
CGAL_KERNEL_INLINE
|
||||||
typename Qualified_result_of<typename R_::Construct_min_vertex_2, Segment_2<R_> >::type
|
typename boost::result_of<typename R_::Construct_min_vertex_2( Segment_2<R_> )>::type
|
||||||
Segment_2<R_>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
Segment_2<R_>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
{
|
{
|
||||||
typename R_::Less_xy_2 less_xy;
|
typename R_::Less_xy_2 less_xy;
|
||||||
|
|
@ -187,7 +187,7 @@ Segment_2<R_>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
|
|
||||||
template < class R_ >
|
template < class R_ >
|
||||||
CGAL_KERNEL_INLINE
|
CGAL_KERNEL_INLINE
|
||||||
typename Qualified_result_of<typename R_::Construct_max_vertex_2, Segment_2<R_> >::type
|
typename boost::result_of<typename R_::Construct_max_vertex_2( Segment_2<R_> )>::type
|
||||||
Segment_2<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
Segment_2<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
{
|
{
|
||||||
typename R_::Less_xy_2 less_xy;
|
typename R_::Less_xy_2 less_xy;
|
||||||
|
|
@ -196,7 +196,7 @@ Segment_2<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
|
|
||||||
template < class R_ >
|
template < class R_ >
|
||||||
CGAL_KERNEL_INLINE
|
CGAL_KERNEL_INLINE
|
||||||
typename Qualified_result_of<typename R_::Construct_vertex_2, Segment_2<R_>, int >::type
|
typename boost::result_of<typename R_::Construct_vertex_2( Segment_2<R_>, int )>::type
|
||||||
Segment_2<R_>::vertex(int i) const
|
Segment_2<R_>::vertex(int i) const
|
||||||
{
|
{
|
||||||
return (i%2 == 0) ? source() : target();
|
return (i%2 == 0) ? source() : target();
|
||||||
|
|
@ -204,7 +204,7 @@ Segment_2<R_>::vertex(int i) const
|
||||||
|
|
||||||
template < class R_ >
|
template < class R_ >
|
||||||
inline
|
inline
|
||||||
typename Qualified_result_of<typename R_::Construct_vertex_2, Segment_2<R_>, int >::type
|
typename boost::result_of<typename R_::Construct_vertex_2( Segment_2<R_>, int )>::type
|
||||||
Segment_2<R_>::point(int i) const
|
Segment_2<R_>::point(int i) const
|
||||||
{
|
{
|
||||||
return vertex(i);
|
return vertex(i);
|
||||||
|
|
@ -212,7 +212,7 @@ Segment_2<R_>::point(int i) const
|
||||||
|
|
||||||
template < class R_ >
|
template < class R_ >
|
||||||
inline
|
inline
|
||||||
typename Qualified_result_of<typename R_::Construct_vertex_2, Segment_2<R_>, int >::type
|
typename boost::result_of<typename R_::Construct_vertex_2( Segment_2<R_>, int )>::type
|
||||||
Segment_2<R_>::operator[](int i) const
|
Segment_2<R_>::operator[](int i) const
|
||||||
{
|
{
|
||||||
return vertex(i);
|
return vertex(i);
|
||||||
|
|
|
||||||
|
|
@ -74,54 +74,44 @@ public:
|
||||||
Segment_3(const Point_3& sp, const Point_3& ep)
|
Segment_3(const Point_3& sp, const Point_3& ep)
|
||||||
: Rep(typename R::Construct_segment_3()(Return_base_tag(), sp, ep)) {}
|
: Rep(typename R::Construct_segment_3()(Return_base_tag(), sp, ep)) {}
|
||||||
|
|
||||||
// FIXME TODO : Use Qrt here !
|
typename boost::result_of<typename R::Construct_source_3(Segment_3)>::type
|
||||||
//typename Qualified_result_of<typename R::Construct_source_3, Segment_3>::type
|
|
||||||
Point_3
|
|
||||||
source() const
|
source() const
|
||||||
{
|
{
|
||||||
return R_().construct_source_3_object()(*this);
|
return R_().construct_source_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_target_3, Segment_3>::type
|
typename boost::result_of<typename R::Construct_target_3(Segment_3)>::type
|
||||||
Point_3
|
|
||||||
target() const
|
target() const
|
||||||
{
|
{
|
||||||
return R_().construct_target_3_object()(*this);
|
return R_().construct_target_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_source_3, Segment_3>::type
|
typename boost::result_of<typename R::Construct_source_3(Segment_3)>::type
|
||||||
Point_3
|
|
||||||
start() const
|
start() const
|
||||||
{
|
{
|
||||||
return source();
|
return source();
|
||||||
}
|
}
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_target_3, Segment_3>::type
|
typename boost::result_of<typename R::Construct_target_3(Segment_3)>::type
|
||||||
Point_3
|
|
||||||
end() const
|
end() const
|
||||||
{
|
{
|
||||||
return target();
|
return target();
|
||||||
}
|
}
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_min_vertex_2, Segment_2>::type
|
typename boost::result_of<typename R::Construct_min_vertex_3(Segment_3)>::type
|
||||||
Point_3
|
|
||||||
min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_max_vertex_2, Segment_2>::type
|
typename boost::result_of<typename R::Construct_max_vertex_3(Segment_3)>::type
|
||||||
Point_3
|
|
||||||
max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_vertex_2, Segment_2, int>::type
|
typename boost::result_of<typename R::Construct_vertex_3(Segment_3, int)>::type
|
||||||
Point_3
|
|
||||||
vertex(int i) const;
|
vertex(int i) const;
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_vertex_2, Segment_2, int>::type
|
typename boost::result_of<typename R::Construct_vertex_3(Segment_3, int)>::type
|
||||||
Point_3
|
|
||||||
point(int i) const
|
point(int i) const
|
||||||
{ return vertex(i); }
|
{ return vertex(i); }
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_vertex_2, Segment_2, int>::type
|
typename boost::result_of<typename R::Construct_vertex_3(Segment_3, int)>::type
|
||||||
Point_3
|
|
||||||
operator[](int i) const
|
operator[](int i) const
|
||||||
{ return vertex(i); }
|
{ return vertex(i); }
|
||||||
|
|
||||||
|
|
@ -179,8 +169,7 @@ public:
|
||||||
|
|
||||||
template < class R_ >
|
template < class R_ >
|
||||||
CGAL_KERNEL_INLINE
|
CGAL_KERNEL_INLINE
|
||||||
//typename Qualified_result_of<typename R_::Construct_min_vertex_2, Segment_2<R_> >::type
|
typename boost::result_of<typename R_::Construct_min_vertex_3( Segment_3<R_> ) >::type
|
||||||
typename R_::Point_3
|
|
||||||
Segment_3<R_>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
Segment_3<R_>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
{
|
{
|
||||||
typename R_::Less_xyz_3 less_xyz;
|
typename R_::Less_xyz_3 less_xyz;
|
||||||
|
|
@ -189,8 +178,7 @@ Segment_3<R_>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
|
|
||||||
template < class R_ >
|
template < class R_ >
|
||||||
CGAL_KERNEL_INLINE
|
CGAL_KERNEL_INLINE
|
||||||
//typename Qualified_result_of<typename R_::Construct_max_vertex_2, Segment_2<R_> >::type
|
typename boost::result_of<typename R_::Construct_max_vertex_3( Segment_3<R_> ) >::type
|
||||||
typename R_::Point_3
|
|
||||||
Segment_3<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
Segment_3<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
{
|
{
|
||||||
typename R_::Less_xyz_3 less_xyz;
|
typename R_::Less_xyz_3 less_xyz;
|
||||||
|
|
@ -199,8 +187,7 @@ Segment_3<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
|
|
||||||
template < class R_ >
|
template < class R_ >
|
||||||
CGAL_KERNEL_INLINE
|
CGAL_KERNEL_INLINE
|
||||||
//typename Qualified_result_of<typename R_::Construct_vertex_2, Segment_2<R_>, int >::type
|
typename boost::result_of<typename R_::Construct_vertex_3( Segment_3<R_>, int ) >::type
|
||||||
typename R_::Point_3
|
|
||||||
Segment_3<R_>::vertex(int i) const
|
Segment_3<R_>::vertex(int i) const
|
||||||
{
|
{
|
||||||
return (i%2 == 0) ? source() : target();
|
return (i%2 == 0) ? source() : target();
|
||||||
|
|
|
||||||
|
|
@ -94,9 +94,7 @@ public:
|
||||||
|
|
||||||
Sphere_3 orthogonal_transform(const Aff_transformation_3 &t) const;
|
Sphere_3 orthogonal_transform(const Aff_transformation_3 &t) const;
|
||||||
|
|
||||||
// FIXME : why doesn't Qrt work here ? We loose optimization !
|
typename boost::result_of<typename R::Construct_center_3( Sphere_3)>::type
|
||||||
//typename Qualified_result_of<typename R::Construct_center_3, Sphere_3>::type
|
|
||||||
Point_3_
|
|
||||||
center() const
|
center() const
|
||||||
{
|
{
|
||||||
return R().construct_center_3_object()(*this);
|
return R().construct_center_3_object()(*this);
|
||||||
|
|
|
||||||
|
|
@ -78,16 +78,13 @@ public:
|
||||||
t.transform(this->vertex(3)));
|
t.transform(this->vertex(3)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME TODO : Why doesn't Qrt work here ???
|
typename boost::result_of<typename R::Construct_vertex_3( Tetrahedron_3, int)>::type
|
||||||
//typename Qualified_result_of<typename R::Construct_vertex_3, Tetrahedron_3, int>::type
|
|
||||||
Point_3
|
|
||||||
vertex(int i) const
|
vertex(int i) const
|
||||||
{
|
{
|
||||||
return R().construct_vertex_3_object()(*this,i);
|
return R().construct_vertex_3_object()(*this,i);
|
||||||
}
|
}
|
||||||
|
|
||||||
//typename Qualified_result_of<typename R::Construct_vertex_3, Tetrahedron_3, int>::type
|
typename boost::result_of<typename R::Construct_vertex_3( Tetrahedron_3, int)>::type
|
||||||
Point_3
|
|
||||||
operator[](int i) const
|
operator[](int i) const
|
||||||
{
|
{
|
||||||
return vertex(i);
|
return vertex(i);
|
||||||
|
|
@ -139,7 +136,7 @@ public:
|
||||||
return R().has_on_unbounded_side_3_object()(*this, p);
|
return R().has_on_unbounded_side_3_object()(*this, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_volume_3, Tetrahedron_3>::type
|
typename boost::result_of<typename R::Compute_volume_3( Tetrahedron_3)>::type
|
||||||
volume() const
|
volume() const
|
||||||
{
|
{
|
||||||
return R().compute_volume_3_object()(*this);
|
return R().compute_volume_3_object()(*this);
|
||||||
|
|
|
||||||
|
|
@ -107,13 +107,13 @@ public:
|
||||||
return !(*this == t);
|
return !(*this == t);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_vertex_2, Triangle_2, int>::type
|
typename boost::result_of<typename R::Construct_vertex_2( Triangle_2, int)>::type
|
||||||
vertex(int i) const
|
vertex(int i) const
|
||||||
{
|
{
|
||||||
return R().construct_vertex_2_object()(*this,i);
|
return R().construct_vertex_2_object()(*this,i);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_vertex_2, Triangle_2, int>::type
|
typename boost::result_of<typename R::Construct_vertex_2( Triangle_2, int)>::type
|
||||||
operator[](int i) const
|
operator[](int i) const
|
||||||
{
|
{
|
||||||
return vertex(i);
|
return vertex(i);
|
||||||
|
|
|
||||||
|
|
@ -90,13 +90,13 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_vertex_3, Triangle_3 >::type
|
typename boost::result_of<typename R::Construct_vertex_3( Triangle_3 )>::type
|
||||||
vertex(int i) const
|
vertex(int i) const
|
||||||
{
|
{
|
||||||
return R().construct_vertex_3_object()(*this, i);
|
return R().construct_vertex_3_object()(*this, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Construct_vertex_3, Triangle_3 >::type
|
typename boost::result_of<typename R::Construct_vertex_3( Triangle_3 )>::type
|
||||||
operator[](int i) const
|
operator[](int i) const
|
||||||
{
|
{
|
||||||
return vertex(i);
|
return vertex(i);
|
||||||
|
|
|
||||||
|
|
@ -99,26 +99,26 @@ public:
|
||||||
: RVector_2(typename R::Construct_vector_2()(Return_base_tag(), x,y,w)) {}
|
: RVector_2(typename R::Construct_vector_2()(Return_base_tag(), x,y,w)) {}
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_x_2,Vector_2>::type
|
typename boost::result_of<typename R::Compute_x_2(Vector_2)>::type
|
||||||
x() const
|
x() const
|
||||||
{
|
{
|
||||||
return R().compute_x_2_object()(*this);
|
return R().compute_x_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_y_2,Vector_2>::type
|
typename boost::result_of<typename R::Compute_y_2(Vector_2)>::type
|
||||||
y() const
|
y() const
|
||||||
{
|
{
|
||||||
return R().compute_y_2_object()(*this);
|
return R().compute_y_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_y_2,Vector_2>::type
|
typename boost::result_of<typename R::Compute_y_2(Vector_2)>::type
|
||||||
cartesian(int i) const
|
cartesian(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( (i == 0) || (i == 1) );
|
CGAL_kernel_precondition( (i == 0) || (i == 1) );
|
||||||
return (i==0) ? x() : y();
|
return (i==0) ? x() : y();
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_x_2,Vector_2>::type
|
typename boost::result_of<typename R::Compute_x_2(Vector_2)>::type
|
||||||
operator[](int i) const
|
operator[](int i) const
|
||||||
{
|
{
|
||||||
return cartesian(i);
|
return cartesian(i);
|
||||||
|
|
@ -134,26 +134,26 @@ public:
|
||||||
return typename R::Construct_cartesian_const_iterator_2()(*this,2);
|
return typename R::Construct_cartesian_const_iterator_2()(*this,2);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hx_2,Vector_2>::type
|
typename boost::result_of<typename R::Compute_hx_2(Vector_2)>::type
|
||||||
hx() const
|
hx() const
|
||||||
{
|
{
|
||||||
return R().compute_hx_2_object()(*this);
|
return R().compute_hx_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hy_2,Vector_2>::type
|
typename boost::result_of<typename R::Compute_hy_2(Vector_2)>::type
|
||||||
hy() const
|
hy() const
|
||||||
{
|
{
|
||||||
return R().compute_hy_2_object()(*this);
|
return R().compute_hy_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hw_2,Vector_2>::type
|
typename boost::result_of<typename R::Compute_hw_2(Vector_2)>::type
|
||||||
hw() const
|
hw() const
|
||||||
{
|
{
|
||||||
return R().compute_hw_2_object()(*this);
|
return R().compute_hw_2_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hx_2,Vector_2>::type
|
typename boost::result_of<typename R::Compute_hx_2(Vector_2)>::type
|
||||||
homogeneous(int i) const
|
homogeneous(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( (i >= 0) || (i <= 2) );
|
CGAL_kernel_precondition( (i >= 0) || (i <= 2) );
|
||||||
|
|
|
||||||
|
|
@ -133,49 +133,49 @@ public:
|
||||||
return R().construct_divided_vector_3_object()(*this,c);
|
return R().construct_divided_vector_3_object()(*this,c);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_x_3, Vector_3>::type
|
typename boost::result_of<typename R::Compute_x_3(Vector_3)>::type
|
||||||
x() const
|
x() const
|
||||||
{
|
{
|
||||||
return R().compute_x_3_object()(*this);
|
return R().compute_x_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_y_3, Vector_3>::type
|
typename boost::result_of<typename R::Compute_y_3(Vector_3)>::type
|
||||||
y() const
|
y() const
|
||||||
{
|
{
|
||||||
return R().compute_y_3_object()(*this);
|
return R().compute_y_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_z_3, Vector_3>::type
|
typename boost::result_of<typename R::Compute_z_3(Vector_3)>::type
|
||||||
z() const
|
z() const
|
||||||
{
|
{
|
||||||
return R().compute_z_3_object()(*this);
|
return R().compute_z_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hx_3, Vector_3>::type
|
typename boost::result_of<typename R::Compute_hx_3(Vector_3)>::type
|
||||||
hx() const
|
hx() const
|
||||||
{
|
{
|
||||||
return R().compute_hx_3_object()(*this);
|
return R().compute_hx_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hy_3, Vector_3>::type
|
typename boost::result_of<typename R::Compute_hy_3(Vector_3)>::type
|
||||||
hy() const
|
hy() const
|
||||||
{
|
{
|
||||||
return R().compute_hy_3_object()(*this);
|
return R().compute_hy_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hz_3, Vector_3>::type
|
typename boost::result_of<typename R::Compute_hz_3(Vector_3)>::type
|
||||||
hz() const
|
hz() const
|
||||||
{
|
{
|
||||||
return R().compute_hz_3_object()(*this);
|
return R().compute_hz_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hw_3, Vector_3>::type
|
typename boost::result_of<typename R::Compute_hw_3(Vector_3)>::type
|
||||||
hw() const
|
hw() const
|
||||||
{
|
{
|
||||||
return R().compute_hw_3_object()(*this);
|
return R().compute_hw_3_object()(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_x_3, Vector_3>::type
|
typename boost::result_of<typename R::Compute_x_3(Vector_3)>::type
|
||||||
cartesian(int i) const
|
cartesian(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
|
CGAL_kernel_precondition( (i == 0) || (i == 1) || (i == 2) );
|
||||||
|
|
@ -184,7 +184,7 @@ public:
|
||||||
return z();
|
return z();
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_hw_3, Vector_3>::type
|
typename boost::result_of<typename R::Compute_hw_3(Vector_3)>::type
|
||||||
homogeneous(int i) const
|
homogeneous(int i) const
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition( (i >= 0) || (i <= 3) );
|
CGAL_kernel_precondition( (i >= 0) || (i <= 3) );
|
||||||
|
|
@ -199,7 +199,7 @@ public:
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_x_3, Vector_3>::type
|
typename boost::result_of<typename R::Compute_x_3(Vector_3)>::type
|
||||||
operator[](int i) const
|
operator[](int i) const
|
||||||
{
|
{
|
||||||
return cartesian(i);
|
return cartesian(i);
|
||||||
|
|
@ -215,7 +215,7 @@ public:
|
||||||
return typename R::Construct_cartesian_const_iterator_3()(*this,3);
|
return typename R::Construct_cartesian_const_iterator_3()(*this,3);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Qualified_result_of<typename R::Compute_squared_length_3, Vector_3>::type
|
typename boost::result_of<typename R::Compute_squared_length_3(Vector_3)>::type
|
||||||
squared_length() const
|
squared_length() const
|
||||||
{
|
{
|
||||||
return R().compute_squared_length_3_object()(*this);
|
return R().compute_squared_length_3_object()(*this);
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@
|
||||||
#include <CGAL/enum.h>
|
#include <CGAL/enum.h>
|
||||||
#include <CGAL/aff_transformation_tags.h>
|
#include <CGAL/aff_transformation_tags.h>
|
||||||
#include <CGAL/Object.h>
|
#include <CGAL/Object.h>
|
||||||
#include <CGAL/Qualified_result_of.h>
|
|
||||||
#include <CGAL/Kernel_traits.h>
|
#include <CGAL/Kernel_traits.h>
|
||||||
|
|
||||||
#endif // CGAL_KERNEL_BASIC_H
|
#endif // CGAL_KERNEL_BASIC_H
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@ void _test_construct_radical_line(const K &k) {
|
||||||
typedef typename K::Construct_circle_2 Construct_circle_2;
|
typedef typename K::Construct_circle_2 Construct_circle_2;
|
||||||
typedef typename K::Construct_radical_line_2 Construct_radical_line_2;
|
typedef typename K::Construct_radical_line_2 Construct_radical_line_2;
|
||||||
|
|
||||||
Intersect_2 theIntersect_2 = k.intersect_2_object();
|
// Intersect_2 theIntersect_2 = k.intersect_2_object();
|
||||||
Construct_circle_2 theConstruct_circle_2 = k.construct_circle_2_object();
|
Construct_circle_2 theConstruct_circle_2 = k.construct_circle_2_object();
|
||||||
Construct_radical_line_2 theConstruct_radical_line_2 = k.construct_radical_line_2_object();
|
Construct_radical_line_2 theConstruct_radical_line_2 = k.construct_radical_line_2_object();
|
||||||
Has_on_2 theHas_on_2 = k.has_on_2_object();
|
// Has_on_2 theHas_on_2 = k.has_on_2_object();
|
||||||
|
|
||||||
std::cout << "Testing radical_line(Circle,Circle)..." << std::endl;
|
std::cout << "Testing radical_line(Circle,Circle)..." << std::endl;
|
||||||
Circle_2 s = theConstruct_circle_2(Point_2(0,0),1);
|
Circle_2 s = theConstruct_circle_2(Point_2(0,0),1);
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ _test_cls_iso_cuboid_3(const R& )
|
||||||
assert( (r2.max)() == p3 );
|
assert( (r2.max)() == p3 );
|
||||||
|
|
||||||
assert( r1.vertex(0) == p1 );
|
assert( r1.vertex(0) == p1 );
|
||||||
|
assert( r1[0] == p1 );
|
||||||
assert( r1.vertex(1) == p5 );
|
assert( r1.vertex(1) == p5 );
|
||||||
assert( r1.vertex(2) == p10);
|
assert( r1.vertex(2) == p10);
|
||||||
assert( r1.vertex(3) == p11);
|
assert( r1.vertex(3) == p11);
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,10 @@ min_n(const T& t0, const T& t1, const T& t2, const T& t3, const T& t4,
|
||||||
{ return (std::min)(t0, min_n(t1, t2, t3, t4, t5, t6, t7)); }
|
{ return (std::min)(t0, min_n(t1, t2, t3, t4, t5, t6, t7)); }
|
||||||
|
|
||||||
|
|
||||||
|
template<typename T> inline
|
||||||
|
const T&
|
||||||
|
max_n(const T& t) { return t; }
|
||||||
|
|
||||||
template < typename T > inline
|
template < typename T > inline
|
||||||
const T&
|
const T&
|
||||||
max_n(const T& t0, const T& t1)
|
max_n(const T& t0, const T& t1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue