import { Type } from '@lastolivegames/becsy'; import { mat3 } from 'gl-matrix'; import { Vec3 } from './Vec3'; import { Vec2 } from './Vec2'; import { Transform } from '../transform/Transform'; /** * A 3x3 column major matrix. * @see https://glmatrix.net/docs/module-mat3.html * * This 3x3 matrix type features convenience methods for creating and using linear and * affine transformations. * If you are primarily dealing with 2D affine transformations * the [`Affine2`](crate::Affine2) type is much faster and more space efficient than using a 3x3 matrix. */ export declare class Mat3 { get x_axis(): Vec3; get y_axis(): Vec3; get z_axis(): Vec3; /** * A 3x3 matrix with all elements set to `0.0`. */ static ZERO: Mat3; /** * A 3x3 identity matrix, where all diagonal elements are `1`, and all off-diagonal elements are `0`. */ static IDENTITY: Mat3; static fromTransform(transform: Transform): Mat3; static fromGLMat3(m: mat3): Mat3; static toGLMat3(m: Mat3): mat3; static copy(m: Mat3): Mat3; /** * Creates a 3x3 matrix from three column vectors. */ static from_cols(x_axis: Vec3, y_axis: Vec3, z_axis: Vec3): Mat3; /** * Creates an affine transformation matrix from the given 2D `scale`, rotation `angle` (in radians) and `translation`. */ static from_scale_angle_translation(scale: Vec2, angle: number, translation: Vec2): Mat3; /** * Creates a 3x3 matrix from a 4x4 matrix, discarding the 4th row and column. */ m00: number; m01: number; m02: number; m10: number; m11: number; m12: number; m20: number; m21: number; m22: number; constructor(m00?: number, m01?: number, m02?: number, m10?: number, m11?: number, m12?: number, m20?: number, m21?: number, m22?: number); mul_vec3(rhs: Vec3): Vec3; /** * Multiplies two 3x3 matrices. */ mul_mat3(rhs: Mat3): Mat3; } export declare const m3Type: Type;