52#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_IMPL_LINE_2D_CARTESIAN_H
53#define LASS_GUARDIAN_OF_INCLUSION_PRIM_IMPL_LINE_2D_CARTESIAN_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;
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;
Line2DCartesian(const TPoint &iSupport, const TPoint &iPoint)
Construct a line through three points.
Line2DCartesian(const TVector &iNormal, TParam iD)
Construct a line by a cartesian equation N.P + d == 0.
const TPoint support() const
return generated support point.
const TVector project(const TVector &iVector) const
project a vector orthogonally onto the line
const TVector reject(const TPoint &iPoint) const
return the vector that, if added to the PROJECTION of iPoint, you get iPoint again.
bool isValid() const
return true if line is a valid line (no normal or direction vectors that are zero).
const TPoint point(TParam iT) const
return point by filling in parameter in generated parametric equation
const TValue equation(const TPoint &iPoint) const
Return value of point in equation.
const TVector direction() const
return generated direction vector.
const TVector reject(const TVector &iVector) const
return the part of iVector that is orthogonal to the line.
const TValue t(const TPoint &iPoint) const
return parameter along generated paremetric equation.
const TPoint project(const TPoint &iPoint) const
project a point orthogonally onto the line
Line2DCartesian()
initializes to an invalid state.
Line2DCartesian(const TVector &iNormal, const TPoint &iSupport)
Construct a line through a support point and by a normal vector.
const TPoint reflect(const TPoint &iPoint) const
reflect a point orthogonally into the line.
Line2DCartesian(const TPoint &iSupport, const TVector &iDirection)
construct a line through a support point and by two direction vectors.
const TValue equation(const TPoint &iPoint, TParam iRelativeTolerance) const
Return value of point in equation, snapped to zero by iRelativeTolerance.
const TVector reflect(const TVector &iVector) const
reflect a vector orthogonally into the line
#define LASS_SIMD_ALIGN
if LASS_SIMD_ALIGNMENT is set, use LASS_SIMD_ALIGN to align some structures on SIMD alignment boundar...
implementation details of lass::prim
set of geometrical primitives
Library for Assembled Shared Sources.