import { Box3, BufferGeometry, Matrix4, MeshStandardNodeMaterial, Sphere, Vector3, Vector4, type ColorRepresentation, type Intersection, type Object3D, type Raycaster } from 'three/webgpu'; import { BaseMesh, InstanceObject, type InteractionEvent, type InteractionEventMap } from 'u-space'; import type { SemanticColor, SemanticGeometryEntry, SemanticKind } from '../types'; type FacilityReference = InstanceObject | string; type FacilitySemanticKind = 'Facilities'; type FloorMeshMaterial = MeshStandardNodeMaterial | MeshStandardNodeMaterial[]; export type FloorSemanticKind = SemanticKind | FacilitySemanticKind; export interface FloorGeometrySemanticEntity { type: 'geometry'; kind: SemanticKind; id: string; name?: string; index: number; object: FloorSemanticInstanceObject; } export interface FloorFacilitySemanticEntity { type: 'object'; kind: FacilitySemanticKind; id: string; name?: string; index: number; object: InstanceObject; aliases: string[]; } export type FloorSemanticEntity = FloorGeometrySemanticEntity | FloorFacilitySemanticEntity; type FloorMeshEventPayload = T extends { event: InteractionEvent; } ? { event: FloorMeshInteractionEvent; } : T; export interface FloorMeshIntersection extends Intersection { semanticId: string; semanticKind: FloorSemanticKind; semanticName?: string; semanticIndex: number; semanticObject?: InstanceObject; facility?: InstanceObject; facilityId?: string; } export type FloorMeshInteractionEvent = Omit & { readonly target: Object3D; currentTarget: FloorMesh; readonly intersect: FloorMeshIntersection | null; }; export type FloorMeshEventMap = { [K in keyof InteractionEventMap]: FloorMeshEventPayload; }; export declare class FloorSemanticInstanceObject extends InstanceObject { #private; isFloorSemanticInstanceObject: boolean; type: string; readonly floorMesh: FloorMesh; readonly semanticIndex: number; constructor(floorMesh: FloorMesh, semanticIndex: number); setInstanceVisible(visible: boolean): this; setInstanceColor(color: ColorRepresentation): this; resetInstanceColor(): this; setInstanceOpacity(opacity: number): this; getInstanceOpacity(): number; setInstanceHighlight(color: ColorRepresentation, opacity: number, overwrite?: boolean): this; clearInstanceHighlight(): this; getInstanceBoundingBox(target?: Box3, world?: boolean): Box3; } export declare class FloorMesh extends BaseMesh { #private; isFloorMergedSemanticMesh: boolean; type: string; semanticId: string; semanticKind: string; semanticName: string; pivot: Vector3; boundingBox: Box3 | null; boundingSphere: Sphere | null; wallsInstances: Map; columnsInstances: Map; spacesInstances: Map; doorsInstances: Map; windowsInstances: Map; staircasesInstances: Map; semanticInstances: Map; semanticEntities: Map; facilityObjectsById: Map; facilityObjects: InstanceObject[]; facilityIndexVersion: number; constructor(entries: SemanticGeometryEntry[]); setSemanticIdentity(identity: { id?: string | null; kind?: string | null; name?: string | null; }): this; planish(kind?: FloorSemanticKind): this; unplanish(kind?: FloorSemanticKind): this; get semanticCount(): number; get instanceCount(): number; getSemanticIndexById(id: string): number | undefined; getSemanticById(id: string): FloorSemanticEntity | undefined; getSemantics(): FloorSemanticEntity[]; getSemanticsByKind(kind: FloorSemanticKind): FloorSemanticEntity[]; getSemanticIdAt(index: number): string; getSemanticKindAt(index: number): SemanticKind; getSemanticNameAt(index: number): string | undefined; getSemanticObjectAt(index: number): FloorSemanticInstanceObject; showAllFacilities(): this; hideAllFacilities(): this; addFacility(object: InstanceObject, ids?: string | string[]): this; getFacilityById(id: string): InstanceObject | undefined; getFacilityAt(index: number): InstanceObject; getFacilities(): InstanceObject[]; removeFacility(facility: FacilityReference): this; setColorAt(index: number, color: SemanticColor): this; resetColorAt(index: number): this; getColorAt(index: number, target?: Vector4): Vector4; setOpacityAt(index: number, opacity: number): this; getOpacityAt(index: number): number; setVisibleAt(index: number, visible: boolean): this; getVisibleAt(index: number): boolean; setMatrixAt(index: number, matrix: Matrix4): this; setScaleAt(index: number, scale: number | Vector3, y?: number, z?: number): this; setScaleYAt(index: number, y: number): this; getMatrixAt(index: number, matrix?: Matrix4): Matrix4; getFinalMatrixAt(index: number, matrix?: Matrix4): Matrix4; computeBoundingBox(): void; computeBoundingSphere(): void; getBoundingBoxAt(index: number, target?: Box3, world?: boolean): Box3 | null; getBoundingSphereAt(index: number, target?: Sphere, world?: boolean): Sphere | null; raycast(raycaster: Raycaster, intersects: Intersection[]): boolean | void; dispose(): void; } export {};