22 [[nodiscard]]
constexpr BoundingBox() noexcept : min(0), max(0) {}
28 for (
int dy = min.y; dy <= max.y; ++dy)
29 for (
int dx = min.x; dx <= max.x; ++dx)
30 for (
int dz = min.z; dz <= max.z; ++dz) {
36 *
this =
BoundingBox{ll::math::min(a.min, min), ll::math::max(a.max, max)};
41 *
this =
BoundingBox{ll::math::min(a, min), ll::math::max(a, max)};
45 template <
typename T,
size_t N>
46 [[nodiscard]]
constexpr T& get()
noexcept {
47 if constexpr (N == 0) {
49 }
else if constexpr (N == 1) {
52 static_assert(ll::traits::always_false<T>);
56 template <
typename T,
size_t N>
57 [[nodiscard]]
constexpr T
const& get()
const noexcept {
58 if constexpr (N == 0) {
60 }
else if constexpr (N == 1) {
63 static_assert(ll::traits::always_false<T>);
67 [[nodiscard]]
bool contains(
BlockPos const& a)
const noexcept {
return a.ge(min).all() && a.le(max).all(); }
69 [[nodiscard]]
bool contains(
BoundingBox const& a)
const noexcept {
70 return a.min.ge(min).all() && a.max.le(max).all();
73 [[nodiscard]]
BlockPos getSideLength()
const noexcept {
return max - min + 1; }
75 LLNDAPI
operator class AABB() const;
80 MCAPI
BoundingBox(
int _x0,
int _y0,
int _z0,
int _x1,
int _y1,
int _z1);
82 MCAPI
void applyTransformation(
::BlockPos const& pivot, ::Rotation rotationXZ,
bool mirrorX,
bool mirrorZ);
84 MCFOLD
bool isValid()
const;
92 MCAPI static ::BoundingBox orientBox(
109 MCFOLD
void* $ctor();
111 MCAPI
void* $ctor(
int _x0,
int _y0,
int _z0,
int _x1,
int _y1,
int _z1);