Function createPositions3DecompressMat4

  • Creates a 4x4 matrix for decompressing 3D positions based on a given axis-aligned bounding box (AABB). This matrix is used to map compressed positions back to their original space.

    Parameters

    • aabb: FloatArrayParam

      The axis-aligned bounding box (AABB) defined by [xmin, ymin, zmin, xmax, ymax, zmax].

    • OptionalpositionsDecompressMatrix: FloatArrayParam = ...

      An optional pre-allocated matrix to store the result. Defaults to a new matrix if not provided.

    Returns FloatArrayParam

    • The decompression matrix used for transforming compressed positions back to their original scale.
    const aabb = [0, 0, 0, 10, 10, 10];
    const decompressionMatrix = createPositions3DecompressMat4(aabb);