library of assembled shared sources

http://lass.cocamware.com

lass::prim::LineSegment3D< T, ParameterPolicy > Class Template Reference

3D Line Segment More...

#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 TPointtail () const
TPointtail ()
const TPointhead () const
TPointhead ()
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::XmlOStreamoperator<< (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.


Detailed Description

template<typename T, class ParameterPolicy = Bounded>
class lass::prim::LineSegment3D< T, ParameterPolicy >

3D Line Segment

Author:
Bram de Greve [BdG]
Date:
3003

Definition at line 74 of file line_segment_3d.h.


Member Typedef Documentation

template<typename T , class ParameterPolicy = Bounded>
typedef LineSegment3D<T, ParameterPolicy> lass::prim::LineSegment3D< T, ParameterPolicy >::TSelf

Definition at line 78 of file line_segment_3d.h.

template<typename T , class ParameterPolicy = Bounded>
typedef ParameterPolicy lass::prim::LineSegment3D< T, ParameterPolicy >::TParameterPolicy

Definition at line 79 of file line_segment_3d.h.

template<typename T , class ParameterPolicy = Bounded>
typedef Point3D<T> lass::prim::LineSegment3D< T, ParameterPolicy >::TPoint

Definition at line 81 of file line_segment_3d.h.

template<typename T , class ParameterPolicy = Bounded>
typedef TPoint::TVector lass::prim::LineSegment3D< T, ParameterPolicy >::TVector

Definition at line 82 of file line_segment_3d.h.

template<typename T , class ParameterPolicy = Bounded>
typedef TPoint::TNumTraits lass::prim::LineSegment3D< T, ParameterPolicy >::TNumTraits

Definition at line 83 of file line_segment_3d.h.

template<typename T , class ParameterPolicy = Bounded>
typedef TPoint::TValue lass::prim::LineSegment3D< T, ParameterPolicy >::TValue

Definition at line 84 of file line_segment_3d.h.

template<typename T , class ParameterPolicy = Bounded>
typedef TPoint::TParam lass::prim::LineSegment3D< T, ParameterPolicy >::TParam

Definition at line 85 of file line_segment_3d.h.

template<typename T , class ParameterPolicy = Bounded>
typedef TPoint::TReference lass::prim::LineSegment3D< T, ParameterPolicy >::TReference

Definition at line 86 of file line_segment_3d.h.

template<typename T , class ParameterPolicy = Bounded>
typedef TPoint::TConstReference lass::prim::LineSegment3D< T, ParameterPolicy >::TConstReference

Definition at line 87 of file line_segment_3d.h.


Member Enumeration Documentation

template<typename T , class ParameterPolicy = Bounded>
anonymous enum

Enumerator:
dimension 

Definition at line 89 of file line_segment_3d.h.


Constructor & Destructor Documentation

template<typename T , class PP >
lass::prim::LineSegment3D< T, PP >::LineSegment3D (  )  [inline]

template<typename T , class PP >
lass::prim::LineSegment3D< T, PP >::LineSegment3D ( const TPoint iTail,
const TPoint iHead 
) [inline]

Definition at line 70 of file line_segment_3d.inl.

template<typename T , class PP >
template<typename PP2 >
lass::prim::LineSegment3D< T, PP >::LineSegment3D ( const LineSegment3D< T, PP2 > &  other  )  [inline]

Definition at line 80 of file line_segment_3d.inl.


Member Function Documentation

template<typename T , class PP >
const LineSegment3D< T, PP >::TPoint & lass::prim::LineSegment3D< T, PP >::tail (  )  const [inline]

template<typename T , class PP >
LineSegment3D< T, PP >::TPoint & lass::prim::LineSegment3D< T, PP >::tail (  )  [inline]

template<typename T , class PP >
const LineSegment3D< T, PP >::TPoint & lass::prim::LineSegment3D< T, PP >::head (  )  const [inline]

template<typename T , class PP >
LineSegment3D< T, PP >::TPoint & lass::prim::LineSegment3D< T, PP >::head (  )  [inline]

template<typename T , class PP >
const LineSegment3D< T, PP >::TPoint lass::prim::LineSegment3D< T, PP >::point ( TParam  iT  )  const [inline]

template<typename T , class PP >
const LineSegment3D< T, PP >::TValue lass::prim::LineSegment3D< T, PP >::t ( const TPoint iPoint  )  const [inline]

template<typename T , class PP >
const LineSegment3D< T, PP >::TVector lass::prim::LineSegment3D< T, PP >::vector (  )  const [inline]

template<typename T , class PP >
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().

template<typename T , class PP >
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().

template<typename T , class PP >
const LineSegment3D< T, PP >::TValue lass::prim::LineSegment3D< T, PP >::squaredDistance ( const TPoint iPoint  )  const [inline]

template<typename T , class PP >
const LineSegment3D< T, PP >::TValue lass::prim::LineSegment3D< T, PP >::closestsPoint ( const TPoint iPoint,
T &  oT 
) const [inline]


Friends And Related Function Documentation

template<typename T , class PPa , class PPb >
bool operator== ( const LineSegment3D< T, PPa > &  iA,
const LineSegment3D< T, PPb > &  iB 
) [related]

template<typename T , class PPa , class PPb >
bool operator!= ( const LineSegment3D< T, PPa > &  iA,
const LineSegment3D< T, PPb > &  iB 
) [related]

Definition at line 224 of file line_segment_3d.inl.

template<typename T , class PP >
std::ostream & operator<< ( std::ostream &  ioOStream,
const LineSegment3D< T, PP > &  iLineSegment 
) [related]

Definition at line 233 of file line_segment_3d.inl.

References LASS_ENFORCE_STREAM.

template<typename T , class PP >
io::XmlOStream & operator<< ( io::XmlOStream ioOStream,
const LineSegment3D< T, PP > &  iLineSegment 
) [related]

Definition at line 244 of file line_segment_3d.inl.

References LASS_ENFORCE_STREAM.

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() 
) [related]

Find the intersection of a plane and line segment by their parameter t on the ray.

Parameters:
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.
Returns:
  • rNone no intersections > tMin found t is not assigned.
  • rOne exactly one intersection > tMin found t represents it.
  • rInfinite infinite many intersections found (segment is coincident with plane), t is not assigned.
  • rInvalid plane or iRay is invalid, no intersection. t is not assigned.

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().


Field Documentation

template<typename T , class ParameterPolicy = Bounded>
TPoint lass::prim::LineSegment3D< T, ParameterPolicy >::tail_ [private]

template<typename T , class ParameterPolicy = Bounded>
TPoint lass::prim::LineSegment3D< T, ParameterPolicy >::head_ [private]


The documentation for this class was generated from the following files:

Generated on Mon Nov 10 14:22:13 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo