11template <
typename T,
size_t N>
34 static_assert(
N == 2 ||
N == 3);
35 if constexpr (
N == 3)
return (
d[0] +
d[1]) *
d[2] +
d[0] *
d[1];
36 if constexpr (
N == 2)
return d[0] +
d[1];
37 return static_cast<T
>(0.);
42 Vec<T, N>(+std::numeric_limits<T>::max()),
43 Vec<T, N>(-std::numeric_limits<T>::max()));
BVH_ALWAYS_INLINE T robust_max(T a, T b)
BVH_ALWAYS_INLINE T robust_min(T a, T b)
BVH_ALWAYS_INLINE T get_half_area() const
BVH_ALWAYS_INLINE BBox(const Vec< T, N > &point)
BVH_ALWAYS_INLINE Vec< T, N > get_center() const
BVH_ALWAYS_INLINE Vec< T, N > get_diagonal() const
BVH_ALWAYS_INLINE BBox & extend(const Vec< T, N > &point)
BVH_ALWAYS_INLINE BBox & extend(const BBox &other)
BVH_ALWAYS_INLINE BBox(const Vec< T, N > &min, const Vec< T, N > &max)
static BVH_ALWAYS_INLINE constexpr BBox make_empty()