Tile Class

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.loadChildren should not be overridden, but it calls Tile._loadChildren, which must be overridden because it is abstract.

extensions

Extended by

Methods

Name Description
constructor(params: TileParams, tree: TileTree): Tile Protected Constructor  
_loadChildren(resolve: (children: undefined | Tile[]) => void, reject: (error: Error) => void): void ProtectedAbstract Load this tile's children, possibly asynchronously.  
computeLoadPriority(_viewports: Iterable<Viewport>, _users: Iterable<TileUser>): number Compute the load priority of this tile.  
computeVisibility(args: TileDrawArgs): TileVisibility Determine the visibility of this tile according to the specified args.  
countDescendants(): number Primarily for debugging purposes, compute the number of tiles below this one in the TileTree.  
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.  
getSizeProjectionCorners(): undefined | Point3d[] Optional corners used to compute the screen size of the tile.  
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.  
isFrustumCulled(box: Frustum, args: TileDrawArgs, testClipIntersection: boolean, sphere?: BoundingSphere): boolean Protected    
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.  
meetsScreenSpaceError(args: TileDrawArgs): boolean Protected Returns true if this tile is of at least high enough resolution to be displayed, per the supplied TileDrawArgs; or false if  
produceGraphics(): undefined | RenderGraphic 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: undefined | RenderGraphic): void Protected    
setIsReady(): void    
setLeaf(): void    
setNotFound(): void    

Properties

Name Type Description
_childrenLoadStatus Protected TileTreeLoadStatus The current loading state of this tile's children.  
_contentId Protected string Uniquely identifies this tile's content in the context of its tree.  
_contentRange Protected undefined | Range3d A volume no larger than this tile's range, and optionally more tightly encompassing its contents, used for more accurate culling.  
_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.  
boundingSphere Readonly BoundingSphere The bounding sphere for this tile.  
bytesUsed number Exclusively for use by LRUTileList.  
center Accessor ReadOnly Point3d The point at the center of this tile's volume.  
channel Accessor AbstractReadOnly TileRequestChannel Return the channel via which this tile's content should be requested.  
children Accessor ReadOnly undefined | Tile[] This tile's child tiles, if they exist and are loaded.  
contentId Accessor ReadOnly string Uniquely identifies this tile's content.  
contentRange Accessor ReadOnly Range3d A volume no larger than this tile's range, and optionally more tightly encompassing its contents, used for more accurate culling.  
depth Readonly 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 | Exclusively for use by LRUTileList.  
parent Readonly undefined | Tile The parent of this tile, or undefined if it is the TileTree's root tile.  
previous undefined | Exclusively for use by LRUTileList.  
radius Accessor ReadOnly number The radius of a sphere fully encompassing this tile's volume - used for culling.  
range Readonly Range3d The volume of space occupied by this tile.  
tileUserIds undefined | Exclusively for use by LRUTileList.  
tree Readonly TileTree The TileTree to which this tile belongs.  
usageMarker Readonly TileUsageMarker Tracks the usage of this tile.  

Defined in

Last Updated: 30 November, 2023