43#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_RAY_2D_SIMPLE_POLYGON_2D_H
44#define LASS_GUARDIAN_OF_INCLUSION_PRIM_RAY_2D_SIMPLE_POLYGON_2D_H
70template<
typename T,
class DP,
class NP,
class PP>
73 T& t,
const T& tMin = T())
75 typedef Point2D<T> TPoint;
77 typedef typename TVector::TValue TValue;
78 typedef typename TVector::TNumTraits TNumTraits;
80 const TPoint& support = ray.
support();
81 const TVector& direction = ray.
direction();
83 TValue tNear = TNumTraits::infinity;
86 size_t iPrev =
size - 1;
87 for (
size_t i = 0; i <
size; ++i)
89 good |= impl::intersectEdge2D(
90 support, direction, polygon[iPrev], polygon[i], tNear, tMin);
const TVector & direction() const
Return direction of ray.
const TPoint & support() const
return origin of ray.
Result intersect(const SimplePolygon2D< T, DP > &polygon, const Ray2D< T, NP, PP > &ray, T &t, const T &tMin=T())
Find the intersection of a ray and a triangle by their parameter t on the ray.
set of geometrical primitives
Result
meta information on the result you have from an operation like an intersection ...
@ 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.