library of assembled shared sources |
http://lass.cocamware.com |
#include <line_2d_parametric.h>
Public Types | |
enum | { dimension = TPoint::dimension } |
typedef NormalizingPolicy | TNormalizingPolicy |
typedef Point2D< 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 | |
Line2DParametric () | |
initializes to an invalid state. | |
Line2DParametric (const TPoint &iSupport, const TPoint &iPoint) | |
Construct a line through three points. | |
Line2DParametric (const TPoint &iSupport, const TVector &iDir) | |
construct a line through a support point and by two direction vectors. | |
Line2DParametric (const TVector &iNormal, const TPoint &iSupport) | |
Construct a line through a support point and by a normal vector. | |
Line2DParametric (const TVector &iNormal, TParam iD) | |
Construct a line by a cartesian equation N.P + d == 0. | |
const TPoint & | support () const |
return support point. | |
const TVector & | direction () const |
return direction vector. | |
void | getCartesian (TVector &oNormal, TReference oD) const |
const TVector | normal () const |
const TValue | d () const |
const TValue | equation (const TPoint &iPoint) const |
Return value of point in equation. | |
const TValue | equation (const TPoint &iPoint, TParam iRelativeTolerance) const |
Return value of point in equation. | |
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 by filling in the parametric equation: P(t) = S + t * U | |
const TValue | t (const TPoint &iPoint) const |
return UV pair of parameters | |
void | flip () |
const bool | isValid () const |
return true if line is a valid line (no normal or direction vectors that are zero). | |
Private Attributes | |
TPoint | support_ |
TVector | direction_ |
Definition at line 65 of file line_2d_parametric.h.
typedef NormalizingPolicy lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::TNormalizingPolicy |
Definition at line 69 of file line_2d_parametric.h.
typedef Point2D<T> lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::TPoint |
Definition at line 71 of file line_2d_parametric.h.
typedef TPoint::TVector lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::TVector |
Definition at line 72 of file line_2d_parametric.h.
typedef TPoint::TValue lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::TValue |
Definition at line 74 of file line_2d_parametric.h.
typedef TPoint::TParam lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::TParam |
Definition at line 75 of file line_2d_parametric.h.
typedef TPoint::TReference lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::TReference |
Definition at line 76 of file line_2d_parametric.h.
typedef TPoint::TConstReference lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::TConstReference |
Definition at line 77 of file line_2d_parametric.h.
typedef TPoint::TNumTraits lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::TNumTraits |
Definition at line 78 of file line_2d_parametric.h.
anonymous enum |
lass::prim::impl::Line2DParametric< T, NP >::Line2DParametric | ( | ) | [inline] |
initializes to an invalid state.
Definition at line 63 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::isValid(), and LASS_ASSERT.
lass::prim::impl::Line2DParametric< T, NP >::Line2DParametric | ( | const TPoint & | iSupport, | |
const TPoint & | iPoint | |||
) | [inline] |
Construct a line through three points.
Definition at line 78 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_.
lass::prim::impl::Line2DParametric< T, NP >::Line2DParametric | ( | const TPoint & | iSupport, | |
const TVector & | iDirection | |||
) | [inline] |
construct a line through a support point and by two direction vectors.
Definition at line 92 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_.
lass::prim::impl::Line2DParametric< T, NP >::Line2DParametric | ( | const TVector & | iNormal, | |
const TPoint & | iSupport | |||
) | [inline] |
Construct a line through a support point and by a normal vector.
Definition at line 106 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_.
lass::prim::impl::Line2DParametric< T, NP >::Line2DParametric | ( | const TVector & | iNormal, | |
TParam | iD | |||
) | [inline] |
Construct a line by a cartesian equation N.P + d == 0.
Definition at line 120 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_.
const Line2DParametric< T, NP >::TPoint & lass::prim::impl::Line2DParametric< T, NP >::support | ( | ) | const [inline] |
return support point.
Definition at line 132 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::support_.
const Line2DParametric< T, NP >::TVector & lass::prim::impl::Line2DParametric< T, NP >::direction | ( | ) | const [inline] |
return direction vector.
Definition at line 142 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_.
void lass::prim::impl::Line2DParametric< T, NP >::getCartesian | ( | TVector & | oNormal, | |
TReference | oD | |||
) | const [inline] |
Definition at line 150 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_, lass::prim::dot(), lass::prim::Vector2D< T >::perp(), lass::prim::Point2D< T >::position(), and lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::support_.
Referenced by lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::d(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::equation(), and lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::normal().
const Line2DParametric< T, NP >::TVector lass::prim::impl::Line2DParametric< T, NP >::normal | ( | ) | const [inline] |
Definition at line 159 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::d(), and lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::getCartesian().
Referenced by lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::d(), and lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::equation().
const Line2DParametric< T, NP >::TValue lass::prim::impl::Line2DParametric< T, NP >::d | ( | ) | const [inline] |
Definition at line 170 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::getCartesian(), and lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::normal().
Referenced by lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::equation(), and lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::normal().
const Line2DParametric< T, NP >::TValue lass::prim::impl::Line2DParametric< T, NP >::equation | ( | const TPoint & | iPoint | ) | const [inline] |
Return value of point in equation.
Definition at line 184 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::d(), lass::prim::dot(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::getCartesian(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::normal(), and lass::prim::Point2D< T >::position().
const Line2DParametric< T, NP >::TValue lass::prim::impl::Line2DParametric< T, NP >::equation | ( | const TPoint & | iPoint, | |
TParam | iRelativeTolerance | |||
) | const [inline] |
Return value of point in equation.
Definition at line 198 of file line_2d_parametric.inl.
References lass::num::almostEqual(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::d(), lass::prim::dot(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::getCartesian(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::normal(), lass::prim::Point2D< T >::position(), and lass::num::NumTraits< C >::zero.
const Line2DParametric< T, NP >::TVector lass::prim::impl::Line2DParametric< 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 214 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::support_.
const Line2DParametric< T, NP >::TVector lass::prim::impl::Line2DParametric< 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 227 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::project().
const Line2DParametric< T, NP >::TPoint lass::prim::impl::Line2DParametric< T, NP >::project | ( | const TPoint & | iPoint | ) | const [inline] |
project a point orthogonally onto the line
Definition at line 239 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::support_.
Referenced by lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::reflect(), and lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::reject().
const Line2DParametric< T, NP >::TVector lass::prim::impl::Line2DParametric< T, NP >::project | ( | const TVector & | iVector | ) | const [inline] |
project a vector orthogonally onto the line
Definition at line 250 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_, and lass::prim::dot().
const Line2DParametric< T, NP >::TPoint lass::prim::impl::Line2DParametric< T, NP >::reflect | ( | const TPoint & | iPoint | ) | const [inline] |
reflect a point orthogonally into the line.
Definition at line 261 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::support_.
const Line2DParametric< T, NP >::TVector lass::prim::impl::Line2DParametric< T, NP >::reflect | ( | const TVector & | iVector | ) | const [inline] |
reflect a vector orthogonally to the line
Definition at line 272 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::project(), and lass::stde::T.
const Line2DParametric< T, NP >::TPoint lass::prim::impl::Line2DParametric< T, NP >::point | ( | TParam | iT | ) | const [inline] |
return point by filling in the parametric equation: P(t) = S + t * U
Definition at line 283 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_, and lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::support_.
const Line2DParametric< T, NP >::TValue lass::prim::impl::Line2DParametric< T, NP >::t | ( | const TPoint & | iPoint | ) | const [inline] |
return UV pair of parameters
Definition at line 294 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_, lass::prim::dot(), and lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::support_.
void lass::prim::impl::Line2DParametric< T, NP >::flip | ( | ) | [inline] |
Definition at line 302 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_.
const bool lass::prim::impl::Line2DParametric< T, NP >::isValid | ( | ) | const [inline] |
return true if line is a valid line (no normal or direction vectors that are zero).
Definition at line 312 of file line_2d_parametric.inl.
References lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_, and lass::prim::Vector2D< T >::isZero().
Referenced by lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::Line2DParametric().
TPoint lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::support_ [private] |
Definition at line 113 of file line_2d_parametric.h.
Referenced by lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::getCartesian(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::point(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::project(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::reflect(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::reject(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::support(), and lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::t().
TVector lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction_ [private] |
Definition at line 114 of file line_2d_parametric.h.
Referenced by lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::direction(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::flip(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::getCartesian(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::isValid(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::Line2DParametric(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::point(), lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::project(), and lass::prim::impl::Line2DParametric< T, NormalizingPolicy >::t().
Generated on Mon Nov 10 14:22:14 2008 for Library of Assembled Shared Sources by 1.5.7.1 |