Point.h
Go to the documentation of this file.
65 template < typename T2 > Point2<T> & operator+=(const T2 & val) { x+=val; y+=val; return *this; }
66 template < typename T2 > Point2<T> & operator-=(const T2 & val) { x-=val; y-=val; return *this; }
67 template < typename T2 > Point2<T> & operator*=(const T2 & val) { x*=val; y*=val; return *this; }
68 template < typename T2 > Point2<T> & operator/=(const T2 & val) { x/=val; y/=val; return *this; }
98 bool operator==(const Point2& p2) const { return artec::sdk::base::isZero(x-p2.x) && artec::sdk::base::isZero(y-p2.y); }
101 bool operator>=(const Point2& p2) const { return (x>p2.x || artec::sdk::base::isZero(x-p2.x)) && (y>p2.y || artec::sdk::base::isZero(y-p2.y)); }
103 bool operator<=(const Point2& p2) const { return (x<p2.x || artec::sdk::base::isZero(x-p2.x)) && (y<p2.y || artec::sdk::base::isZero(y-p2.y)); }
215 template< typename T2 > explicit Point3(const Point3< T2 > &ot) : x(T(ot.x)), y(T(ot.y)), z(T(ot.z)) {}
219 template < typename T2 > Point3<T>& operator+=(const T2 & val) { x+=val; y+=val; z+=val; return *this; }
220 template < typename T2 > Point3<T>& operator-=(const T2 & val) { x-=val; y-=val; z-=val; return *this; }
221 template < typename T2 > Point3<T>& operator*=(const T2 & val) { x*=val; y*=val; z*=val; return *this; }
222 template < typename T2 > Point3<T>& operator/=(const T2 & val) { x/=val; y/=val; z/=val; return *this; }
254 return artec::sdk::base::isZero(x-p2.x) && artec::sdk::base::isZero(y-p2.y) && artec::sdk::base::isZero(z-p2.z);
260 return (x>p2.x || artec::sdk::base::isZero(x-p2.x)) && (y>p2.y || artec::sdk::base::isZero(y-p2.y)) && (z>p2.z || artec::sdk::base::isZero(z-p2.z));
265 return (x<p2.x || artec::sdk::base::isZero(x-p2.x)) && (y<p2.y || artec::sdk::base::isZero(y-p2.y)) && (z<p2.z || artec::sdk::base::isZero(z-p2.z));
313 bool isZero() const { return artec::sdk::base::isZero(x) && artec::sdk::base::isZero(y) && artec::sdk::base::isZero(z); }
381 template< typename T2 > explicit Point4(const Point4< T2 > &ot) : x(ot.x), y(ot.y), z(ot.z), w(ot.w) {}
385 template < typename T2 > Point4<T> & operator+=(const T2 & val) { x+=val; y+=val; z += val; w += val; return *this; }
386 template < typename T2 > Point4<T> & operator-=(const T2 & val) { x-=val; y-=val; z -= val; w -= val; return *this; }
387 template < typename T2 > Point4<T> & operator*=(const T2 & val) { x*=val; y*=val; z *= val; w *= val; return *this; }
388 template < typename T2 > Point4<T> & operator/=(const T2 & val) { x/=val; y/=val; z /= val; w /= val; return *this; }
418 bool operator==(const Point4& p2) const { return artec::sdk::base::isZero(x-p2.x) && artec::sdk::base::isZero(y-p2.y) && artec::sdk::base::isZero(z-p2.z) && artec::sdk::base::isZero(w-p2.w); }
421 bool operator>=(const Point4& p2) const { return (x>p2.x || artec::sdk::base::isZero(x-p2.x)) && (y>p2.y || artec::sdk::base::isZero(y-p2.y)) && (z>p2.z || artec::sdk::base::isZero(z-p2.z)) && (w>p2.w || artec::sdk::base::isZero(w-p2.w)); }
423 bool operator<=(const Point4& p2) const { return (x<p2.x || artec::sdk::base::isZero(x-p2.x)) && (y<p2.y || artec::sdk::base::isZero(y-p2.y)) && (z<p2.z || artec::sdk::base::isZero(z-p2.z)) && (w<p2.w || artec::sdk::base::isZero(w-p2.w)); }
465 bool isZero() const { return artec::sdk::base::isZero(x) && artec::sdk::base::isZero(y) && artec::sdk::base::isZero(z) && artec::sdk::base::isZero(w); }
Point2< T > operator+(const T2 &val, const Point2< T > &p)
Arithmetic operators of the form: operator(scalar, TPoint2)
Definition: Point.h:178
Point2< T > operator*(const T2 &val) const
Definition: Point.h:74
Point4< T > operator+(const T2 &val) const
Definition: Point.h:390
Definition: AlgorithmWorkset.h:17
Point3< Type2 > operator*(const GenericMatrix< 3, 3, Type > &matrix, const Point3< Type2 > &point)
Definition: GenericMatrix.h:296
Point3< T > operator+(const T2 &val) const
Definition: Point.h:224
Point3< T > operator-(const T2 &val) const
Definition: Point.h:226
T distanceSquare(const Point2< T > &p1, const Point2< T > &p2)
Distance measure (squared)
Definition: Point.h:165
Definition: Point.h:22
Definition: Point.h:36
Point3< T > crossProduct(const Point3< T > &p1, const Point3< T > &p2)
Cross product of two points.
Definition: Point.h:347
Point4< T > operator-(const T2 &val) const
Definition: Point.h:392
Point2< T > operator-(const T2 &val) const
Definition: Point.h:72
Definition: Point.h:21
static T dot(const Point4< T > &p1, const Point4< T > &p2)
Inner product operator.
Definition: Point.h:427
Point4< T > operator*(const T2 &val) const
Definition: Point.h:394
Point2< T > operator-(const T2 &val, const Point2< T > &p)
Definition: Point.h:180
static T dot(const Point2< T > &p1, const Point2< T > &p2)
Inner product operator.
Definition: Point.h:107
Point3< T > operator*(const T2 &val) const
Definition: Point.h:228
static T dot(const Point3< T > &p1, const Point3< T > &p2)
Inner product operator.
Definition: Point.h:270
T dotProduct(const Point2< T > &p1, const Point2< T > &p2)
Cross product of two points.
Definition: Point.h:171
Point3< T > operator/(const T2 &val) const
Definition: Point.h:230
Point4< T > operator/(const T2 &val) const
Definition: Point.h:396
static Point3< T > cross(const Point3< T > &p1, const Point3< T > &p2)
Cross product of two points.
Definition: Point.h:276
bool isZero(const Tf &some)
Equality expression for types which are not exact.
Definition: Point.h:25
Point2< T > operator+(const T2 &val) const
Definition: Point.h:70
Point2< T > operator/(const T2 &val) const
Definition: Point.h:76