Overview
BoundingBox is an axis-aligned bounding box (AABB) defined by two Vector3 corners: minimum (lowest x, y, z) and maximum (highest x, y, z). It is used for spatial queries such as point-in-box tests, frustum culling helpers, and scene-level size estimation.
A BoundingBox can be in a null (empty/uninitialised) state when created with no arguments. Calling merge() on a null box initialises it from the first point or box provided.
Package: aspose.threed.utilities
Constructor
| Signature | Description |
|---|
BoundingBox() | Null (empty) bounding box |
BoundingBox(minimum, maximum) | Constructs from two Vector3 corners |
BoundingBox(min_x, min_y, min_z, max_x, max_y, max_z) | Constructs from six scalar values |
Properties
| Name | Type | Description |
|---|
minimum | Vector3 | The corner with the smallest x, y, z values. Returns (+inf, +inf, +inf) for a null box |
maximum | Vector3 | The corner with the largest x, y, z values. Returns (-inf, -inf, -inf) for a null box |
center | Vector3 | Midpoint between minimum and maximum; (0,0,0) for a null box |
size | Vector3 | Extent per axis (maximum - minimum); (0,0,0) for a null box |
Static Factory Methods
| Method | Return Type | Description |
|---|
BoundingBox.get_null() | BoundingBox | Returns a null (empty) bounding box |
BoundingBox.get_infinite() | BoundingBox | Returns an infinite bounding box spanning all of space |
Instance Methods
| Method | Return Type | Description |
|---|
merge(point) | None | Expands the box to include a Vector3, Vector4, or another BoundingBox |
merge(x, y, z) | None | Expands the box to include the point (x, y, z) |
contains(point) | bool | Returns True if the Vector3 point is inside or on the boundary |
contains(box) | bool | Returns True if box is entirely within this box |
overlaps_with(box) | bool | Returns True if the two boxes intersect |
scale() | float | Returns the largest absolute coordinate value — useful as a rough scene scale estimate |
Example
See Also