Interface IFlowGraphMatrix<VectorType>
m: number[];
add(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;
addToRef(
other: IFlowGraphMatrix<VectorType>,
result: IFlowGraphMatrix<VectorType>,
): IFlowGraphMatrix<VectorType>;
asArray(): number[];
determinant(): number;
divide(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;
divideToRef(
other: IFlowGraphMatrix<VectorType>,
result: IFlowGraphMatrix<VectorType>,
): IFlowGraphMatrix<VectorType>;
equals(other: IFlowGraphMatrix<VectorType>, epsilon?: number): boolean;
fromArray(array: number[]): IFlowGraphMatrix<VectorType>;
getClassName(): string;
inverse(): IFlowGraphMatrix<VectorType>;
multiply(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;
multiplyToRef(
other: IFlowGraphMatrix<VectorType>,
result: IFlowGraphMatrix<VectorType>,
): IFlowGraphMatrix<VectorType>;
subtract(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;
subtractToRef(
other: IFlowGraphMatrix<VectorType>,
result: IFlowGraphMatrix<VectorType>,
): IFlowGraphMatrix<VectorType>;
toArray(emptyArray: number[]): number[];
transformVector(v: VectorType): VectorType;
transformVectorToRef(v: VectorType, result: VectorType): VectorType;
transpose(): IFlowGraphMatrix<VectorType>;
}
Type Parameters
- VectorType
Implemented by
Methods
add
-
Adds another matrix to this matrix.
Parameters
- other: IFlowGraphMatrix<VectorType>
The matrix to add.
Returns IFlowGraphMatrix<VectorType>
The result matrix.
- other: IFlowGraphMatrix<VectorType>
add To Ref
-
addToRef(
other: IFlowGraphMatrix<VectorType>,
result: IFlowGraphMatrix<VectorType>,
): IFlowGraphMatrix<VectorType>Adds another matrix to this matrix and stores the result in a reference matrix.
Parameters
- other: IFlowGraphMatrix<VectorType>
The matrix to add.
- result: IFlowGraphMatrix<VectorType>
The matrix to store the result.
Returns IFlowGraphMatrix<VectorType>
The result matrix.
- other: IFlowGraphMatrix<VectorType>
as Array
-
Returns the matrix elements as an array.
Returns number[]
The matrix elements as an array.
determinant
-
Computes the determinant of this matrix.
Returns number
The determinant of the matrix.
divide
-
Divides this matrix by another matrix.
Parameters
- other: IFlowGraphMatrix<VectorType>
The matrix to divide by.
Returns IFlowGraphMatrix<VectorType>
The result matrix.
- other: IFlowGraphMatrix<VectorType>
divide To Ref
-
divideToRef(
other: IFlowGraphMatrix<VectorType>,
result: IFlowGraphMatrix<VectorType>,
): IFlowGraphMatrix<VectorType>Divides this matrix by another matrix and stores the result in a reference matrix.
Parameters
- other: IFlowGraphMatrix<VectorType>
The matrix to divide by.
- result: IFlowGraphMatrix<VectorType>
The matrix to store the result.
Returns IFlowGraphMatrix<VectorType>
The result matrix.
- other: IFlowGraphMatrix<VectorType>
equals
-
Checks if this matrix is equal to another matrix within an optional epsilon.
Parameters
- other: IFlowGraphMatrix<VectorType>
The matrix to compare with.
Optionalepsilon: numberThe optional epsilon for comparison.
Returns boolean
True if the matrices are equal, false otherwise.
- other: IFlowGraphMatrix<VectorType>
from Array
-
Sets the matrix elements from an array.
Parameters
- array: number[]
The array containing the matrix elements.
Returns IFlowGraphMatrix<VectorType>
The updated matrix.
- array: number[]
get Class Name
-
Gets the class name of this matrix.
Returns string
The class name.
inverse
multiply
-
Multiplies this matrix with another matrix. To staz conform with the Matrix class, this does B * A
Parameters
- other: IFlowGraphMatrix<VectorType>
The matrix to multiply with.
Returns IFlowGraphMatrix<VectorType>
The result matrix.
- other: IFlowGraphMatrix<VectorType>
multiply To Ref
-
multiplyToRef(
other: IFlowGraphMatrix<VectorType>,
result: IFlowGraphMatrix<VectorType>,
): IFlowGraphMatrix<VectorType>Multiplies this matrix with another matrix and stores the result in a reference matrix.
Parameters
- other: IFlowGraphMatrix<VectorType>
The matrix to multiply with.
- result: IFlowGraphMatrix<VectorType>
The matrix to store the result.
Returns IFlowGraphMatrix<VectorType>
The result matrix.
- other: IFlowGraphMatrix<VectorType>
subtract
-
Subtracts another matrix from this matrix.
Parameters
- other: IFlowGraphMatrix<VectorType>
The matrix to subtract.
Returns IFlowGraphMatrix<VectorType>
The result matrix.
- other: IFlowGraphMatrix<VectorType>
subtract To Ref
-
subtractToRef(
other: IFlowGraphMatrix<VectorType>,
result: IFlowGraphMatrix<VectorType>,
): IFlowGraphMatrix<VectorType>Subtracts another matrix from this matrix and stores the result in a reference matrix.
Parameters
- other: IFlowGraphMatrix<VectorType>
The matrix to subtract.
- result: IFlowGraphMatrix<VectorType>
The matrix to store the result.
Returns IFlowGraphMatrix<VectorType>
The result matrix.
- other: IFlowGraphMatrix<VectorType>
to Array
-
Copies the matrix elements to an array.
Parameters
- emptyArray: number[]
The array to copy the elements to.
Returns number[]
The array with the matrix elements.
- emptyArray: number[]
transform Vector
-
Transforms a vector using this matrix.
Parameters
- v: VectorType
The vector to transform.
Returns VectorType
The transformed vector.
- v: VectorType
transform Vector To Ref
-
Transforms a vector using this matrix and stores the result in a reference vector.
Parameters
- v: VectorType
The vector to transform.
- result: VectorType
The vector to store the result.
Returns VectorType
The transformed vector.
- v: VectorType
Interface representing a generic flow graph matrix.
BREAKING (since the KHR_interactivity work): FlowGraphMatrix2D and FlowGraphMatrix3D now store their elements in column-major order, matching core Matrix and the glTF/KHR_interactivity convention. Previous releases stored them row-major. This changes the result of building a matrix from a flat array (
fromArray/set), oftransformVector/transformVectorToRef, and ofmultiply/multiplyToRef(which now computesthis * otherrather thanother * this). There is no compile error — graphs that relied on the old ordering or operand order get silently different numbers, so any code constructing these from raw arrays should be re-checked.