43#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_AABB_2D_RAY_2D_H
44#define LASS_GUARDIAN_OF_INCLUSION_PRIM_AABB_2D_RAY_2D_H
69template<
typename T,
typename MMPAabb,
typename NPRay,
typename PPRay>
72 T&
t,
const T& tMin = T())
79 typedef num::NumTraits<T> TNumTraits;
80 typedef Point2D<T> TPoint;
83 const TPoint& min = aabb.min();
84 const TPoint& max = aabb.max();
89 T tFar = TNumTraits::infinity;
91 good &= impl::intersectSlab(min[0], max[0],
support[0],
direction[0], tNear, tFar);
92 good &= impl::intersectSlab(min[1], max[1],
support[1],
direction[1], tNear, tFar);
131template<
typename T,
typename MMPAabb,
typename NPRay,
typename PPRay>
135 T&
t,
const T& tMin = T())
142 typedef num::NumTraits<T> TNumTraits;
143 typedef Point2D<T> TPoint;
146 const TPoint& min = aabb.min();
147 const TPoint& max = aabb.max();
152 T tFar = TNumTraits::infinity;
154 good &= impl::intersectSlab(min[0], max[0],
support[0],
direction[0], invDirection[0], tNear, tFar);
155 good &= impl::intersectSlab(min[1], max[1],
support[1],
direction[1], invDirection[1], tNear, tFar);
your momma's axis aligned bounding box.
Result intersect(const Aabb2D< T, MMPAabb > &aabb, const Ray2D< T, NPRay, PPRay > &ray, T &t, const T &tMin=T())
Find the intersection of an AABB and ray by their parameter t on the ray.
const TVector & direction() const
const TValue t(const TPoint &iPoint) const
const TPoint & support() const
Result intersect(const Aabb2D< T, MMPAabb > &aabb, const Ray2D< T, NPRay, PPRay > &ray, const Vector2D< T > &invDirection, T &t, const T &tMin=T())
Find the intersection of an AABB and ray 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.