Struct MinMaxAABB
Axis aligned bounding box (AABB) stored in min and max form.
Namespace: Unity.Mathematics
Assembly: Unity.Mathematics.Extensions.dll
Syntax
[Serializable]
public struct MinMaxAABB
Remarks
Axis aligned bounding boxes (AABB) are boxes where each side is parallel with one of the Cartesian coordinate axes X, Y, and Z. AABBs are useful for approximating the region an object (or collection of objects) occupies and quickly testing whether or not that object (or collection of objects) is relevant. Because they are axis aligned, they are very cheap to construct and perform overlap tests with them.
Fields
Name | Description |
---|---|
Max | The maximum point contained by the AABB. |
Min | The minimum point contained by the AABB. |
Properties
Name | Description |
---|---|
Empty | An empty AABB - where the minimum and maximum coordinates are at opposing infinities. |
IsEmpty | Is this AABB empty? It is empty only if the minimum and maximum coordinates are at opposing infinities. |
Methods
Name | Description |
---|---|
Encapsulate(MinMaxAABB) | Make this AABB into the smallest AABB that contains both this AABB, and another AABB. |
Encapsulate(float3) | Encapsulates the given AABB. |
Equals(MinMaxAABB) | Determine whether this MinMaxAABB is the same as another MinMaxAABB |
Operators
Name | Description |
---|---|
implicit operator MinMaxAABB(AABB) | Make a MinMaxAABB from an AABB (an AABB which has a center and extents) |
implicit operator AABB(MinMaxAABB) | Make an AABB (an AABB which has a center and extents) from a MinMaxAABB |