Computes the axis-aligned bounding box (AABB) enclosing a set of 3D positions stored as a flattened array. If the positions are compressed, it applies a decompression matrix before computing the bounds.

  • Parameters

    • positions: FloatArrayParam

      A flattened array of 3D points [x0, y0, z0, x1, y1, z1, ...].

    • aabb: AABB3 = ...

      The output AABB array [minX, minY, minZ, maxX, maxY, maxZ]. If not provided, a new AABB is created.

    • OptionalpositionsDecompressMatrix: Mat4

      Optional 4x4 matrix to decompress positions.

    Returns AABB3

    The computed AABB.