library of assembled shared sources |
http://lass.cocamware.com |
#include <line_segment_3d.h>
Data Structures | |
struct | Rebind |
Public Types | |
enum | { dimension = TPoint::dimension } |
typedef LineSegment3D< T, ParameterPolicy > | TSelf |
typedef ParameterPolicy | TParameterPolicy |
typedef Point3D< 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 | |
LineSegment3D () | |
LineSegment3D (const TPoint &iTail, const TPoint &iHead) | |
template<typename PP2 > | |
LineSegment3D (const LineSegment3D< T, PP2 > &other) | |
const TPoint & | tail () const |
TPoint & | tail () |
const TPoint & | head () const |
TPoint & | head () |
const TPoint | point (TParam iT) const |
Return point on ray by it's parameter. | |
const TValue | t (const TPoint &iPoint) 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. | |
const TValue | distance (const TPoint &iPoint) const |
Return distance of point to line segment. | |
const TValue | squaredDistance (const TPoint &iPoint) const |
Return squared distance of a point to line segment. | |
const TValue | closestsPoint (const TPoint &iPoint, T &oT) const |
t is parameter of closests point and return squared distance of a point to the line segment. | |
Private Attributes | |
TPoint | tail_ |
TPoint | head_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T , class PPa , class PPb > | |
bool | operator== (const LineSegment3D< T, PPa > &iA, const LineSegment3D< T, PPb > &iB) |
template<typename T , class PPa , class PPb > | |
bool | operator!= (const LineSegment3D< T, PPa > &iA, const LineSegment3D< T, PPb > &iB) |
template<typename T , class PP > | |
std::ostream & | operator<< (std::ostream &ioOStream, const LineSegment3D< T, PP > &iLineSegment) |
template<typename T , class PP > | |
io::XmlOStream & | operator<< (io::XmlOStream &ioOStream, const LineSegment3D< T, PP > &iLineSegment) |
template<typename T , class EPPlane , class NPPlane , class PPRay > | |
Result | intersect (const Plane3D< T, EPPlane, NPPlane > &plane, const LineSegment3D< T, PPRay > &lineSegment, T &t, const T &tMin=T()) |
Find the intersection of a plane and line segment by their parameter t on the ray. |
Definition at line 74 of file line_segment_3d.h.
typedef LineSegment3D<T, ParameterPolicy> lass::prim::LineSegment3D< T, ParameterPolicy >::TSelf |
Definition at line 78 of file line_segment_3d.h.
typedef ParameterPolicy lass::prim::LineSegment3D< T, ParameterPolicy >::TParameterPolicy |
Definition at line 79 of file line_segment_3d.h.
typedef Point3D<T> lass::prim::LineSegment3D< T, ParameterPolicy >::TPoint |
Definition at line 81 of file line_segment_3d.h.
typedef TPoint::TVector lass::prim::LineSegment3D< T, ParameterPolicy >::TVector |
Definition at line 82 of file line_segment_3d.h.
typedef TPoint::TNumTraits lass::prim::LineSegment3D< T, ParameterPolicy >::TNumTraits |
Definition at line 83 of file line_segment_3d.h.
typedef TPoint::TValue lass::prim::LineSegment3D< T, ParameterPolicy >::TValue |
Definition at line 84 of file line_segment_3d.h.
typedef TPoint::TParam lass::prim::LineSegment3D< T, ParameterPolicy >::TParam |
Definition at line 85 of file line_segment_3d.h.
typedef TPoint::TReference lass::prim::LineSegment3D< T, ParameterPolicy >::TReference |
Definition at line 86 of file line_segment_3d.h.
typedef TPoint::TConstReference lass::prim::LineSegment3D< T, ParameterPolicy >::TConstReference |
Definition at line 87 of file line_segment_3d.h.
anonymous enum |
lass::prim::LineSegment3D< T, PP >::LineSegment3D | ( | ) | [inline] |
Definition at line 59 of file line_segment_3d.inl.
References lass::prim::LineSegment3D< T, ParameterPolicy >::head_, lass::prim::Point3D< T >::isZero(), LASS_ASSERT, and lass::prim::LineSegment3D< T, ParameterPolicy >::tail_.
lass::prim::LineSegment3D< T, PP >::LineSegment3D | ( | const TPoint & | iTail, | |
const TPoint & | iHead | |||
) | [inline] |
Definition at line 70 of file line_segment_3d.inl.
lass::prim::LineSegment3D< T, PP >::LineSegment3D | ( | const LineSegment3D< T, PP2 > & | other | ) | [inline] |
Definition at line 80 of file line_segment_3d.inl.
const LineSegment3D< T, PP >::TPoint & lass::prim::LineSegment3D< T, PP >::tail | ( | ) | const [inline] |
Definition at line 90 of file line_segment_3d.inl.
References lass::prim::LineSegment3D< T, ParameterPolicy >::tail_.
Referenced by lass::prim::closestsPoints(), lass::prim::LineSegment3D< T, ParameterPolicy >::intersect(), lass::prim::LineSegment3D< T, ParameterPolicy >::operator==(), lass::prim::Plane3D< T, EquationPolicy, NormalizingPolicy >::project(), lass::prim::Plane3D< T, EquationPolicy, NormalizingPolicy >::reflect(), and lass::prim::squaredDistance().
LineSegment3D< T, PP >::TPoint & lass::prim::LineSegment3D< T, PP >::tail | ( | ) | [inline] |
Definition at line 99 of file line_segment_3d.inl.
References lass::prim::LineSegment3D< T, ParameterPolicy >::tail_.
const LineSegment3D< T, PP >::TPoint & lass::prim::LineSegment3D< T, PP >::head | ( | ) | const [inline] |
Definition at line 108 of file line_segment_3d.inl.
References lass::prim::LineSegment3D< T, ParameterPolicy >::head_.
Referenced by lass::prim::closestsPoints(), lass::prim::LineSegment3D< T, ParameterPolicy >::intersect(), lass::prim::LineSegment3D< T, ParameterPolicy >::operator==(), lass::prim::Plane3D< T, EquationPolicy, NormalizingPolicy >::project(), lass::prim::Plane3D< T, EquationPolicy, NormalizingPolicy >::reflect(), and lass::prim::squaredDistance().
LineSegment3D< T, PP >::TPoint & lass::prim::LineSegment3D< T, PP >::head | ( | ) | [inline] |
Definition at line 117 of file line_segment_3d.inl.
References lass::prim::LineSegment3D< T, ParameterPolicy >::head_.
const LineSegment3D< T, PP >::TPoint lass::prim::LineSegment3D< T, PP >::point | ( | TParam | iT | ) | const [inline] |
Return point on ray by it's parameter.
Definition at line 129 of file line_segment_3d.inl.
References lass::num::NumTraits< C >::one, lass::prim::LineSegment3D< T, ParameterPolicy >::tail_, lass::prim::LineSegment3D< T, ParameterPolicy >::vector(), and lass::num::NumTraits< C >::zero.
Referenced by lass::prim::LineSegment3D< T, ParameterPolicy >::closestsPoint(), lass::prim::closestsPoints(), lass::prim::SimplePolygon3D< T, PlaneEquationPolicy, PlaneNormalizingPolicy >::intersect(), lass::prim::squaredDistance(), and lass::prim::LineSegment3D< T, ParameterPolicy >::squaredDistance().
const LineSegment3D< T, PP >::TValue lass::prim::LineSegment3D< T, PP >::t | ( | const TPoint & | iPoint | ) | const [inline] |
Return parameter of projection of iPoint on line segment.
Definition at line 142 of file line_segment_3d.inl.
References lass::prim::dot(), lass::prim::LineSegment3D< T, ParameterPolicy >::head_, lass::num::NumTraits< C >::one, lass::prim::LineSegment3D< T, ParameterPolicy >::tail_, and lass::prim::LineSegment3D< T, ParameterPolicy >::vector().
Referenced by lass::prim::LineSegment3D< T, ParameterPolicy >::closestsPoint(), lass::prim::closestsPoints(), lass::prim::squaredDistance(), and lass::prim::LineSegment3D< T, ParameterPolicy >::squaredDistance().
const LineSegment3D< T, PP >::TVector lass::prim::LineSegment3D< T, PP >::vector | ( | ) | const [inline] |
Return vector from tail to head.
Definition at line 155 of file line_segment_3d.inl.
References lass::prim::LineSegment3D< T, ParameterPolicy >::head_, and lass::prim::LineSegment3D< T, ParameterPolicy >::tail_.
Referenced by lass::prim::closestsPoints(), lass::prim::LineSegment3D< T, ParameterPolicy >::length(), lass::prim::LineSegment3D< T, ParameterPolicy >::point(), lass::prim::squaredDistance(), and lass::prim::LineSegment3D< T, ParameterPolicy >::t().
const LineSegment3D< T, PP >::TValue lass::prim::LineSegment3D< T, PP >::length | ( | ) | const [inline] |
Return length of line segment.
Definition at line 166 of file line_segment_3d.inl.
References lass::prim::Vector3D< T >::norm(), and lass::prim::LineSegment3D< T, ParameterPolicy >::vector().
const LineSegment3D< T, PP >::TValue lass::prim::LineSegment3D< T, PP >::distance | ( | const TPoint & | iPoint | ) | const [inline] |
Return distance of point to line segment.
Definition at line 209 of file line_segment_3d.inl.
References sqrt(), and lass::prim::LineSegment3D< T, ParameterPolicy >::squaredDistance().
const LineSegment3D< T, PP >::TValue lass::prim::LineSegment3D< T, PP >::squaredDistance | ( | const TPoint & | iPoint | ) | const [inline] |
Return squared distance of a point to line segment.
Definition at line 195 of file line_segment_3d.inl.
References lass::prim::LineSegment3D< T, ParameterPolicy >::head_, lass::prim::LineSegment3D< T, ParameterPolicy >::point(), lass::prim::LineSegment3D< T, ParameterPolicy >::t(), and lass::prim::LineSegment3D< T, ParameterPolicy >::tail_.
Referenced by lass::prim::LineSegment3D< T, ParameterPolicy >::distance(), and lass::prim::squaredDistance().
const LineSegment3D< T, PP >::TValue lass::prim::LineSegment3D< T, PP >::closestsPoint | ( | const TPoint & | iPoint, | |
T & | oT | |||
) | const [inline] |
t is parameter of closests point and return squared distance of a point to the line segment.
Definition at line 175 of file line_segment_3d.inl.
References lass::prim::LineSegment3D< T, ParameterPolicy >::head_, lass::prim::LineSegment3D< T, ParameterPolicy >::point(), lass::prim::LineSegment3D< T, ParameterPolicy >::t(), and lass::prim::LineSegment3D< T, ParameterPolicy >::tail_.
Referenced by lass::prim::closestsPoints().
bool operator== | ( | const LineSegment3D< T, PPa > & | iA, | |
const LineSegment3D< T, PPb > & | iB | |||
) | [related] |
Definition at line 217 of file line_segment_3d.inl.
References lass::prim::LineSegment3D< T, ParameterPolicy >::head(), and lass::prim::LineSegment3D< T, ParameterPolicy >::tail().
bool operator!= | ( | const LineSegment3D< T, PPa > & | iA, | |
const LineSegment3D< T, PPb > & | iB | |||
) | [related] |
Definition at line 224 of file line_segment_3d.inl.
std::ostream & operator<< | ( | std::ostream & | ioOStream, | |
const LineSegment3D< T, PP > & | iLineSegment | |||
) | [related] |
io::XmlOStream & operator<< | ( | io::XmlOStream & | ioOStream, | |
const LineSegment3D< T, PP > & | iLineSegment | |||
) | [related] |
Result intersect | ( | const Plane3D< T, EPPlane, NPPlane > & | plane, | |
const LineSegment3D< T, PPRay > & | lineSegment, | |||
T & | t, | |||
const T & | tMin = T() | |||
) | [related] |
Find the intersection of a plane and line segment by their parameter t on the ray.
plane | [in] the plane | |
lineSegment | [in] the line segment | |
t | [out] the parameter of the intersection point > tMin. | |
tMin | [in] the minimum t that may be returned as valid intersection. |
Definition at line 73 of file line_segment_3d_plane_3d.h.
References lass::prim::impl::Plane3DCartesian< T, NormalizingPolicy >::equation(), lass::prim::LineSegment3D< T, ParameterPolicy >::head(), lass::prim::impl::Plane3DCartesian< T, NormalizingPolicy >::isValid(), lass::prim::rInfinite, lass::prim::rInvalid, lass::prim::rNone, lass::prim::rOne, and lass::prim::LineSegment3D< T, ParameterPolicy >::tail().
TPoint lass::prim::LineSegment3D< T, ParameterPolicy >::tail_ [private] |
Definition at line 122 of file line_segment_3d.h.
Referenced by lass::prim::LineSegment3D< T, ParameterPolicy >::closestsPoint(), lass::prim::LineSegment3D< T, ParameterPolicy >::LineSegment3D(), lass::prim::LineSegment3D< T, ParameterPolicy >::point(), lass::prim::LineSegment3D< T, ParameterPolicy >::squaredDistance(), lass::prim::LineSegment3D< T, ParameterPolicy >::t(), lass::prim::LineSegment3D< T, ParameterPolicy >::tail(), and lass::prim::LineSegment3D< T, ParameterPolicy >::vector().
TPoint lass::prim::LineSegment3D< T, ParameterPolicy >::head_ [private] |
Definition at line 123 of file line_segment_3d.h.
Referenced by lass::prim::LineSegment3D< T, ParameterPolicy >::closestsPoint(), lass::prim::LineSegment3D< T, ParameterPolicy >::head(), lass::prim::LineSegment3D< T, ParameterPolicy >::LineSegment3D(), lass::prim::LineSegment3D< T, ParameterPolicy >::squaredDistance(), lass::prim::LineSegment3D< T, ParameterPolicy >::t(), and lass::prim::LineSegment3D< T, ParameterPolicy >::vector().
Generated on Mon Nov 10 14:22:13 2008 for Library of Assembled Shared Sources by ![]() |