Library of Assembled Shared Sources
lass::prim::LineSegment3D< T, ParameterPolicy > Class Template Reference

3D Line Segment More...

#include <line_segment_3d.h>

Inheritance diagram for lass::prim::LineSegment3D< T, ParameterPolicy >:

Public Member Functions

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.
 

Related Symbols

(Note that these are not member symbols.)

template<typename T, class EPPlane, class NPPlane, class PPRay>
Result intersect (const Plane3D< T, EPPlane, NPPlane > &plane, const LineSegment3D< T, PPRay > &lineSegment, T &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 Function Documentation

◆ point()

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

Return point on ray by it's parameter.

Returns
origin + t * direction

Definition at line 129 of file line_segment_3d.inl.

References point(), and vector().

Referenced by closestsPoint(), lass::prim::SimplePolygon3D< U, PlaneEquationPolicy, PlaneNormalizingPolicy >::intersect(), point(), and squaredDistance().

◆ t()

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

Return parameter of projection of iPoint on line segment.

Warning
the result can be out of bound [0, 1] regardless the parameter policy used.

Definition at line 142 of file line_segment_3d.inl.

References t(), and vector().

Referenced by closestsPoint(), squaredDistance(), and t().

Friends And Related Symbol Documentation

◆ intersect()

template<typename T, class EPPlane, class NPPlane, class PPRay>
Result intersect ( const Plane3D< T, EPPlane, NPPlane > & plane,
const LineSegment3D< T, PPRay > & lineSegment,
T & 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 found t is not assigned.
  • rOne exactly one intersection found t represents it.
  • rInfinite infinite many intersections found (segment is coincident with plane), t is not assigned.
  • rInvalid plane or lineSegment is invalid, no intersection. t is not assigned.

Definition at line 73 of file line_segment_3d_plane_3d.h.


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