/**
 * @module viw-webgl-viewer/gizmos/measure
 */
import * as THREE from 'three';
import { IRaycastResult } from '../../raycaster';
import { Viewer } from '../../viewer';
/**
 * Interacts with the measure tool.
 */
export interface IMeasure {
    /**
     * Start point of the current measure or undefined if no active measure.
     */
    get startPoint(): THREE.Vector3 | undefined;
    /**
     * End point of the current measure or undefined if no active measure.
     */
    get endPoint(): THREE.Vector3 | undefined;
    /**
     * Vector from start to end of the current measure or undefined if no active measure.
     */
    get measurement(): THREE.Vector3 | undefined;
    /**
     * Stage of the current measure or undefined if no active measure.
     */
    get stage(): MeasureStage | undefined;
    /**
     * Starts a new measure flow where the two next click are overriden.
     * Currently running flow if any will be aborted.
     * Promise is resolved if flow is succesfully completed, rejected otherwise.
     * Do not override viewer.onMouseClick while this flow is active.
     */
    start(): Promise<void>;
    /**
     * Aborts the current measure flow, fails the related promise.
     */
    abort(): void;
    /**
     * Clears meshes.
     */
    clear(): void;
}
export type MeasureStage = 'ready' | 'active' | 'done' | 'failed';
/**
 * Manages measure flow and gizmos
 */
export declare class Measure implements IMeasure {
    private _viewer;
    private _meshes;
    private _startPos;
    private _endPos;
    private _measurement;
    private _previousOnClick;
    private _promise;
    private _stage;
    /**
     * Start point of the current measure or undefined if no active measure.
     */
    get startPoint(): THREE.Vector3;
    /**
     * End point of the current measure or undefined if no active measure.
     */
    get endPoint(): THREE.Vector3;
    /**
     * Vector from start to end of the current measure or undefined if no active measure.
     */
    get measurement(): THREE.Vector3;
    /**
     * Stage of the current measure or undefined if no active measure.
     */
    get stage(): MeasureStage | undefined;
    constructor(viewer: Viewer);
    /**
     * Starts a new measure flow where the two next click are overriden.
     * Currently running flow if any will be aborted.
     * Promise is resolved if flow is succesfully completed, rejected otherwise.
     * Do not override viewer.onMouseClick while this flow is active.
     */
    start(): Promise<void>;
    private onClick;
    /**
     * Should be private.
     */
    onFirstClick(hit: IRaycastResult): void;
    /**
     * Should be private.
     */
    onSecondClick(hit: IRaycastResult): boolean;
    /**
     * Aborts the current measure flow, fails the related promise.
     */
    abort(): void;
    /**
     * Clears meshes.
     */
    clear(): void;
}
