4#include "MRPch/MRBindingMacros.h"
17 alignas( 16 )
float box[6][4];
23 [[nodiscard]] Box3f
get(
int i )
const {
return { {
box[0][i],
box[1][i],
box[2][i] }, {
box[3][i],
box[4][i],
box[5][i] } }; }
26 void set(
int i,
const Box3f & b )
28 for (
int c = 0; c < 3; ++c )
31 box[c + 3][i] = b.max[c];
38 constexpr float inf = std::numeric_limits<float>::infinity();
39 for (
int c = 0; c < 3; ++c )
50 for (
int i = 0; i < 4; ++i )
51 res.include(
get( i ) );
constexpr NoInit noInit
Definition MRMeshFwd.h:103
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
void set(int i, const Box3f &b)
sets i-th box
Definition MRAABBTreeSimd.h:26
Box3f get(int i) const
returns i-th box
Definition MRAABBTreeSimd.h:23
AABBTreeSimdBoxes()=default
Box3f getUnion() const
returns the union of all four boxes (as Box3f::include of them in their order)
Definition MRAABBTreeSimd.h:47
float box[6][4]
Definition MRAABBTreeSimd.h:17
void setEmpty(int i)
makes i-th box empty
Definition MRAABBTreeSimd.h:36
AABBTreeSimdBoxes(NoInit) noexcept
Definition MRAABBTreeSimd.h:20
AABBTreeSimdNode()=default
AABBTreeSimdNode(NoInit) noexcept
Definition MRAABBTreeSimd.h:64
int child[4]
i-th child: the index in simdNodes() if > 0, otherwise ~(the index of the leaf); 0 in unused slots (t...
Definition MRAABBTreeSimd.h:61
Definition MRMeshFwd.h:102