Tile Class
Beta
A 3d tile within a TileTree. A tile represents the contents of some sub-volume of the tile tree's volume. It may produce graphics representing those contents, or may have no graphics. A tile can have child tiles that further sub-divide its own volume, providing higher-resolution representations of its contents. A tile that has no children is referred to as a "leaf" of the tile tree. A non-leaf tile's children are produced when they are needed, and discarded when no longer needed. A tile's contents can be discarded at any time by TileAdmin when GPU memory needs to be reclaimed; or when the Tile itself is discarded via Tile.dispose.
Several public Tile methods carry a warning that they should not be overridden by subclasses; typically a protected method exists that can be overridden instead. For example, Tile.collectStatistics should not be overridden, but it calls Tile._collectStatistics, which should be overridden if the tile owns WebGL resources besides its RenderGraphic.
Methods
Name | Description | |
---|---|---|
constructor(params: TileParams, tree: TileTree): Tile Protected | Constructor | |
_loadChildren(resolve: (children: Tile[] | undefined) => void, reject: (error: Error) => void): void ProtectedAbstract | Load this tile's children, possibly asynchronously. | |
computeVisibility(args: TileDrawArgs): TileVisibility | Determine the visibility of this tile according to the specified args. | |
dispose(): void | Dispose of resources held by this tile and all of its children, marking it and all of its children as "abandoned". | |
disposeChildren(): void Protected | Dispose of this tile's child tiles and mark them as "not loaded". | |
disposeContents(): void | Dispose of resources held by this tile. | |
drawGraphics(args: TileDrawArgs): void | Output this tile's graphics. | |
isContentCulled(args: TileDrawArgs): boolean Protected | Returns true if this tile's content bounding volume is culled by the frustum or clip volumes specified by args . |
|
isRegionCulled(args: TileDrawArgs): boolean Protected | Returns true if this tile's bounding volume is culled by the frustum or clip volumes specified by args . |
|
loadChildren(): TileTreeLoadStatus Protected | If this tile's child tiles have not yet been requested, enqueue an asynchronous request to load them. | |
produceGraphics(): RenderGraphic | undefined | Produce the graphics that should be drawn. | |
readContent(data: TileRequest.ResponseData, system: RenderSystem, isCanceled?: () => boolean): Promise<TileContent> Abstract | Return a Promise that deserializes this tile's content from raw format produced by Tile.requestContent. | |
requestContent(isCanceled: () => boolean): Promise<TileRequest.Response> Abstract | Return a Promise that resolves to the raw data representing this tile's content. | |
setContent(content: TileContent): void | Set this tile's content to the result of Tile.readContent | |
setGraphic(graphic: RenderGraphic | undefined): void Protected |
Properties
Name | Type | Description | |
---|---|---|---|
_childrenLoadStatus Protected | TileTreeLoadStatus | Child tiles are loaded on-demand, potentially asynchronously. | |
_contentId Protected | string | Uniquely identifies this tile's content. | |
_graphic Protected | undefined | RenderGraphic | This tile's renderable content. | |
_hadGraphics Protected | boolean | True if this tile ever had graphics loaded. | |
_maximumSize Protected | number | The maximum size in pixels this tile can be drawn. | |
bytesUsed | number | Exclusively for use by LRUTileList. | |
center | Point3d | The point at the center of this tile's volume. | |
children Accessor ReadOnly | Tile[] | undefined | This tile's child tiles, if they exist and are loaded. | |
contentId Accessor ReadOnly | string | Uniquely identifies this tile's content. | |
contentRange Accessor ReadOnly | ElementAlignedBox3d | A volume no larger than this tile's range , and optionally more tightly encompassing its contents. |
|
depth | number | The depth of this tile within its [[TileTree]. | |
hasContentRange Accessor ReadOnly | boolean | True if this tile has a known volume tightly encompassing its graphics. | |
hasGraphics Accessor ReadOnly | boolean | True if this tile has graphics ready to draw. | |
iModel Accessor ReadOnly | IModelConnection | The IModelConnection to which this tile belongs. | |
isLeaf Accessor ReadOnly | boolean | True if this tile has no child tiles. | |
isLoading Accessor ReadOnly | boolean | True if this tile's content is currently being loaded. | |
isNotFound Accessor ReadOnly | boolean | True if an attempt to load this tile's content failed. | |
isQueued Accessor ReadOnly | boolean | True if a request for this tile's content has been enqueued. | |
isReady Accessor ReadOnly | boolean | True if this tile's content has been loaded and is ready to be drawn. | |
loadStatus Accessor ReadOnly | TileLoadStatus | Tile contents are loaded asynchronously on demand. | |
maximumSize Accessor ReadOnly | number | The maximum size in pixels this tile can be drawn. | |
next | undefined | LRUTileListNode | Exclusively for use by LRUTileList. | |
parent | Tile | undefined | The parent of this tile, or undefined if it is the TileTree's root tile. | |
previous | undefined | LRUTileListNode | Exclusively for use by LRUTileList. | |
radius | number | The radius of a sphere fully encompassing this tile's volume - used for culling. | |
range | ElementAlignedBox3d | The volume of space occupied by this tile. | |
tree | TileTree | The TileTree to which this tile belongs. | |
usageMarker | TileUsageMarker | Tracks the usage of this tile. | |
viewportIds | undefined | ViewportIdSet | Exclusively for use by LRUTileList. |
Defined in
- core/frontend/src/tile/Tile.ts Line 62
Last Updated: 25 February, 2021