library of assembled shared sources |
http://lass.cocamware.com |
#include <line_3d.h>
Data Structures | |
struct | Rebind |
rebind to other value type More... | |
Public Types | |
enum | { dimension = TPoint::dimension } |
typedef Line3D< T, NormalizingPolicy > | TSelf |
typedef NormalizingPolicy | TNormalizingPolicy |
typedef Point3D< T > | TPoint |
typedef TPoint::TVector | TVector |
typedef TPoint::TValue | TValue |
typedef TPoint::TParam | TParam |
typedef TPoint::TReference | TReference |
typedef TPoint::TConstReference | TConstReference |
typedef TPoint::TNumTraits | TNumTraits |
Public Member Functions | |
Line3D () | |
Line3D (const TPoint &iSupport, const TPoint &iPoint) | |
Line3D (const TPoint &iSupport, const TVector &iDirection) | |
const TPoint & | support () const |
TPoint & | support () |
const TVector & | direction () const |
Return direction of line. | |
void | setDirection (const TVector &iDirection) |
Set direction and normalize it if that's the policy. | |
void | lookAt (const TPoint &iLookAt) |
Set direction from support to look-at point. | |
const TVector | reject (const TPoint &iPoint) const |
return the vector that, if added to the projection of iPoint, you get iPoint again. | |
const TVector | reject (const TVector &iVector) const |
return the part of iVector that is orthogonal to the line. | |
const TPoint | project (const TPoint &iPoint) const |
project a point orthogonally onto the line | |
const TVector | project (const TVector &iVector) const |
project a vector orthogonally onto the line | |
const TPoint | reflect (const TPoint &iPoint) const |
reflect a point orthogonally into the line. | |
const TVector | reflect (const TVector &iVector) const |
reflect a vector orthogonally to the line | |
const TPoint | point (TParam iT) const |
Return point on line by it's parameter. | |
const TValue | t (const TPoint &iPoint) const |
Return parameter of point on the line that is the projection of the given point. | |
void | flip () |
const bool | isValid () const |
Return true if line is valid (direction isn't a zero vector). | |
Private Attributes | |
TPoint | support_ |
TVector | direction_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T , class NP > | |
std::ostream & | operator<< (std::ostream &ioOStream, const Line3D< T, NP > &iLine) |
template<typename T , class NP > | |
io::XmlOStream & | operator<< (io::XmlOStream &ioOStream, const Line3D< T, NP > &iLine) |
Definition at line 73 of file line_3d.h.
typedef Line3D<T, NormalizingPolicy> lass::prim::Line3D< T, NormalizingPolicy >::TSelf |
typedef NormalizingPolicy lass::prim::Line3D< T, NormalizingPolicy >::TNormalizingPolicy |
typedef Point3D<T> lass::prim::Line3D< T, NormalizingPolicy >::TPoint |
typedef TPoint::TVector lass::prim::Line3D< T, NormalizingPolicy >::TVector |
typedef TPoint::TValue lass::prim::Line3D< T, NormalizingPolicy >::TValue |
typedef TPoint::TParam lass::prim::Line3D< T, NormalizingPolicy >::TParam |
typedef TPoint::TReference lass::prim::Line3D< T, NormalizingPolicy >::TReference |
typedef TPoint::TConstReference lass::prim::Line3D< T, NormalizingPolicy >::TConstReference |
typedef TPoint::TNumTraits lass::prim::Line3D< T, NormalizingPolicy >::TNumTraits |
anonymous enum |
lass::prim::Line3D< T, NP >::Line3D | ( | ) | [inline] |
Definition at line 62 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::direction_, lass::prim::Vector3D< T >::isZero(), lass::prim::Point3D< T >::isZero(), LASS_ASSERT, and lass::prim::Line3D< T, NormalizingPolicy >::support_.
lass::prim::Line3D< T, NP >::Line3D | ( | const TPoint & | iSupport, | |
const TPoint & | iPoint | |||
) | [inline] |
Definition at line 83 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::direction_.
lass::prim::Line3D< T, NP >::Line3D | ( | const TPoint & | iSupport, | |
const TVector & | iDirection | |||
) | [inline] |
Definition at line 73 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::direction_.
const Line3D< T, NP >::TPoint & lass::prim::Line3D< T, NP >::support | ( | ) | const [inline] |
Definition at line 94 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::support_.
Line3D< T, NP >::TPoint & lass::prim::Line3D< T, NP >::support | ( | ) | [inline] |
Definition at line 103 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::support_.
const Line3D< T, NP >::TVector & lass::prim::Line3D< T, NP >::direction | ( | ) | const [inline] |
Return direction of line.
Definition at line 114 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::direction_.
void lass::prim::Line3D< T, NP >::setDirection | ( | const TVector & | iDirection | ) | [inline] |
Set direction and normalize it if that's the policy.
Definition at line 124 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::direction_.
void lass::prim::Line3D< T, NP >::lookAt | ( | const TPoint & | iLookAt | ) | [inline] |
Set direction from support to look-at point.
Definition at line 135 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::direction_, and lass::prim::Line3D< T, NormalizingPolicy >::support_.
const Line3D< T, NP >::TVector lass::prim::Line3D< T, NP >::reject | ( | const TPoint & | iPoint | ) | const [inline] |
return the vector that, if added to the projection of iPoint, you get iPoint again.
iPoint == (almost) project(iPoint) + reject(iPoint)
Definition at line 148 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::support_.
const Line3D< T, NP >::TVector lass::prim::Line3D< T, NP >::reject | ( | const TVector & | iVector | ) | const [inline] |
return the part of iVector that is orthogonal to the line.
it's the vector that, if added to the projection of iVector, you get iVector again. iVector == (almost) project(iVector) + reject(iVector)
.
Definition at line 161 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::project().
const Line3D< T, NP >::TPoint lass::prim::Line3D< T, NP >::project | ( | const TPoint & | iPoint | ) | const [inline] |
project a point orthogonally onto the line
Definition at line 173 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::support_.
Referenced by lass::prim::Line3D< T, NormalizingPolicy >::reflect(), and lass::prim::Line3D< T, NormalizingPolicy >::reject().
const Line3D< T, NP >::TVector lass::prim::Line3D< T, NP >::project | ( | const TVector & | iVector | ) | const [inline] |
project a vector orthogonally onto the line
Definition at line 184 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::direction_, and lass::prim::dot().
const Line3D< T, NP >::TPoint lass::prim::Line3D< T, NP >::reflect | ( | const TPoint & | iPoint | ) | const [inline] |
reflect a point orthogonally into the line.
Definition at line 195 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::support_.
const Line3D< T, NP >::TVector lass::prim::Line3D< T, NP >::reflect | ( | const TVector & | iVector | ) | const [inline] |
reflect a vector orthogonally to the line
Definition at line 206 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::project(), and lass::stde::T.
const Line3D< T, NP >::TPoint lass::prim::Line3D< T, NP >::point | ( | TParam | iT | ) | const [inline] |
Return point on line by it's parameter.
Definition at line 218 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::direction_, and lass::prim::Line3D< T, NormalizingPolicy >::support_.
const Line3D< T, NP >::TValue lass::prim::Line3D< T, NP >::t | ( | const TPoint & | iPoint | ) | const [inline] |
Return parameter of point on the line that is the projection of the given point.
Definition at line 229 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::direction_, lass::prim::dot(), and lass::prim::Line3D< T, NormalizingPolicy >::support_.
void lass::prim::Line3D< T, NormalizingPolicy >::flip | ( | ) |
const bool lass::prim::Line3D< T, NP >::isValid | ( | ) | const [inline] |
Return true if line is valid (direction isn't a zero vector).
Definition at line 239 of file line_3d.inl.
References lass::prim::Line3D< T, NormalizingPolicy >::direction_, and lass::prim::Vector3D< T >::isZero().
std::ostream & operator<< | ( | std::ostream & | ioOStream, | |
const Line3D< T, NP > & | iLine | |||
) | [related] |
io::XmlOStream & operator<< | ( | io::XmlOStream & | ioOStream, | |
const Line3D< T, NP > & | iLine | |||
) | [related] |
TPoint lass::prim::Line3D< T, NormalizingPolicy >::support_ [private] |
Definition at line 124 of file line_3d.h.
Referenced by lass::prim::Line3D< T, NormalizingPolicy >::Line3D(), lass::prim::Line3D< T, NormalizingPolicy >::lookAt(), lass::prim::Line3D< T, NormalizingPolicy >::point(), lass::prim::Line3D< T, NormalizingPolicy >::project(), lass::prim::Line3D< T, NormalizingPolicy >::reflect(), lass::prim::Line3D< T, NormalizingPolicy >::reject(), lass::prim::Line3D< T, NormalizingPolicy >::support(), and lass::prim::Line3D< T, NormalizingPolicy >::t().
TVector lass::prim::Line3D< T, NormalizingPolicy >::direction_ [private] |
Definition at line 125 of file line_3d.h.
Referenced by lass::prim::Line3D< T, NormalizingPolicy >::direction(), lass::prim::Line3D< T, NormalizingPolicy >::isValid(), lass::prim::Line3D< T, NormalizingPolicy >::Line3D(), lass::prim::Line3D< T, NormalizingPolicy >::lookAt(), lass::prim::Line3D< T, NormalizingPolicy >::point(), lass::prim::Line3D< T, NormalizingPolicy >::project(), lass::prim::Line3D< T, NormalizingPolicy >::setDirection(), and lass::prim::Line3D< T, NormalizingPolicy >::t().
Generated on Mon Nov 10 14:22:13 2008 for Library of Assembled Shared Sources by 1.5.7.1 |