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
BVH_ALWAYS_INLINE constexpr T make_bitmask(size_t bits)
Generates a bitmask with the given number of bits.
static constexpr size_t bits
UnsignedIntType< Bits > Type
bool operator==(const Index &other) const
Index(size_t first_id, size_t prim_count)
static constexpr Type max_prim_count
bool operator!=(const Index &other) const
static Index make_leaf(size_t first_prim, size_t prim_count)
static constexpr size_t prim_count_bits
void set_first_id(size_t first_id)
void set_prim_count(size_t prim_count)
static Index make_inner(size_t first_child)
static constexpr Type max_first_id