Creates a new 3x3 identity matrix instance. Uses a shared static array for memory efficiency.
Internal Float32Array storage for matrix elements
Static
Readonly
__vShared Float32Array containing the identity matrix values [1,0,0,0,1,0,0,0,1]
Gets the class name for debugging and reflection purposes
Indicates that this is an identity matrix class implementation
Gets the matrix element at row 0, column 0
Gets the matrix element at row 0, column 1
Gets the matrix element at row 0, column 2
Gets the matrix element at row 0, column 3 (not applicable for 3x3 matrix)
Gets the matrix element at row 1, column 0
Gets the matrix element at row 1, column 1
Gets the matrix element at row 1, column 2
Gets the matrix element at row 1, column 3 (not applicable for 3x3 matrix)
Gets the matrix element at row 2, column 0
Gets the matrix element at row 2, column 1
Gets the matrix element at row 1, column 2
Gets the matrix element at row 2, column 3 (not applicable for 3x3 matrix)
Gets the matrix element at row 3, column 0 (not applicable for 3x3 matrix)
Gets the matrix element at row 3, column 1 (not applicable for 3x3 matrix)
Gets the matrix element at row 3, column 2 (not applicable for 3x3 matrix)
Gets the matrix element at row 3, column 3 (not applicable for 3x3 matrix)
Static
compositionGets the composition type for this matrix class
Gets the scale components from this matrix and stores them in an output vector. For identity matrix, all scale components are 1.
The output vector to store the scale values
The output vector containing [1, 1, 1]
Checks if another matrix is approximately equal to this identity matrix within a tolerance.
The matrix to compare against
The tolerance for floating-point comparison (default: Number.EPSILON)
True if the matrix is approximately an identity matrix
Checks if another matrix is strictly equal to this identity matrix (exact comparison). Note: This method appears to have a bug - it checks 16 elements instead of 9 for a 3x3 matrix.
The matrix to compare against
True if the matrix is exactly an identity matrix
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, this copies the input vector to the output vector.
The input vector to multiply
The output vector to store the result
The output vector containing the result
Gets the matrix element at the specified flat index.
This provides direct access to the underlying Float32Array storage using a single index rather than row/column coordinates.
The zero-based flat index into the matrix storage
The matrix element value at the specified index
A 3x3 identity matrix implementation that represents the multiplicative identity for 3x3 matrices. This matrix has 1s on the main diagonal and 0s elsewhere:
This class is optimized for identity matrix operations and provides constant-time access to matrix elements without storing the actual matrix data.