import { Camera, Color, Group, Plane, Vector3 } from 'three'; import { HtmlOverlayTool } from '../HtmlOverlay/HtmlOverlayTool'; import { Measurement, MeasurementOptions } from './types'; export declare class MeasurementManager { private readonly _measurementLabel; private readonly _line; private readonly _options; private readonly _domElement; private readonly _camera; private readonly _meshGroup; private readonly _htmlOverlay; private _labelElement; private readonly _distanceToCamera; private readonly _startPoint; private _measurement; constructor(viewerDomElement: HTMLElement, camera: Camera, meshGroup: Group, options: Required, overlay: HtmlOverlayTool, startPoint: Vector3); /** * Update the measurement line end point to the provided mouse coordinates */ update(mouseEvent: { offsetX: number; offsetY: number; }): void; /** * End the measurement. * @param point World position at which measuring line ends. */ endMeasurement(point: Vector3): void; /** * Remove the measurement. */ removeMeasurement(): void; getMeasurement(): Readonly; /** * Updates the measuring line clipping planes * @param clippingPlanes current active global clipping planes. */ updateLineClippingPlanes(clippingPlanes: Plane[]): void; /** * Update current line width. * @param lineWidth Width of the measuring line mesh. */ updateLineWidth(lineWidth: number): void; /** * Update current line color. * @param color Color of the measuring line mesh. */ updateLineColor(color: Color): void; /** * Hide/unhide all measurements * @param enable */ visible(enable: boolean): void; /** * Start the measurement. * @param point World position to start measurement operation from. */ private startMeasurement; /** * Creates a measurement label, add it to HTMLOverlay and return the created label element. * @param position Label position. * @param label Label text. * @returns HTML element. */ private addLabel; private pointerTo3DPosition; }