27 static constexpr size_t dimension = Dim;
44 return other.bounds == bounds;
47 return other.bounds != bounds;
60 bounds[i * 2 + 0] = bbox.min[i];
61 bounds[i * 2 + 1] = bbox.max[i];
82 return make_intersection_result(
ray, tmin, tmax);
93 return make_intersection_result(
ray, tmin, tmax);
97 for (
auto&&
bound : bounds)
122 return std::pair<T, T> {
t0,
t1 };
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Bool_t operator!=(const TDatime &d1, const TDatime &d2)
Bool_t operator==(const TDatime &d1, const TDatime &d2)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Stream of data that can be used to serialize data structures.
bool write(const T &data)
BVH_ALWAYS_INLINE T robust_max(T a, T b)
BVH_ALWAYS_INLINE T fast_mul_add(T a, T b, T c)
Fast multiply-add operation.
BVH_ALWAYS_INLINE T robust_min(T a, T b)
Packed index data structure.
UnsignedIntType< Bits > Type
Binary BVH node, containing its bounds and an index into its children or the primitives it contains.
BVH_ALWAYS_INLINE BBox< T, Dim > get_bbox() const
static BVH_ALWAYS_INLINE Node deserialize(InputStream &stream)
BVH_ALWAYS_INLINE std::pair< T, T > intersect_robust(const Ray< T, Dim > &ray, const Vec< T, Dim > &inv_dir, const Vec< T, Dim > &inv_dir_pad, const Octant &octant) const
Robust ray-node intersection routine. See "Robust BVH Ray Traversal", by T. Ize.
BVH_ALWAYS_INLINE Vec< T, Dim > get_max_bounds(const Octant &octant) const
BVH_ALWAYS_INLINE void set_bbox(const BBox< T, Dim > &bbox)
BVH_ALWAYS_INLINE Vec< T, Dim > get_min_bounds(const Octant &octant) const
static BVH_ALWAYS_INLINE std::pair< T, T > make_intersection_result(const Ray< T, Dim > &ray, const Vec< T, Dim > &tmin, const Vec< T, Dim > &tmax)
Index index
Index to the children of an inner node, or to the primitives for a leaf node.
std::array< T, Dim *2 > bounds
Bounds of the node, laid out in memory as [min_x, max_x, min_y, max_y, ...].
BVH_ALWAYS_INLINE void serialize(OutputStream &stream) const
BVH_ALWAYS_INLINE std::pair< T, T > intersect_fast(const Ray< T, Dim > &ray, const Vec< T, Dim > &inv_dir, const Vec< T, Dim > &inv_org, const Octant &octant) const
BVH_ALWAYS_INLINE bool is_leaf() const
static BVH_ALWAYS_INLINE Vec< T, N > generate(F &&f)