import type { Euler } from "./euler.js"; import type { Quaternion } from "./quaternion.js"; import { Vector3 } from "./vector3.js"; /** * A matrix with 3 x 3 components. */ export declare class Matrix3 { /** * The components of the matrix. */ m: number[][]; /** * Get position `0,0` of this matrix. * @returns The position `0,0` of this matrix. */ get m00(): number; /** * Set position `0,0` of this matrix. */ set m00(value: number); /** * Get position `1,0` of this matrix. * @returns The position `1,0` of this matrix. */ get m10(): number; /** * Set position `1,0` of this matrix. */ set m10(value: number); /** * Get position `2,0` of this matrix. * @returns The position `2,0` of this matrix. */ get m20(): number; /** * Set position `2,0` of this matrix. */ set m20(value: number); /** * Get position `0,1` of this matrix. * @returns The position `0,1` of this matrix. */ get m01(): number; /** * Set position `0,1` of this matrix. */ set m01(value: number); /** * Get position `1,1` of this matrix. * @returns The position `1,1` of this matrix. */ get m11(): number; /** * Set position `1,1` of this matrix. */ set m11(value: number); /** * Get position `2,1` of this matrix. * @returns The position `2,1` of this matrix. */ get m21(): number; /** * Set position `2,1` of this matrix. */ set m21(value: number); /** * Get position `0,2` of this matrix. * @returns The position `0,2` of this matrix. */ get m02(): number; /** * Set position `0,2` of this matrix. */ set m02(value: number); /** * Get position `1,2` of this matrix. * @returns The position `1,2` of this matrix. */ get m12(): number; /** * Set position `1,2` of this matrix. */ set m12(value: number); /** * Get position `2,2` of this matrix. * @returns The position `2,2` of this matrix. */ get m22(): number; /** * Set position `2,2` of this matrix. */ set m22(value: number); /** * Constructs a new {@linkcode Matrix3}. * @param m00 - Position `0,0` of this matrix. * @param m10 - Position `1,0` of this matrix. * @param m20 - Position `2,0` of this matrix. * @param m01 - Position `0,1` of this matrix. * @param m11 - Position `1,1` of this matrix. * @param m21 - Position `2,1` of this matrix. * @param m02 - Position `0,2` of this matrix. * @param m12 - Position `1,2` of this matrix. * @param m22 - Position `2,2` of this matrix. */ constructor(m00?: number, m10?: number, m20?: number, m01?: number, m11?: number, m21?: number, m02?: number, m12?: number, m22?: number); /** * Creates a new {@linkcode Matrix3} from another {@linkcode Matrix3}. * @param matrix - The matrix to copy. * @returns A new matrix. */ static fromMatrix3(matrix: Readonly): Matrix3; /** * Creates a new {@linkcode Matrix3} from a rotation in Euler angles. * @param degrees - The rotation in Euler angles. * @returns A new matrix. */ static fromEuler(degrees: Readonly): Matrix3; /** * Creates a new {@linkcode Matrix3} from a rotation around an axis. * @param axis - The axis around which to rotate. * @param degrees - The rotation in degrees. * @returns A new matrix. */ static fromVector3(axis: Readonly, degrees: number): Matrix3; /** * Creates a new {@linkcode Matrix3} from a quaternion. * @param quaternion - The quaternion describes the rotation. * @returns A new matrix. */ static fromQuaternion(quaternion: Readonly): Matrix3; /** * Sets the matrix to new values from another matrix. * @param matrix - The matrix to copy. * @returns This instance. */ set(matrix: Readonly): this; /** * Update the matrix by individual components. * @param m00 - Position `0,0` of this matrix. * @param m10 - Position `1,0` of this matrix. * @param m20 - Position `2,0` of this matrix. * @param m01 - Position `0,1` of this matrix. * @param m11 - Position `1,1` of this matrix. * @param m21 - Position `2,1` of this matrix. * @param m02 - Position `0,2` of this matrix. * @param m12 - Position `1,2` of this matrix. * @param m22 - Position `2,2` of this matrix. * @returns This instance. */ setM(m00: number, m10: number, m20: number, m01: number, m11: number, m21: number, m02: number, m12: number, m22: number): this; /** * Sets the matrix to a rotation in Euler angles. * @param degrees - The rotation in Euler angles. * @returns This instance. */ setEuler(degrees: Readonly): this; /** * Sets the matrix to a rotation around an axis. * @param axis - The axis around which to rotate. * @param degrees - The rotation in degrees. * @returns This instance. */ setVector3(axis: Readonly, degrees: number): this; /** * Sets the matrix to a rotation described by a quaternion. * @param quaternion - The quaternion describing the rotation. * @returns This instance. */ setQuaternion(quaternion: Readonly): this; /** * Normalizes the matrix. * @returns This instance. */ normalize(): this; /** * Inverts the matrix. * @returns This instance. */ invert(): this; /** * Multiply with another matrix from the right. * @param matrix - The matrix to multiply with. * @returns This instance. */ multiplyR(matrix: Readonly): this; /** * Inversely multiply with another matrix from the right. * @param matrix - The matrix to multiply with. * @returns This instance. */ multiplyInverseR(matrix: Readonly): this; /** * Multiply with another matrix from the left. * @param matrix - The matrix to multiply with. * @returns This instance. */ multiplyL(matrix: Readonly): this; /** * Inversely multiply with another matrix from the right. * @param matrix - The matrix to multiply with. * @returns This instance. */ multiplyInverseL(matrix: Readonly): this; /** * Sets this matrix up as a transformation matrix to look in a given direction. * @param direction - The direction to look in. * @param upVector - The vector indicating the up direction. If not provided * a best effort is made to find a good one. * @returns This instance. */ lookAt(direction: Readonly, upVector?: Readonly): this; /** * Return the components of this matrix as an array. * @returns The components of this matrix as an array. */ asArray(): [ number, number, number, number, number, number, number, number, number ]; }