import { Component, IComponentOption } from "../../core/component"; import { Vec3, Mat4, Quat, Euler, Mat3 } from 'xtorcga'; import { MetaEntity } from "../entity/metaentity"; export declare class TransformComponent extends Component { _position: Vec3; _rotation: Euler; _scale: Vec3; _quat: Quat; _mat: Mat4; _matWorld: Mat4; _modelViewMat: Mat4; _normalMat: Mat3; _matWorldInverse: Mat4; up: Vec3; right: Vec3; front: Vec3; /** * 物体是否需要更新世界矩阵 */ matWorldNeedsUpdate: boolean; /** * 自动更新矩阵 */ matAutoUpdate: boolean; [key: string]: any; constructor(options: IComponentOption); /** * 更新自身矩阵 */ updateMat(): void; /** * 更新整体层次的世界矩阵 * @param force 是否强制更新 */ updateMatWorld(force?: boolean): void; /** * @description : 更新当前 世界矩阵 * @param {boolean} updateParents 是否更新父节点 * @param {boolean} updateChildren 是否更新子节点 * @return {*} * @example : */ updateWorldMat(updateParents: boolean, updateChildren: boolean): void; /** * 响应其他矩阵 * @param mat4 */ applyMat4(mat4: Mat4): void; applyQuaternion(q: Quat): this; setRotationFromAxisAngle(axis: Vec3, angle: number): void; setRotationFromEuler(euler: Euler): void; setRotationFromMat(m: Mat4): void; setRotationFromQuaternion(q: Quat): void; /** * 在本地坐标旋转 * @param axis 正交化的旋转轴 * @param angle 旋转角度 * @returns */ rotateOnAxis(axis: Vec3, angle: number): this; /** * 在世界坐标旋转 不旋转父节点 * @param axis 正交化的旋转轴 * @param angle 旋转角度 * @returns */ rotateOnWorldAxis(axis: Vec3, angle: number): this; rotateX(angle: any): this; rotateY(angle: any): this; rotateZ(angle: any): this; translateOnAxis(axis: Vec3, distance: number): this; translateX(distance: number): this; translateY(distance: number): this; translateZ(distance: number): this; localToWorld(vector: { applyMat4: (arg0: Mat4) => any; }): any; worldToLocal(vector: { applyMat4: (arg0: Mat4) => any; }): any; lookAt(x: number | Vec3, y?: number, z?: number): void; update(entity: MetaEntity): void; }