BoundingBox

Represents the bounding box for 3D content. All measurements are expressed in meters (m).

This class represents an Axis-Aligned Bounding Box (AABB), which is a bounding box whose edges are always aligned with the coordinate axes. It is defined by its center position and half extent, making it symmetrical along each axis.

Key characteristics:

  • Axis-aligned: The bounding box is always aligned with the coordinate axes, without any rotation or skew.

  • Symmetrical: The bounding box is defined by its center (center) and half extent (halfExtent), ensuring symmetry along all axes.

  • Precision: All calculations have a precision error of 0.00001F.

Constructors

Link copied to clipboard
constructor(center: Vector3 = Vector3.ZERO, halfExtent: Vector3 = Vector3.ZERO)

Properties

Link copied to clipboard

The radius of the bounding sphere that circumscribes the bounding box. Precision error: 0.00001F.

Link copied to clipboard

The center of the bounding box. Precision error: 0.00001F.

Link copied to clipboard

The half extent of the bounding box. Precision error: 0.00001F.

Link copied to clipboard

The maximum coordinate vertex of the bounding box. Precision error: 0.00001F.

Link copied to clipboard

The minimum coordinate vertex of the bounding box. Precision error: 0.00001F.

Link copied to clipboard

The size of the bounding box, represented as a vector. Precision error: 0.00001F.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun isEmpty(): Boolean

Checks if the bounding box is empty.

Link copied to clipboard
open override fun toString(): String