import { Matrix4 } from "three";
import { Polygon } from "./math/Polygon3";
import { Vector3D } from "./math/Vector3";
/** Class CSG
 * Holds a binary space partition tree representing a 3D solid. Two solids can
 * be combined using the `union()`, `subtract()`, and `intersect()` methods.
 * @constructor
 */
export declare class CSG {
    polygons: Polygon[];
    /** # 是否已精简重复点 */
    isCanonicalized: boolean;
    /** # 是否已合并轮廓 */
    isRetesselated: boolean;
    cachedBoundingBox: Vector3D[];
    constructor(polygons?: Polygon[]);
    /**
     * Return a new CSG solid representing the space in either this solid or
     * in the given solids. Neither this solid nor the given solids are modified.
     * @param {CSG[]} csg - list of CSG objects
     * @returns {CSG} new CSG object
     * @example
     * let C = A.union(B)
     * @example
     * +-------+            +-------+
     * |       |            |       |
     * |   A   |            |       |
     * |    +--+----+   =   |       +----+
     * +----+--+    |       +----+       |
     *      |   B   |            |       |
     *      |       |            |       |
     *      +-------+            +-------+
     */
    union(csg: CSG | CSG[]): CSG;
    unionSub(csg: CSG, retesselate?: boolean, canonicalize?: boolean): CSG;
    unionForNonIntersecting(csg: CSG): CSG;
    /**
     * Return a new CSG solid representing space in this solid but
     * not in the given solids. Neither this solid nor the given solids are modified.
     * @returns new CSG object
     * @example
     * let C = A.subtract(B)
     * @example
     * +-------+            +-------+
     * |       |            |       |
     * |   A   |            |       |
     * |    +--+----+   =   |    +--+
     * +----+--+    |       +----+
     *      |   B   |
     *      |       |
     *      +-------+
     */
    subtract(csg: CSG | CSG[]): CSG;
    subtractSub(csg: CSG, retesselate?: boolean, canonicalize?: boolean): CSG;
    /**
     * Return a new CSG solid representing space in both this solid and
     * in the given solids. Neither this solid nor the given solids are modified.
     * let C = A.intersect(B)
     * @returns new CSG object
     * @example
     * +-------+
     * |       |
     * |   A   |
     * |    +--+----+   =   +--+
     * +----+--+    |       +--+
     *      |   B   |
     *      |       |
     *      +-------+
     */
    intersect(csg: CSG | CSG[]): CSG;
    intersectSub(csg: CSG, retesselate?: boolean, canonicalize?: boolean): CSG;
    /**
     * Return a new CSG solid with solid and empty space switched.
     * This solid is not modified.
     */
    invert(): CSG;
    transform1(matrix4x4: Matrix4): CSG;
    /**
     * Return a new CSG solid that is transformed using the given Matrix.
     * Several matrix transformations can be combined before transforming this solid.
     * @param {CSG.Matrix4x4} matrix4x4 - matrix to be applied
     * @returns {CSG} new CSG object
     * @example
     * var m = new CSG.Matrix4x4()
     * m = m.multiply(CSG.Matrix4x4.rotationX(40))
     * m = m.multiply(CSG.Matrix4x4.translation([-.5, 0, 0]))
     * let B = A.transform(m)
     */
    transform(matrix4x4: Matrix4): this;
    canonicalized(): CSG;
    reTesselated(): CSG;
    mayOverlap(csg: CSG): boolean;
    toTriangles(): Polygon[];
}
//# sourceMappingURL=CSG.d.ts.map