45#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_AABB_3D_RAY_3D_H
46#define LASS_GUARDIAN_OF_INCLUSION_PRIM_AABB_3D_RAY_3D_H
71template<
typename T,
typename MMPAabb,
typename NPRay,
typename PPRay>
74 T&
t,
const T& tMin = T())
81 typedef num::NumTraits<T> TNumTraits;
85 const TPoint& min = aabb.min();
86 const TPoint& max = aabb.max();
91 T tFar = TNumTraits::infinity;
130template<
typename T,
typename MMPAabb,
typename NPRay,
typename PPRay>
134 T&
t,
const T& tMin = T())
141 typedef num::NumTraits<T> TNumTraits;
145 const TPoint& min = aabb.min();
146 const TPoint& max = aabb.max();
151 T tFar = TNumTraits::infinity;
152 if (!impl::intersectSlab(min[0], max[0],
support[0],
direction[0], invDirection[0], tNear, tFar))
return rNone;
153 if (!impl::intersectSlab(min[1], max[1],
support[1],
direction[1], invDirection[1], tNear, tFar))
return rNone;
154 if (!impl::intersectSlab(min[2], max[2],
support[2],
direction[2], invDirection[2], tNear, tFar))
return rNone;
your momma's axis aligned bounding box.
const TVector & direction() const
const TPoint & support() const
Result intersect(const Aabb3D< T, MMPAabb > &aabb, const Ray3D< T, NPRay, PPRay > &ray, const Vector3D< T > &invDirection, T &t, const T &tMin=T())
Find the intersection of an AABB and ray by their parameter t on the ray.
const TValue t(const TPoint &iPoint) const
Result intersect(const Aabb3D< T, MMPAabb > &aabb, const Ray3D< 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.
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.