Description
The Maxs
field represents the maximum corner extents of the Axis-Aligned Bounding Box (AABB). It is a Vector3
that defines the farthest point of the bounding box on each axis. The values of Maxs
should be mathematically larger than the corresponding values of the Mins
field, which represents the minimum corner extents of the AABB. This ensures that the bounding box is properly defined in 3D space.
Usage
Use the Maxs
field to determine or set the maximum extents of a bounding box. This is useful when you need to calculate the size, volume, or perform collision detection with other objects in a 3D environment.
Example
// Example of using BBox and its Maxs field
BBox boundingBox = new BBox();
boundingBox.Mins = new Vector3(0, 0, 0);
boundingBox.Maxs = new Vector3(10, 10, 10);
// Accessing the Maxs field
Vector3 maxExtents = boundingBox.Maxs;
// Checking if a point is within the bounding box
Vector3 point = new Vector3(5, 5, 5);
bool isInside = boundingBox.Contains(point);