15template <
typename T,
size_t N>
25 T
tmax = std::numeric_limits<T>::max())
29 template <
bool SafeInverse = false>
39 static_for<0, N>([&] (
size_t i) {
40 octant.
value |= std::signbit(
dir[i]) * (uint32_t{1} << i);
BVH_ALWAYS_INLINE T safe_inverse(T x)
Computes the inverse of the given value, always returning a finite value.
BVH_ALWAYS_INLINE T add_ulp_magnitude(T t, unsigned ulp)
Adds the given number of ULPs (Units in the Last Place) to the given floating-point number.
static constexpr size_t max_dim
uint32_t operator[](size_t i) const
BVH_ALWAYS_INLINE Ray(const Vec< T, N > &org, const Vec< T, N > &dir, T tmin=0, T tmax=std::numeric_limits< T >::max())
static BVH_ALWAYS_INLINE Vec< T, N > pad_inv_dir(const Vec< T, N > &inv_dir)
BVH_ALWAYS_INLINE Vec< T, N > get_inv_dir() const
BVH_ALWAYS_INLINE Octant get_octant() const
static BVH_ALWAYS_INLINE Vec< T, N > generate(F &&f)