![]() |
Lysa
0.0
Lysa 3D Engine
|
Lightweight structure representing a 3D axis-aligned bounding box in the engine's right-handed coordinate system.
An AABB is defined by its minimum and maximum corners in object or world space. It is commonly used for coarse collision detection, visibility tests (frustum culling), and spatial queries.
Notes:
Public Member Functions | |
| AABB () = default | |
| AABB (const float3 &min, const float3 &max) | |
| AABB | toGlobal (const float4x4 &transform) const |
Public Attributes | |
| float3 | min {} |
| float3 | max {} |
|
default |
Default-construct an empty/invalid AABB with zeroed corners. The box becomes valid once min/max are assigned meaningful values.
|
inline |
Construct a bounding box from its minimum and maximum corners.
| min | Minimum corner (x/y/z individually less-or-equal to max). |
| max | Maximum corner (x/y/z individually greater-or-equal to min). |
| AABB toGlobal | ( | const float4x4 & | transform | ) | const |
Compute the world-space AABB that encloses this box transformed by the given matrix.
The input box is considered to be in local/object space. The result is axis-aligned in the destination space of the transform (typically world space). If the transform contains rotation or shear, the returned AABB will be the minimal axis-aligned box that fully contains the rotated (oriented) box.
| transform | 4x4 row-major transform matrix (object -> world). |
| float3 max {} |
Maximum corner of the box (component-wise). Typically corresponds to the right/top/front corner: {max.x, max.y, max.z}.
| float3 min {} |
Minimum corner of the box (component-wise). Typically corresponds to the left/bottom/back corner: {min.x, min.y, min.z}.