library of assembled shared sources |
http://lass.cocamware.com |
#include <line_segment_2d.h>
Data Structures | |
struct | Rebind |
Public Types | |
enum | { dimension = TPoint::dimension } |
typedef LineSegment2D< T, ParameterPolicy > | TSelf |
typedef ParameterPolicy | TParameterPolicy |
typedef Point2D< T > | TPoint |
typedef TPoint::TVector | TVector |
typedef TPoint::TNumTraits | TNumTraits |
typedef TPoint::TValue | TValue |
typedef TPoint::TParam | TParam |
typedef TPoint::TReference | TReference |
typedef TPoint::TConstReference | TConstReference |
Public Member Functions | |
LineSegment2D () | |
LineSegment2D (const TPoint &tail, const TPoint &head) | |
const TPoint & | tail () const |
TPoint & | tail () |
const TPoint & | head () const |
TPoint & | head () |
const TPoint | point (TParam t) const |
Return point on ray by it's parameter. | |
const TValue | t (const TPoint &point) const |
Return parameter of projection of iPoint on line segment. | |
const TVector | vector () const |
Return vector from tail to head. | |
const TValue | length () const |
Return length of line segment. | |
Private Attributes | |
TPoint | tail_ |
TPoint | head_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T , class PPa , class PPb > | |
Result | intersect (const LineSegment2D< T, PPa > &a, const LineSegment2D< T, PPb > &b, T &tA, T &tB) |
intersection of two line segments | |
template<typename T , class PPa , class PPb > | |
bool | operator== (const LineSegment2D< T, PPa > &a, const LineSegment2D< T, PPb > &b) |
template<typename T , class PPa , class PPb > | |
bool | operator!= (const LineSegment2D< T, PPa > &a, const LineSegment2D< T, PPb > &b) |
template<typename T , class PP > | |
std::ostream & | operator<< (std::ostream &stream, const LineSegment2D< T, PP > &segment) |
template<typename T , class PP > | |
io::XmlOStream & | operator<< (io::XmlOStream &stream, const LineSegment2D< T, PP > &segment) |
template<typename T , class PP > | |
lass::io::MatlabOStream & | operator<< (lass::io::MatlabOStream &stream, const LineSegment2D< T, PP > &segment) |
Definition at line 74 of file line_segment_2d.h.
typedef LineSegment2D<T, ParameterPolicy> lass::prim::LineSegment2D< T, ParameterPolicy >::TSelf |
Definition at line 78 of file line_segment_2d.h.
typedef ParameterPolicy lass::prim::LineSegment2D< T, ParameterPolicy >::TParameterPolicy |
Definition at line 79 of file line_segment_2d.h.
typedef Point2D<T> lass::prim::LineSegment2D< T, ParameterPolicy >::TPoint |
Definition at line 81 of file line_segment_2d.h.
typedef TPoint::TVector lass::prim::LineSegment2D< T, ParameterPolicy >::TVector |
Definition at line 82 of file line_segment_2d.h.
typedef TPoint::TNumTraits lass::prim::LineSegment2D< T, ParameterPolicy >::TNumTraits |
Definition at line 83 of file line_segment_2d.h.
typedef TPoint::TValue lass::prim::LineSegment2D< T, ParameterPolicy >::TValue |
Definition at line 84 of file line_segment_2d.h.
typedef TPoint::TParam lass::prim::LineSegment2D< T, ParameterPolicy >::TParam |
Definition at line 85 of file line_segment_2d.h.
typedef TPoint::TReference lass::prim::LineSegment2D< T, ParameterPolicy >::TReference |
Definition at line 86 of file line_segment_2d.h.
typedef TPoint::TConstReference lass::prim::LineSegment2D< T, ParameterPolicy >::TConstReference |
Definition at line 87 of file line_segment_2d.h.
anonymous enum |
lass::prim::LineSegment2D< T, PP >::LineSegment2D | ( | ) | [inline] |
Definition at line 56 of file line_segment_2d.inl.
References lass::prim::LineSegment2D< T, ParameterPolicy >::head_, lass::prim::Point2D< T >::isZero(), LASS_ASSERT, and lass::prim::LineSegment2D< T, ParameterPolicy >::tail_.
lass::prim::LineSegment2D< T, PP >::LineSegment2D | ( | const TPoint & | tail, | |
const TPoint & | head | |||
) | [inline] |
Definition at line 67 of file line_segment_2d.inl.
const LineSegment2D< T, PP >::TPoint & lass::prim::LineSegment2D< T, PP >::tail | ( | ) | const [inline] |
Definition at line 77 of file line_segment_2d.inl.
References lass::prim::LineSegment2D< T, ParameterPolicy >::tail_.
Referenced by lass::prim::Ray2D< T, NormalizingPolicy, ParameterPolicy >::intersect(), lass::prim::LineSegment2D< T, ParameterPolicy >::intersect(), lass::prim::LineSegment2D< T, ParameterPolicy >::operator==(), lass::spat::PlanarMesh::pointWalk(), lass::prim::squaredDistance(), lass::spat::PlanarMesh::walk(), and lass::spat::PlanarMesh::walkIntersections().
LineSegment2D< T, PP >::TPoint & lass::prim::LineSegment2D< T, PP >::tail | ( | ) | [inline] |
Definition at line 86 of file line_segment_2d.inl.
References lass::prim::LineSegment2D< T, ParameterPolicy >::tail_.
const LineSegment2D< T, PP >::TPoint & lass::prim::LineSegment2D< T, PP >::head | ( | ) | const [inline] |
Definition at line 95 of file line_segment_2d.inl.
References lass::prim::LineSegment2D< T, ParameterPolicy >::head_.
Referenced by lass::prim::Ray2D< T, NormalizingPolicy, ParameterPolicy >::intersect(), lass::prim::LineSegment2D< T, ParameterPolicy >::intersect(), lass::prim::LineSegment2D< T, ParameterPolicy >::operator==(), lass::spat::PlanarMesh::pointWalk(), lass::prim::squaredDistance(), lass::spat::PlanarMesh::walk(), and lass::spat::PlanarMesh::walkIntersections().
LineSegment2D< T, PP >::TPoint & lass::prim::LineSegment2D< T, PP >::head | ( | ) | [inline] |
Definition at line 104 of file line_segment_2d.inl.
References lass::prim::LineSegment2D< T, ParameterPolicy >::head_.
const LineSegment2D< T, PP >::TPoint lass::prim::LineSegment2D< T, PP >::point | ( | TParam | t | ) | const [inline] |
Return point on ray by it's parameter.
Definition at line 116 of file line_segment_2d.inl.
References lass::num::NumTraits< C >::one, lass::prim::LineSegment2D< T, ParameterPolicy >::tail_, lass::prim::LineSegment2D< T, ParameterPolicy >::vector(), and lass::num::NumTraits< C >::zero.
Referenced by lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::intersect().
const LineSegment2D< T, PP >::TValue lass::prim::LineSegment2D< T, PP >::t | ( | const TPoint & | point | ) | const [inline] |
Return parameter of projection of iPoint on line segment.
Definition at line 129 of file line_segment_2d.inl.
References lass::prim::dot(), lass::prim::LineSegment2D< T, ParameterPolicy >::head_, lass::num::NumTraits< C >::one, lass::prim::LineSegment2D< T, ParameterPolicy >::tail_, and lass::prim::LineSegment2D< T, ParameterPolicy >::vector().
Referenced by lass::prim::LineSegment2D< T, ParameterPolicy >::intersect(), and lass::spat::PlanarMesh::onEdge().
const LineSegment2D< T, PP >::TVector lass::prim::LineSegment2D< T, PP >::vector | ( | ) | const [inline] |
Return vector from tail to head.
Definition at line 144 of file line_segment_2d.inl.
References lass::prim::LineSegment2D< T, ParameterPolicy >::head_, and lass::prim::LineSegment2D< T, ParameterPolicy >::tail_.
Referenced by lass::prim::LineSegment2D< T, ParameterPolicy >::intersect(), lass::prim::LineSegment2D< T, ParameterPolicy >::length(), lass::prim::LineSegment2D< T, ParameterPolicy >::point(), lass::spat::PlanarMesh::pointWalk(), lass::prim::squaredDistance(), lass::prim::LineSegment2D< T, ParameterPolicy >::t(), and lass::spat::PlanarMesh::walk().
const LineSegment2D< T, PP >::TValue lass::prim::LineSegment2D< T, PP >::length | ( | ) | const [inline] |
Return length of line segment.
Definition at line 155 of file line_segment_2d.inl.
References lass::prim::Vector2D< T >::norm(), and lass::prim::LineSegment2D< T, ParameterPolicy >::vector().
Result intersect | ( | const LineSegment2D< T, PPa > & | a, | |
const LineSegment2D< T, PPb > & | b, | |||
T & | tA, | |||
T & | tB | |||
) | [related] |
intersection of two line segments
a | [in] line segment A | |
b | [in] line segment B | |
aT | [out] parameter of intersection point on line segment A | |
bT | [out] parameter of intersection point on line segment B |
Definition at line 208 of file line_segment_2d.inl.
References lass::prim::doubleTriangleArea(), lass::prim::LineSegment2D< T, ParameterPolicy >::head(), lass::prim::perpDot(), lass::prim::rInfinite, lass::prim::rNone, lass::prim::rOne, lass::prim::LineSegment2D< T, ParameterPolicy >::t(), lass::prim::LineSegment2D< T, ParameterPolicy >::tail(), and lass::prim::LineSegment2D< T, ParameterPolicy >::vector().
bool operator== | ( | const LineSegment2D< T, PPa > & | a, | |
const LineSegment2D< T, PPb > & | b | |||
) | [related] |
Definition at line 293 of file line_segment_2d.inl.
References lass::prim::LineSegment2D< T, ParameterPolicy >::head(), and lass::prim::LineSegment2D< T, ParameterPolicy >::tail().
bool operator!= | ( | const LineSegment2D< T, PPa > & | a, | |
const LineSegment2D< T, PPb > & | b | |||
) | [related] |
Definition at line 300 of file line_segment_2d.inl.
std::ostream & operator<< | ( | std::ostream & | stream, | |
const LineSegment2D< T, PP > & | segment | |||
) | [related] |
io::XmlOStream & operator<< | ( | io::XmlOStream & | stream, | |
const LineSegment2D< T, PP > & | segment | |||
) | [related] |
lass::io::MatlabOStream & operator<< | ( | lass::io::MatlabOStream & | stream, | |
const LineSegment2D< T, PP > & | segment | |||
) | [related] |
TPoint lass::prim::LineSegment2D< T, ParameterPolicy >::tail_ [private] |
Definition at line 114 of file line_segment_2d.h.
Referenced by lass::prim::LineSegment2D< T, ParameterPolicy >::LineSegment2D(), lass::prim::LineSegment2D< T, ParameterPolicy >::point(), lass::prim::LineSegment2D< T, ParameterPolicy >::t(), lass::prim::LineSegment2D< T, ParameterPolicy >::tail(), and lass::prim::LineSegment2D< T, ParameterPolicy >::vector().
TPoint lass::prim::LineSegment2D< T, ParameterPolicy >::head_ [private] |
Definition at line 115 of file line_segment_2d.h.
Referenced by lass::prim::LineSegment2D< T, ParameterPolicy >::head(), lass::prim::LineSegment2D< T, ParameterPolicy >::LineSegment2D(), lass::prim::LineSegment2D< T, ParameterPolicy >::t(), and lass::prim::LineSegment2D< T, ParameterPolicy >::vector().
Generated on Mon Nov 10 14:22:13 2008 for Library of Assembled Shared Sources by 1.5.7.1 |