Creates a new IdentityMatrix44 instance. The internal array reference points to the static identity matrix values.
Internal Float32Array storage for matrix elements
Static
Readonly
__vStatic array representing the identity matrix values in column-major order. This is shared across all instances for memory efficiency.
Gets the class name for debugging and reflection purposes.
The string 'IdentityMatrix44'
Indicates whether this matrix is an identity matrix class.
Always true for IdentityMatrix44
Gets the matrix element at row 0, column 0.
Always 1 for identity matrix
Gets the matrix element at row 0, column 1.
Always 0 for identity matrix
Gets the matrix element at row 0, column 2.
Always 0 for identity matrix
Gets the matrix element at row 0, column 3.
Always 0 for identity matrix
Gets the matrix element at row 1, column 0.
Always 0 for identity matrix
Gets the matrix element at row 1, column 1.
Always 1 for identity matrix
Gets the matrix element at row 1, column 2.
Always 0 for identity matrix
Gets the matrix element at row 1, column 3.
Always 0 for identity matrix
Gets the matrix element at row 2, column 0.
Always 0 for identity matrix
Gets the matrix element at row 2, column 1.
Always 0 for identity matrix
Gets the matrix element at row 2, column 2.
Always 1 for identity matrix
Gets the matrix element at row 2, column 3.
Always 0 for identity matrix
Gets the matrix element at row 3, column 0.
Always 0 for identity matrix
Gets the matrix element at row 3, column 1.
Always 0 for identity matrix
Gets the matrix element at row 3, column 2.
Always 0 for identity matrix
Gets the matrix element at row 3, column 3.
Always 1 for identity matrix
Gets the X translation component from the matrix.
Always 0 for identity matrix
Gets the Y translation component from the matrix.
Always 0 for identity matrix
Gets the Z translation component from the matrix.
Always 0 for identity matrix
Static
compositionGets the composition type for this matrix class.
CompositionType.Mat4 indicating this is a 4x4 matrix
Gets the matrix element at the specified row and column indices. For identity matrix, returns 1 for diagonal elements and 0 for off-diagonal elements.
The row index (0-based)
The column index (0-based)
1 if row equals column (diagonal), 0 otherwise
Extracts the scale components and stores them in an output vector. For identity matrix, sets all scale components to 1.
The mutable vector to store the scale values
The output vector with scale components set to 1
Checks if the given matrix is approximately equal to this identity matrix within a tolerance. Compares each element of the input matrix against the corresponding identity matrix element.
The matrix to compare against this identity matrix
The tolerance for floating-point comparison (default: Number.EPSILON)
True if the matrix is approximately an identity matrix, false otherwise
Performs a strict equality check against another matrix. Uses exact floating-point comparison without tolerance.
The matrix to compare for strict equality
True if the matrix is exactly an identity matrix, false otherwise
Checks if the matrix's internal storage shares the same ArrayBuffer as the provided one.
This method is useful for determining if two matrices share the same underlying memory, which can be important for performance optimizations and avoiding unnecessary data copying.
The ArrayBuffer to compare against
True if the internal storage uses the same ArrayBuffer, false otherwise
Multiplies this identity matrix with a vector and stores the result in an output vector. Since this is an identity matrix, copies the input vector to the output vector.
The input vector to multiply
The mutable vector to store the result
The output vector containing the copied values
Represents a 4x4 identity matrix that provides optimized operations for identity transformations. This class implements the identity matrix pattern where all diagonal elements are 1 and all other elements are 0. It extends AbstractMatrix and implements both IMatrix and IMatrix44 interfaces.
The identity matrix is immutable and provides efficient implementations since the result of many operations can be computed without actual matrix multiplication.
Example