32template <
size_t Bits,
size_t PrimCountBits>
36 static constexpr size_t bits = Bits;
41 static_assert(PrimCountBits < Bits);
76 return Index { first_child, 0 };
typename UnsignedInt< Bits >::Type UnsignedIntType
Packed index data structure.
BVH_ALWAYS_INLINE bool is_inner() const
BVH_ALWAYS_INLINE Type first_id() const
static constexpr size_t bits
static BVH_ALWAYS_INLINE Index make_inner(size_t first_child)
UnsignedIntType< Bits > Type
bool operator==(const Index &other) const
BVH_ALWAYS_INLINE void set_prim_count(size_t prim_count)
Index(size_t first_id, size_t prim_count)
static constexpr Type max_prim_count
bool operator!=(const Index &other) const
BVH_ALWAYS_INLINE void set_first_id(size_t first_id)
static constexpr size_t prim_count_bits
static BVH_ALWAYS_INLINE Index make_leaf(size_t first_prim, size_t prim_count)
BVH_ALWAYS_INLINE Type prim_count() const
static constexpr Type max_first_id
BVH_ALWAYS_INLINE bool is_leaf() const