Box3
Axis-aligned bounding box defined by minimum and maximum corners.
Box3 represents a 3D region bounded by two corners: min and max. It is used for spatial queries, culling tests, intersection checks, and computing bounding volumes. All operations assume the box is axis-aligned in the current coordinate space.
Construction
Constructors
Box3() constexpr
Constructs a box from minimum and maximum corners.
cpp
Box3::Box3(const Vector3& v_min, const Vector3& v_max);| Parameter | Description |
|---|---|
| v_min | Minimum point. |
| v_max | Maximum point. |
Properties
Functions
ApplyTransform() void
Applies a transform to the box.
Computes the axis-aligned bounding box that encloses the transformed eight corners of the original box.
cpp
void Box3::ApplyTransform(const Matrix4& transform);| Parameter | Description |
|---|---|
| transform | Transformation matrix to apply. |
ExpandWithPoint() void
IsEmpty() bool
Reset() void
Resets the box to an empty state.
After calling this, the next expanded point will define the new bounds.
cpp
void Box3::Reset();Translate() void
Union() void
Expands this box to contain another box.
cpp
void Box3::Union(const Box3& other);| Parameter | Description |
|---|---|
| other | Box to merge. |