xtorcga
Version:
Xtor Compute Geometry Algorithm Libary 计算几何算法库
21 lines (20 loc) • 597 B
TypeScript
import { Vec3 } from '../math/Vec3';
export declare enum AxisPlane {
XY = "xy",
XZ = "xz",
YZ = "yz",
XYZ = "xyz"
}
export interface ITriangulationOption {
feature?: AxisPlane;
dim?: number;
normal?: Vec3;
}
/**
* 三角剖分 earcut.js
* @param {Array} boundary 边界
* @param {Array<Array>} holes 洞的数组
* @param {options:{feature,dim,normal}} feature 选择平平面
* @returns {Array<Number>} 三角形索引数组
*/
export declare function triangulation(inboundary: any, holes?: any[], options?: ITriangulationOption): number[];