Why to use operator < because it would just test only the X axis?
<time prog. generic>
the plan would be good to have a class of predicate template type:
Code:
template<int Idx> struct order_by_component;
template<> struct order_by_component<1>
{
bool operator ()( PointType const& i,PointType const& j) { return /* test on x */; }
};
template<> struct order_by_component<2>
{
bool operator ()( PointType const& i,PointType const& j) { return /* test on y */; }
};
template<> struct order_by_component<3>
{
bool operator ()( PointType const& i,PointType const& j) { return /* test on z */; }
};
</ time prog. generic>
Bookmarks