library of assembled shared sources |
http://lass.cocamware.com |
#include <point_2dh.h>
Data Structures | |
struct | Rebind |
Public Types | |
enum | { dimension = TPoint::dimension } |
typedef Point2DH< T > | TSelf |
typedef Point2D< T > | TPoint |
typedef Vector3D< 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 | |
Point2DH () | |
Point2DH (TParam iX, TParam iY, TParam iZ=TNumTraits::one) | |
Point2DH (const TPoint &iAffinePoint) | |
Point2DH (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 Point2DH< T > & | operator+ () const |
A weird way to get back the same object. | |
const Point2DH< T > | operator- () const |
Point2DH< T > & | operator+= (const Point2DH< T > &iB) |
Point2DH< T > & | operator-= (const Point2DH< T > &iB) |
Point2DH< T > & | operator*= (TParam iB) |
Point2DH< T > & | operator/= (TParam iB) |
const bool | isZero () const |
Return true if point is origin (0, 0, z). | |
const bool | isInfinite () const |
Return true if point is at infinite distance of origin. | |
const bool | isNaN () const |
Return true if at least one of the components is NaN. | |
const bool | isValid () const |
Return true if point is valid. | |
const TValue | weight () const |
Return weight of point. | |
const Point2D< T > | 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 |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T > | |
bool | operator== (const Point2DH< T > &iA, const Point2DH< T > &iB) |
template<typename T > | |
bool | operator!= (const Point2DH< T > &iA, const Point2DH< T > &iB) |
template<typename T > | |
Point2DH< T > | operator+ (const Point2DH< T > &iA, const Point2DH< T > &iB) |
template<typename T > | |
Point2DH< T > | operator+ (const Point2DH< T > &iA, const Point2D< T > &iB) |
template<typename T > | |
Point2DH< T > | operator+ (const Point2D< T > &iA, const Point2DH< T > &iB) |
template<typename T > | |
Point2DH< T > | operator+ (const Point2D< T > &iA, const Point2D< T > &iB) |
template<typename T > | |
Point2DH< T > | operator- (const Point2DH< T > &iA, const Point2DH< T > &iB) |
template<typename T > | |
Point2DH< T > | operator* (const Point2DH< T > &iA, typename Point2DH< T >::TParam iB) |
template<typename T > | |
Point2DH< T > | operator/ (const Point2DH< T > &iA, typename Point2DH< T >::TParam iB) |
template<typename T > | |
Point2DH< T > | operator* (typename Point2DH< T >::TParam iA, const Point2DH< T > &iB) |
template<typename T > | |
std::ostream & | operator<< (std::ostream &ioOStream, const Point2DH< T > &iB) |
template<typename T > | |
io::XmlOStream & | operator<< (io::XmlOStream &oOStream, const Point2DH< T > &iB) |
template<typename T > | |
std::istream & | operator>> (std::istream &ioIStream, Point2DH< T > &oB) |
Definition at line 62 of file point_2dh.h.
typedef Point2DH<T> lass::prim::Point2DH< T >::TSelf |
Definition at line 66 of file point_2dh.h.
typedef Point2D<T> lass::prim::Point2DH< T >::TPoint |
Definition at line 68 of file point_2dh.h.
typedef Vector3D<T> lass::prim::Point2DH< T >::TVector |
Definition at line 69 of file point_2dh.h.
typedef TVector::TValue lass::prim::Point2DH< T >::TValue |
Definition at line 71 of file point_2dh.h.
typedef TVector::TParam lass::prim::Point2DH< T >::TParam |
Definition at line 72 of file point_2dh.h.
typedef TVector::TReference lass::prim::Point2DH< T >::TReference |
Definition at line 73 of file point_2dh.h.
typedef TVector::TConstReference lass::prim::Point2DH< T >::TConstReference |
Definition at line 74 of file point_2dh.h.
typedef TVector::TNumTraits lass::prim::Point2DH< T >::TNumTraits |
Definition at line 75 of file point_2dh.h.
anonymous enum |
lass::prim::Point2DH< T >::Point2DH | ( | ) | [inline] |
Definition at line 54 of file point_2dh.inl.
References lass::prim::Point2DH< T >::isZero(), and LASS_ASSERT.
lass::prim::Point2DH< T >::Point2DH | ( | TParam | iX, | |
TParam | iY, | |||
TParam | iZ = TNumTraits::one | |||
) | [inline] |
Definition at line 65 of file point_2dh.inl.
lass::prim::Point2DH< T >::Point2DH | ( | const TPoint & | iAffinePoint | ) | [inline] |
Definition at line 75 of file point_2dh.inl.
lass::prim::Point2DH< T >::Point2DH | ( | const TVector & | iPositionVector | ) | [inline, explicit] |
Definition at line 85 of file point_2dh.inl.
const Point2DH< T >::TVector lass::prim::Point2DH< T >::position | ( | ) | const [inline] |
Definition at line 96 of file point_2dh.inl.
References lass::prim::Point2DH< T >::x, lass::prim::Point2DH< T >::y, and lass::prim::Point2DH< T >::z.
Referenced by lass::prim::Point2DH< T >::operator-().
Point2DH< T >::TConstReference lass::prim::Point2DH< T >::operator[] | ( | size_t | iIndex | ) | const [inline] |
Definition at line 105 of file point_2dh.inl.
References lass::prim::Point2DH< T >::dimension, LASS_ASSERT, and lass::prim::Point2DH< T >::x.
Point2DH< T >::TReference lass::prim::Point2DH< T >::operator[] | ( | size_t | iIndex | ) | [inline] |
Definition at line 115 of file point_2dh.inl.
References lass::prim::Point2DH< T >::dimension, LASS_ASSERT, and lass::prim::Point2DH< T >::x.
Point2DH< T >::TConstReference lass::prim::Point2DH< T >::at | ( | signed | iIndex | ) | const [inline] |
Wrap index around range.
Definition at line 127 of file point_2dh.inl.
References lass::prim::Point2DH< T >::dimension, lass::num::mod(), and lass::prim::Point2DH< T >::x.
Point2DH< T >::TReference lass::prim::Point2DH< T >::at | ( | signed | iIndex | ) | [inline] |
Wrap index around range.
Definition at line 138 of file point_2dh.inl.
References lass::prim::Point2DH< T >::dimension, lass::num::mod(), and lass::prim::Point2DH< T >::x.
const Point2DH< T > & lass::prim::Point2DH< T >::operator+ | ( | ) | const [inline] |
const Point2DH< T > lass::prim::Point2DH< T >::operator- | ( | ) | const [inline] |
Definition at line 156 of file point_2dh.inl.
References lass::prim::Point2DH< T >::x, lass::prim::Point2DH< T >::y, and lass::prim::Point2DH< T >::z.
Point2DH< T > & lass::prim::Point2DH< T >::operator+= | ( | const Point2DH< T > & | iB | ) | [inline] |
Definition at line 164 of file point_2dh.inl.
References lass::prim::Point2DH< T >::x, lass::prim::Point2DH< T >::y, and lass::prim::Point2DH< T >::z.
Point2DH< T > & lass::prim::Point2DH< T >::operator-= | ( | const Point2DH< T > & | iB | ) | [inline] |
Definition at line 175 of file point_2dh.inl.
References lass::prim::Point2DH< T >::x, lass::prim::Point2DH< T >::y, and lass::prim::Point2DH< T >::z.
Point2DH< T > & lass::prim::Point2DH< T >::operator*= | ( | TParam | iB | ) | [inline] |
Definition at line 186 of file point_2dh.inl.
References lass::prim::Point2DH< T >::x, lass::prim::Point2DH< T >::y, and lass::prim::Point2DH< T >::z.
Point2DH< T > & lass::prim::Point2DH< T >::operator/= | ( | TParam | iB | ) | [inline] |
Definition at line 197 of file point_2dh.inl.
References lass::num::NumTraits< C >::one, lass::prim::Point2DH< T >::x, lass::prim::Point2DH< T >::y, and lass::prim::Point2DH< T >::z.
const bool lass::prim::Point2DH< T >::isZero | ( | ) | const [inline] |
Return true if point is origin (0, 0, z).
z may be 0 but doesn't has to be.
Definition at line 212 of file point_2dh.inl.
References lass::prim::Point2DH< T >::x, lass::prim::Point2DH< T >::y, and lass::num::NumTraits< C >::zero.
Referenced by lass::prim::Point2DH< T >::Point2DH().
const bool lass::prim::Point2DH< T >::isInfinite | ( | ) | const [inline] |
Return true if point is at infinite distance of origin.
test if z == 0.
Definition at line 232 of file point_2dh.inl.
References lass::prim::Point2DH< T >::z, and lass::num::NumTraits< C >::zero.
const bool lass::prim::Point2DH< T >::isNaN | ( | ) | const [inline] |
Return true if at least one of the components is NaN.
Definition at line 222 of file point_2dh.inl.
References lass::prim::Point2DH< T >::x, lass::prim::Point2DH< T >::y, and lass::prim::Point2DH< T >::z.
const bool lass::prim::Point2DH< T >::isValid | ( | ) | const [inline] |
Return true if point is valid.
test if point != (0, 0, 0)
Definition at line 242 of file point_2dh.inl.
References lass::prim::Point2DH< T >::x, lass::prim::Point2DH< T >::y, lass::prim::Point2DH< T >::z, and lass::num::NumTraits< C >::zero.
const Point2DH< T >::TValue lass::prim::Point2DH< T >::weight | ( | ) | const [inline] |
Return weight of point.
weight = z.
Definition at line 252 of file point_2dh.inl.
References lass::prim::Point2DH< T >::z.
Referenced by lass::prim::Aabb2D< T, MinMaxPolicy >::collides(), and lass::prim::Aabb2D< T, MinMaxPolicy >::intersects().
const Point2D< T > lass::prim::Point2DH< T >::affine | ( | ) | const [inline] |
Return rescaled version of point with weight = 1.
Does not influence original poitn.
Definition at line 263 of file point_2dh.inl.
References lass::prim::Point2DH< T >::homogenize(), lass::prim::Point2DH< T >::x, and lass::prim::Point2DH< T >::y.
Referenced by lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::intersect(), and lass::prim::Triangle2D< T >::partialVoronoiArea().
void lass::prim::Point2DH< T >::homogenize | ( | ) | [inline] |
Rescale point so that weight is 1.
Definition at line 275 of file point_2dh.inl.
References lass::num::NumTraits< C >::one, lass::prim::Point2DH< T >::x, lass::prim::Point2DH< T >::y, and lass::prim::Point2DH< T >::z.
Referenced by lass::prim::Point2DH< T >::affine().
bool operator== | ( | const Point2DH< T > & | iA, | |
const Point2DH< T > & | iB | |||
) | [related] |
Definition at line 290 of file point_2dh.inl.
References lass::prim::Point2DH< T >::x, lass::prim::Point2DH< T >::y, and lass::prim::Point2DH< T >::z.
bool operator!= | ( | const Point2DH< T > & | iA, | |
const Point2DH< T > & | iB | |||
) | [related] |
Definition at line 300 of file point_2dh.inl.
Point2DH< T > operator+ | ( | const Point2DH< T > & | iA, | |
const Point2DH< T > & | iB | |||
) | [related] |
Definition at line 310 of file point_2dh.inl.
Point2DH< T > operator+ | ( | const Point2DH< T > & | iA, | |
const Point2D< T > & | iB | |||
) | [related] |
Definition at line 322 of file point_2dh.inl.
Point2DH< T > operator+ | ( | const Point2D< T > & | iA, | |
const Point2DH< T > & | iB | |||
) | [related] |
Definition at line 334 of file point_2dh.inl.
Point2DH< T > operator+ | ( | const Point2D< T > & | iA, | |
const Point2D< T > & | iB | |||
) | [related] |
Definition at line 346 of file point_2dh.inl.
Point2DH< T > operator* | ( | const Point2DH< T > & | iA, | |
typename Point2DH< T >::TParam | iB | |||
) | [related] |
Definition at line 370 of file point_2dh.inl.
Point2DH< T > operator/ | ( | const Point2DH< T > & | iA, | |
typename Point2DH< T >::TParam | iB | |||
) | [related] |
Definition at line 382 of file point_2dh.inl.
Point2DH< T > operator* | ( | typename Point2DH< T >::TParam | iA, | |
const Point2DH< T > & | iB | |||
) | [related] |
Definition at line 394 of file point_2dh.inl.
std::ostream & operator<< | ( | std::ostream & | ioOStream, | |
const Point2DH< T > & | iB | |||
) | [related] |
io::XmlOStream & operator<< | ( | io::XmlOStream & | oOStream, | |
const Point2DH< T > & | iB | |||
) | [related] |
std::istream & operator>> | ( | std::istream & | ioIStream, | |
Point2DH< T > & | oB | |||
) | [related] |
TValue lass::prim::Point2DH< T >::x |
Definition at line 84 of file point_2dh.h.
Referenced by lass::prim::Point2DH< T >::affine(), lass::prim::Point2DH< T >::at(), lass::prim::Point2DH< T >::homogenize(), lass::prim::Point2DH< T >::isNaN(), lass::prim::Point2DH< T >::isValid(), lass::prim::Point2DH< T >::isZero(), lass::prim::Point2DH< T >::operator*=(), lass::prim::Point2DH< T >::operator+=(), lass::prim::Point2DH< T >::operator-(), lass::prim::Point2DH< T >::operator-=(), lass::prim::Point2DH< T >::operator/=(), lass::prim::Point2DH< T >::operator==(), lass::prim::Point2DH< T >::operator[](), and lass::prim::Point2DH< T >::position().
TValue lass::prim::Point2DH< T >::y |
Definition at line 85 of file point_2dh.h.
Referenced by lass::prim::Point2DH< T >::affine(), lass::prim::Point2DH< T >::homogenize(), lass::prim::Point2DH< T >::isNaN(), lass::prim::Point2DH< T >::isValid(), lass::prim::Point2DH< T >::isZero(), lass::prim::Point2DH< T >::operator*=(), lass::prim::Point2DH< T >::operator+=(), lass::prim::Point2DH< T >::operator-(), lass::prim::Point2DH< T >::operator-=(), lass::prim::Point2DH< T >::operator/=(), lass::prim::Point2DH< T >::operator==(), and lass::prim::Point2DH< T >::position().
TValue lass::prim::Point2DH< T >::z |
Definition at line 86 of file point_2dh.h.
Referenced by lass::prim::Point2DH< T >::homogenize(), lass::prim::Point2DH< T >::isInfinite(), lass::prim::Point2DH< T >::isNaN(), lass::prim::Point2DH< T >::isValid(), lass::prim::Point2DH< T >::operator*=(), lass::prim::Point2DH< T >::operator+=(), lass::prim::Point2DH< T >::operator-(), lass::prim::Point2DH< T >::operator-=(), lass::prim::Point2DH< T >::operator/=(), lass::prim::Point2DH< T >::operator==(), lass::prim::Point2DH< T >::position(), and lass::prim::Point2DH< T >::weight().
Generated on Mon Nov 10 14:22:14 2008 for Library of Assembled Shared Sources by 1.5.7.1 |