xtorcga
Version:
Xtor Compute Geometry Algorithm Libary 计算几何算法库
24 lines (19 loc) • 407 B
text/typescript
import { Node } from "./node";
import { Polygon } from "./polygon";
export class BSP {
tree: Node;
constructor(faces: Polygon[]) {
this.tree = new Node(faces);
}
//差
sub(other: BSP) {
const a = this.tree.clone();
const b = this.tree.clone();
}
//和
union(other: BSP) {
}
//交
intersect(other: BSP) {
}
}