library of assembled shared sources |
http://lass.cocamware.com |
#include <point_3d.h>
Data Structures | |
struct | Rebind |
Public Types | |
enum | { dimension = TVector::dimension } |
typedef Point3D< T > | TSelf |
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 | |
Point3D () | |
Point3D (TParam x, TParam y, TParam z) | |
template<typename U > | |
Point3D (const Point3D< U > &other) | |
template<typename U > | |
Point3D (const Vector3D< U > &position) | |
template<typename U > | |
Point3D (const U &x, const U &y, const U &z) | |
const TVector | position () const |
TConstReference | operator[] (size_t index) const |
TReference | operator[] (size_t index) |
TConstReference | at (signed index) const |
Wrap index around range. | |
TReference | at (signed index) |
Wrap index around range. | |
Point3D< T > & | operator+= (const Vector3D< T > &offset) |
Point3D< T > & | operator-= (const Vector3D< T > &offset) |
const bool | isZero () const |
const bool | isNaN () const |
Return true if at least one of the components is NaN. | |
Data Fields | |
TValue | x |
TValue | y |
TValue | z |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T > | |
bool | operator== (const Point3D< T > &a, const Point3D< T > &b) |
template<typename T > | |
bool | operator!= (const Point3D< T > &a, const Point3D< T > &b) |
template<typename T > | |
Point3D< T > | operator+ (const Point3D< T > &a, const Vector3D< T > &b) |
template<typename T > | |
Point3D< T > | operator- (const Point3D< T > &a, const Vector3D< T > &b) |
template<typename T > | |
Point3D< T > | operator+ (const Vector3D< T > &a, const Point3D< T > &b) |
template<typename T > | |
Vector3D< T > | operator- (const Point3D< T > &a, const Point3D< T > &b) |
template<typename T > | |
Point3D< T >::TValue | distance (const Point3D< T > &a, const Point3D< T > &b) |
return the distance between two points | |
template<typename T > | |
Point3D< T > | pointwiseMin (const Point3D< T > &a, const Point3D< T > &b) |
return a point with, for each coordinate, the minimum value of a and b | |
template<typename T > | |
Point3D< T > | lerp (const Point3D< T > &a, const Point3D< T > &b, typename Point3D< T >::TParam t) |
interpolate linearly between two points: a + t * (b - a) | |
template<typename T > | |
Point3D< T > | pointwiseMax (const Point3D< T > &a, const Point3D< T > &b) |
return a point with, for each coordinate, the maximum value of a and b | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &stream, const Point3D< T > &b) |
template<typename T > | |
io::XmlOStream & | operator<< (io::XmlOStream &stream, const Point3D< T > &b) |
template<typename T > | |
std::istream & | operator>> (std::istream &stream, Point3D< T > &b) |
Definition at line 70 of file point_3d.h.
typedef Point3D<T> lass::prim::Point3D< T >::TSelf |
Definition at line 74 of file point_3d.h.
typedef Vector3D<T> lass::prim::Point3D< T >::TVector |
Definition at line 76 of file point_3d.h.
typedef TVector::TValue lass::prim::Point3D< T >::TValue |
Definition at line 78 of file point_3d.h.
typedef TVector::TParam lass::prim::Point3D< T >::TParam |
Definition at line 79 of file point_3d.h.
typedef TVector::TReference lass::prim::Point3D< T >::TReference |
Definition at line 80 of file point_3d.h.
typedef TVector::TConstReference lass::prim::Point3D< T >::TConstReference |
Definition at line 81 of file point_3d.h.
typedef TVector::TNumTraits lass::prim::Point3D< T >::TNumTraits |
Definition at line 82 of file point_3d.h.
anonymous enum |
lass::prim::Point3D< T >::Point3D | ( | ) | [inline] |
Definition at line 62 of file point_3d.inl.
References lass::prim::Point3D< T >::isZero(), and LASS_ASSERT.
lass::prim::Point3D< T >::Point3D | ( | TParam | x, | |
TParam | y, | |||
TParam | z | |||
) | [inline] |
Definition at line 73 of file point_3d.inl.
lass::prim::Point3D< T >::Point3D | ( | const Point3D< U > & | other | ) | [inline, explicit] |
Definition at line 84 of file point_3d.inl.
lass::prim::Point3D< T >::Point3D | ( | const Vector3D< U > & | position | ) | [inline, explicit] |
Definition at line 95 of file point_3d.inl.
lass::prim::Point3D< T >::Point3D | ( | const U & | x, | |
const U & | y, | |||
const U & | z | |||
) | [inline, explicit] |
Definition at line 106 of file point_3d.inl.
const Point3D< T >::TVector lass::prim::Point3D< T >::position | ( | ) | const [inline] |
Definition at line 117 of file point_3d.inl.
References lass::prim::Point3D< T >::x, lass::prim::Point3D< T >::y, and lass::prim::Point3D< T >::z.
Referenced by lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::equation(), lass::prim::impl::Plane3DCombined< T, NormalizingPolicy >::equation(), lass::prim::impl::Plane3DCartesian< T, NormalizingPolicy >::equation(), lass::prim::impl::Plane3DImplDetail::generateCartesian(), lass::prim::Point3D< T >::lerp(), lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::loopSubdivision(), lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::reject(), and lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::subdivide().
Point3D< T >::TConstReference lass::prim::Point3D< T >::operator[] | ( | size_t | index | ) | const [inline] |
Definition at line 126 of file point_3d.inl.
References lass::prim::Point3D< T >::dimension, LASS_ASSERT, and lass::prim::Point3D< T >::x.
Point3D< T >::TReference lass::prim::Point3D< T >::operator[] | ( | size_t | index | ) | [inline] |
Definition at line 136 of file point_3d.inl.
References lass::prim::Point3D< T >::dimension, LASS_ASSERT, and lass::prim::Point3D< T >::x.
Point3D< T >::TConstReference lass::prim::Point3D< T >::at | ( | signed | index | ) | const [inline] |
Wrap index around range.
Definition at line 148 of file point_3d.inl.
References lass::prim::Point3D< T >::dimension, lass::num::mod(), and lass::prim::Point3D< T >::x.
Point3D< T >::TReference lass::prim::Point3D< T >::at | ( | signed | index | ) | [inline] |
Wrap index around range.
Definition at line 159 of file point_3d.inl.
References lass::prim::Point3D< T >::dimension, lass::num::mod(), and lass::prim::Point3D< T >::x.
Point3D<T>& lass::prim::Point3D< T >::operator+= | ( | const Vector3D< T > & | offset | ) |
Point3D<T>& lass::prim::Point3D< T >::operator-= | ( | const Vector3D< T > & | offset | ) |
const bool lass::prim::Point3D< T >::isZero | ( | ) | const [inline] |
Definition at line 190 of file point_3d.inl.
References lass::prim::Point3D< T >::x, lass::prim::Point3D< T >::y, lass::prim::Point3D< T >::z, and lass::num::NumTraits< C >::zero.
Referenced by lass::prim::Line3D< T, NormalizingPolicy >::Line3D(), lass::prim::LineSegment3D< T, ParameterPolicy >::LineSegment3D(), lass::prim::Point3D< T >::Point3D(), lass::prim::Ray3D< T, NormalizingPolicy, ParameterPolicy >::Ray3D(), and lass::prim::Sphere3D< T >::Sphere3D().
const bool lass::prim::Point3D< T >::isNaN | ( | ) | const [inline] |
Return true if at least one of the components is NaN.
Definition at line 200 of file point_3d.inl.
References lass::prim::Point3D< T >::x, lass::prim::Point3D< T >::y, and lass::prim::Point3D< T >::z.
Definition at line 212 of file point_3d.inl.
References lass::prim::Point3D< T >::x, lass::prim::Point3D< T >::y, and lass::prim::Point3D< T >::z.
Definition at line 222 of file point_3d.inl.
Point3D< T > operator+ | ( | const Point3D< T > & | a, | |
const Vector3D< T > & | b | |||
) | [related] |
Definition at line 232 of file point_3d.inl.
Point3D< T > operator- | ( | const Point3D< T > & | a, | |
const Vector3D< T > & | b | |||
) | [related] |
Definition at line 244 of file point_3d.inl.
Point3D< T > operator+ | ( | const Vector3D< T > & | a, | |
const Point3D< T > & | b | |||
) | [related] |
Definition at line 256 of file point_3d.inl.
Vector3D< T > operator- | ( | const Point3D< T > & | a, | |
const Point3D< T > & | b | |||
) | [related] |
Definition at line 268 of file point_3d.inl.
References lass::prim::Point3D< T >::x, lass::prim::Point3D< T >::y, and lass::prim::Point3D< T >::z.
Point3D< T >::TValue distance | ( | const Point3D< T > & | a, | |
const Point3D< T > & | b | |||
) | [related] |
return the distance between two points
Definition at line 279 of file point_3d.inl.
References lass::prim::Vector3D< T >::norm().
Point3D< T > pointwiseMin | ( | const Point3D< T > & | a, | |
const Point3D< T > & | b | |||
) | [related] |
return a point with, for each coordinate, the minimum value of a and b
Definition at line 300 of file point_3d.inl.
References lass::prim::Point3D< T >::x, lass::prim::Point3D< T >::y, and lass::prim::Point3D< T >::z.
Point3D< T > lerp | ( | const Point3D< T > & | a, | |
const Point3D< T > & | b, | |||
typename Point3D< T >::TParam | t | |||
) | [related] |
interpolate linearly between two points: a + t * (b - a)
Definition at line 311 of file point_3d.inl.
References lass::prim::lerp(), and lass::prim::Point3D< T >::position().
Point3D< T > pointwiseMax | ( | const Point3D< T > & | a, | |
const Point3D< T > & | b | |||
) | [related] |
return a point with, for each coordinate, the maximum value of a and b
Definition at line 322 of file point_3d.inl.
References lass::prim::Point3D< T >::x, lass::prim::Point3D< T >::y, and lass::prim::Point3D< T >::z.
std::ostream & operator<< | ( | std::ostream & | stream, | |
const Point3D< T > & | b | |||
) | [related] |
io::XmlOStream & operator<< | ( | io::XmlOStream & | stream, | |
const Point3D< T > & | b | |||
) | [related] |
std::istream & operator>> | ( | std::istream & | stream, | |
Point3D< T > & | b | |||
) | [related] |
TValue lass::prim::Point3D< T >::x |
Definition at line 91 of file point_3d.h.
Referenced by lass::prim::Point3D< T >::at(), lass::prim::Aabb3D< T, MinMaxPolicy >::classify(), lass::prim::SimplePolygon3D< T, PlaneEquationPolicy, PlaneNormalizingPolicy >::clip(), lass::prim::Aabb2D< T, MinMaxPolicy >::collides(), lass::prim::Aabb3D< T, MinMaxPolicy >::contains(), lass::prim::Aabb3D< T, MinMaxPolicy >::grow(), lass::prim::Aabb3D< T, MinMaxPolicy >::isEmpty(), lass::prim::Point3D< T >::isNaN(), lass::prim::Aabb3D< T, MinMaxPolicy >::isValid(), lass::prim::Point3D< T >::isZero(), lass::prim::Point3D< T >::operator-(), lass::prim::Point3D< T >::operator==(), lass::prim::Point3D< T >::operator[](), lass::prim::Point3D< T >::pointwiseMax(), lass::prim::Point3D< T >::pointwiseMin(), lass::prim::Point3D< T >::position(), lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::PositionalEdge::PositionalEdge(), lass::prim::Transformation3D< T >::transform(), and lass::prim::Transformation3D< T >::Transformation3D().
TValue lass::prim::Point3D< T >::y |
Definition at line 92 of file point_3d.h.
Referenced by lass::prim::Aabb3D< T, MinMaxPolicy >::classify(), lass::prim::SimplePolygon3D< T, PlaneEquationPolicy, PlaneNormalizingPolicy >::clip(), lass::prim::Aabb2D< T, MinMaxPolicy >::collides(), lass::prim::Aabb3D< T, MinMaxPolicy >::contains(), lass::prim::Aabb3D< T, MinMaxPolicy >::grow(), lass::prim::Point3D< T >::isNaN(), lass::prim::Aabb3D< T, MinMaxPolicy >::isValid(), lass::prim::Point3D< T >::isZero(), lass::prim::Point3D< T >::operator-(), lass::prim::Point3D< T >::operator==(), lass::prim::Point3D< T >::pointwiseMax(), lass::prim::Point3D< T >::pointwiseMin(), lass::prim::Point3D< T >::position(), lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::PositionalEdge::PositionalEdge(), lass::prim::Transformation3D< T >::transform(), and lass::prim::Transformation3D< T >::Transformation3D().
TValue lass::prim::Point3D< T >::z |
Definition at line 93 of file point_3d.h.
Referenced by lass::prim::Aabb3D< T, MinMaxPolicy >::classify(), lass::prim::SimplePolygon3D< T, PlaneEquationPolicy, PlaneNormalizingPolicy >::clip(), lass::prim::Aabb2D< T, MinMaxPolicy >::collides(), lass::prim::Aabb3D< T, MinMaxPolicy >::contains(), lass::prim::Aabb3D< T, MinMaxPolicy >::grow(), lass::prim::Point3D< T >::isNaN(), lass::prim::Aabb3D< T, MinMaxPolicy >::isValid(), lass::prim::Point3D< T >::isZero(), lass::prim::Point3D< T >::operator-(), lass::prim::Point3D< T >::operator==(), lass::prim::Point3D< T >::pointwiseMax(), lass::prim::Point3D< T >::pointwiseMin(), lass::prim::Point3D< T >::position(), lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::PositionalEdge::PositionalEdge(), lass::prim::Transformation3D< T >::transform(), and lass::prim::Transformation3D< T >::Transformation3D().
Generated on Mon Nov 10 14:22:14 2008 for Library of Assembled Shared Sources by 1.5.7.1 |