/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Tile
 */
import { TileFormat, TileHeader } from "./TileIO";
/** Header preceding tile content in [composite](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification/TileFormats/Composite) format, containing any number of tiles in other standard 3D tile formats.
 * @internal
 */
export class CompositeTileHeader extends TileHeader {
    get isValid() { return TileFormat.Cmpt === this.format; }
    constructor(stream) {
        super(stream);
        this.length = stream.readUint32();
        this.tileCount = stream.readUint32();
        this.tilePosition = stream.curPos;
        if (stream.isPastTheEnd)
            this.invalidate();
    }
}
//# sourceMappingURL=CompositeTileIO.js.map