TileTree Class
A hierarchical level-of-detail tree of 3d Tiles to be rendered in a Viewport. Tile trees originate from a variety of sources:
- Each GeometricModelState can supply its graphics as a tile tree;
- A DisplayStyleState's map settings or reality models;
- ViewAttachments in a SheetModelState;
- TiledGraphicsProviders associated with a viewport.
The same TileTree can be displayed in any number of viewports using multiple TileTreeReferences. A TileTree's lifetime is managed by a TileTreeOwner.
@note Some methods carry a warning that they should not be overridden by subclasses; typically a protected method exists that can be overridden instead to customize the behavior. For example, selectTiles should not be overridden; instead, override the_selectTiles method that it calls.
Extended by
Methods
Name | Description | |
---|---|---|
constructor(params: TileTreeParams): TileTree Protected | Constructor | |
_selectTiles(args: TileDrawArgs): Tile[] Protected Abstract | Implement this method to select tiles of appropriate resolution. | |
collectTileGeometry(_collector: TileGeometryCollector): void | Populate polyfaces with geometry obtained from this tile tree's tiles satisfying the collector's criteria. | |
countTiles(): number | Returns the number of Tiles currently in memory belonging to this tree, primarily for debugging. | |
dispose(): void | Dispose of this tree and any resources owned by it. | |
draw(args: TileDrawArgs): void Abstract | Produce graphics of appropriate resolution to be drawn in a Viewport. | |
getEcefTransform(): Promise<undefined | Transform> | Return the transform from the tile tree's coordinate space to ECEF (Earth Centered Earth Fixed) coordinates. | |
prune(): void Abstract | Discard tiles and/or tile contents, presumably based on a least-recently-used and/or least-likely-to-be-needed criterion. | |
selectTiles(args: TileDrawArgs): Tile[] | Selects tiles of appropriate resolution for some purpose like drawing to the screen, producing a shadow map, etc. |
Properties
Name | Type | Description | |
---|---|---|---|
contentRange Readonly | Range3d | undefined | Optional tight bounding box around the entire contents of all of this tree's tiles. | |
expirationTime Readonly | BeDuration | The length of time after which tiles belonging to this tree are considered elegible for disposal if they are no longer in use. | |
id Readonly | string | Uniquely identifies this tree among all other tile trees associated with the iModel. | |
iModel Readonly | IModelConnection | ||
iModelTransform Readonly | Transform | Transform from this tile tree's coordinate space to the iModel's coordinate space. | |
is2d Accessor ReadOnly | boolean | True if this tile tree contains 2d graphics. | |
is3d Accessor Abstract ReadOnly | boolean | True if this tile tree contains 3d graphics. | |
isContentUnbounded Accessor ReadOnly | boolean | True if this tile tree has no bounds - e.g., a tile tree representing a globe is unbounded. | |
isDisposed Accessor ReadOnly | boolean | True if dispose has been called on this tile tree. | |
lastSelectedTime Accessor ReadOnly | BeTimePoint | The most recent time at which tiles selectTiles was called. | |
maxDepth Accessor Abstract ReadOnly | undefined | number | Returns the maximum depth of this tree, if any. | |
modelId Readonly | string | A 64-bit identifier for this tile tree, unique within the context of its IModelConnection. | |
parentsAndChildrenExclusive Accessor ReadOnly | boolean | True if a tile and its child tiles should not be drawn simultaneously. | |
range Accessor ReadOnly | Range3d | The volume of space occupied by this tile tree. | |
rootTile Accessor Abstract ReadOnly | Tile | The lowest-resolution tile in this tree. | |
viewFlagOverrides Accessor Abstract ReadOnly | Partial<Mutable<NonFunctionPropertiesOf<ViewFlags>>> | The overrides that should be applied to the view's ViewFlags when this tile tree is drawn. |
Defined in
Last Updated: 23 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.