import { ExtensionBase } from '../ExtensionBase'; import { Color, ColorRepresentation, Plane } from 'three'; import { ViewpointState } from '../../index'; declare enum GizmoDir { X = "crop-x", NX = "crop-nx", Y = "crop-y", NY = "crop-ny", Z = "crop-z", NZ = "crop-nz" } /** * Crop extension options for initial extension settings. */ export declare class CropExtensionOptions { /** Color of handles for resizing. */ gizmoColor: ColorRepresentation; /** Color of crop box. */ boxColor: ColorRepresentation; } /** * Crop box extension. Extension can show crop box and creates gizmos for modifying box size. */ export declare class CropExtension extends ExtensionBase implements ViewpointState { static getName: () => string; private sharedToolbar; /** Whether the measurement command is active or not. */ isCropOn: boolean; /** Map with box clipping planes. */ planes: Map; /** Color of handles for resizing. */ gizmoColor: Color; /** Color of crop box. */ boxColor: Color; private startPosition; private cropBoxLines; private gizmosGroup; private obb; private isNoData; private renderManager; private rotation; private readonly boxMat; isPicking: boolean; private equalResize; private syncResize; /** * @param viewerName - Owner viewer name. * @param options - options for extension. */ constructor(viewerName: string, options: CropExtensionOptions); zoomSelected(): void; sharedToolbarRender(container: HTMLElement): void; storeViewpointState(): any; restoreViewpointState(state: any): void; initKeymap(): void; added(): void; deleted(): void; private onSceneLoaded; private init; onDragStart(event: any): void; onDragEnd(event: any): void; onDrag(event: any): void; private updateGizmos; private updateCropBox; private addGizmo; private onMouseMove; private hideFacesOutside; private onMouseWheel; /** * Sets vertical axis rotation via picking face. */ setRotation(): void; commandChanged(): void; /** * Sets crop box size to selected elements boundaries. */ setCropToSelected(forceZoom?: boolean): void; /** * Switch on or off crop box mode. * @param on - Is crop box on. */ setCrop(on: boolean): void; private setRotationFromNormal; } export {};