43#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_IMPL_AABB_SLAB_H
44#define LASS_GUARDIAN_OF_INCLUSION_PRIM_IMPL_AABB_SLAB_H
60template <
typename T>
inline
61bool intersectSlab(
const T min,
const T max,
const T support,
const T direction,
const T invDirection, T& tNear, T& tFar)
65 return support >= min && support <= max;
68 const T tMin = (min - support) * invDirection;
69 const T tMax = (max - support) * invDirection;
99template <
typename T>
inline
100bool intersectSlab(
const T min,
const T max,
const T support,
const T direction, T& tNear, T& tFar)
102 const T invDirection =
num::inv(direction);
103 return intersectSlab(min, max, support, direction, invDirection, tNear, tFar);
T inv(const T &x)
return x ^ -1
implementation details of lass::prim
set of geometrical primitives
Library for Assembled Shared Sources.