Creates a new IdentityMatrix44 instance. The internal array reference points to the static identity matrix values.
Internal Float32Array storage for matrix elements
Static Readonly__Static 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
StaticcompositionGets 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
Creates a copy of this identity matrix. Returns a new IdentityMatrix44 instance.
A new IdentityMatrix44 instance
Calculates the determinant of this identity matrix. The determinant of an identity matrix is always 1.
Always returns 1
Returns the matrix elements as a flat array in column-major order.
An array of 16 numbers representing the identity matrix
Extracts the rotation part of this transformation matrix. For identity matrix, the rotation is also an identity matrix.
A new IdentityMatrix44 representing no rotation
Extracts the scale components from this transformation matrix. For identity matrix, the scale is (1, 1, 1).
A Vector3 with all components set to 1
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
Extracts the translation components from this transformation matrix. For identity matrix, the translation is (0, 0, 0).
A Vector3 with all components set to 0
Indicates whether this matrix is a dummy/placeholder matrix. Identity matrix is not considered a dummy matrix.
Always false for identity matrix
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
Returns a string representation of the identity matrix in a readable format. Each row is separated by newlines for visual clarity.
A formatted string showing the 4x4 identity matrix
Returns an approximate string representation of the matrix. For identity matrix, this is identical to toString() since all values are exact.
A formatted string showing the 4x4 identity matrix
Gets the matrix element at the specified linear index in column-major order. For identity matrix, returns 1 for diagonal positions and 0 elsewhere.
The linear index (0-15) in column-major order
1 for diagonal elements (indices 0, 5, 10, 15), 0 otherwise
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