Description
The Mins
field represents the minimum corner extents of the Axis-Aligned Bounding Box (AABB). It is a Vector3
that defines the smallest values on each axis (X, Y, Z) of the bounding box. These values should be mathematically smaller than the corresponding values in the Maxs
field, which represents the maximum corner extents of the AABB. This ensures that the bounding box is correctly defined in 3D space.
Usage
Use the Mins
field to access or modify the minimum extents of a BBox
instance. This field is public and non-static, meaning it can be accessed directly on an instance of BBox
. Ensure that the values assigned to Mins
are always less than or equal to the corresponding values in Maxs
to maintain a valid bounding box.
Example
// Example of using the Mins field
BBox boundingBox = new BBox();
boundingBox.Mins = new Vector3(-1.0f, -1.0f, -1.0f);
boundingBox.Maxs = new Vector3(1.0f, 1.0f, 1.0f);
// Ensure Mins is less than Maxs
if (boundingBox.Mins.x > boundingBox.Maxs.x ||
boundingBox.Mins.y > boundingBox.Maxs.y ||
boundingBox.Mins.z > boundingBox.Maxs.z)
{
throw new InvalidOperationException("Mins must be less than Maxs on all axes.");
}