74 T& t,
const T& tMin = T())
76 typedef Point2D<T> TPoint;
78 typedef typename TVector::TValue TValue;
79 typedef typename TVector::TNumTraits TNumTraits;
81 const TPoint& support = ray.
support();
82 const TVector& direction = ray.
direction();
84 TValue tNear = TNumTraits::infinity;
86 good |= impl::intersectEdge2D(support, direction, triangle[0], triangle[1], tNear, tMin);
87 good |= impl::intersectEdge2D(support, direction, triangle[1], triangle[2], tNear, tMin);
88 good |= impl::intersectEdge2D(support, direction, triangle[2], triangle[0], tNear, tMin);
92 LASS_ASSERT(tNear > tMin);
Result intersect(const Triangle2D< T > &triangle, 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.