library of assembled shared sources |
http://lass.cocamware.com |
#include <line_2d_cartesian.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 | |
Line2DCartesian () | |
initializes to an invalid state. | |
Line2DCartesian (const TPoint &iSupport, const TPoint &iPoint) | |
Construct a line through three points. | |
Line2DCartesian (const TPoint &iSupport, const TVector &iDirection) | |
construct a line through a support point and by two direction vectors. | |
Line2DCartesian (const TVector &iNormal, const TPoint &iSupport) | |
Construct a line through a support point and by a normal vector. | |
Line2DCartesian (const TVector &iNormal, TParam iD) | |
Construct a line by a cartesian equation N.P + d == 0. | |
const TPoint | support () const |
return generated support point. | |
const TVector | direction () const |
return generated direction vector. | |
void | getCartesian (TVector &oNormal, TReference oD) const |
const TVector & | normal () const |
TParam | 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, snapped to zero by iRelativeTolerance. | |
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 into the line | |
const TPoint | point (TParam iT) const |
return point by filling in parameter in generated parametric equation | |
const TValue | t (const TPoint &iPoint) const |
return parameter along generated paremetric equation. | |
void | flip () |
const bool | isValid () const |
return true if line is a valid line (no normal or direction vectors that are zero). | |
Private Attributes | |
TVector | normal_ |
TValue | d_ |
Definition at line 65 of file line_2d_cartesian.h.
typedef NormalizingPolicy lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::TNormalizingPolicy |
Definition at line 69 of file line_2d_cartesian.h.
typedef Point2D<T> lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::TPoint |
Reimplemented in lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >.
Definition at line 71 of file line_2d_cartesian.h.
typedef TPoint::TVector lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::TVector |
Reimplemented in lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >.
Definition at line 72 of file line_2d_cartesian.h.
typedef TPoint::TValue lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::TValue |
Reimplemented in lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >.
Definition at line 74 of file line_2d_cartesian.h.
typedef TPoint::TParam lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::TParam |
Reimplemented in lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >.
Definition at line 75 of file line_2d_cartesian.h.
typedef TPoint::TReference lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::TReference |
Reimplemented in lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >.
Definition at line 76 of file line_2d_cartesian.h.
typedef TPoint::TConstReference lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::TConstReference |
Reimplemented in lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >.
Definition at line 77 of file line_2d_cartesian.h.
typedef TPoint::TNumTraits lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::TNumTraits |
Reimplemented in lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >.
Definition at line 78 of file line_2d_cartesian.h.
anonymous enum |
lass::prim::impl::Line2DCartesian< T, NP >::Line2DCartesian | ( | ) | [inline] |
initializes to an invalid state.
Definition at line 63 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::isValid(), and LASS_ASSERT.
lass::prim::impl::Line2DCartesian< T, NP >::Line2DCartesian | ( | const TPoint & | iSupport, | |
const TPoint & | iPoint | |||
) | [inline] |
Construct a line through three points.
Definition at line 80 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d_, lass::prim::dot(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_, and lass::prim::Point2D< T >::position().
lass::prim::impl::Line2DCartesian< T, NP >::Line2DCartesian | ( | const TPoint & | iSupport, | |
const TVector & | iDirection | |||
) | [inline] |
construct a line through a support point and by two direction vectors.
Definition at line 96 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d_, lass::prim::dot(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_, and lass::prim::Point2D< T >::position().
lass::prim::impl::Line2DCartesian< T, NP >::Line2DCartesian | ( | const TVector & | iNormal, | |
const TPoint & | iSupport | |||
) | [inline] |
Construct a line through a support point and by a normal vector.
Definition at line 112 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d_, lass::prim::dot(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_, and lass::prim::Point2D< T >::position().
lass::prim::impl::Line2DCartesian< T, NP >::Line2DCartesian | ( | const TVector & | iNormal, | |
TParam | iD | |||
) | [inline] |
Construct a line by a cartesian equation N.P + d == 0.
Definition at line 128 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d_, and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_.
const Line2DCartesian< T, NP >::TPoint lass::prim::impl::Line2DCartesian< T, NP >::support | ( | ) | const [inline] |
return generated support point.
Definition at line 141 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d_, and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_.
Referenced by lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::distance(), lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::intersect(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::point(), and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::t().
const Line2DCartesian< T, NP >::TVector lass::prim::impl::Line2DCartesian< T, NP >::direction | ( | ) | const [inline] |
return generated direction vector.
Definition at line 151 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_, and lass::prim::Vector2D< T >::perp().
Referenced by lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::distance(), lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::intersect(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::point(), and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::t().
void lass::prim::impl::Line2DCartesian< T, NP >::getCartesian | ( | TVector & | oNormal, | |
TReference | oD | |||
) | const [inline] |
Definition at line 159 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d_, and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_.
const Line2DCartesian< T, NP >::TVector & lass::prim::impl::Line2DCartesian< T, NP >::normal | ( | ) | const [inline] |
Definition at line 168 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_.
Referenced by lass::prim::Ray2D< T, NormalizingPolicy, ParameterPolicy >::intersect(), and lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::signedDistance().
Line2DCartesian< T, NP >::TParam lass::prim::impl::Line2DCartesian< T, NP >::d | ( | ) | const [inline] |
Definition at line 176 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d_.
Referenced by lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::equation().
const Line2DCartesian< T, NP >::TValue lass::prim::impl::Line2DCartesian< T, NP >::equation | ( | const TPoint & | iPoint | ) | const [inline] |
Return value of point in equation.
Definition at line 187 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d_, lass::prim::dot(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_, and lass::prim::Point2D< T >::position().
Referenced by lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::classify(), lass::prim::Ray2D< T, NormalizingPolicy, ParameterPolicy >::intersect(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::reject(), and lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::signedDistance().
const Line2DCartesian< T, NP >::TValue lass::prim::impl::Line2DCartesian< T, NP >::equation | ( | const TPoint & | iPoint, | |
TParam | iRelativeTolerance | |||
) | const [inline] |
Return value of point in equation, snapped to zero by iRelativeTolerance.
Definition at line 198 of file line_2d_cartesian.inl.
References lass::num::almostEqual(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d_, lass::prim::dot(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_, lass::prim::Point2D< T >::position(), and lass::num::NumTraits< C >::zero.
const Line2DCartesian< T, NP >::TVector lass::prim::impl::Line2DCartesian< 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 211 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::equation(), and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_.
Referenced by lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::project(), and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::reflect().
const Line2DCartesian< T, NP >::TVector lass::prim::impl::Line2DCartesian< 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 224 of file line_2d_cartesian.inl.
References lass::prim::dot(), and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_.
const Line2DCartesian< T, NP >::TPoint lass::prim::impl::Line2DCartesian< T, NP >::project | ( | const TPoint & | iPoint | ) | const [inline] |
project a point orthogonally onto the line
Definition at line 235 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::reject().
const Line2DCartesian< T, NP >::TVector lass::prim::impl::Line2DCartesian< T, NP >::project | ( | const TVector & | iVector | ) | const [inline] |
project a vector orthogonally onto the line
Definition at line 246 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::reject().
const Line2DCartesian< T, NP >::TPoint lass::prim::impl::Line2DCartesian< T, NP >::reflect | ( | const TPoint & | iPoint | ) | const [inline] |
reflect a point orthogonally into the line.
Definition at line 257 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::reject(), and lass::stde::T.
const Line2DCartesian< T, NP >::TVector lass::prim::impl::Line2DCartesian< T, NP >::reflect | ( | const TVector & | iVector | ) | const [inline] |
reflect a vector orthogonally into the line
Definition at line 268 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::reject(), and lass::stde::T.
const Line2DCartesian< T, NP >::TPoint lass::prim::impl::Line2DCartesian< T, NP >::point | ( | TParam | iT | ) | const [inline] |
return point by filling in parameter in generated parametric equation
Definition at line 279 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::direction(), and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::support().
Referenced by lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::intersect().
const Line2DCartesian< T, NP >::TValue lass::prim::impl::Line2DCartesian< T, NP >::t | ( | const TPoint & | iPoint | ) | const [inline] |
return parameter along generated paremetric equation.
Definition at line 289 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::direction(), lass::prim::dot(), and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::support().
void lass::prim::impl::Line2DCartesian< T, NP >::flip | ( | ) | [inline] |
Definition at line 298 of file line_2d_cartesian.inl.
References lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d_, and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_.
const bool lass::prim::impl::Line2DCartesian< T, NP >::isValid | ( | ) | const [inline] |
return true if line is a valid line (no normal or direction vectors that are zero).
Definition at line 309 of file line_2d_cartesian.inl.
References lass::prim::Vector2D< T >::isZero(), and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_.
Referenced by lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::distance(), lass::prim::Ray2D< T, NormalizingPolicy, ParameterPolicy >::intersect(), lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::intersect(), and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::Line2DCartesian().
TVector lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal_ [private] |
Definition at line 113 of file line_2d_cartesian.h.
Referenced by lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::direction(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::equation(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::flip(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::getCartesian(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::isValid(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::Line2DCartesian(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::normal(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::reject(), and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::support().
TValue lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d_ [private] |
Definition at line 114 of file line_2d_cartesian.h.
Referenced by lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::d(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::equation(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::flip(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::getCartesian(), lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::Line2DCartesian(), and lass::prim::impl::Line2DCartesian< T, NormalizingPolicy >::support().
Generated on Mon Nov 10 14:22:14 2008 for Library of Assembled Shared Sources by 1.5.7.1 |