TileTreeReference Class
A reference to a TileTree suitable for drawing within a Viewport. The reference does not own its tile tree - it merely refers to it by way of the tree's TileTreeOwner. The specific TileTree referenced by this object may change based on the current state of the Viewport in which it is drawn - for example, as a result of changing the RenderMode, or animation settings, or classification settings, etc. A reference to a TileTree is typically associated with a ViewState, a DisplayStyleState, or a Viewport. Multiple TileTreeReferences can refer to the same TileTree with different parameters and logic - for example, the same background map tiles can be displayed in two viewports with differing levels of transparency.
see TiledGraphicsProvider to supply custom TileTreeReferences to be drawn within a Viewport.
extensions
Extended by
- RealityModelTileTree.Reference
- GeometryTileTreeReference
Methods
Name | Description | |
---|---|---|
constructor(): TileTreeReference | ||
_collectTileGeometry(collector: TileGeometryCollector): void Protected | A function that can be assigned to TileTreeReference.collectTileGeometry to enable geometry collection for references to tile trees that support geometry collection. | Beta |
_createGeometryTreeReference(): undefined | GeometryTileTreeReference Protected | Create a tile tree reference equivalent to this one that also supplies an implementation of GeometryTileTreeReference.collectTileGeometry. | Beta |
accumulateTransformedRange(range: Range3d, matrix: Matrix4d, frustumPlanes?: FrustumPlanes): void | ||
addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void | Add attribution logo cards for the tile tree source logo cards to the viewport's logo div. | |
addToScene(context: SceneContext): void | Adds this reference's graphics to the scene. | |
computeTransform(tree: TileTree): Transform Protected | Compute a transform from this tile tree reference's coordinate space to the IModelConnection's coordinate space. | |
computeWorldContentRange(): Range3d | Compute the range of this tile tree's contents in world coordinates. | |
createDrawArgs(context: SceneContext): undefined | TileDrawArgs | Create context for drawing the tile tree, if it is ready for drawing. | |
createGeometryTreeReference(): undefined | GeometryTileTreeReference | Obtain a tile tree reference equivalent to this one that also supplies an implementation of GeometryTileTreeReference.collectTileGeometry, or | Beta |
decorate(_context: DecorateContext): void | Optionally add any decorations specific to this reference. | |
discloseTileTrees(trees: DisclosedTileTreeSet): void | Disclose all TileTrees use by this reference. | |
draw(args: TileDrawArgs): void | Adds this reference's graphics to the scene. | |
getAppearanceProvider(_tree: TileTree): undefined | FeatureAppearanceProvider Protected | Return a provider that can supplement the view's symbology overrides. | |
getClipVolume(tree: TileTree): undefined | RenderClipVolume Protected | Return the clip volume applied to this reference's tile tree, if any. | |
getHiddenLineSettings(_tree: TileTree): undefined | Settings Protected | Return hidden line settings to replace those defined for the view. | |
getLocation(): undefined | Transform | Supply transform from this tile tree reference's location to iModel coordinate space. | |
getSymbologyOverrides(_tree: TileTree): undefined | FeatureSymbology.Overrides Protected | Return overrides that replace any defined for the view. | |
getToolTip(_hit: HitDetail): Promise<undefined | string | HTMLElement> | Optionally return a tooltip describing the hit. | |
getViewFlagOverrides(tree: TileTree): Partial<Mutable<NonFunctionPropertiesOf<ViewFlags>>> Protected | Supply overrides that should be applied to the ViewState's ViewFlags when drawing this tile tree reference. | |
resetTreeOwner(): void | Force a new tree owner / tile tree to be created for the current tile tree reference | |
unionFitRange(union: Range3d): void | Unions this reference's range with the supplied range to help compute a volume in world space for fitting a viewport to its contents. |
Properties
Name | Type | Description | |
---|---|---|---|
_isLoadingComplete Accessor ReadOnly | boolean | Override if additional asynchronous loading is required after the tile tree is successfully loaded, to indicate when that loading has completed. | |
castsShadows Accessor ReadOnly | boolean | Return whether the geometry exposed by this tile tree reference should cast shadows on other geometry. | |
collectTileGeometry | undefined | (collector: TileGeometryCollector) => void | ||
isGlobal Accessor ReadOnly | boolean | Return whether this reference has global coverage. | |
isLoadingComplete Accessor ReadOnly | boolean | Return true if the tile tree is fully loaded and ready to draw. | |
treeOwner Accessor AbstractReadOnly | TileTreeOwner | The owner of the currently-referenced TileTree. |
Defined in
Last Updated: 20 June, 2023