UNPKG

@itwin/core-common

Version:

iTwin.js components common to frontend and backend

78 lines 3.67 kB
/** @packageDocumentation * @module Tile */ import { ByteStream } from "@itwin/core-bentley"; import { ElementAlignedBox3d } from "../geometry/Placement"; import { TileHeader } from "./TileIO"; /** Flags describing the geometry contained within a tile in iMdl format. * @internal */ export declare enum ImdlFlags { /** No special flags */ None = 0, /** The tile contains some curved geometry */ ContainsCurves = 1, /** Some geometry within the tile range was omitted based on its size */ Incomplete = 4, /** The tile must be refined by sub-division, not magnification. */ DisallowMagnification = 8, /** The tile's feature table contains features from multiple models. */ MultiModelFeatureTable = 16 } /** Describes the maximum major and minor version of the iMdl tile format supported by this version of this package. * @internal */ export declare enum CurrentImdlVersion { /** The unsigned 16-bit major version number. If the major version specified in the tile header is greater than this value, then this * front-end is not capable of reading the tile content. Otherwise, this front-end can read the tile content even if the header specifies a * greater minor version than CurrentVersion.Minor, although some data may be skipped. */ Major = 37, /** The unsigned 16-bit minor version number. If the major version in the tile header is equal to CurrentVersion.Major, then this package can * read the tile content even if the minor version in the tile header is greater than this value, although some data may be skipped. */ Minor = 0, /** The unsigned 32-bit version number derived from the 16-bit major and minor version numbers. */ Combined = 2424832 } /** Header embedded at the beginning of binary tile data in iMdl format describing its contents. * @internal */ export declare class ImdlHeader extends TileHeader { /** The size of this header in bytes. */ readonly headerLength: number; /** Flags describing the geometry contained within the tile */ readonly flags: ImdlFlags; /** A bounding box no larger than the tile's range, tightly enclosing the tile's geometry; or a null range if the tile is empty */ readonly contentRange: ElementAlignedBox3d; /** The chord tolerance in meters at which the tile's geometry was faceted */ readonly tolerance: number; /** The number of elements which contributed at least some geometry to the tile content */ readonly numElementsIncluded: number; /** The number of elements within the tile range which contributed no geometry to the tile content */ readonly numElementsExcluded: number; /** The total number of bytes in the binary tile data, including this header */ readonly tileLength: number; /** A bitfield wherein each set bit indicates an empty sub-volume. */ readonly emptySubRanges: number; get versionMajor(): number; get versionMinor(): number; get isValid(): boolean; get isReadableVersion(): boolean; /** Deserialize a header from the binary data at the stream's current position. * If the binary data does not contain a valid header, the Header will be marked 'invalid'. */ constructor(stream: ByteStream); } /** Header preceding the feature table embedded in an iMdl tile's content. * @internal */ export declare class FeatureTableHeader { readonly length: number; readonly numSubCategories: number; readonly count: number; static readFrom(stream: ByteStream): FeatureTableHeader | undefined; static sizeInBytes: number; private constructor(); } //# sourceMappingURL=IModelTileIO.d.ts.map