13template<
typename Item>
19template<std::
size_t N,
typename Item>
20class TBvhInfoNode final
22 static_assert(N >= 2);
28 const std::array<const TBvhInfoNode*, N>& children,
29 std::size_t singleSplitAxis)
49 auto getChild(std::size_t childIdx)
const
70 inline static
constexpr uint8 NO_AXIS_FLAG = 0b11;
73 constant::X_AXIS < NO_AXIS_FLAG &&
74 constant::Y_AXIS < NO_AXIS_FLAG &&
75 constant::Z_AXIS < NO_AXIS_FLAG);
79 uint8 splitAxis : 2 = NO_AXIS_FLAG;
82 std::array<const TBvhInfoNode*, N> m_children;
87 std::array<ChildFlags, N> m_perChildFlags;
90 uint32f m_singleSplitAxis : 2;
if constexpr(IS_ROBUST)
Definition TBvhSimdComputingContext.h:561
General BVH node packed with additional information. This node type is typically used for building ot...
Definition TLinearDepthFirstWideBvh.h:21
auto getSplitAxis(std::size_t childIdx) const -> std::size_t
Definition TBvhInfoNode.ipp:164
static constexpr std::size_t noAxisFlag()
Definition TBvhInfoNode.ipp:73
bool isBinaryLeaf() const
Definition TBvhInfoNode.ipp:90
auto getItems() const -> TSpanView< ItemInfoType >
Definition TBvhInfoNode.ipp:137
bool isInternal() const
Definition TBvhInfoNode.ipp:120
static auto makeInternal(const std::array< const TBvhInfoNode *, N > &children, std::size_t singleSplitAxis) -> TBvhInfoNode
Definition TBvhInfoNode.ipp:14
bool isBinaryInternal() const
Definition TBvhInfoNode.ipp:102
static constexpr bool isBinary()
Definition TBvhInfoNode.ipp:58
TBvhInfoNode()
Definition TBvhInfoNode.ipp:80
auto getSingleSplitAxis() const -> std::size_t
Definition TBvhInfoNode.ipp:153
auto getAABB() const -> const AABB3D &
Definition TBvhInfoNode.ipp:145
bool isLeaf() const
Definition TBvhInfoNode.ipp:113
auto getChild(std::size_t childIdx) const -> const TBvhInfoNode *
Definition TBvhInfoNode.ipp:127
bool isSingleSplitAxis() const
Definition TBvhInfoNode.ipp:175
static constexpr std::size_t numChildren()
Definition TBvhInfoNode.ipp:65
static auto makeLeaf(TSpanView< ItemInfoType > leafItems, const AABB3D &leafAabb) -> TBvhInfoNode
Definition TBvhInfoNode.ipp:43
Definition TBvhItemInfo.h:11
Math functions and utilities.
Definition TransformInfo.h:10
std::span< const T, EXTENT > TSpanView
Same as TSpan, except that the objects are const-qualified. Note that for pointer types,...
Definition TSpan.h:19