import { Plane } from "./math/Plane";
import { Polygon } from "./math/Polygon3";
import { Vector3D } from "./math/Vector3";
declare class PolygonTreeNode {
    parent: PolygonTreeNode;
    children: PolygonTreeNode[];
    polygon: Polygon;
    removed: boolean;
    constructor(polygon?: Polygon);
    addPolygons(polygons: Polygon[]): void;
    remove(): void;
    isRemoved(): boolean;
    isRootNode(): boolean;
    invert(): void;
    getPolygon(): Polygon;
    getPolygons(outPolygons?: Polygon[]): Polygon[];
    splitByPlane(plane: Plane, coplanarFrontNodes: PolygonTreeNode[], coplanarBackNodes: PolygonTreeNode[], frontNodes: PolygonTreeNode[], backNodes: PolygonTreeNode[]): void;
    private splitByPlaneNotChildren;
    addChild(polygon: Polygon): PolygonTreeNode;
    invertSub(): void;
    recursivelyInvalidatePolygon(): void;
}
export declare class Tree {
    polygonTree: PolygonTreeNode;
    rootNode: Node;
    constructor(polygons: Polygon[]);
    invert(): void;
    /**
     * this 减去 tree  删除此BSP树中位于其他BSP树内的所有多边形
     * @param tree 不会被修改
     * @param [alsoRemovecoplanarFront=false] 同时删除共面
     */
    clipTo(tree: Tree, alsoRemovecoplanarFront?: boolean): void;
    allPolygons(): Polygon[];
    addPolygons(polygons: Polygon[]): void;
}
declare class Node {
    plane: Plane;
    front: Node;
    back: Node;
    polygonTreeNodes: PolygonTreeNode[];
    parent: Node;
    constructor(parent: Node);
    invert(): void;
    clipPolygons(polygonTreeNodes: PolygonTreeNode[], alsoRemoveCoplanarFront: boolean): void;
    clipTo(tree: Tree, alsoRemovecoplanarFront: boolean): void;
    addPolygonTreeNodes(polygonTreeNodes: PolygonTreeNode[]): void;
    getParentPlaneNormals(normals: Vector3D[], maxdepth: number): void;
}
export {};
//# sourceMappingURL=trees.d.ts.map