33 lines
1.7 KiB
TypeScript
33 lines
1.7 KiB
TypeScript
import { Box3, Vector3 } from "three";
|
|
import { Curve } from "../DatabaseServices/Entity/Curve";
|
|
import { IntersectOption } from "../GraphicsSystem/IntersectWith";
|
|
/**
|
|
* 简化优化版本的曲线求交, 优化版本可以参考(算法导论33.2 确定任意一对线段是否相交 p599)
|
|
*/
|
|
export declare class CurveIntersection {
|
|
protected fuzz: number;
|
|
protected boxMap: Map<Curve, Box3>;
|
|
/**
|
|
* 交点数据集,key 为曲线 value 为和它相交的(曲线和交点的Map)
|
|
*/
|
|
intersect: Map<Curve, Map<Curve, Vector3[]>>;
|
|
intersect2: Map<Curve, [number, Vector3][]>;
|
|
intersect3: [Curve, Curve, Vector3[]][];
|
|
/**
|
|
* @param {Curve[]} cus 请注意数组的顺序会被更改,如果你在意数组的顺序,请拷贝数组后传进来
|
|
* @memberof CurveIntersection
|
|
*/
|
|
constructor(cus: Curve[], parseIntersectionParam?: boolean, intType?: IntersectOption, fuzz?: number, parseRecord?: boolean);
|
|
protected IntersectWith2(c1: Curve, c2: Curve, intType: IntersectOption): import("../GraphicsSystem/IntersectWith").IntersectResult[];
|
|
protected AppendIntersectionParams(curve: Curve, params: [number, Vector3][]): void;
|
|
protected GenBox(cus: Curve[]): void;
|
|
protected SortCurve(cus: Curve[]): void;
|
|
GetIntersect(cu: Curve): Map<Curve, Vector3[]>;
|
|
}
|
|
export declare class CurveIntersection2 extends CurveIntersection {
|
|
/**
|
|
* Curve2Polyline使用这个时,为了避免多余的交点导致曲线切割过度,过滤掉无关的点
|
|
*/
|
|
protected IntersectWith2(c1: Curve, c2: Curve, intType: IntersectOption): import("../GraphicsSystem/IntersectWith").IntersectResult[];
|
|
}
|
|
//# sourceMappingURL=CurveIntersection.d.ts.map
|