rhodonite
    Preparing search index...

    Interface IMutableMatrix

    Interface for mutable matrix operations. Extends IMatrix with methods that modify the matrix in place.

    interface IMutableMatrix {
        _v: TypedArray;
        className: string;
        isIdentityMatrixClass: boolean;
        _swap(l: number, r: number): void;
        at(row_i: number, column_i: number): number;
        clone(): IMutableMatrix;
        copyComponents(mat: IMatrix): IMutableMatrix;
        determinant(): number;
        flattenAsArray(): number[];
        identity(): IMutableMatrix;
        invert(): IMutableMatrix;
        isDummy(): boolean;
        isTheSourceSame(arrayBuffer: ArrayBuffer): boolean;
        multiply(mat: IMatrix): IMutableMatrix;
        multiplyByLeft(mat: IMatrix): IMutableMatrix;
        multiplyScale(vec: IVector): IMutableMatrix;
        raw(): TypedArray;
        rotate(any: any): IMutableMatrix;
        scale(vec: IVector): IMutableMatrix;
        setAt(row_i: number, column_i: number, value: number): void;
        setComponents(...num: number[]): IMutableMatrix;
        toString(): string;
        toStringApproximately(): string;
        transpose(): IMutableMatrix;
        v(i: number): number;
        zero(): IMutableMatrix;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Internal typed array storing matrix data in column-major order (Float32Array or Float64Array)

    className: string

    Returns the class name of the matrix implementation

    isIdentityMatrixClass: boolean

    Indicates if this matrix is an identity matrix class

    • Swaps two elements in the internal array.

      Parameters

      • l: number

        Left index

      • r: number

        Right index

      Returns void

    • Gets the value at the specified row and column.

      Parameters

      • row_i: number

        Row index (0-based)

      • column_i: number

        Column index (0-based)

      Returns number

      Value at the specified position

    • Creates a deep copy of this matrix.

      Returns IMutableMatrix

      New mutable matrix with the same values

    • Copies components from another matrix.

      Parameters

      • mat: IMatrix

        Source matrix to copy from

      Returns IMutableMatrix

      This matrix for method chaining

    • Calculates the determinant of the matrix.

      Returns number

      Determinant value

    • Flattens the matrix into a plain JavaScript array.

      Returns number[]

      Array containing all matrix elements

    • Sets this matrix to the identity matrix.

      Returns IMutableMatrix

      This matrix for method chaining

    • Inverts this matrix in place.

      Returns IMutableMatrix

      This matrix for method chaining

    • Checks if this is a dummy/placeholder matrix.

      Returns boolean

      True if this is a dummy matrix

    • Checks if the internal array buffer is the same as the provided one.

      Parameters

      • arrayBuffer: ArrayBuffer

        Array buffer to compare against

      Returns boolean

      True if the source is the same

    • Multiplies this matrix by another matrix.

      Parameters

      • mat: IMatrix

        Matrix to multiply by

      Returns IMutableMatrix

      This matrix for method chaining

    • Multiplies this matrix by another matrix from the left.

      Parameters

      • mat: IMatrix

        Matrix to multiply from the left

      Returns IMutableMatrix

      This matrix for method chaining

    • Multiplies this matrix by a scale vector.

      Parameters

      Returns IMutableMatrix

      This matrix for method chaining

    • Gets the raw typed array containing matrix data.

      Returns TypedArray

      Raw typed array

    • Applies a rotation to this matrix.

      Parameters

      • any: any

        Rotation parameters (type varies by matrix dimension)

      Returns IMutableMatrix

      This matrix for method chaining

    • Sets the value at the specified row and column.

      Parameters

      • row_i: number

        Row index (0-based)

      • column_i: number

        Column index (0-based)

      • value: number

        Value to set

      Returns void

    • Sets all matrix components from individual values.

      Parameters

      • ...num: number[]

        Variable number of numeric values

      Returns IMutableMatrix

      This matrix for method chaining

    • Converts the matrix to a string representation.

      Returns string

      String representation of the matrix

    • Converts the matrix to an approximate string representation.

      Returns string

      Approximate string representation with rounded values

    • Transposes this matrix in place.

      Returns IMutableMatrix

      This matrix for method chaining

    • Gets the value at the specified linear index.

      Parameters

      • i: number

        Linear index in the internal array

      Returns number

      Value at the specified index

    • Sets all matrix elements to zero.

      Returns IMutableMatrix

      This matrix for method chaining