rhodonite
    Preparing search index...

    Class IdentityMatrix33

    A 3x3 identity matrix implementation that represents the multiplicative identity for 3x3 matrices. This matrix has 1s on the main diagonal and 0s elsewhere:

    [1 0 0]
    [0 1 0]
    [0 0 1]

    This class is optimized for identity matrix operations and provides constant-time access to matrix elements without storing the actual matrix data.

    Hierarchy (View Summary)

    Implements

    Index
    _v: TypedArray = ...

    Internal typed array storage for matrix elements (Float32Array or Float64Array)

    __v: Float32Array<ArrayBuffer> = ...

    Shared Float32Array containing the identity matrix values [1,0,0,0,1,0,0,0,1]

    • get className(): string

      Gets the class name for debugging and reflection purposes

      Returns string

    • get glslStrAsFloat(): string

      Gets the GLSL string representation of the identity matrix as float values.

      Returns string

      GLSL mat3 constructor string for identity matrix

    • get glslStrAsInt(): string

      Gets the GLSL string representation of the identity matrix as integer values.

      Returns string

      GLSL mat3 constructor string for identity matrix

    • get glslStrAsUint(): string

      Gets the GLSL string representation of the identity matrix as unsigned integer values.

      Returns string

      GLSL mat3 constructor string for identity matrix

    • get isIdentityMatrixClass(): boolean

      Indicates that this is an identity matrix class implementation

      Returns boolean

    • get m00(): number

      Gets the matrix element at row 0, column 0

      Returns number

    • get m01(): number

      Gets the matrix element at row 0, column 1

      Returns number

    • get m02(): number

      Gets the matrix element at row 0, column 2

      Returns number

    • get m03(): number

      Gets the matrix element at row 0, column 3 (not applicable for 3x3 matrix)

      Returns number

    • get m10(): number

      Gets the matrix element at row 1, column 0

      Returns number

    • get m11(): number

      Gets the matrix element at row 1, column 1

      Returns number

    • get m12(): number

      Gets the matrix element at row 1, column 2

      Returns number

    • get m13(): number

      Gets the matrix element at row 1, column 3 (not applicable for 3x3 matrix)

      Returns number

    • get m20(): number

      Gets the matrix element at row 2, column 0

      Returns number

    • get m21(): number

      Gets the matrix element at row 2, column 1

      Returns number

    • get m22(): number

      Gets the matrix element at row 1, column 2

      Returns number

    • get m23(): number

      Gets the matrix element at row 2, column 3 (not applicable for 3x3 matrix)

      Returns number

    • get m30(): number

      Gets the matrix element at row 3, column 0 (not applicable for 3x3 matrix)

      Returns number

    • get m31(): number

      Gets the matrix element at row 3, column 1 (not applicable for 3x3 matrix)

      Returns number

    • get m32(): number

      Gets the matrix element at row 3, column 2 (not applicable for 3x3 matrix)

      Returns number

    • get m33(): number

      Gets the matrix element at row 3, column 3 (not applicable for 3x3 matrix)

      Returns number

    • get wgslStrAsFloat(): string

      Gets the WGSL string representation of the identity matrix as float values.

      Returns string

      WGSL mat3x3f constructor string for identity matrix

    • get wgslStrAsInt(): string

      Gets the WGSL string representation of the identity matrix as integer values.

      Returns string

      WGSL mat3x3i constructor string for identity matrix

    • get wgslStrAsUint(): string

      Gets the WGSL string representation of the identity matrix as unsigned integer values.

      Returns string

      WGSL mat3x3u constructor string for identity matrix

    • Gets the matrix element at the specified row and column. For identity matrix: returns 1 if row equals column, 0 otherwise.

      Parameters

      • row_i: number

        The row index (0-2)

      • column_i: number

        The column index (0-2)

      Returns number

      The matrix element value

    • Calculates the determinant of the identity matrix. The determinant of any identity matrix is always 1.

      Returns number

      Always returns 1

    • Returns the matrix elements as a flattened array in row-major order.

      Returns number[]

      An array containing [1,0,0,0,1,0,0,0,1]

    • Extracts the rotation part of this matrix. For identity matrix, the rotation is also identity (no rotation).

      Returns IdentityMatrix33

      A new IdentityMatrix33 instance representing no rotation

    • Gets the scale components from this matrix. For identity matrix, all scale components are 1.

      Returns Vector3

      A Vector3 with components [1, 1, 1]

    • Gets the scale components from this matrix and stores them in an output vector. For identity matrix, all scale components are 1.

      Parameters

      Returns MutableVector3

      The output vector containing [1, 1, 1]

    • Indicates whether this matrix is a dummy/placeholder matrix. Identity matrices are never considered dummy matrices.

      Returns boolean

      Always false for identity matrices

    • Checks if another matrix is approximately equal to this identity matrix within a tolerance.

      Parameters

      • mat: IMatrix33

        The matrix to compare against

      • delta: number = Number.EPSILON

        The tolerance for floating-point comparison (default: Number.EPSILON)

      Returns boolean

      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.

      Parameters

      • mat: IMatrix33

        The matrix to compare against

      Returns boolean

      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.

      Parameters

      • arrayBuffer: ArrayBuffer

        The ArrayBuffer to compare against

      Returns boolean

      True if the internal storage uses the same ArrayBuffer, false otherwise

    • Multiplies this identity matrix with a vector. Since this is an identity matrix, the result is the original vector unchanged.

      Parameters

      • vec: IVector

        The vector to multiply

      Returns IVector

      The same vector (identity operation)

    • 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.

      Parameters

      Returns MutableVector3

      The output vector containing the result

    • Returns a string representation of the identity matrix in a readable format.

      Returns string

      A formatted string showing the 3x3 identity matrix

    • Returns an approximate string representation of the matrix. For identity matrix, this is identical to toString() since all values are exact.

      Returns string

      A formatted string showing the 3x3 identity matrix

    • 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.

      Parameters

      • i: number

        The zero-based flat index into the matrix storage

      Returns number

      The matrix element value at the specified index