32 #include <boost/operators.hpp>
37 namespace ost {
namespace img {
44 boost::additive2<Point, Size,
45 boost::multipliable2<Point,int,
46 boost::less_than_comparable<Point,
47 boost::equality_comparable<Point> > > > >{
90 x(static_cast<int>(round(v[0]))),
91 y(static_cast<int>(round(v[1]))),
99 x(static_cast<int>(round(v[0]))),
100 y(static_cast<int>(round(v[1]))),
101 z(static_cast<int>(round(v[2])))
108 x(static_cast<int>(round(v[0]))),
109 y(static_cast<int>(round(v[1]))),
110 z(static_cast<int>(round(v[2])))
112 if(std::abs(v[3])<1e-100) {
116 x =
static_cast<int>(x*sf);
117 y =
static_cast<int>(y*sf);
118 z =
static_cast<int>(z*sf);
142 int&
At(
unsigned int index)
144 if(index>2)
throw std::range_error(
"Point index out of range");
148 int At(
unsigned int index)
const
class encapsulating 1D to 3D point
int & operator[](unsigned int index)
Point(int a)
1D int constructor
Point(const Vec3 &v)
conversion from Vec3
Point & operator*=(int s)
Point(int a, int b)
2D int constructor
int At(unsigned int index) const
Point & operator=(const Point &p)
Point(int a, int b, int c)
3D int constructor
Point & operator+=(const Size &p)
Point & operator+=(const Point &p)
Point Mirror(int planes)
return mirror point according to planes
bool operator<(const Point &p) const
int operator[](unsigned int index) const
Point(const Size &size)
(implicit) conversion of size to point
Point & operator-=(const Point &p)
Point(const Vec4 &v)
conversion from Vec4 (normalization)
int & At(unsigned int index)
bool operator==(const Point &p) const
Point(const Vec2 &v)
conversion from Vec2
Point & operator-=(const Size &p)
class encapsulating 1D to 3D size
#define DLLEXPORT_OST_IMG_BASE
DLLEXPORT_OST_IMG_BASE std::ostream & operator<<(std::ostream &os, const img::Extent &b)