@itwin/core-frontend
Version:
iTwin.js frontend components
55 lines • 2.49 kB
TypeScript
/** @packageDocumentation
* @module Tiles
*/
import { BeTimePoint } from "@itwin/core-bentley";
import { ColorDef, TileProps } from "@itwin/core-common";
import { GraphicBuilder } from "../../render/GraphicBuilder";
import { RenderSystem } from "../../render/RenderSystem";
import { IModelTileTree, Tile, TileBoundingBoxes, TileContent, TileDrawArgs, TileParams, TileRequest, TileRequestChannel } from "./../../tile/internal";
/** Parameters used to construct an [[IModelTile]].
*/
export interface IModelTileParams extends TileParams {
sizeMultiplier?: number;
}
export declare function iModelTileParamsFromJSON(props: TileProps, parent: IModelTile | undefined): IModelTileParams;
/**
* Indicates whether a parent tile should be drawn in place of a child tile.
*/
export declare enum SelectParent {
No = 0,
Yes = 1
}
export interface IModelTileContent extends TileContent {
/** If this tile was produced by refinement, the multiplier applied to its screen size. */
sizeMultiplier?: number;
/** A bitfield describing empty sub-volumes of this tile's volume. */
emptySubRangeMask?: number;
}
/** A tile belonging to an [[IModelTileTree].
*/
export declare class IModelTile extends Tile {
private _sizeMultiplier?;
private _emptySubRangeMask?;
/** If an initial attempt to obtain this tile's content (e.g., from cloud storage cache) failed,
* the next channel to try.
*/
requestChannel?: TileRequestChannel;
constructor(params: IModelTileParams, tree: IModelTileTree);
get iModelTree(): IModelTileTree;
get iModelChildren(): IModelTile[] | undefined;
get emptySubRangeMask(): number;
get sizeMultiplier(): number | undefined;
get hasSizeMultiplier(): boolean;
get maximumSize(): number;
get channel(): TileRequestChannel;
requestContent(): Promise<TileRequest.Response>;
readContent(data: TileRequest.ResponseData, system: RenderSystem, isCanceled?: () => boolean): Promise<IModelTileContent>;
setContent(content: IModelTileContent): void;
protected _loadChildren(resolve: (children: Tile[]) => void, reject: (error: Error) => void): void;
protected get rangeGraphicColor(): ColorDef;
protected addRangeGraphic(builder: GraphicBuilder, type: TileBoundingBoxes): void;
pruneChildren(olderThan: BeTimePoint): void;
selectTiles(selected: Tile[], args: TileDrawArgs, numSkipped: number): SelectParent;
clearLayers(): void;
}
//# sourceMappingURL=IModelTile.d.ts.map