43#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_LINE_2D_RAY_2D_H
44#define LASS_GUARDIAN_OF_INCLUSION_PRIM_LINE_2D_RAY_2D_H
73template<
typename T,
class EP1,
class NP1,
class NP2,
class PP2>
75 const Ray2D<T, NP2, PP2>& ray,
76 T&
t,
const T& tMin = T())
78 typedef typename Vector2D<T>::TValue TValue;
79 typedef typename Vector2D<T>::TNumTraits TNumTraits;
80 typedef num::Consistent<T> TConsistent;
87 const TValue nd = perpDot(line.normal(), ray.
direction());
88 if (nd == TNumTraits::zero)
98 LASS_ASSERT(!num::isNaN(tCandidate));
99 if (tCandidate > tMin)
101 t = tCandidate.value();
Side classify(const TPoint &iPoint) const
Return on what side a point is located.
Result intersect(const Line2D< T, EP1, NP1 > &line, const Ray2D< T, NP2, PP2 > &ray, T &t, const T &tMin=T())
Find the intersection of a line and ray by their parameter t on the ray.
bool isValid() const
Return true if ray is valid (direction isn't a zero vector).
const TVector & direction() const
Return direction of ray.
const TValue t(const TPoint &iPoint) const
const TPoint & support() const
return origin of ray.
bool isValid() const
return true if line is a valid line (no normal or direction vectors that are zero).
const TValue equation(const TPoint &iPoint) const
Return value of point in equation.
set of geometrical primitives
Side
Different sides of a surface.
@ sFront
in front of the surface
@ sBack
in back of the surface
@ sSurface
right on the surface
Result
meta information on the result you have from an operation like an intersection ...
@ rInfinite
there are infinite many solutions, output arguments are meaningless
@ rInvalid
0 is an invalid value, nothing is known.
@ rNone
operation has no answer, output arguments are meaningless
@ rOne
there's exactly one answer, 1 output argument contains the answer
Library for Assembled Shared Sources.