library of assembled shared sources |
http://lass.cocamware.com |
#include <point_3dh.h>
Data Structures | |
struct | Rebind |
Public Types | |
enum | { dimension = TPoint::dimension } |
typedef Point3DH< T > | TSelf |
typedef Point3D< T > | TPoint |
typedef Vector4D< T > | TVector |
typedef TVector::TValue | TValue |
typedef TVector::TParam | TParam |
typedef TVector::TReference | TReference |
typedef TVector::TConstReference | TConstReference |
typedef TVector::TNumTraits | TNumTraits |
Public Member Functions | |
Point3DH () | |
Point3DH (TParam iX, TParam iY, TParam iZ, TParam iW=TNumTraits::one) | |
Point3DH (const TPoint &iAffinePoint) | |
Point3DH (const TVector &iPositionVector) | |
const TVector | position () const |
TConstReference | operator[] (size_t iIndex) const |
TReference | operator[] (size_t iIndex) |
TConstReference | at (signed iIndex) const |
Wrap index around range. | |
TReference | at (signed iIndex) |
Wrap index around range. | |
const Point3DH< T > & | operator+ () const |
A weird way to get back the same object. | |
const Point3DH< T > | operator- () const |
Point3DH< T > & | operator+= (const Point3DH< T > &iB) |
Point3DH< T > & | operator-= (const Point3DH< T > &iB) |
Point3DH< T > & | operator*= (TParam iB) |
Point3DH< T > & | operator/= (TParam iB) |
const bool | isZero () const |
Return true if point is origin (0, 0, 0, w). | |
const bool | isNaN () const |
Return true if at least one of the components is NaN. | |
const bool | isInfinite () const |
Return true if point is at infinite distance of origin. | |
const bool | isValid () const |
Return true if point is valid. | |
const TParam | weight () const |
Return weight of point. | |
const TPoint | affine () const |
Return rescaled version of point with weight = 1. | |
void | homogenize () |
Rescale point so that weight is 1. | |
Data Fields | |
TValue | x |
TValue | y |
TValue | z |
TValue | w |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T > | |
bool | operator== (const Point3DH< T > &iA, const Point3DH< T > &iB) |
template<typename T > | |
bool | operator!= (const Point3DH< T > &iA, const Point3DH< T > &iB) |
template<typename T > | |
Point3DH< T > | operator+ (const Point3DH< T > &iA, const Point3DH< T > &iB) |
template<typename T > | |
Point3DH< T > | operator- (const Point3DH< T > &iA, const Point3DH< T > &iB) |
template<typename T > | |
Point3DH< T > | operator* (const Point3DH< T > &iA, typename Point3DH< T >::TParam iB) |
template<typename T > | |
Point3DH< T > | operator/ (const Point3DH< T > &iA, typename Point3DH< T >::TParam iB) |
template<typename T > | |
Point3DH< T > | operator* (typename Point3DH< T >::TParam iA, const Point3DH< T > &iB) |
template<typename T > | |
std::ostream & | operator<< (std::ostream &ioOStream, const Point3DH< T > &iB) |
template<typename T > | |
io::XmlOStream & | operator<< (io::XmlOStream &oOStream, const Point3DH< T > &iB) |
template<typename T > | |
std::istream & | operator>> (std::istream &ioIStream, Point3DH< T > &oB) |
Definition at line 71 of file point_3dh.h.
typedef Point3DH<T> lass::prim::Point3DH< T >::TSelf |
Definition at line 75 of file point_3dh.h.
typedef Point3D<T> lass::prim::Point3DH< T >::TPoint |
Definition at line 77 of file point_3dh.h.
typedef Vector4D<T> lass::prim::Point3DH< T >::TVector |
Definition at line 78 of file point_3dh.h.
typedef TVector::TValue lass::prim::Point3DH< T >::TValue |
Definition at line 80 of file point_3dh.h.
typedef TVector::TParam lass::prim::Point3DH< T >::TParam |
Definition at line 81 of file point_3dh.h.
typedef TVector::TReference lass::prim::Point3DH< T >::TReference |
Definition at line 82 of file point_3dh.h.
typedef TVector::TConstReference lass::prim::Point3DH< T >::TConstReference |
Definition at line 83 of file point_3dh.h.
typedef TVector::TNumTraits lass::prim::Point3DH< T >::TNumTraits |
Definition at line 84 of file point_3dh.h.
anonymous enum |
lass::prim::Point3DH< T >::Point3DH | ( | ) | [inline] |
Definition at line 62 of file point_3dh.inl.
References lass::prim::Point3DH< T >::isZero(), and LASS_ASSERT.
Referenced by lass::prim::Point3DH< T >::operator-().
lass::prim::Point3DH< T >::Point3DH | ( | TParam | iX, | |
TParam | iY, | |||
TParam | iZ, | |||
TParam | iW = TNumTraits::one | |||
) | [inline] |
Definition at line 74 of file point_3dh.inl.
lass::prim::Point3DH< T >::Point3DH | ( | const TPoint & | iAffinePoint | ) | [inline] |
Definition at line 85 of file point_3dh.inl.
lass::prim::Point3DH< T >::Point3DH | ( | const TVector & | iPositionVector | ) | [inline, explicit] |
Definition at line 96 of file point_3dh.inl.
const Point3DH< T >::TVector lass::prim::Point3DH< T >::position | ( | ) | const [inline] |
Definition at line 108 of file point_3dh.inl.
References lass::prim::Point3DH< T >::w, lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, and lass::prim::Point3DH< T >::z.
Referenced by lass::prim::Point3DH< T >::operator-().
Point3DH< T >::TConstReference lass::prim::Point3DH< T >::operator[] | ( | size_t | iIndex | ) | const [inline] |
Definition at line 117 of file point_3dh.inl.
References lass::prim::Point3DH< T >::dimension, LASS_ASSERT, and lass::prim::Point3DH< T >::x.
Point3DH< T >::TReference lass::prim::Point3DH< T >::operator[] | ( | size_t | iIndex | ) | [inline] |
Definition at line 127 of file point_3dh.inl.
References lass::prim::Point3DH< T >::dimension, LASS_ASSERT, and lass::prim::Point3DH< T >::x.
Point3DH< T >::TConstReference lass::prim::Point3DH< T >::at | ( | signed | iIndex | ) | const [inline] |
Wrap index around range.
Definition at line 139 of file point_3dh.inl.
References lass::prim::Point3DH< T >::dimension, lass::num::mod(), and lass::prim::Point3DH< T >::x.
Point3DH< T >::TReference lass::prim::Point3DH< T >::at | ( | signed | iIndex | ) | [inline] |
Wrap index around range.
Definition at line 151 of file point_3dh.inl.
References lass::prim::Point3DH< T >::dimension, lass::num::mod(), and lass::prim::Point3DH< T >::x.
const Point3DH< T > & lass::prim::Point3DH< T >::operator+ | ( | ) | const [inline] |
const Point3DH< T > lass::prim::Point3DH< T >::operator- | ( | ) | const [inline] |
Definition at line 169 of file point_3dh.inl.
References lass::prim::Point3DH< T >::Point3DH(), lass::prim::Point3DH< T >::w, lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, and lass::prim::Point3DH< T >::z.
Point3DH< T > & lass::prim::Point3DH< T >::operator+= | ( | const Point3DH< T > & | iB | ) | [inline] |
Definition at line 177 of file point_3dh.inl.
References lass::prim::Point3DH< T >::w, lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, and lass::prim::Point3DH< T >::z.
Point3DH< T > & lass::prim::Point3DH< T >::operator-= | ( | const Point3DH< T > & | iB | ) | [inline] |
Definition at line 189 of file point_3dh.inl.
References lass::prim::Point3DH< T >::w, lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, and lass::prim::Point3DH< T >::z.
Point3DH< T > & lass::prim::Point3DH< T >::operator*= | ( | TParam | iB | ) | [inline] |
Definition at line 201 of file point_3dh.inl.
References lass::prim::Point3DH< T >::w, lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, and lass::prim::Point3DH< T >::z.
Point3DH< T > & lass::prim::Point3DH< T >::operator/= | ( | TParam | iB | ) | [inline] |
Definition at line 213 of file point_3dh.inl.
References lass::num::NumTraits< C >::one, lass::prim::Point3DH< T >::w, lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, and lass::prim::Point3DH< T >::z.
const bool lass::prim::Point3DH< T >::isZero | ( | ) | const [inline] |
Return true if point is origin (0, 0, 0, w).
w may be 0 but doesn't has to be.
Definition at line 229 of file point_3dh.inl.
References lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, lass::prim::Point3DH< T >::z, and lass::num::NumTraits< C >::zero.
Referenced by lass::prim::Point3DH< T >::Point3DH().
const bool lass::prim::Point3DH< T >::isNaN | ( | ) | const [inline] |
Return true if at least one of the components is NaN.
Definition at line 239 of file point_3dh.inl.
References lass::prim::Point3DH< T >::w, lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, and lass::prim::Point3DH< T >::z.
const bool lass::prim::Point3DH< T >::isInfinite | ( | ) | const [inline] |
Return true if point is at infinite distance of origin.
test if w == 0.
Definition at line 249 of file point_3dh.inl.
References lass::prim::Point3DH< T >::w, and lass::num::NumTraits< C >::zero.
const bool lass::prim::Point3DH< T >::isValid | ( | ) | const [inline] |
Return true if point is valid.
test if point != (0, 0, 0, 0)
Definition at line 259 of file point_3dh.inl.
References lass::prim::Point3DH< T >::w, lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, lass::prim::Point3DH< T >::z, and lass::num::NumTraits< C >::zero.
const Point3DH< T >::TParam lass::prim::Point3DH< T >::weight | ( | ) | const [inline] |
Return weight of point.
weight = w.
Definition at line 271 of file point_3dh.inl.
References lass::prim::Point3DH< T >::w.
Referenced by lass::prim::Aabb3D< T, MinMaxPolicy >::collides(), and lass::prim::Aabb3D< T, MinMaxPolicy >::intersects().
const Point3D< T > lass::prim::Point3DH< T >::affine | ( | ) | const [inline] |
Return rescaled version of point with weight = 1.
Does not influence original poitn.
Definition at line 282 of file point_3dh.inl.
References lass::prim::Point3DH< T >::homogenize(), lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, and lass::prim::Point3DH< T >::z.
Referenced by lass::prim::Aabb3D< T, MinMaxPolicy >::boundingSphere().
void lass::prim::Point3DH< T >::homogenize | ( | ) | [inline] |
Rescale point so that weight is 1.
Definition at line 294 of file point_3dh.inl.
References lass::num::NumTraits< C >::one, lass::prim::Point3DH< T >::w, lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, and lass::prim::Point3DH< T >::z.
Referenced by lass::prim::Point3DH< T >::affine().
bool operator== | ( | const Point3DH< T > & | iA, | |
const Point3DH< T > & | iB | |||
) | [related] |
Definition at line 310 of file point_3dh.inl.
References lass::prim::Point3DH< T >::w, lass::prim::Point3DH< T >::x, lass::prim::Point3DH< T >::y, and lass::prim::Point3DH< T >::z.
bool operator!= | ( | const Point3DH< T > & | iA, | |
const Point3DH< T > & | iB | |||
) | [related] |
Definition at line 320 of file point_3dh.inl.
Point3DH< T > operator+ | ( | const Point3DH< T > & | iA, | |
const Point3DH< T > & | iB | |||
) | [related] |
Definition at line 330 of file point_3dh.inl.
Point3DH< T > operator* | ( | const Point3DH< T > & | iA, | |
typename Point3DH< T >::TParam | iB | |||
) | [related] |
Definition at line 354 of file point_3dh.inl.
Point3DH< T > operator/ | ( | const Point3DH< T > & | iA, | |
typename Point3DH< T >::TParam | iB | |||
) | [related] |
Definition at line 366 of file point_3dh.inl.
Point3DH< T > operator* | ( | typename Point3DH< T >::TParam | iA, | |
const Point3DH< T > & | iB | |||
) | [related] |
Definition at line 378 of file point_3dh.inl.
std::ostream & operator<< | ( | std::ostream & | ioOStream, | |
const Point3DH< T > & | iB | |||
) | [related] |
io::XmlOStream & operator<< | ( | io::XmlOStream & | oOStream, | |
const Point3DH< T > & | iB | |||
) | [related] |
std::istream & operator>> | ( | std::istream & | ioIStream, | |
Point3DH< T > & | oB | |||
) | [related] |
TValue lass::prim::Point3DH< T >::x |
Definition at line 93 of file point_3dh.h.
Referenced by lass::prim::Point3DH< T >::affine(), lass::prim::Point3DH< T >::at(), lass::prim::Point3DH< T >::homogenize(), lass::prim::Point3DH< T >::isNaN(), lass::prim::Point3DH< T >::isValid(), lass::prim::Point3DH< T >::isZero(), lass::prim::Point3DH< T >::operator*=(), lass::prim::Point3DH< T >::operator+=(), lass::prim::Point3DH< T >::operator-(), lass::prim::Point3DH< T >::operator-=(), lass::prim::Point3DH< T >::operator/=(), lass::prim::Point3DH< T >::operator==(), lass::prim::Point3DH< T >::operator[](), and lass::prim::Point3DH< T >::position().
TValue lass::prim::Point3DH< T >::y |
Definition at line 94 of file point_3dh.h.
Referenced by lass::prim::Point3DH< T >::affine(), lass::prim::Point3DH< T >::homogenize(), lass::prim::Point3DH< T >::isNaN(), lass::prim::Point3DH< T >::isValid(), lass::prim::Point3DH< T >::isZero(), lass::prim::Point3DH< T >::operator*=(), lass::prim::Point3DH< T >::operator+=(), lass::prim::Point3DH< T >::operator-(), lass::prim::Point3DH< T >::operator-=(), lass::prim::Point3DH< T >::operator/=(), lass::prim::Point3DH< T >::operator==(), and lass::prim::Point3DH< T >::position().
TValue lass::prim::Point3DH< T >::z |
Definition at line 95 of file point_3dh.h.
Referenced by lass::prim::Point3DH< T >::affine(), lass::prim::Point3DH< T >::homogenize(), lass::prim::Point3DH< T >::isNaN(), lass::prim::Point3DH< T >::isValid(), lass::prim::Point3DH< T >::isZero(), lass::prim::Point3DH< T >::operator*=(), lass::prim::Point3DH< T >::operator+=(), lass::prim::Point3DH< T >::operator-(), lass::prim::Point3DH< T >::operator-=(), lass::prim::Point3DH< T >::operator/=(), lass::prim::Point3DH< T >::operator==(), and lass::prim::Point3DH< T >::position().
TValue lass::prim::Point3DH< T >::w |
Definition at line 96 of file point_3dh.h.
Referenced by lass::prim::Point3DH< T >::homogenize(), lass::prim::Point3DH< T >::isInfinite(), lass::prim::Point3DH< T >::isNaN(), lass::prim::Point3DH< T >::isValid(), lass::prim::Point3DH< T >::operator*=(), lass::prim::Point3DH< T >::operator+=(), lass::prim::Point3DH< T >::operator-(), lass::prim::Point3DH< T >::operator-=(), lass::prim::Point3DH< T >::operator/=(), lass::prim::Point3DH< T >::operator==(), lass::prim::Point3DH< T >::position(), and lass::prim::Point3DH< T >::weight().
Generated on Mon Nov 10 14:22:14 2008 for Library of Assembled Shared Sources by 1.5.7.1 |