import { Matrix, Quaternion, Vector3 } from "@galacean/engine"; import { LiteCollider } from "./LiteCollider"; import { LiteUpdateFlag } from "./LiteUpdateFlag"; import { LiteColliderShape } from "./shape/LiteColliderShape"; /** * Used to implement transformation related functions. */ export declare class LiteTransform { private static _tempQuat0; private static _tempMat42; private _position; private _rotation; private _rotationQuaternion; private _scale; private _worldRotationQuaternion; private _localMatrix; private _worldMatrix; private _updateFlagManager; private _isParentDirty; private _parentTransformCache; private _dirtyFlag; private _owner; set owner(value: LiteColliderShape | LiteCollider); /** * Local position. * @remarks Need to re-assign after modification to ensure that the modification takes effect. */ get position(): Vector3; set position(value: Vector3); /** * Local rotation, defining the rotation by using a unit quaternion. * @remarks Need to re-assign after modification to ensure that the modification takes effect. */ get rotationQuaternion(): Quaternion; set rotationQuaternion(value: Quaternion); /** * World rotation, defining the rotation by using a unit quaternion. * @remarks Need to re-assign after modification to ensure that the modification takes effect. */ get worldRotationQuaternion(): Quaternion; set worldRotationQuaternion(value: Quaternion); /** * Local scaling. * @remarks Need to re-assign after modification to ensure that the modification takes effect. */ get scale(): Vector3; set scale(value: Vector3); /** * Local matrix. * @remarks Need to re-assign after modification to ensure that the modification takes effect. */ get localMatrix(): Matrix; set localMatrix(value: Matrix); /** * World matrix. * @remarks Need to re-assign after modification to ensure that the modification takes effect. */ get worldMatrix(): Matrix; set worldMatrix(value: Matrix); /** * Set local position by X, Y, Z value. * @param x - X coordinate * @param y - Y coordinate * @param z - Z coordinate */ setPosition(x: number, y: number, z: number): void; /** * Set local rotation by the X, Y, Z, and W components of the quaternion. * @param x - X component of quaternion * @param y - Y component of quaternion * @param z - Z component of quaternion * @param w - W component of quaternion */ setRotationQuaternion(x: number, y: number, z: number, w: number): void; /** * Set local scaling by scaling values along X, Y, Z axis. * @param x - Scaling along X axis * @param y - Scaling along Y axis * @param z - Scaling along Z axis */ setScale(x: number, y: number, z: number): void; /** * Register world transform change flag. * @returns Change flag */ registerWorldChangeFlag(): LiteUpdateFlag; /** * Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities. * Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities. * In summary, any update of related variables will cause the dirty mark of one of the full process (worldMatrix or worldRotationQuaternion) to be false. */ private _updateWorldPositionFlag; /** * Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities. * Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities. * Get worldRotationQuaternion: Will trigger the world rotation (in quaternion) update of itself and all parent entities. * Get worldRotation: Will trigger the world rotation(in euler and quaternion) update of itself and world rotation(in quaternion) update of all parent entities. * In summary, any update of related variables will cause the dirty mark of one of the full process (worldMatrix or worldRotationQuaternion) to be false. */ private _updateWorldRotationFlag; /** * Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities. * Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities. * Get worldScale: Will trigger the scaling update of itself and all parent entities. * In summary, any update of related variables will cause the dirty mark of one of the full process (worldMatrix) to be false. */ private _updateWorldScaleFlag; /** * Update all world transform property dirty flag, the principle is the same as above. */ private _updateAllWorldFlag; private _getParentTransform; private _isContainDirtyFlags; private _isContainDirtyFlag; private _setDirtyFlagTrue; private _setDirtyFlagFalse; private _worldAssociatedChange; }