53#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_POINT_3DH_H
54#define LASS_GUARDIAN_OF_INCLUSION_PRIM_POINT_3DH_H
75 typedef Point3DH<T> TSelf;
80 typedef typename TVector::TValue TValue;
81 typedef typename TVector::TParam TParam;
82 typedef typename TVector::TReference TReference;
83 typedef typename TVector::TConstReference TConstReference;
84 typedef typename TVector::TNumTraits TNumTraits;
86 enum { dimension = TPoint::dimension };
88 template <
typename U>
struct Rebind
90 typedef Point3DH<U> Type;
99 Point3DH(TParam iX, TParam iY, TParam iZ, TParam iW = TNumTraits::one);
100 Point3DH(
const TPoint& iAffinePoint);
101 explicit Point3DH(
const TVector& iPositionVector);
103 const TVector position()
const;
104 TConstReference operator[](
size_t iIndex)
const;
105 TReference operator[](
size_t iIndex);
106 TConstReference
at(
signed iIndex)
const;
107 TReference
at(
signed iIndex);
110 const Point3DH<T> operator-()
const;
112 Point3DH<T>& operator+=(
const Point3DH<T>& iB);
113 Point3DH<T>& operator-=(
const Point3DH<T>& iB);
114 Point3DH<T>& operator*=(TParam iB);
115 Point3DH<T>& operator/=(TParam iB);
137template<
typename T> std::ostream& operator<<(std::ostream& oOStream,
const Point3DH<T>& iB);
139template<
typename T> std::istream& operator>>(std::istream& ioIStream,
Point3DH<T>& oB);
148template<
typename T>
inline Point3DH<T> operator*(
typename Point3D<T>::TParam iA,
const Point3D<T>& iB)
150 return iA * Point3DH<T>(iB);
152template<
typename T>
inline Point3DH<T> operator*(
const Point3D<T>& iA,
typename Point3D<T>::TParam iB)
154 return Point3DH<T>(iA) * iB;
Output stream for writing a selection of geometric primitives to XML files.
#define LASS_SIMD_ALIGN
if LASS_SIMD_ALIGNMENT is set, use LASS_SIMD_ALIGN to align some structures on SIMD alignment boundar...
set of geometrical primitives
Library for Assembled Shared Sources.
const Point3DH< T > & operator+() const
A weird way to get back the same object.
const TParam weight() const
Return weight of point.
bool isZero() const
Return true if point is origin (0, 0, 0, w).
TConstReference at(signed iIndex) const
Wrap index around range.
const TPoint affine() const
Return rescaled version of point with weight = 1.
TReference at(signed iIndex)
Wrap index around range.
bool isNaN() const
Return true if at least one of the components is NaN.
bool isInfinite() const
Return true if point is at infinite distance of origin.
bool isValid() const
Return true if point is valid.
void homogenize()
Rescale point so that weight is 1.