webcad-ue4-api/types/Common/Matrix4Utils.d.ts
2024-10-29 17:14:43 +08:00

55 lines
2.3 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Matrix4, Vector2, Vector3 } from 'three';
/**
* 设置矩阵的某列的向量
* @param {Matrix4} mtx 矩阵
* @param {number} col 列索引,0x 1y 2z 3org
* @param {Vector3} v 向量或点
*/
export declare function SetMtxVector(mtx: Matrix4, col: number, v: Vector3): void;
/**
* 返回矩阵,该坐标系将坐标系与原点的坐标系映射为坐标系,
* 并将坐标系与X轴坐标系
* Y轴坐标轴以及Z轴坐标系统之间的坐标系统坐标系统的原点坐标系和原点坐标系统坐标轴的坐标系分别设置为XAxisYAxis和ZAxis
* @returns {Matrix4} 返回新的矩阵
*/
export declare function matrixAlignCoordSys(matrixFrom: Matrix4, matrixTo: Matrix4): Matrix4;
/**
* 判断2个矩形共面
* @param {Matrix4} matrixFrom
* @param {Matrix4} matrixTo
* @returns {boolean} 2个矩阵共面
*/
export declare function matrixIsCoplane(matrixFrom: Matrix4, matrixTo: Matrix4, fuzz?: number): boolean;
export declare function matrixScale(scale: number, center?: Vector3): Matrix4;
export declare function MakeScaleMatrix(scaleX: number, scaleY: number, scaleZ: number, center?: Vector3): Matrix4;
/**
* 设置旋转矩阵,不改变矩阵的基点
*/
export declare function setRotationOnAxis(mtx: Matrix4, axis: Vector3, ro: number): Matrix4;
/**
* 修正镜像后矩阵
*/
export declare function reviseMirrorMatrix(mtx: Matrix4, index?: number): Matrix4;
export declare function Vector2ApplyMatrix4(mtx: Matrix4, vec: Vector2): void;
export declare function MakeMirrorMtx(planeNormal: Vector3, pos?: Vector3): Matrix4;
/**
* 对向量进行方向变换 (如果是pos 请使用pos.applyMatrix4)
* @param vec 向量
* @param m 矩阵
* @returns vec
*/
export declare function TransformVector<T extends {
x: number;
y: number;
z: number;
}>(vec: T, m: Matrix4): T;
export declare function MakeRotateMatrix4(cen: Vector3, axis: Vector3, angle: number, roMtx?: Matrix4): Matrix4;
/**
* 把变换矩阵展平成2d矩阵,避免出现三维坐标.
*/
export declare function MatrixPlanarizere(mtx: Matrix4, z0?: boolean): Matrix4;
export declare function NormalMatrix(mtx: Matrix4): Matrix4;
export declare function RoundMatrix(mtx: Matrix4, fuzz?: number): Matrix4;
export declare const tempMatrix1: Matrix4;
export declare const ZMirrorMatrix: Matrix4;
//# sourceMappingURL=Matrix4Utils.d.ts.map