import type { PluginFloorplan } from './floorplan'; import type { BimItemProperties } from '../../components/viewers/bim/src/lib/bimQueries'; import type { ModelIdMap } from '../../components/viewers/bim/src/lib/bimTree'; import type { ModelPlacementChange, ModelPlacementWatcher } from '../../components/viewers/bim/src/lib/modelPlacementWatchers'; import type * as OBC from '@thatopen/components'; export interface BimToolProps { components: OBC.Components | null; world: OBC.World | null; fragments: OBC.FragmentsManager | null; /** Ids of every loaded model, in load order. */ modelIds: string[]; /** The live selection, keyed by model id. Updates as the user clicks in the viewport. */ selection: ModelIdMap; select: (items: ModelIdMap) => Promise; clearSelection: () => void; /** Frame the camera on whatever is currently selected. */ fitToSelection: () => Promise; /** Hides everything except `items`, across every loaded model. */ isolate: (items: ModelIdMap) => Promise; setItemsVisible: (items: ModelIdMap, visible: boolean) => Promise; /** The escape hatch from `isolate`: makes everything visible again. */ showAll: () => Promise; getItemsOfCategory: (category: string) => Promise; /** Attributes for the given elements. Omit `attributes` for the default set. */ getProperties: (items: ModelIdMap, attributes?: string[]) => Promise; /** The building whose models are open, or null before one is chosen. */ buildingId: number | null; /** Storeys, plan sketching and plan overlays, scoped to the calling plugin. */ floorplan: PluginFloorplan; /** Element colours, scoped to the calling plugin. */ appearance: PluginBimAppearance; /** Lets data kept in world coordinates follow a model the user moves or turns. */ modelPlacement: PluginModelPlacement; } export interface PluginModelPlacement { /** Follows every confirmed move and turn until the returned function is called. */ watch: (watcher: ModelPlacementWatcher) => () => void; } type PluginScopedProps = Pick; type BimViewerBase = Omit; /** What the BIM toolbar hands its plugin tools: `forPlugin` supplies the plugin-scoped half. */ export interface BimToolHostProps extends BimViewerBase { forPlugin: (pluginId: string) => PluginScopedProps; } /** For the BIM toolbar, which renders every plugin's tool and so cannot know one plugin's id. */ export declare function useBimToolHostProps(): BimToolHostProps; /** The BIM viewer as the calling plugin sees it. Inside a plugin component only. */ export declare function useBimViewer(): BimToolProps; export interface BimAppearance { /** `0xRRGGBB`. Omit to keep each element's own colour. */ color?: number; /** `0`–`1`. Omit to leave elements opaque. */ opacity?: number; } export interface BimAppearanceGroup { items: ModelIdMap; appearance: BimAppearance; } export interface PluginBimAppearance { setAppearance: (groups: readonly BimAppearanceGroup[]) => void; clearAppearance: () => void; } export declare function usePluginBimAppearance(): PluginBimAppearance; export type { ModelIdMap, BimItemProperties, ModelPlacementChange, ModelPlacementWatcher }; export type { FloorplanStorey, PlanFootprint, PlanOverlayOptions, PlanOverlayShape, PlanPoint, PluginFloorplan, SketchKind } from './floorplan'; //# sourceMappingURL=bimViewer.d.ts.map