import * as FRAGS from "bim-fragment"; import { Component, Disposable, UI, Event, UIElement } from "../../base-types"; import { PlanView } from "./src/types"; import { PlanObjects } from "./src/plan-objects"; import { Components } from "../../core"; import { Button, FloatingWindow, SimpleUIComponent, CommandsMenu, UICommands } from "../../ui"; /** * Helper to control the camera and easily define and navigate 2D floor plans. */ export declare class FragmentPlans extends Component implements Disposable, UI { static readonly uuid: "a80874aa-1c93-43a4-80f2-df346da086b1"; /** {@link Disposable.onDisposed} */ readonly onDisposed: Event; readonly onNavigated: Event<{ id: string; }>; readonly onExited: Event; /** {@link Component.enabled} */ enabled: boolean; /** The floorplan that is currently selected. */ currentPlan: PlanView | null; /** The offset from the clipping planes to their respective floor plan elevation. */ defaultSectionOffset: number; /** The offset of the 2D camera to the floor plan elevation. */ defaultCameraOffset: number; /** The created floor plans. */ storeys: { [modelID: number]: any[]; }; objects: PlanObjects; /** {@link UI.uiElement} */ uiElement: UIElement<{ floatingWindow: FloatingWindow; main: Button; planList: SimpleUIComponent; defaultText: SimpleUIComponent; exitButton: Button; commandsMenu: CommandsMenu; }>; private _plans; private _floorPlanViewCached; private _previousCamera; private _previousTarget; private _previousProjection; get commands(): UICommands; set commands(commands: UICommands); constructor(components: Components); /** {@link Component.get} */ get(): PlanView[]; /** {@link Disposable.dispose} */ dispose(): Promise; computeAllPlanViews(model: FRAGS.FragmentsGroup): Promise; /** * Creates a new floor plan in the navigator. * * @param config - Necessary data to initialize the floor plan. */ create(config: PlanView): Promise; /** * Make the navigator go to the specified floor plan. * * @param id - Floor plan to go to. * @param animate - Whether to animate the camera transition. */ goTo(id: string, animate?: boolean): Promise; /** * Deactivate navigator and go back to the previous view. * * @param animate - Whether to animate the camera transition. */ exitPlanView(animate?: boolean): Promise; updatePlansList(): Promise; private setUI; private storeCameraPosition; private createClippingPlane; private cacheFloorplanView; private moveCameraTo2DPlanPosition; private activateCurrentPlan; private store3dCameraPosition; private updateCurrentPlan; private hidePreviousClippingPlane; private setupPlanObjectUI; private getAbsoluteFloorHeight; }