/** * the matrix class */ import { Vector3 } from "./Vector3"; export declare class Matrix4 { data: Float32Array; /** * create an eye 4x4 matrix * @param data */ constructor(data?: Float32Array); setIdentity(x?: number, y?: number, z?: number): this; copy(other: Matrix4): this; /** * get a translation matrix * @param x * @param y * @param z * @returns {Matrix4} */ static translate(x: number, y: number, z?: number): Matrix4; translate(x: number, y: number, z?: number): this; get position(): Vector3; /** * get a rotation matrix around x-axis * @param alpha * @returns {Matrix4} */ static rotateX(alpha: number): Matrix4; setRotationX(alpha: number): this; rotateX(alpha: number): this; /** * get a rotation matrix around y-axis * @param alpha * @returns {Matrix4} */ static rotateY(alpha: number): Matrix4; setRotationY(alpha: number): this; rotateY(alpha: number): this; /** * get a rotation matrix around z-axis * @param alpha * @returns {Matrix4} */ static rotateZ(alpha: number): Matrix4; setRotationZ(alpha: number): this; rotateZ(alpha: number): this; /** * get a scale matrix * @param x * @param y * @param z * @returns {Matrix4} */ /** * concatenate with other transformation matrix * @param matrix * @returns {Matrix4} */ multiply(matrix: Matrix4): Matrix4; /** * * @param left * @param right * @param bottom * @param top * @param near * @param far * @returns {Matrix4} */ static ortho(left: number, right: number, bottom: number, top: number, near?: number, far?: number): Matrix4; setOrtho(left: number, right: number, bottom: number, top: number, near?: number, far?: number): this; /** * create a perspective matrix * @param fov * @param aspect * @param near * @param far * @returns {Matrix4} */ static perspective(fov: number, aspect: number, near: number, far: number): Matrix4; setPerspective(fov: number, aspect: number, near: number, far: number): void; /** * * @param left * @param right * @param bottom * @param top * @param near * @param far * @returns {Matrix4} */ static frustum(left: number, right: number, bottom: number, top: number, near?: number, far?: number): Matrix4; setFrustum(left: number, right: number, bottom: number, top: number, near?: number, far?: number): void; /** * transform a vector * @param vector * @param w include transformation */ transform(vector: Vector3, w?: number): Vector3; /** * get the matrix buffer * @returns {number[]} */ buffer(): Float32Array; /** * return look at matrix * @param eye * @param target * @param scale * @param up * @returns {Matrix4} */ inverse(): Matrix4; }