API

Function computeAabb

  • Compute an AABB by folding XYZ min/max over a positions buffer.

    When world is provided each position is transformed by it before being folded (column-major Mat4: m[col*4+row]). Otherwise the AABB is computed in the positions' own space.

    Returns [[+Inf,+Inf,+Inf],[-Inf,-Inf,-Inf]] for empty input — callers that care can check isFinite(min[0]).

    Parameters

    • positions: Float32Array
    • Optionalworld: Mat4

    Returns Aabb