/** @packageDocumentation * @module Tile */ import { BentleyError, ByteStream } from "@bentley/bentleyjs-core"; import { Point3d } from "@bentley/geometry-core"; /** Type codes for various tile formats. Often these are embedded as 32-bit 'magic numbers' in a binary stream to indicate the format. * @internal */ export declare enum TileFormat { Unknown = 0, B3dm = 1835283298, Gltf = 1179937895, Pnts = 1937010288, IModel = 1818512745, Cmpt = 1953525091, I3dm = 1835283305, A3x = 5780289 } /** Given a magic number, return whether it identifies a known tile format. * @internal */ export declare function isKnownTileFormat(format: number): boolean; /** Given a magic number, attempt to convert it to a known TileFormat. * @internal */ export declare function tileFormatFromNumber(formatNumber: number): TileFormat; /** Status codes for tile reading operations * @internal */ export declare enum TileReadStatus { Success = 0, InvalidTileData = 1, InvalidHeader = 2, InvalidBatchTable = 3, InvalidScene = 4, InvalidFeatureTable = 5, NewerMajorVersion = 6, Canceled = 7 } /** Exception thrown by functions that deserialize tiles. * @internal */ export declare class TileReadError extends BentleyError { constructor(status: TileReadStatus, message?: string); get wasCanceled(): boolean; } /** The base header preceding tile data of most formats, identifying the tile format and version of that format. * Specific tile formats may define their own headers as sub-types of this Header, appending * additional format-specific data. * @internal */ export declare abstract class TileHeader { private _format; version: number; /** Construct a Header from the binary data at the supplied stream's current read position */ constructor(stream: ByteStream); get format(): TileFormat; /** Returns whether the header represents valid data */ abstract get isValid(): boolean; /** Mark the header as representing invalid data */ protected invalidate(): void; } /** Read 3 64-bit floating point numbers at the byte stream's current read position, advance by 24 bytes, and return a Point3d constructed from the 3 numbers. * @internal */ export declare function nextPoint3d64FromByteStream(stream: ByteStream, result?: Point3d): Point3d; //# sourceMappingURL=TileIO.d.ts.map