mat4
Namespace of @v12-engine/client/lite-views
Members
compose beta
compose: (scale: XYZ, rotation: XYZW, translation: XYZ) => Mat4A size, a turn and a place as one matrix, a new one
composeAt beta
export declare function composeAt(scale: XYZ, rotation: XYZW, translation: XYZ, out: Float32Array | number[], offset: number): void;A size, a turn and a place into sixteen floats of an array at offset: a batch's copy written where it stands. The size first, then the turn, then the place
composeToRef beta
export declare function composeToRef(scale: XYZ, rotation: XYZW, translation: XYZ, out: Mat4): Mat4;A size, a turn and a place as one matrix
copyToArray beta
export declare function copyToArray(m: MatrixLike, array: Float32Array | number[], offset?: number): void;A matrix into an array, at offset: one of a batch's
copyToRef beta
export declare function copyToRef(m: MatrixLike, out: Mat4): Mat4;m's sixteen floats into out
decompose beta
export declare function decompose(m: MatrixLike, scale?: XYZ, rotation?: XYZW, translation?: XYZ): boolean;A matrix taken apart into its size, its turn and its place: each written where one is given. A matrix that mirrors has its y size under 0. False, and the turn none, where a size is 0
determinant beta
export declare function determinant(m: MatrixLike): number;m's determinant: 0 where a size is 0, under 0 where it mirrors
equalsWithEpsilon beta
export declare function equalsWithEpsilon(a: MatrixLike, b: MatrixLike, epsilon?: number): boolean;Whether two matrices are the same to within epsilon a float
fromArrayToRef beta
export declare function fromArrayToRef(array: MatrixLike, offset: number, out: Mat4): Mat4;Sixteen floats of an array, from offset, into a matrix
fromQuaternionToRef beta
export declare function fromQuaternionToRef(rotation: XYZW, out: Mat4): Mat4;A quaternion's turn as a matrix
getTranslationToRef beta
export declare function getTranslationToRef(m: MatrixLike, out: XYZ): XYZ;m's place (its 12..14) into out
identity beta
export declare function identity(): Mat4;A new matrix that changes nothing
identityToRef beta
export declare function identityToRef(out: Mat4): Mat4;The matrix that changes nothing, into out
invert beta
export declare function invert(m: MatrixLike): Mat4;The matrix that undoes m, in a new one: a copy of m where there is none
invertToRef beta
export declare function invertToRef(m: MatrixLike, out: Mat4): boolean;The matrix that undoes m. False, and out a copy of m, where there is none (a scale of 0): as Babylon's invertToRef leaves it. out may be m
lookAtLHToRef beta
export declare function lookAtLHToRef(eye: XYZ, target: XYZ, up: XYZ, out: Mat4): Mat4;A view from eye towards target: Babylon's LookAtLHToRef
lookToToRef beta
export declare function lookToToRef(eye: XYZ, forward: XYZ, up: XYZ, out: Mat4): Mat4;A view from eye along forward (of any length), up being up on the screen as nearly as it can: the world as the camera sees it, x to its right, y up, z into the view
Mat4 beta
export type Mat4 = Float32Array;A matrix: 16 floats, the translation at 12..14
multiply beta
multiply: (a: MatrixLike, b: MatrixLike) => Mat4a then b, in a new matrix
multiplyInto beta
export declare function multiplyInto(a: MatrixLike, aOffset: number, b: MatrixLike, bOffset: number, out: Float32Array | number[], offset: number): void;a then b, into an array at offset. out may be either's own array at its own offset
multiplyToRef beta
export declare function multiplyToRef(a: MatrixLike, b: MatrixLike, out: Mat4): Mat4;a then b. out may be either
orthoOffCenterLHToRef beta
export declare function orthoOffCenterLHToRef(left: number, right: number, bottom: number, top: number, near: number, far: number, out: Mat4): Mat4;A view without perspective, of a box: depth 0 at near and 1 at far
perspectiveFovLHToRef beta
export declare function perspectiveFovLHToRef(fov: number, aspect: number, near: number, far: number, out: Mat4): Mat4;A lens of fov radians from top to bottom, depth 0 at near and 1 at far: Babylon's with the depth WebGPU's
rotationToRef beta
export declare function rotationToRef<T extends XYZW>(m: MatrixLike, out: T): T;The turn a matrix of no size makes (its three rows of length 1), as a quaternion
rotationX beta
rotationX: (angle: number) => Mat4A turn of angle radians about x, in a new matrix
rotationXToRef beta
export declare function rotationXToRef(angle: number, out: Mat4): Mat4;A turn of angle radians about x, into out
rotationYawPitchRollToRef beta
export declare function rotationYawPitchRollToRef(yaw: number, pitch: number, roll: number, out: Mat4): Mat4;A turn about the vertical axis (yaw), then tilted (pitch, about x), after a roll about z: Babylon's order
rotationYToRef beta
export declare function rotationYToRef(angle: number, out: Mat4): Mat4;A turn of angle radians about y, the vertical, into out
rotationZToRef beta
export declare function rotationZToRef(angle: number, out: Mat4): Mat4;A turn of angle radians about z, into out
scalingToRef beta
export declare function scalingToRef(x: number, y: number, z: number, out: Mat4): Mat4;A size of x, y, z along each axis and nothing else, into out
setTranslation beta
export declare function setTranslation(m: Mat4, x: number, y: number, z: number): Mat4;m's place set to x, y, z, the rest as it was
transformNormalInto beta
export declare function transformNormalInto(m: MatrixLike, x: number, y: number, z: number, out: Float32Array | number[], offset?: number): void;A direction through a matrix into three floats of an array at offset: its turn and size, not its place
transformPointInto beta
export declare function transformPointInto(m: MatrixLike, x: number, y: number, z: number, out: Float32Array | number[], offset?: number): void;A point through a matrix into three floats of an array at offset, divided by its fourth (a point through a projection): Babylon's TransformCoordinates
translation beta
translation: (x: number, y: number, z: number) => Mat4A move to x, y, z and nothing else, in a new matrix
translationToRef beta
export declare function translationToRef(x: number, y: number, z: number, out: Mat4): Mat4;A move to x, y, z and nothing else, into out
transposeToRef beta
export declare function transposeToRef(m: MatrixLike, out: Mat4): Mat4;m with its rows as columns, into out. out may be m