Matrix3x3f
APJS Script API reference for the Matrix3x3f class.
| Type | Name | Interface Description |
|---|---|---|
| Variables | column0: Vector3f | • Function: The first column of the matrix. |
| Variables | column1: Vector3f | • Function: The second column of the matrix. |
| Variables | column2: Vector3f | • Function: The third column of the matrix. |
| Functions | constructor() | |
| Functions | constructor(m0?: number, m1?: number, m2?: number, m3?: number, m4?: number, m5?: number, m6?: number, m7?: number, m8?: number) | Parameters • • • • • • • • • |
| Functions | add(other: Matrix3x3f): this | • Function: Adds the specified matrix to this matrix and returns the result. Parameters • Returns This matrix after addition. |
| Functions | clone(): Matrix3x3f | • Function: Returns a clone of the current Matrix3x3f instance. Returns A new Matrix3x3f object with the same data as the original. |
| Functions | divide(other: Matrix3x3f): this | • Function: Divides each element of the current matrix by the corresponding element of another matrix. Parameters • Returns This matrix after performing the division. |
| Functions | equals(other: Matrix3x3f): boolean | • Function: Compares this matrix with another matrix for equality. This method performs a direct value comparison of the elements in both matrices. Parameters • Returns A boolean indicating whether the two matrices are equal. |
| Functions | get(row: number, column: number): number | • Function: Retrieves the value at the specified row and column in the 3x3 matrix. Parameters • • Returns The value at the specified row and column. |
| Functions | inverse(): this | • Function: Returns the inverse of the matrix. Returns The current instance with its values set to the inverse of the original matrix. |
| Functions | multiply(other: Matrix3x3f | number): this | • Function: Multiplies the current matrix by another matrix or a scalar. Parameters • Returns The modified instance of the current matrix after multiplication. |
| Functions | multiplyScalar(scalar: number): this | • Function: Multiplies each element of the matrix by a given scalar. Parameters • Returns This instance of Matrix3x3f after performing the scalar multiplication. |
| Functions | set(row: number, column: number, value: number): this | • Function: Sets the value at a specified row and column in the matrix. Parameters • • • Returns This instance of Matrix3x3f for method chaining. |
| Functions | subtract(other: Matrix3x3f): this | • Function: Returns the result of subtracting another 3x3 matrix from this matrix. Parameters • Returns This matrix after performing the subtraction. |
| Functions | toString(): string | • Function: Returns a string representation of the Matrix3x3f, with each element formatted to five decimal places. Returns The string representation of the matrix. |
| Functions | transpose(): this | • Function: Returns the transpose of this matrix. Returns The transposed matrix. |
Examples
constructor()
let obj = new APJS.Matrix3x3f();
constructor(m0?: number, m1?: number, m2?: number, m3?: number, m4?: number, m5?: number, m6?: number, m7?: number, m8?: number)
let obj = new APJS.Matrix3x3f();
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use Matrix3x3f here
}
onUpdate(deltaTime: number) {
}
}