Aabb

class Aabb(var min: FloatArray = FloatArray(3) { Float.MAX_VALUE }, var max: FloatArray = FloatArray(3) { -Float.MAX_VALUE })

An axis-aligned box represented by its min and max coordinates.

Vectors are float3 arrays and matrices column-major mat3f/mat4f arrays, as in the rest of the API.

Constructors

Link copied to clipboard
constructor(min: FloatArray = FloatArray(3) { Float.MAX_VALUE }, max: FloatArray = FloatArray(3) { -Float.MAX_VALUE })

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class Corners(val vertices: Array<FloatArray>)

The 8 corners of a box.

Properties

Link copied to clipboard

max coordinates

Link copied to clipboard

min coordinates

Functions

Link copied to clipboard

The center of the box: (max + min) / 2.

Link copied to clipboard

The maximum signed distance from p to the box: negative if the box contains p.

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

The half-extent of the box: (max - min) / 2.

Link copied to clipboard

The 8 corner vertices of the box.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Whether the box is empty, i.e. its volume is null or negative.

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

The bounding box of this box transformed by the affine transform m (mat4f).