52#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_IMPL_LINE_2D_PARAMETRIC_H
53#define LASS_GUARDIAN_OF_INCLUSION_PRIM_IMPL_LINE_2D_PARAMETRIC_H
64template <
typename T,
class NormalizingPolicy = Normalized>
69 typedef NormalizingPolicy TNormalizingPolicy;
71 typedef Point2D<T> TPoint;
72 typedef typename TPoint::TVector TVector;
74 typedef typename TPoint::TValue TValue;
75 typedef typename TPoint::TParam TParam;
76 typedef typename TPoint::TReference TReference;
77 typedef typename TPoint::TConstReference TConstReference;
78 typedef typename TPoint::TNumTraits TNumTraits;
80 enum { dimension = TPoint::dimension };
91 void getCartesian(TVector& oNormal, TReference oD)
const;
92 const TVector normal()
const;
93 const TValue d()
const;
95 const TValue
equation(
const TPoint& iPoint)
const;
96 const TValue
equation(
const TPoint& iPoint, TParam iRelativeTolerance)
const;
98 const TVector
reject(
const TPoint& iPoint)
const;
99 const TVector
reject(
const TVector& iVector)
const;
100 const TPoint
project(
const TPoint& iPoint)
const;
101 const TVector
project(
const TVector& iVector)
const;
102 const TPoint
reflect(
const TPoint& iPoint)
const;
103 const TVector
reflect(
const TVector& iVector)
const;
105 const TPoint
point(TParam iT)
const;
106 const TValue
t(
const TPoint& iPoint)
const;
const TVector reject(const TPoint &iPoint) const
return the vector that, if added to the PROJECTION of iPoint, you get iPoint again.
const TValue equation(const TPoint &iPoint) const
Return value of point in equation.
const TVector reject(const TVector &iVector) const
return the part of iVector that is orthogonal to the line.
Line2DParametric(const TPoint &iSupport, const TVector &iDir)
construct a line through a support point and by two direction vectors.
const TValue t(const TPoint &iPoint) const
return UV pair of parameters
const TPoint & support() const
return support point.
const TValue equation(const TPoint &iPoint, TParam iRelativeTolerance) const
Return value of point in equation.
const TVector project(const TVector &iVector) const
project a vector orthogonally onto the line
Line2DParametric(const TPoint &iSupport, const TPoint &iPoint)
Construct a line through three points.
const TPoint project(const TPoint &iPoint) const
project a point orthogonally onto the line
Line2DParametric()
initializes to an invalid state.
Line2DParametric(const TVector &iNormal, TParam iD)
Construct a line by a cartesian equation N.P + d == 0.
const TVector & direction() const
return direction vector.
const TPoint point(TParam iT) const
return point by filling in the parametric equation: P(t) = S + t * U
bool isValid() const
return true if line is a valid line (no normal or direction vectors that are zero).
const TPoint reflect(const TPoint &iPoint) const
reflect a point orthogonally into the line.
Line2DParametric(const TVector &iNormal, const TPoint &iSupport)
Construct a line through a support point and by a normal vector.
const TVector reflect(const TVector &iVector) const
reflect a vector orthogonally to the line
implementation details of lass::prim
set of geometrical primitives
Library for Assembled Shared Sources.