Changeset 155 for cpp/frams


Ignore:
Timestamp:
03/01/14 22:30:05 (11 years ago)
Author:
sz
Message:

Pt3D: allCoordsLowerThan()/HigherThan?() functions instead of the potentially misleading operators < >

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/util/3d.h

    r139 r155  
    4040Pt3D    operator*(double d) const {return Pt3D(x*d,y*d,z*d);}
    4141Pt3D    operator/(double d) const {return Pt3D(x/d,y/d,z/d);}
    42 int     operator<(const Pt3D& p) const {return (x<p.x)&&(y<p.y)&&(z<p.z);}
    43         ///< check if all coords are below the second point
    44 int     operator>(const Pt3D& p) const {return (x>p.x)&&(y>p.y)&&(z>p.z);}
    45         ///< check if all coords are above the second point
    46 int     operator<=(const Pt3D& p) const {return (x<p.x)||(y<p.y)||(z<p.z);}
    47         ///< check if some coords are below the second point
    48 int     operator>=(const Pt3D& p) const {return (x>p.x)||(y>p.y)||(z>p.z);}
    49         ///< check if some coords are above the second point
     42bool    allCoordsLowerThan(const Pt3D& p) const {return (x<p.x)&&(y<p.y)&&(z<p.z);}
     43bool    allCoordsHigherThan(const Pt3D& p) const {return (x>p.x)&&(y>p.y)&&(z>p.z);}
    5044void getMin(const Pt3D& p);
    5145void getMax(const Pt3D& p);
Note: See TracChangeset for help on using the changeset viewer.