/** @internal NOTE: Internal APIs. Subject to change. Use of these APIs in production applications is not supported. */ /** */
import { TargetCamera, Mesh, Scene, Ray, Camera } from './babylonjs-import';
import { Intersection } from './bim-format-types';
import { Materials } from './materials';
import { PickOption, Selectables, VisibleSelectable, CanvasPosition, AttachOption, GetVisibleInSightOptions } from './Selectables';
import { Icon } from '../tools/Icon';
import { PickResult } from './PickResult';
/** Debugging options for GPU picking. */
interface GpuPickDebugOptions {
    /** If `true` then the rendered gpu pick texture will be saved to disk. If `false` disables all other options.  */
    saveTexture: boolean;
    /** Camera FOV when rendering to gpu pick texture is usually very small. But that means that it will
     * be difficult to see rendered objects in texture. This value will override fov on pick camera during pick operation.
     * Only used if {@link saveTexture} is true*/
    pickCameraFovInRadians?: number;
    /** Default texture size if very small so it is difficult to make out bojects.
     * Setting this allows us to use bigger texture size when debuggin. Only used if {@link saveTexture} is true */
    textureSizePow?: number;
    /**  When texture is saved (after click) this indicates how big the marker drawn on the click point should be. */
    clickMarkerSize: number;
    /** If `true` meshes are culled during picking. Otherwise they are not */
    cullMeshes: boolean;
}
export declare class GpuSelectables implements Selectables {
    private readonly scene;
    private readonly _materials;
    private static readonly _tmp;
    private static readonly _tmpScreenCoordinate;
    private static readonly _identity;
    static readonly defaultGpuPickTextureSize = 16;
    debugOptions: GpuPickDebugOptions;
    private _renderTargetTextureBugWorkaroundMap;
    private _pickCameras;
    /** BabylonJS meshes containing the merged IFC product meshes. */
    readonly meshes: Map<string, Mesh>;
    private readonly _textureObjectIdToGpuPickMap;
    private readonly _meshToGpuPickMeshMap;
    private readonly _iconHandlersToGpuPick;
    private readonly _boundOnDisposeMesh;
    private readonly _perspectiveGpuPickCameraFov;
    private readonly _orthographicGpuPickCameraHeight;
    private readonly _gpuPickCameraDefaultMinZ;
    private readonly _gpuPickCameraDefaultMaxZ;
    private readonly _gpuPickingTargetCache;
    constructor(scene: Scene, _materials: Materials);
    /**
     * Attach a babylonJs {@link Mesh} so it becomes available for gpu picking. That means that it may be returned in a {@link pick} operation.
     * @param meshOrIcon
     * @param o
     * @returns Number of remaning meshes it is possible to attach.
     */
    attach(meshOrIcon: Mesh | Icon, o?: AttachOption): number;
    /** Detach a babylonJs {@link Mesh} or {@link Icon}, that was previously attached using {@link attach} from gpu picking.
     * @returns `true` if detach was succesful.
     */
    detach(meshOrIcon: Mesh | Icon): boolean;
    idOf(meshOrIcon: Mesh | Icon): number;
    getAndUpdatePickCamera(rayOrScreenCoordinate: Ray | CanvasPosition | Intersection): TargetCamera;
    /**
     * Renders objects to a texture and checks which objects are in sight from given camera.
     * @param o Options.
     */
    getVisiblesInSight(o?: GetVisibleInSightOptions): VisibleSelectable[];
    /**
     * Renders objects to a texture and checks which objects are in sight from given camera.
     * @param inSightCamera Camera to represent the view to check for visible objects. If not specified then current {@link Scene.activeCamera} is used
     * @param textureSizePow2 The resolution of texture to be used for in sight detection. (Smaller might miss object ending up smaller than a pixel.)
     * @param isDistanceCullingEnabled Whether to enable distance culling or not.
     */
    getVisiblesInSight(inSightCamera?: Camera, textureSizePow2?: number, isDistanceCullingEnabled?: boolean): VisibleSelectable[];
    private getVisiblesFromTexture;
    pick(o: PickOption): PickResult;
    pick(picker: TargetCamera, textureSizePow2?: number, doIntersectionTestOnGeometry?: boolean, saveRenderedGpuPickingSceneTexture?: boolean): PickResult;
    private renderToTarget;
    private assignEnabledDebugOptions;
    private findObjectClosestToCenter;
    clear(): void;
    private appendToRenderListIfHitByRay;
    private convertPickArgumentsToPickOptionRayAndCamera;
    private getObjectInGpuPickingTargetFromOffset;
    private getObjectInGpuPickingTargetFromPixelCoordinate;
    private debugSaveTexture;
    private drawSquareCenteredOnClickedPixel;
    private onDisposeMesh;
    private isIntersection;
    private waitUntilRenderTargetTextureIsReady;
}
export {};
//# sourceMappingURL=GpuSelectables.d.ts.map