import { Box3, BufferGeometry, Geometry, Line, Matrix4, Mesh, Object3D, Vector, Vector2, Vector3 } from 'three';
import { Vec3 } from './IVec3';
export declare const IdentityMtx4: Matrix4;
export declare const ZeroVec: Vector3;
export declare const XAxis: Vector3;
export declare const XAxisN: Vector3;
export declare const YAxis: Vector3;
export declare const YAxisN: Vector3;
export declare const ZAxis: Vector3;
export declare const ZAxisN: Vector3;
export declare function AsVector2(p: {
    x: number;
    y: number;
}): Vector2;
export declare function AsVector3(p: {
    x: number;
    y: number;
    z?: number;
}): Vector3;
/**
 * 判断一维线段a和b是否存在交集
 */
export declare function isIntersect(amin: number, amax: number, bmin: number, bmax: number, eps?: number): boolean;
export declare function isIntersect2(a1: number, a2: number, b1: number, b2: number, eps?: number): boolean;
/**
 * 旋转一个点,旋转中心在原点
 * @param {Vector3} p 点
 * @param {number} a 角度.
 * @returns {Vector3} 返回pt不拷贝.
 */
export declare function rotatePoint(p: Vector3, a: number): Vector3;
export declare function equaln(v1: number, v2: number, fuzz?: number): boolean;
export declare function equalnn(dis?: number): (v1: number, v2: number) => boolean;
interface P2 {
    x: number;
    y: number;
}
export declare function equalv3(v1: Vec3, v2: Vec3, fuzz?: number): boolean;
export declare function equalv2(v1: P2, v2: P2, fuzz?: number): boolean;
/**
 * 按照极坐标的方式移动一个点
 *
 * @export
 * @template
 * @param {T} v 向量(2d,3d)
 * @param {number} an 角度
 * @param {number} dis 距离
 * @returns {T}
 */
export declare function polar<T extends Vector2 | Vector3>(v: T, an: number, dis: number): T;
export declare function angle(v: Vector3 | Vector2): number;
/**
 * 求两个向量的夹角,顺时针为负,逆时针为正
 *
 * @param {Vector3} v1
 * @param {Vector3} v2
 * @param {Vector3} [ref] 参考向量,如果为世界坐标系则为0,0,1
 * @returns
 */
export declare function angleTo(v1: Vector3, v2: Vector3, ref?: Vector3): number;
export declare function getLoocAtUpVec(dir: Vector3): Vector3;
export declare function createLookAtMat4(dir: Vector3): Matrix4;
/**
 * 判断2个向量是不是平行,尽量传入单位向量,才能保证计算精度
 */
export declare function isParallelTo(v1: Vector3, v2: Vector3, fuzz?: number): boolean;
/**
 * 垂直向量
 */
export declare function isPerpendicularityTo(v1: Vector3, v2: Vector3, fuzz?: number): boolean;
export declare function ptToString(v: Vector3, fractionDigits?: number): string;
export declare function midPoint(v1: Vector3, v2: Vector3): Vector3;
export declare function midPoint2(v1: Vector2, v2: Vector2): Vector2;
/**
 * 获得Three对象的包围盒.
 * @param obj
 * @param [updateMatrix] 是否应该更新对象矩阵
 * @returns box
 */
export declare function GetBox(obj: Object3D, updateMatrix?: boolean): Box3;
export declare function GetBoxArr(arr: Array<Object3D>): Box3;
export declare function MoveMatrix(v: Vector3): Matrix4;
export declare function getPtPostion(sp: Vector3, ep: Vector3, c: Vector3, inPt: Vector3): {
    sp: Vector3;
    ep: Vector3;
};
export declare function angleAndX(v: Vector3 | Vector2): number;
/**
 * 将角度调整为0-2pi之间
 */
export declare function clampRad(an: number): number;
export declare function updateGeometry(l: Line | Mesh, geometry: Geometry | BufferGeometry): void;
export declare function UpdateBoundingSphere(obj: Object3D): void;
export declare type compareVectorFn = (v1: Vector, v2: Vector) => number;
/**
 * 构建返回一个用来排序的函数.根据key创建排序规则.
 *
 * 当key = "xyz" 时,点集按 x从小到大,y从小到大 z从小到大
 *   key = "X"   时,点集按 x从大到小
 * 以此类推.
 *
 * 例子:
 * let pts:Vector3[] =...;
 * pts.sort(comparePoint("x")); //x从小到大排序
 * pts.sort(comparePoint("zX")); //z从小到大 x从大到小
 *
 * @export
 * @param {string} sortKey
 * @returns {compareVectorFn}
 */
export declare function comparePoint(sortKey: string): compareVectorFn;
/**
 *计算各轴旋转角度
 */
export declare function GetEulerAngle(x: Vector3, y: Vector3, z: Vector3): {
    roX: number;
    roY: number;
    roZ: number;
};
/**
 * 方形框捕捉
 * @param sqCenter 正方形点
 * @param snapPt 被捕捉的点
 * @param size 捕捉框大小
 */
export declare function SnapPoint(sqCenter: Vector3, snapPt: Vector3, size: number): boolean;
export declare function SelectNearP(pts: Vector3[], refPt: Vector3): Vector3;
/**n是否在AB之间,fuzz 若为负的,允许相等 */
export declare function IsBetweenA2B(n: number, A: number, B: number, fuzz?: number): boolean;
/** 矩阵是世界坐标系 */
export declare function MatrixIsIdentityCS(mtx: Matrix4): boolean;
export {};
//# sourceMappingURL=GeUtils.d.ts.map