/** @packageDocumentation
 * @module Tiles
 */
import { Id64String, OrderedId64Iterable } from "@itwin/core-bentley";
import { BaseLayerSettings, FeatureAppearanceProvider, HiddenLine, MapLayerSettings, ModelMapLayerSettings, PrimaryTileTreeId, RenderSchedule, SpatialClassifier, ViewFlagOverrides, ViewFlagsProperties } from "@itwin/core-common";
import { Range3d, StringifiedClipVector, Transform } from "@itwin/core-geometry";
import { DisplayStyleState } from "../../DisplayStyleState";
import { IModelConnection } from "../../IModelConnection";
import { GeometricModelState } from "../../ModelState";
import { RenderClipVolume } from "../../render/RenderClipVolume";
import { SpatialViewState } from "../../SpatialViewState";
import { SceneContext } from "../../ViewContext";
import { AttachToViewportArgs, ViewState } from "../../ViewState";
import { DisclosedTileTreeSet, MapLayerTileTreeReference, TileDrawArgs, TileTree, TileTreeOwner, TileTreeReference } from "../../tile/internal";
interface PrimaryTreeId {
    treeId: PrimaryTileTreeId;
    modelId: Id64String;
    is3d: boolean;
    isPlanProjection: boolean;
    timeline?: RenderSchedule.ModelTimeline;
}
/** Find all extant tile trees associated with the specified model Ids and dispose of them.
 * This is used by BriefcaseConnection when a GraphicalEditingScope is exited or after a change to the models' geometry guids
 * is committed, undone, redone, or merged.
 */
export declare function disposeTileTreesForGeometricModels(modelIds: Set<Id64String>, iModel: IModelConnection): void;
declare class PrimaryTreeReference extends TileTreeReference {
    readonly view: ViewState;
    readonly model: GeometricModelState;
    /** Chiefly for debugging - disables iteration of this reference in SpatialModelRefs to e.g. omit the reference from the scene. */
    deactivated: boolean;
    protected _viewFlagOverrides: ViewFlagOverrides;
    protected _id: PrimaryTreeId;
    private _owner;
    private readonly _sectionClip?;
    private readonly _sectionCutAppearanceProvider?;
    protected readonly _animationTransformNodeId?: number;
    private _layerRefHandler;
    readonly iModel: IModelConnection;
    shouldDrapeLayer(layerTreeRef?: MapLayerTileTreeReference): boolean;
    constructor(view: ViewState, model: GeometricModelState, planProjection: boolean, transformNodeId: number | undefined, sectionClip?: StringifiedClipVector, backgroundBase?: BaseLayerSettings, backgroundLayers?: MapLayerSettings[]);
    protected getAnimationTransformNodeId(): number;
    protected getViewFlagOverrides(_tree: TileTree): Partial<import("@itwin/core-bentley").Mutable<import("@itwin/core-bentley").NonFunctionPropertiesOf<import("@itwin/core-common").ViewFlags>>>;
    protected getAppearanceProvider(_tree: TileTree): FeatureAppearanceProvider | undefined;
    protected getHiddenLineSettings(_tree: TileTree): HiddenLine.Settings | undefined;
    get castsShadows(): boolean;
    protected get isPlanProjection(): boolean;
    detachLayerListeners(): void;
    discloseTileTrees(trees: DisclosedTileTreeSet): void;
    protected getClipVolume(_tree: TileTree): RenderClipVolume | undefined;
    canSupplyToolTip(): boolean;
    createDrawArgs(context: SceneContext): TileDrawArgs | undefined;
    get treeOwner(): TileTreeOwner;
    protected createTreeId(view: ViewState, modelId: Id64String): PrimaryTileTreeId;
    protected computeBaseTransform(tree: TileTree): Transform;
    protected computeTransform(tree: TileTree): Transform;
    addToScene(context: SceneContext): void;
}
export declare class AnimatedTreeReference extends PrimaryTreeReference {
    private readonly _branchId;
    constructor(view: ViewState, model: GeometricModelState, transformNodeId: number);
    protected computeBaseTransform(tree: TileTree): Transform;
    createDrawArgs(context: SceneContext): TileDrawArgs | undefined;
}
export declare function createPrimaryTileTreeReference(view: ViewState, model: GeometricModelState, getBackgroundBase?: () => BaseLayerSettings, getBackgroundLayers?: () => MapLayerSettings[]): PrimaryTreeReference;
export declare function createMaskTreeReference(view: ViewState, model: GeometricModelState): TileTreeReference;
export declare class ModelMapLayerTileTreeReference extends MapLayerTileTreeReference {
    private _classifier;
    private _source?;
    private _id;
    private _owner;
    get isPlanar(): boolean;
    get activeClassifier(): SpatialClassifier;
    constructor(layerSettings: MapLayerSettings, _classifier: SpatialClassifier, layerIndex: number, iModel: IModelConnection, _source?: DisplayStyleState | undefined);
    protected createTreeId(): PrimaryTileTreeId;
    get treeOwner(): TileTreeOwner;
    get viewFlags(): Partial<ViewFlagsProperties>;
}
export declare function createModelMapLayerTileTreeReference(layerSettings: ModelMapLayerSettings, layerIndex: number, iModel: IModelConnection): ModelMapLayerTileTreeReference | undefined;
/** Provides [[TileTreeReference]]s for the loaded models present in a [[SpatialViewState]]'s [[ModelSelectorState]].
 * @internal
 */
export interface SpatialTileTreeReferences extends Iterable<TileTreeReference> {
    /** Supplies an iterator over all of the [[TileTreeReference]]s. */
    [Symbol.iterator](): Iterator<TileTreeReference>;
    /** Requests that the set of [[TileTreeReference]]s be updated to match the current state of the view, e.g., after the model selector's contents have changed. */
    update(): void;
    /** See SpatialViewState.setTileTreeReferencesDeactivated. */
    setDeactivated(modelIds: Id64String | Id64String[] | undefined, deactivated: boolean | undefined, refs: "all" | "animated" | "primary" | "section" | number[]): void;
    /** See SpatialViewState.attachToViewport. */
    attachToViewport(args: AttachToViewportArgs): void;
    /** See SpatialViewState.detachFromViewport. */
    detachFromViewport(): void;
    /** See SpatialViewState.collectMaskRefs */
    collectMaskRefs(modelIds: OrderedId64Iterable, maskTreeRefs: TileTreeReference[], maskRange: Range3d): void;
    /** See SpatialViewState.getModelsNotInMask */
    getModelsNotInMask(maskModels: OrderedId64Iterable | undefined, useVisible: boolean): Id64String[] | undefined;
}
/** @internal */
export declare function collectMaskRefs(view: SpatialViewState, modelIds: OrderedId64Iterable, excludedModelIds: Set<Id64String> | undefined, maskTreeRefs: TileTreeReference[], maskRange: Range3d): void;
/** Provides [[TileTreeReference]]s for the loaded models present in a [[SpatialViewState]]'s [[ModelSelectorState]] and
 * not present in the optionally-supplied exclusion list.
 * @internal
 */
export declare function createSpatialTileTreeReferences(view: SpatialViewState, excludedModels?: Set<Id64String>): SpatialTileTreeReferences;
/** Provides [[TileTreeReference]]s for the loaded models present in a [[SpatialViewState]]'s [[ModelSelectorState]].
 * @internal
 */
export declare namespace SpatialTileTreeReferences {
    /** Create a SpatialTileTreeReferences object reflecting the contents of the specified view. */
    function create(view: SpatialViewState): SpatialTileTreeReferences;
}
export {};
//# sourceMappingURL=PrimaryTileTree.d.ts.map