import { Matrix4, Quaternion, Quaternion2, Vector3 } from "../../type_definitions/array_type_definitions.js"; export declare function create(): Matrix4; export declare function create(m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number): Matrix4; export declare function create(uniformValue: number): Matrix4; export declare function getAllocationFunction(): () => Matrix4; /** Specify the function that will be used to allocate the matrix when calling the {@link create} function */ export declare function setAllocationFunction(allocationFunction: () => Matrix4): void; export declare function set(matrix: T, m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number): T; export declare function set(matrix: T, uniformValue: number): T; export declare function copy(from: Readonly, to: T): T; /** The overload where `T extends Matrix4` does also get `array` as `Readonly`, but is not marked as such due to Typescript having issues with inferring the proper type of `T` when `Readonly` is used */ export declare function clone(matrix: Readonly): T; export declare function clone(matrix: Readonly): number[]; export declare function clone(matrix: T): T; export declare function equals(first: Readonly, second: Readonly, epsilon?: number): boolean; export declare function identity(matrix: T): T; export declare function invert(matrix: Readonly): T; export declare function invert(matrix: Readonly, out: T): T; export declare function mul(first: Readonly, second: Readonly): T; export declare function mul(first: Readonly, second: Readonly, out: T): T; export declare function scale(matrix: Readonly, vector: Readonly): T; export declare function scale(matrix: Readonly, vector: Readonly, out: T): T; export declare function getPosition(matrix: Readonly): Vector3; export declare function getPosition(matrix: Readonly, out: T): T; export declare function getRotation(matrix: Readonly): Vector3; export declare function getRotation(matrix: Readonly, out: T): T; export declare const getRotationDegrees: { (matrix: Readonly): Vector3; (matrix: Readonly, out: T): T; }; export declare const getRotationRadians: { (matrix: Readonly): Vector3; (matrix: Readonly, out: T): T; }; export declare const getRotationQuat: { (matrix: Readonly): Quaternion; (matrix: Readonly, out: T): T; }; export declare function getScale(matrix: Readonly): Vector3; export declare function getScale(matrix: Readonly, out: T): T; export declare function setPosition(matrix: T, position: Readonly): T; export declare function setRotation(matrix: T, rotation: Readonly): T; export declare const setRotationDegrees: (matrix: T, rotation: Readonly) => T; export declare const setRotationRadians: (matrix: T, rotation: Readonly) => T; export declare const setRotationQuat: (matrix: T, rotation: Readonly) => T; export declare const setScale: (matrix: T, scale: Readonly) => T; export declare function setPositionRotationScale(matrix: T, position: Readonly, rotation: Readonly, scale: Readonly): T; export declare const setPositionRotationDegreesScale: (matrix: T, position: Readonly, rotation: Readonly, scale: Readonly) => T; export declare const setPositionRotationRadiansScale: (matrix: T, position: Readonly, rotation: Readonly, scale: Readonly) => T; export declare function setPositionRotationQuatScale(matrix: T, position: Readonly, rotation: Readonly, scale: Readonly): T; export declare function setPositionRotation(matrix: T, position: Readonly, rotation: Readonly): T; export declare const setPositionRotationDegrees: (matrix: T, position: Readonly, rotation: Readonly) => T; export declare const setPositionRotationRadians: (matrix: T, position: Readonly, rotation: Readonly) => T; export declare function setPositionRotationQuat(matrix: T, position: Readonly, rotation: Readonly): T; export declare function getAxes(matrix: Readonly): [Vector3, Vector3, Vector3]; export declare function getAxes(matrix: Readonly, out: [T, U, V]): [T, U, V]; export declare function getForward(matrix: Readonly): Vector3; export declare function getForward(matrix: Readonly, out: T): T; export declare function getBackward(matrix: Readonly): Vector3; export declare function getBackward(matrix: Readonly, out: T): T; export declare function getLeft(matrix: Readonly): Vector3; export declare function getLeft(matrix: Readonly, out: T): T; export declare function getRight(matrix: Readonly): Vector3; export declare function getRight(matrix: Readonly, out: T): T; export declare function getUp(matrix: Readonly): Vector3; export declare function getUp(matrix: Readonly, out: T): T; export declare function getDown(matrix: Readonly): Vector3; export declare function getDown(matrix: Readonly, out: T): T; export declare const hasUniformScale: (matrix: Readonly) => boolean; export declare const toWorld: { (matrix: Readonly, parentTransformMatrix: Readonly): T; (matrix: Readonly, parentTransformMatrix: Readonly, out: T): T; }; export declare const toLocal: { (matrix: Readonly, parentTransformMatrix: Readonly): T; (matrix: Readonly, parentTransformMatrix: Readonly, out: T): T; }; export declare const toQuat: { (matrix: Readonly): Quaternion2; (matrix: Readonly, out: T): T; }; export declare function fromQuat(quat: Readonly): Matrix4; export declare function fromQuat(quat: Readonly, out: T): T; /** * How to use * * By default rotations are in `Degrees` and transforms are `Matrix4` (and not `Quat2`) * For functions that work with rotations, `Matrix` means `Matrix3` and `Quat` means `Quat` * For functions that work with transforms, `Matrix` means `Matrix4` and `Quat` means `Quat2` * * For rotations u can add a suffix like `Degrees`/`Radians`/`Quat`/`Matrix` to use a specific version, example: * - `getRotationRadians` * - `setRotationQuat` * * The functions leave u the choice of forwarding an out parameter or just get the return value, example: * - `let position = Mat4Utils.getPosition(matrix)` * - `Mat4Utils.getPosition(matrix, position)` * - the out parameter is always the last one */ export declare const Mat4Utils: { readonly create: typeof create; readonly getAllocationFunction: typeof getAllocationFunction; readonly setAllocationFunction: typeof setAllocationFunction; readonly set: typeof set; readonly copy: typeof copy; readonly clone: typeof clone; readonly equals: typeof equals; readonly identity: typeof identity; readonly invert: typeof invert; readonly mul: typeof mul; readonly scale: typeof scale; readonly getPosition: typeof getPosition; readonly getRotation: typeof getRotation; readonly getRotationDegrees: { (matrix: Readonly): Vector3; (matrix: Readonly, out: T): T; }; readonly getRotationRadians: { (matrix: Readonly): Vector3; (matrix: Readonly, out: T): T; }; readonly getRotationQuat: { (matrix: Readonly): Quaternion; (matrix: Readonly, out: T): T; }; readonly getScale: typeof getScale; readonly setPosition: typeof setPosition; readonly setRotation: typeof setRotation; readonly setRotationDegrees: (matrix: T, rotation: Readonly) => T; readonly setRotationRadians: (matrix: T, rotation: Readonly) => T; readonly setRotationQuat: (matrix: T, rotation: Readonly) => T; readonly setScale: (matrix: T, scale: Readonly) => T; readonly setPositionRotationScale: typeof setPositionRotationScale; readonly setPositionRotationDegreesScale: (matrix: T, position: Readonly, rotation: Readonly, scale: Readonly) => T; readonly setPositionRotationRadiansScale: (matrix: T, position: Readonly, rotation: Readonly, scale: Readonly) => T; readonly setPositionRotationQuatScale: typeof setPositionRotationQuatScale; readonly setPositionRotation: typeof setPositionRotation; readonly setPositionRotationDegrees: (matrix: T, position: Readonly, rotation: Readonly) => T; readonly setPositionRotationRadians: (matrix: T, position: Readonly, rotation: Readonly) => T; readonly setPositionRotationQuat: typeof setPositionRotationQuat; readonly getAxes: typeof getAxes; readonly getForward: typeof getForward; readonly getBackward: typeof getBackward; readonly getLeft: typeof getLeft; readonly getRight: typeof getRight; readonly getUp: typeof getUp; readonly getDown: typeof getDown; readonly hasUniformScale: (matrix: Readonly) => boolean; readonly toWorld: { (matrix: Readonly, parentTransformMatrix: Readonly): T; (matrix: Readonly, parentTransformMatrix: Readonly, out: T): T; }; readonly toLocal: { (matrix: Readonly, parentTransformMatrix: Readonly): T; (matrix: Readonly, parentTransformMatrix: Readonly, out: T): T; }; readonly toQuat: { (matrix: Readonly): Quaternion2; (matrix: Readonly, out: T): T; }; readonly fromQuat: typeof fromQuat; };