/** @packageDocumentation
 * @module Utils
 */
import { Id64String } from "@itwin/core-bentley";
import { BaseLayerSettings, MapLayerSettings, PlanarClipMaskSettings, RealityDataSourceKey, RealityModelDisplaySettings } from "@itwin/core-common";
import { Point3d, Range3d, Transform, TransformProps } from "@itwin/core-geometry";
import { DisplayStyleState } from "../../DisplayStyleState";
import { HitDetail } from "../../HitDetail";
import { IModelConnection } from "../../IModelConnection";
import { PlanarClipMaskState } from "../../PlanarClipMaskState";
import { RealityDataSource } from "../../RealityDataSource";
import { RenderMemory } from "../../render/RenderMemory";
import { DecorateContext, SceneContext } from "../../ViewContext";
import { ViewState } from "../../ViewState";
import { DisclosedTileTreeSet, GeometryTileTreeReference, GeometryTileTreeReferenceOptions, LayerTileTreeHandler, MapLayerTileTreeReference, MapLayerTreeSetting, RealityTile, RealityTileTree, RealityTileTreeParams, SpatialClassifierTileTreeReference, TileDrawArgs, TileTree, TileTreeOwner, TileTreeReference } from "../../tile/internal";
import { SpatialClassifiersState } from "../../SpatialClassifiersState";
import { ScreenViewport } from "../../Viewport";
/** Option for whether or not to produce geometry. If value is "reproject", geometry will be reprojected when loaded in [[RealityTileLoader.loadGeometryFromStream]]. */
export type ProduceGeometryOption = "yes" | "no" | "reproject";
export declare function createRealityTileTreeReference(props: RealityModelTileTree.ReferenceProps): RealityModelTileTree.Reference;
export declare class RealityTileRegion {
    constructor(values: {
        minLongitude: number;
        minLatitude: number;
        minHeight: number;
        maxLongitude: number;
        maxLatitude: number;
        maxHeight: number;
    });
    minLongitude: number;
    minLatitude: number;
    minHeight: number;
    maxLongitude: number;
    maxLatitude: number;
    maxHeight: number;
    static create(region: number[]): RealityTileRegion;
    static isGlobal(boundingVolume: any): boolean;
    getRange(): {
        range: Range3d;
        corners?: Point3d[];
    };
}
/** @internal */
export declare class RealityModelTileUtils {
    static rangeFromBoundingVolume(boundingVolume: any): {
        range: Range3d;
        corners?: Point3d[];
        region?: RealityTileRegion;
    } | undefined;
    static maximumSizeFromGeometricTolerance(range: Range3d, geometricError: number): number;
    static transformFromJson(jTrans: number[] | undefined): Transform;
}
/** Exported strictly for tests. */
export declare class RealityModelTileTreeProps {
    readonly tilesetToEcef?: Transform | undefined;
    location: Transform;
    tilesetJson: any;
    doDrapeBackgroundMap: boolean;
    dataSource: RealityDataSource;
    yAxisUp: boolean;
    root: any;
    readonly maximumScreenSpaceError?: number;
    get usesGeometricError(): boolean;
    constructor(json: any, root: any, rdSource: RealityDataSource, tilesetToDbTransform: Transform, tilesetToEcef?: Transform | undefined);
}
export type RealityModelSource = ViewState | DisplayStyleState;
/** @internal */
export declare class RealityModelTileTree extends RealityTileTree {
    private readonly _isContentUnbounded;
    private readonly _layerHandler;
    layerImageryTrees: MapLayerTreeSetting[];
    get layerHandler(): LayerTileTreeHandler;
    constructor(params: RealityTileTreeParams);
    get isContentUnbounded(): boolean;
    protected collectClassifierGraphics(args: TileDrawArgs, selectedTiles: RealityTile[]): void;
}
export declare namespace RealityModelTileTree {
    interface ReferenceBaseProps {
        iModel: IModelConnection;
        source: RealityModelSource;
        rdSourceKey: RealityDataSourceKey;
        modelId?: Id64String;
        tilesetToDbTransform?: TransformProps;
        name?: string;
        classifiers?: SpatialClassifiersState;
        planarClipMask?: PlanarClipMaskSettings;
        getDisplaySettings(): RealityModelDisplaySettings;
        getBackgroundBase?(): BaseLayerSettings;
        getBackgroundLayers?(): MapLayerSettings[];
    }
    interface ReferenceProps extends ReferenceBaseProps {
        url?: string;
        requestAuthorization?: string;
        produceGeometry?: ProduceGeometryOption;
    }
    abstract class Reference extends TileTreeReference {
        protected readonly _name: string;
        protected _transform?: Transform;
        private _isGlobal?;
        protected readonly _source: RealityModelSource;
        protected _planarClipMask?: PlanarClipMaskState;
        protected _classifier?: SpatialClassifierTileTreeReference;
        protected _mapDrapeTree?: TileTreeReference;
        protected _getDisplaySettings: () => RealityModelDisplaySettings;
        private _layerRefHandler;
        readonly iModel: IModelConnection;
        abstract get modelId(): Id64String;
        detachLayerListeners(): void;
        get planarClipMask(): PlanarClipMaskState | undefined;
        set planarClipMask(planarClipMask: PlanarClipMaskState | undefined);
        get planarClipMaskPriority(): number;
        protected get maskModelIds(): string | undefined;
        shouldDrapeLayer(layerTreeRef?: MapLayerTileTreeReference): boolean;
        constructor(props: RealityModelTileTree.ReferenceBaseProps);
        get planarClassifierTreeRef(): SpatialClassifierTileTreeReference | undefined;
        unionFitRange(union: Range3d): void;
        get isGlobal(): boolean;
        addToScene(context: SceneContext): void;
        protected addPlanarClassifierOrMaskToScene(context: SceneContext): void;
        discloseTileTrees(trees: DisclosedTileTreeSet): void;
        collectStatistics(stats: RenderMemory.Statistics): void;
        createDrawArgs(context: SceneContext): TileDrawArgs | undefined;
    }
    function createRealityModelTileTree(rdSourceKey: RealityDataSourceKey, iModel: IModelConnection, modelId: Id64String, tilesetToDb: Transform | undefined, opts?: {
        deduplicateVertices?: boolean;
        produceGeometry?: ProduceGeometryOption;
    }): Promise<TileTree | undefined>;
}
/** Supplies a reality data [[TileTree]] from a URL. May be associated with a persistent [[GeometricModelState]], or attached at run-time via a [[ContextRealityModelState]].
 */
export declare class RealityTreeReference extends RealityModelTileTree.Reference {
    protected _rdSourceKey: RealityDataSourceKey;
    private readonly _produceGeometry?;
    private readonly _modelId;
    readonly useCachedDecorations?: true | undefined;
    constructor(props: RealityModelTileTree.ReferenceProps);
    get modelId(): string;
    private createTreeId;
    get treeOwner(): TileTreeOwner;
    protected _createGeometryTreeReference(options?: GeometryTileTreeReferenceOptions): GeometryTileTreeReference;
    private get _wantWiremesh();
    get castsShadows(): boolean;
    protected get _isLoadingComplete(): boolean;
    createDrawArgs(context: SceneContext): TileDrawArgs | undefined;
    addToScene(context: SceneContext): void;
    canSupplyToolTip(hit: HitDetail): boolean;
    getToolTip(hit: HitDetail): Promise<HTMLElement | string | undefined>;
    private _getToolTip;
    /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [addAttributions] instead. */
    addLogoCards(cards: HTMLTableElement): void;
    addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void>;
    decorate(_context: DecorateContext): void;
}
//# sourceMappingURL=RealityModelTileTree.d.ts.map