import { Camera, Material, Mesh, Object3D, Plane, Raycaster, Scene, Vector3, WebGLRenderer } from "three";
import type { CameraUtilsApi } from "../../Camera/useCameraUtils";
import type { ViewerStoreApi } from "../../store/ViewerStore";
import type { ViewerControlsRef, ViewerModelRef } from "../../types";
import { ClippingCaps } from "./ClippingCaps";
import { ClippingEdges } from "./ClippingEdges";
import type { ClippingIntersectionSegment } from "./ClippingEdges";
import { PlaneHelper } from "./PlaneHelper";
type ClippingContext = {
    camera: Camera;
    cameraUtils: CameraUtilsApi;
    controlRef: ViewerControlsRef;
    domElement: HTMLCanvasElement;
    modelRef: ViewerModelRef;
    raycaster: Raycaster;
    renderer: WebGLRenderer;
    scene: Scene;
    useWebGPU: boolean;
    viewerStore: ViewerStoreApi;
};
type ClippingPreselection = {
    elementID: number;
    modelID: number;
} | null;
export type ViewerClippingApi = {
    createClippingRectangle: (selected?: boolean) => Plane[];
    createPlane: (event?: MouseEvent | PointerEvent) => Plane | null;
    deleteAllPlanes: () => void;
    getCapsActive: () => boolean;
    getEdgesActive: () => boolean;
    getHelpersActive: () => boolean;
    getPlanes: () => Plane[];
    getActive: () => boolean;
    setActive: (active: boolean) => void;
    setCapsActive: (active: boolean) => void;
    setEdgesActive: (active: boolean) => void;
    setHelpersActive: (active: boolean) => void;
    toggle: () => void;
    updateEdges: () => void;
    updateMaterials: () => void;
};
export declare class ClippingUtils {
    planes: Plane[];
    caps: ClippingCaps[];
    edges: ClippingEdges[];
    helpers: PlaneHelper[];
    private active;
    private capsActive;
    private context;
    private edgesActive;
    private helperDragActive;
    private helpersActive;
    private helperHoverMoveState;
    private capsDragActive;
    private capsDragIdleTimeout;
    private updateEdgesFrame;
    private updateHelpersFrame;
    constructor(context: ClippingContext);
    setContext(context: ClippingContext): void;
    getActive(): boolean;
    getEdgesActive(): boolean;
    getCapsActive(): boolean;
    getHelpersActive(): boolean;
    getPlanes(): Plane[];
    getScene(): Scene<import("three").Object3DEventMap>;
    getCamera(): Camera;
    getCameraUtils(): CameraUtilsApi;
    getDomElement(): HTMLCanvasElement;
    getRaycaster(): Raycaster;
    getUseWebGPU(): boolean;
    getMaxTextureAnisotropy(): number;
    getControlRef(): ViewerControlsRef;
    getMeshes(): Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes, import("three").BufferGeometryEventMap>, Material<import("three").MaterialEventMap> | Material<import("three").MaterialEventMap>[], import("three").Object3DEventMap>[];
    getObjectModelID(object: Object3D): number;
    getEdgeSegmentsForPlane(plane: Plane): readonly ClippingIntersectionSegment[] | null;
    getSelectableObjects(): Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes, import("three").BufferGeometryEventMap>, Material<import("three").MaterialEventMap> | Material<import("three").MaterialEventMap>[], import("three").Object3DEventMap>[];
    getSelected(): import("../..").SelectedStore;
    getPreselectionColor(): import("three").ColorRepresentation;
    getSelectionColor(): import("three").ColorRepresentation;
    setCapsPreselection(preselection: ClippingPreselection): void;
    updateCapsVisualState(): void;
    getHelperHoverIsMoving(): boolean;
    getHelperDragActive(): boolean;
    setHelperDragActive(active: boolean): void;
    setCapsDragActive(active: boolean): void;
    requestCapsDragIdleUpdate(): void;
    private clearCapsDragIdleTimeout;
    clearHelpersHover(except?: PlaneHelper): void;
    setHelperHoverMoveStart: () => void;
    setHelperHoverMoveEnd: () => void;
    setHelperHoverMoving: () => void;
    private getModelWorldBox;
    private getSelectedWorldBox;
    setControlsEnabled(enabled: boolean): void;
    setSelectionInteractionDisabled(disabled: boolean): void;
    updateMaterials(): void;
    setActive(active: boolean): void;
    toggle(): void;
    createPlane(event?: MouseEvent | PointerEvent): Plane | null;
    createClippingRectangle(selected?: boolean): Plane[];
    addPlane(plane: Plane, location: Vector3, normal: Vector3): void;
    deleteAllPlanes(): void;
    setHelpersActive(active: boolean): void;
    setCapsActive(active: boolean): void;
    setEdgesActive(active: boolean): void;
    updateEdges(): void;
    flushEdgesUpdate(): void;
    updateCaps(except?: ClippingCaps): void;
    updateHelpers(): void;
    requestEdgesUpdate(): void;
    requestHelpersUpdate(): void;
    syncWithModel(): void;
    dispose(): void;
}
export declare function useClippingUtils(modelRef: ViewerModelRef, controlRef: ViewerControlsRef, cameraUtils: CameraUtilsApi, useWebGPU?: boolean): ViewerClippingApi & {
    getSelectableObjects: () => Object3D[];
    setCapsPreselection: (preselection: ClippingPreselection) => void;
    syncWithModel: () => void;
};
export {};
