@itwin/core-frontend
Version:
iTwin.js frontend components
62 lines • 2.77 kB
TypeScript
/** @packageDocumentation
* @module Tiles
*/
import { ByteStream, Id64Set, Id64String } from "@itwin/core-bentley";
import { BatchType, TileReadStatus } from "@itwin/core-common";
import { IModelConnection } from "../IModelConnection";
import { RenderGraphic } from "../render/RenderGraphic";
import { RenderSystem } from "../render/RenderSystem";
import { ImdlModel } from "../common/imdl/ImdlModel";
import { ImdlParseError, ImdlParserOptions, ImdlTimeline } from "../common/imdl/ParseImdlDocument";
import { IModelTileContent } from "./internal";
import { BatchOptions } from "../common/render/BatchOptions";
import { LayerTileData } from "../internal/render/webgl/MapLayerParams";
/** @internal */
export interface ImdlReaderResult extends IModelTileContent {
readStatus: TileReadStatus;
}
/** Convert the byte array returned by [[TileAdmin.requestElementGraphics]] into a [[RenderGraphic]].
* @param bytes The binary graphics data obtained from `requestElementGraphics`.
* @param iModel The iModel with which the graphics are associated.
* @param modelId The Id of the [[GeometricModelState]] with which the graphics are associated. Can be an invalid Id.
* @param is3d True if the graphics are 3d.
* @param options Options customizing how [Feature]($common)s within the graphic can be resymbolized; or false if you don't want to produce a batch.
* @public
* @extensions
*/
export declare function readElementGraphics(bytes: Uint8Array, iModel: IModelConnection, modelId: Id64String, is3d: boolean, options?: BatchOptions | false): Promise<RenderGraphic | undefined>;
/** Arguments supplied to [[ImdlReader.create]]
* @internal
*/
export interface ImdlReaderCreateArgs {
stream: ByteStream;
iModel: IModelConnection;
modelId: Id64String;
is3d: boolean;
/** If undefined, the tile's leafness will be deduced by decodeTileContentDescription. */
isLeaf?: boolean;
system: RenderSystem;
type?: BatchType;
loadEdges?: boolean;
isCanceled?: () => boolean;
sizeMultiplier?: number;
options?: BatchOptions | false;
containsTransformNodes?: boolean;
/** Supplied if the graphics in the tile are to be split up based on the nodes in the timeline. */
timeline?: ImdlTimeline;
modelGroups?: Id64Set[];
tileData?: LayerTileData;
}
/** @internal */
export declare function readImdlContent(args: ImdlReaderCreateArgs & {
parseDocument?: (parseOpts: ImdlParserOptions) => Promise<ImdlModel.Document | ImdlParseError>;
}): Promise<ImdlReaderResult>;
/** @internal */
export interface ImdlReader {
read: () => Promise<ImdlReaderResult>;
}
/** @internal */
export declare namespace ImdlReader {
function create(args: ImdlReaderCreateArgs): ImdlReader;
}
//# sourceMappingURL=ImdlReader.d.ts.map