import * as OBC from '@thatopen/components'; import { type BimTreeNode } from './lib/bimTree'; /** * Builds the IFC spatial structure tree (Building > Storey > Space > Element) * for every loaded model. * * State is kept **per model**: `LoadModels` calls `getSpatialStructure` once per * file, so a single shared tree meant federated models overwrote each other and * one failed model wiped the others. `trees` is the union across models, which * is also what the hide/isolate actions operate on. * * The transform itself lives in `lib/spatialTree.ts` as pure functions, so it is * testable without a viewer. */ export declare class SpatialStructure extends OBC.Component { static readonly uuid: "8f7e4d2c-1a9b-4e6f-8c3d-5b2a9f7e4d2c"; /** v3: v2 kept the nameless IFCBUILDING wrapper these trees now drop. */ private static readonly cacheKeyPrefix; /** Trees past this size are rebuilt rather than cached; they blow the quota anyway. */ private static readonly maxCachedNodes; enabled: boolean; /** Fires whenever any model's tree changes, with the merged tree for all models. */ readonly onSpatialStructureCreated: OBC.Event<{ trees: BimTreeNode[]; modelId: string; }>; readonly onLoadingStateChanged: OBC.Event<{ isLoading: boolean; }>; private fragments; private _treesByModelId; private _loadingPromises; private _activeRequests; private _isLoading; constructor(components: OBC.Components); private readonly onModelRemoved; /** The merged tree across every model that has been built, in insertion order. */ get trees(): BimTreeNode[]; get isLoading(): boolean; /** True once this model's tree has been built (even if it turned out empty). */ hasTree(modelId: string): boolean; private setLoadingState; private beginLoading; private endLoading; private emit; /** * Builds (or returns the cached) tree for one model. Concurrent calls for the * same model share one build. */ getSpatialStructure(modelId: string): Promise; private buildForModel; /** Drops one model's tree and its cache, for a model that is gone for good. */ clearForModel(modelId: string): void; /** Drops the tree but keeps the cache, so a model switched back on does not rebuild it. */ forgetModel(modelId: string): void; clearSpatialStructure(): void; private getCacheKey; private readCache; private writeCache; private clearCache; private countNodes; private serialize; private rehydrate; } //# sourceMappingURL=SpatialStructure.d.ts.map