1/* 2 * Copyright (c) 2022-2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import { float32 } from "#koalaui/compat"; 17import { Matrix33 } from "./Matrix33"; 18import { Point3 } from "./Point3"; 19export interface RotateOptions { 20 angle?: float32; 21 x?: float32; 22 y?: float32; 23 z?: float32; 24 pivotX?: float32; 25 pivotY?: float32; 26 pivotZ?: float32; 27} 28export interface ScaleOptions { 29 x?: float32; 30 y?: float32; 31 z?: float32; 32 pivotX?: float32; 33 pivotY?: float32; 34 pivotZ?: float32; 35} 36export interface TranslateOptions { 37 x?: float32; 38 y?: float32; 39 z?: float32; 40} 41export declare function mat44(array?: Float32Array): Matrix44; 42/** 43 * 4x4 matrix with right-handed coordinate system: 44 * +x goes to the right 45 * +y goes down 46 * +z goes into the screen (away from the viewer) 47 */ 48export declare class Matrix44 { 49 readonly array: Float32Array; 50 constructor(array?: Float32Array); 51 static identity(): Matrix44; 52 static zero(): Matrix44; 53 static lookAt(eye: Point3, center: Point3, up: Point3): Matrix44; 54 static perspective(depth: float32): Matrix44; 55 static perspectiveFov(fov: float32, near: float32, far: float32): Matrix44; 56 /** 57 * Returns new matrix, made from Matrix33. 58 * 59 * @param matrix - 3x3 matrix 60 * @returns the new instance of Matrix44 61 * 62 */ 63 static makeFromMatrix33(matrix: Matrix33): Matrix44; 64 /** 65 * Returns new 3x3 matrix, made from this matrix by dropping the third row and the third column. 66 * 67 * @returns the new instance of Matrix33 68 * 69 */ 70 asMatrix33(): Matrix33; 71 copy(): Matrix44; 72 concat(matrix: Matrix44): Matrix44; 73 scale(options: ScaleOptions): Matrix44; 74 rotate(options: RotateOptions): Matrix44; 75 translate(options: TranslateOptions): Matrix44; 76 invert(): Matrix44; 77 transpose(): Matrix44; 78 skew(x?: float32, y?: float32): Matrix44; 79} 80//# sourceMappingURL=Matrix44.d.ts.map