27 [[nodiscard]]
constexpr BoundingBox() noexcept : min(0), max(0) {}
33 for (
int dy = min.y; dy <= max.y; ++dy)
34 for (
int dx = min.x; dx <= max.x; ++dx)
35 for (
int dz = min.z; dz <= max.z; ++dz) {
41 *
this =
BoundingBox{ll::math::min(a.min, min), ll::math::max(a.max, max)};
46 *
this =
BoundingBox{ll::math::min(a, min), ll::math::max(a, max)};
50 template <
typename T,
size_t N>
51 [[nodiscard]]
constexpr T& get()
noexcept {
52 if constexpr (N == 0) {
54 }
else if constexpr (N == 1) {
57 static_assert(ll::traits::always_false<T>);
61 template <
typename T,
size_t N>
62 [[nodiscard]]
constexpr T
const& get()
const noexcept {
63 if constexpr (N == 0) {
65 }
else if constexpr (N == 1) {
68 static_assert(ll::traits::always_false<T>);
72 [[nodiscard]]
bool contains(
BlockPos const& a)
const noexcept {
return a.ge(min).all() && a.le(max).all(); }
74 [[nodiscard]]
bool contains(
BoundingBox const& a)
const noexcept {
75 return a.min.ge(min).all() && a.max.le(max).all();
78 [[nodiscard]]
BlockPos getSideLength()
const noexcept {
return max - min + 1; }
80 LLNDAPI
operator class AABB() const;
85 MCAPI
BoundingBox(
int _x0,
int _y0,
int _z0,
int _x1,
int _y1,
int _z1);
87 MCAPI
void applyTransformation(
::BlockPos const& pivot, ::Rotation rotationXZ,
bool mirrorX,
bool mirrorZ);
89 MCAPI
bool isValid()
const;
97 MCAPI static ::BoundingBox orientBox(
114 MCFOLD
void* $ctor();
116 MCAPI
void* $ctor(
int _x0,
int _y0,
int _z0,
int _x1,
int _y1,
int _z1);