@itwin/core-frontend 3.0.0-dev.129 → 3.0.0-dev.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/DisplayStyleState.d.ts +0 -3
- package/lib/cjs/DisplayStyleState.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleState.js +0 -5
- package/lib/cjs/DisplayStyleState.js.map +1 -1
- package/lib/cjs/DrawingViewState.js +1 -1
- package/lib/cjs/DrawingViewState.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts +3 -5
- package/lib/cjs/IModelConnection.d.ts.map +1 -1
- package/lib/cjs/IModelConnection.js +5 -10
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/RenderScheduleState.d.ts +2 -0
- package/lib/cjs/RenderScheduleState.d.ts.map +1 -1
- package/lib/cjs/RenderScheduleState.js +10 -5
- package/lib/cjs/RenderScheduleState.js.map +1 -1
- package/lib/cjs/SpatialViewState.d.ts +8 -0
- package/lib/cjs/SpatialViewState.d.ts.map +1 -1
- package/lib/cjs/SpatialViewState.js +10 -0
- package/lib/cjs/SpatialViewState.js.map +1 -1
- package/lib/cjs/SubCategoriesCache.js +1 -1
- package/lib/cjs/SubCategoriesCache.js.map +1 -1
- package/lib/cjs/ViewContext.d.ts +3 -1
- package/lib/cjs/ViewContext.d.ts.map +1 -1
- package/lib/cjs/ViewContext.js +4 -0
- package/lib/cjs/ViewContext.js.map +1 -1
- package/lib/cjs/ViewCreator2d.js +2 -2
- package/lib/cjs/ViewCreator2d.js.map +1 -1
- package/lib/cjs/ViewCreator3d.js +1 -1
- package/lib/cjs/ViewCreator3d.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +18 -2
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js +9 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/RenderSystem.d.ts +7 -0
- package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
- package/lib/cjs/render/RenderSystem.js +9 -0
- package/lib/cjs/render/RenderSystem.js.map +1 -1
- package/lib/cjs/render/RenderTarget.d.ts +7 -0
- package/lib/cjs/render/RenderTarget.d.ts.map +1 -1
- package/lib/cjs/render/RenderTarget.js.map +1 -1
- package/lib/cjs/render/webgl/DrawCommand.d.ts +0 -1
- package/lib/cjs/render/webgl/DrawCommand.d.ts.map +1 -1
- package/lib/cjs/render/webgl/DrawCommand.js.map +1 -1
- package/lib/cjs/render/webgl/Graphic.d.ts +13 -0
- package/lib/cjs/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Graphic.js +41 -3
- package/lib/cjs/render/webgl/Graphic.js.map +1 -1
- package/lib/cjs/render/webgl/RenderCommands.d.ts +4 -0
- package/lib/cjs/render/webgl/RenderCommands.d.ts.map +1 -1
- package/lib/cjs/render/webgl/RenderCommands.js +27 -1
- package/lib/cjs/render/webgl/RenderCommands.js.map +1 -1
- package/lib/cjs/render/webgl/System.d.ts +1 -0
- package/lib/cjs/render/webgl/System.d.ts.map +1 -1
- package/lib/cjs/render/webgl/System.js +3 -0
- package/lib/cjs/render/webgl/System.js.map +1 -1
- package/lib/cjs/render/webgl/Target.d.ts +11 -0
- package/lib/cjs/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Target.js +19 -0
- package/lib/cjs/render/webgl/Target.js.map +1 -1
- package/lib/cjs/tile/DynamicIModelTile.js +7 -1
- package/lib/cjs/tile/DynamicIModelTile.js.map +1 -1
- package/lib/cjs/tile/IModelTile.d.ts.map +1 -1
- package/lib/cjs/tile/IModelTile.js +8 -2
- package/lib/cjs/tile/IModelTile.js.map +1 -1
- package/lib/cjs/tile/IModelTileTree.d.ts +5 -0
- package/lib/cjs/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/IModelTileTree.js +15 -0
- package/lib/cjs/tile/IModelTileTree.js.map +1 -1
- package/lib/cjs/tile/ImdlReader.d.ts +18 -1
- package/lib/cjs/tile/ImdlReader.d.ts.map +1 -1
- package/lib/cjs/tile/ImdlReader.js +51 -26
- package/lib/cjs/tile/ImdlReader.js.map +1 -1
- package/lib/cjs/tile/PrimaryTileTree.d.ts +14 -5
- package/lib/cjs/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/PrimaryTileTree.js +65 -11
- package/lib/cjs/tile/PrimaryTileTree.js.map +1 -1
- package/lib/cjs/tile/Tile.d.ts.map +1 -1
- package/lib/cjs/tile/Tile.js +5 -1
- package/lib/cjs/tile/Tile.js.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.d.ts +11 -0
- package/lib/cjs/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.js +6 -1
- package/lib/cjs/tile/TileDrawArgs.js.map +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts +2 -0
- package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/cjs/tile/TileTreeReference.js +5 -0
- package/lib/cjs/tile/TileTreeReference.js.map +1 -1
- package/lib/cjs/tools/ElementSetTool.js +1 -1
- package/lib/cjs/tools/ElementSetTool.js.map +1 -1
- package/lib/esm/DisplayStyleState.d.ts +0 -3
- package/lib/esm/DisplayStyleState.d.ts.map +1 -1
- package/lib/esm/DisplayStyleState.js +0 -5
- package/lib/esm/DisplayStyleState.js.map +1 -1
- package/lib/esm/DrawingViewState.js +1 -1
- package/lib/esm/DrawingViewState.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts +3 -5
- package/lib/esm/IModelConnection.d.ts.map +1 -1
- package/lib/esm/IModelConnection.js +5 -10
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/RenderScheduleState.d.ts +2 -0
- package/lib/esm/RenderScheduleState.d.ts.map +1 -1
- package/lib/esm/RenderScheduleState.js +8 -4
- package/lib/esm/RenderScheduleState.js.map +1 -1
- package/lib/esm/SpatialViewState.d.ts +8 -0
- package/lib/esm/SpatialViewState.d.ts.map +1 -1
- package/lib/esm/SpatialViewState.js +10 -0
- package/lib/esm/SpatialViewState.js.map +1 -1
- package/lib/esm/SubCategoriesCache.js +1 -1
- package/lib/esm/SubCategoriesCache.js.map +1 -1
- package/lib/esm/ViewContext.d.ts +3 -1
- package/lib/esm/ViewContext.d.ts.map +1 -1
- package/lib/esm/ViewContext.js +4 -0
- package/lib/esm/ViewContext.js.map +1 -1
- package/lib/esm/ViewCreator2d.js +2 -2
- package/lib/esm/ViewCreator2d.js.map +1 -1
- package/lib/esm/ViewCreator3d.js +1 -1
- package/lib/esm/ViewCreator3d.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +18 -2
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js +8 -0
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/RenderSystem.d.ts +7 -0
- package/lib/esm/render/RenderSystem.d.ts.map +1 -1
- package/lib/esm/render/RenderSystem.js +9 -0
- package/lib/esm/render/RenderSystem.js.map +1 -1
- package/lib/esm/render/RenderTarget.d.ts +7 -0
- package/lib/esm/render/RenderTarget.d.ts.map +1 -1
- package/lib/esm/render/RenderTarget.js.map +1 -1
- package/lib/esm/render/webgl/DrawCommand.d.ts +0 -1
- package/lib/esm/render/webgl/DrawCommand.d.ts.map +1 -1
- package/lib/esm/render/webgl/DrawCommand.js.map +1 -1
- package/lib/esm/render/webgl/Graphic.d.ts +13 -0
- package/lib/esm/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/esm/render/webgl/Graphic.js +39 -2
- package/lib/esm/render/webgl/Graphic.js.map +1 -1
- package/lib/esm/render/webgl/RenderCommands.d.ts +4 -0
- package/lib/esm/render/webgl/RenderCommands.d.ts.map +1 -1
- package/lib/esm/render/webgl/RenderCommands.js +27 -1
- package/lib/esm/render/webgl/RenderCommands.js.map +1 -1
- package/lib/esm/render/webgl/System.d.ts +1 -0
- package/lib/esm/render/webgl/System.d.ts.map +1 -1
- package/lib/esm/render/webgl/System.js +4 -1
- package/lib/esm/render/webgl/System.js.map +1 -1
- package/lib/esm/render/webgl/Target.d.ts +11 -0
- package/lib/esm/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/render/webgl/Target.js +19 -0
- package/lib/esm/render/webgl/Target.js.map +1 -1
- package/lib/esm/tile/DynamicIModelTile.js +7 -1
- package/lib/esm/tile/DynamicIModelTile.js.map +1 -1
- package/lib/esm/tile/IModelTile.d.ts.map +1 -1
- package/lib/esm/tile/IModelTile.js +8 -2
- package/lib/esm/tile/IModelTile.js.map +1 -1
- package/lib/esm/tile/IModelTileTree.d.ts +5 -0
- package/lib/esm/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/esm/tile/IModelTileTree.js +15 -0
- package/lib/esm/tile/IModelTileTree.js.map +1 -1
- package/lib/esm/tile/ImdlReader.d.ts +18 -1
- package/lib/esm/tile/ImdlReader.d.ts.map +1 -1
- package/lib/esm/tile/ImdlReader.js +53 -28
- package/lib/esm/tile/ImdlReader.js.map +1 -1
- package/lib/esm/tile/PrimaryTileTree.d.ts +14 -5
- package/lib/esm/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/esm/tile/PrimaryTileTree.js +65 -11
- package/lib/esm/tile/PrimaryTileTree.js.map +1 -1
- package/lib/esm/tile/Tile.d.ts.map +1 -1
- package/lib/esm/tile/Tile.js +5 -1
- package/lib/esm/tile/Tile.js.map +1 -1
- package/lib/esm/tile/TileDrawArgs.d.ts +11 -0
- package/lib/esm/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/esm/tile/TileDrawArgs.js +6 -1
- package/lib/esm/tile/TileDrawArgs.js.map +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts +2 -0
- package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/esm/tile/TileTreeReference.js +5 -0
- package/lib/esm/tile/TileTreeReference.js.map +1 -1
- package/lib/esm/tools/ElementSetTool.js +1 -1
- package/lib/esm/tools/ElementSetTool.js.map +1 -1
- package/package.json +22 -22
package/lib/esm/tile/Tile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../src/tile/Tile.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAY,OAAO,EAAW,OAAO,EAAsB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACtI,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAuB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC3G,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAQzC,OAAO,EACmD,WAAW,EAAgC,kBAAkB,EAAE,eAAe,GACvI,MAAM,YAAY,CAAC;AAEpB,uCAAuC;AAEvC,MAAM,cAAc,GAAG,CAAC,IAAI,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,CAAC,CAAC;AAEpF,gBAAgB;AAChB,MAAM,UAAU,eAAe,CAAC,OAAuB,EAAE,KAAc,EAAE,IAAa;IACpF,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3B,OAAO;KACR;IAED,wEAAwE;IACxE,MAAM,GAAG,GAAG,cAAc,CAAC;IAC3B,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACrC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACtC,GAAG,CAAC,CAAC,CAAC,CA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xE,6DAAW,CAAA;IACX,4BAA4B;IAC5B,sDAAQ,CAAA;IACR,wEAAwE;IACxE,8DAAY,CAAA;IACZ,oEAAoE;IACpE,8DAAY,CAAA;IACZ,iCAAiC;IACjC,8DAAY,CAAA;IACZ,wFAAwF;IACxF,oEAAe,CAAA;AACjB,CAAC,EAbW,gBAAgB,KAAhB,gBAAgB,QAa3B;AAED;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IAC3B,gCAAgC;IAChC,yDAAQ,CAAA;IACR,yDAAyD;IACzD,6DAAM,CAAA;IACN,6IAA6I;IAC7I,+DAAO,CAAA;IACP,6CAA6C;IAC7C,yDAAI,CAAA;IACJ,kFAAkF;IAClF,yEAAY,CAAA;IACZ,+BAA+B;IAC/B,6DAAM,CAAA;AACR,CAAC,EAbW,iBAAiB,KAAjB,iBAAiB,QAa5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { assert, dispose } from \"@itwin/core-bentley\";\r\nimport { Arc3d, ClipPlaneContainment, Matrix4d, Point2d, Point3d, Point4d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\nimport { BoundingSphere, ColorDef, ElementAlignedBox3d, Frustum, FrustumPlanes } from \"@itwin/core-common\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { GraphicBuilder } from \"../render/GraphicBuilder\";\r\nimport { RenderGraphic } from \"../render/RenderGraphic\";\r\nimport { RenderMemory } from \"../render/RenderMemory\";\r\nimport { RenderSystem } from \"../render/RenderSystem\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport {\r\n LRUTileListNode, TileContent, TileDrawArgs, TileParams, TileRequest, TileRequestChannel, TileTree, TileTreeLoadStatus, TileUsageMarker, ViewportIdSet,\r\n} from \"./internal\";\r\n\r\n// cSpell:ignore undisplayable bitfield\r\n\r\nconst scratchRange2d = [new Point2d(), new Point2d(), new Point2d(), new Point2d()];\r\n\r\n/** @internal */\r\nexport function addRangeGraphic(builder: GraphicBuilder, range: Range3d, is2d: boolean): void {\r\n if (!is2d) {\r\n builder.addRangeBox(range);\r\n return;\r\n }\r\n\r\n // 3d box is useless in 2d and will be clipped by near/far planes anyway\r\n const pts = scratchRange2d;\r\n pts[0].set(range.low.x, range.low.y);\r\n pts[1].set(range.high.x, range.low.y);\r\n pts[2].set(range.high.x, range.high.y);\r\n pts[3].set(range.low.x, range.high.y);\r\n builder.addLineString2d(pts, 0);\r\n}\r\n\r\nconst scratchWorldFrustum = new Frustum();\r\nconst scratchRootFrustum = new Frustum();\r\nconst scratchWorldSphere = new BoundingSphere();\r\nconst scratchPoint4d = Point4d.createZero();\r\nconst scratchFrustum = new Frustum();\r\n\r\n/** A 3d tile within a [[TileTree]].\r\n *\r\n * 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.\r\n * 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\r\n * 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.\r\n * 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\r\n * [[Tile.dispose]].\r\n *\r\n * 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.\r\n * For example, [[loadChildren]] should not be overridden, but it calls [[_loadChildren]], which must be overridden because it is abstract.\r\n * @public\r\n */\r\nexport abstract class Tile {\r\n private _state: TileState = TileState.NotReady;\r\n private _children: Tile[] | undefined;\r\n private _rangeGraphic?: RenderGraphic;\r\n private _rangeGraphicType: TileBoundingBoxes = TileBoundingBoxes.None;\r\n /** This tile's renderable content. */\r\n protected _graphic?: RenderGraphic;\r\n /** True if this tile ever had graphics loaded. Used to determine when a tile's graphics were later freed to conserve memory. */\r\n protected _hadGraphics = false;\r\n /** Uniquely identifies this tile's content in the context of its tree. */\r\n protected _contentId: string;\r\n /** The current loading state of this tile's children. Child tiles are loaded on-demand, potentially asynchronously. */\r\n protected _childrenLoadStatus: TileTreeLoadStatus;\r\n /** @internal */\r\n protected _request?: TileRequest;\r\n /** @internal */\r\n protected _isLeaf: boolean;\r\n /** A volume no larger than this tile's `range`, and optionally more tightly encompassing its contents, used for more accurate culling.\r\n * [[contentRange]] uses this range if defined; otherwise it uses [[range]].\r\n */\r\n protected _contentRange?: ElementAlignedBox3d;\r\n /** The maximum size in pixels this tile can be drawn. If the size of the tile on screen exceeds this maximum, a higher-resolution tile should be drawn in its place. */\r\n protected _maximumSize: number;\r\n /** The [[TileTree]] to which this tile belongs. */\r\n public readonly tree: TileTree;\r\n /** The volume of space occupied by this tile. Its children are guaranteed to also be contained within this volume. */\r\n public readonly range: ElementAlignedBox3d;\r\n /** The parent of this tile, or undefined if it is the [[TileTree]]'s root tile. */\r\n public readonly parent: Tile | undefined;\r\n /** The depth of this tile within its [[TileTree]]. The root tile has a depth of zero. */\r\n public readonly depth: number;\r\n /** The bounding sphere for this tile. */\r\n public readonly boundingSphere: BoundingSphere;\r\n /** The point at the center of this tile's volume. */\r\n public get center(): Point3d { return this.boundingSphere.center; }\r\n /** The radius of a sphere fully encompassing this tile's volume - used for culling. */\r\n public get radius(): number { return this.boundingSphere.radius; }\r\n /** Tracks the usage of this tile. After a period of disuse, the tile may be [[prune]]d to free up memory. */\r\n public readonly usageMarker = new TileUsageMarker();\r\n\r\n /** Exclusively for use by LRUTileList. @internal */\r\n public previous?: LRUTileListNode;\r\n /** Exclusively for use by LRUTileList. @internal */\r\n public next?: LRUTileListNode;\r\n /** Exclusively for use by LRUTileList. @internal */\r\n public bytesUsed = 0;\r\n /** Exclusively for use by LRUTileList. @internal */\r\n public viewportIds?: ViewportIdSet;\r\n\r\n /** Load this tile's children, possibly asynchronously. Pass them to `resolve`, or an error to `reject`. */\r\n protected abstract _loadChildren(resolve: (children: Tile[] | undefined) => void, reject: (error: Error) => void): void;\r\n\r\n /** Return the channel via which this tile's content should be requested.\r\n * @note The channel *must* be registered with `IModelApp.tileAdmin.channels`.\r\n * @see [[TileRequestChannels.getForHttp]] to create a channel that requests content over HTTP.\r\n * @see [[TileAdmin.channels]].\r\n * @public\r\n */\r\n public abstract get channel(): TileRequestChannel;\r\n\r\n /** Return a Promise that resolves to the raw data representing this tile's content. */\r\n public abstract requestContent(isCanceled: () => boolean): Promise<TileRequest.Response>;\r\n\r\n /** Return a Promise that deserializes this tile's content from raw format produced by [[requestContent]]. */\r\n public abstract readContent(data: TileRequest.ResponseData, system: RenderSystem, isCanceled?: () => boolean): Promise<TileContent>;\r\n\r\n /** Constructor */\r\n protected constructor(params: TileParams, tree: TileTree) {\r\n this.tree = tree;\r\n this.parent = params.parent;\r\n this.depth = undefined !== this.parent ? this.parent.depth + 1 : 0;\r\n this.range = params.range;\r\n this._maximumSize = params.maximumSize;\r\n this._contentRange = params.contentRange;\r\n this._contentId = params.contentId;\r\n\r\n const center = this.range.low.interpolate(0.5, this.range.high);\r\n const radius = 0.5 * this.range.low.distance(this.range.high);\r\n this.boundingSphere = new BoundingSphere(center, radius);\r\n\r\n if (params.maximumSize <= 0)\r\n this.setIsReady();\r\n\r\n this._isLeaf = true === params.isLeaf;\r\n this._childrenLoadStatus = (undefined !== tree.maxDepth && this.depth < tree.maxDepth) ? TileTreeLoadStatus.NotLoaded : TileTreeLoadStatus.Loaded;\r\n }\r\n\r\n /** Free memory-consuming resources owned by this tile to reduce memory pressure.\r\n * By default, this calls [[disposeContents]]. Problematic subclasses (MapTile, ImageryMapTile) may opt out for now by overriding this method to do nothing.\r\n * That option may be removed in the future.\r\n * @alpha\r\n */\r\n public freeMemory(): void {\r\n this.disposeContents();\r\n }\r\n\r\n /** Dispose of resources held by this tile. */\r\n public disposeContents(): void {\r\n this._state = TileState.NotReady;\r\n this._graphic = dispose(this._graphic);\r\n this._rangeGraphic = dispose(this._rangeGraphic);\r\n this._rangeGraphicType = TileBoundingBoxes.None;\r\n IModelApp.tileAdmin.onTileContentDisposed(this);\r\n }\r\n\r\n /** Dispose of resources held by this tile and all of its children, marking it and all of its children as \"abandoned\". */\r\n public dispose(): void {\r\n this.disposeContents();\r\n this._state = TileState.Abandoned;\r\n this.disposeChildren();\r\n }\r\n\r\n /** This tile's child tiles, if they exist and are loaded. The children are fully contained within this tile's volume and provide higher-resolution graphics than this tile.\r\n * @see [[loadChildren]]\r\n */\r\n public get children(): Tile[] | undefined { return this._children; }\r\n /** The [[IModelConnection]] to which this tile belongs. */\r\n public get iModel(): IModelConnection { return this.tree.iModel; }\r\n /** Uniquely identifies this tile's content. */\r\n public get contentId(): string { return this._contentId; }\r\n\r\n /** True if this tile's content is currently being loaded. */\r\n public get isLoading(): boolean { return TileLoadStatus.Loading === this.loadStatus; }\r\n /** True if a request for this tile's content has been enqueued. */\r\n public get isQueued(): boolean { return TileLoadStatus.Queued === this.loadStatus; }\r\n /** True if an attempt to load this tile's content failed. */\r\n public get isNotFound(): boolean { return TileLoadStatus.NotFound === this.loadStatus; }\r\n /** True if this tile's content has been loaded and is ready to be drawn. */\r\n public get isReady(): boolean { return TileLoadStatus.Ready === this.loadStatus; }\r\n\r\n /** @public */\r\n public setNotFound(): void {\r\n this._state = TileState.NotFound;\r\n }\r\n\r\n /** @public */\r\n public setIsReady(): void {\r\n if (this.hasGraphics)\r\n this._hadGraphics = true;\r\n\r\n this._state = TileState.Ready;\r\n IModelApp.tileAdmin.onTileContentLoaded(this);\r\n }\r\n\r\n /** @public */\r\n public setLeaf(): void {\r\n // Don't potentially re-request the children later.\r\n this.disposeChildren();\r\n this._isLeaf = true;\r\n this._childrenLoadStatus = TileTreeLoadStatus.Loaded;\r\n }\r\n\r\n /** True if this tile has no child tiles. */\r\n public get isLeaf(): boolean { return this._isLeaf; }\r\n /** @internal */\r\n public get isEmpty(): boolean { return this.isReady && !this.hasGraphics && this.isLeaf; }\r\n /** @internal */\r\n public get isDisplayable(): boolean { return 0 < this.maximumSize; }\r\n /** The maximum size in pixels this tile can be drawn. If the size of the tile on screen exceeds this maximum, a higher-resolution tile should be drawn in its place. */\r\n public get maximumSize(): number { return this._maximumSize; }\r\n /** @internal */\r\n public get isParentDisplayable(): boolean { return undefined !== this.parent && this.parent.isDisplayable; }\r\n /** @internal */\r\n public get isUndisplayableRootTile(): boolean { return undefined === this.parent && !this.isDisplayable; }\r\n\r\n /** @internal */\r\n public get request(): TileRequest | undefined { return this._request; }\r\n public set request(request: TileRequest | undefined) {\r\n assert(undefined === request || undefined === this.request);\r\n this._request = request;\r\n }\r\n\r\n /** Compute the load priority of this tile. This determines which tiles' contents are requested first.\r\n * @param _viewports The viewports for which the tile has been requested for display.\r\n * @returns The priority.\r\n * @see [[TileLoadPriority]] for suggested priority values.\r\n */\r\n public computeLoadPriority(_viewports: Iterable<Viewport>): number {\r\n return this.depth;\r\n }\r\n\r\n /** True if this tile has graphics ready to draw. */\r\n public get hasGraphics(): boolean { return undefined !== this._graphic; }\r\n /** True if this tile has a known volume tightly encompassing its graphics. */\r\n public get hasContentRange(): boolean { return undefined !== this._contentRange; }\r\n /** A volume no larger than this tile's `range`, and optionally more tightly encompassing its contents, used for more accurate culling. */\r\n public get contentRange(): ElementAlignedBox3d {\r\n if (undefined !== this._contentRange)\r\n return this._contentRange;\r\n else if (undefined === this.parent && undefined !== this.tree.contentRange)\r\n return this.tree.contentRange;\r\n else\r\n return this.range;\r\n }\r\n\r\n /** Tile contents are loaded asynchronously on demand. This member tracks the current loading status of this tile's contents. */\r\n public get loadStatus(): TileLoadStatus {\r\n switch (this._state) {\r\n case TileState.NotReady: {\r\n if (undefined === this.request)\r\n return TileLoadStatus.NotLoaded;\r\n else if (TileRequest.State.Loading === this.request.state)\r\n return TileLoadStatus.Loading;\r\n\r\n assert(TileRequest.State.Completed !== this.request.state && TileRequest.State.Failed !== this.request.state); // this.request should be undefined in these cases...\r\n return TileLoadStatus.Queued;\r\n }\r\n case TileState.Ready: {\r\n assert(undefined === this.request);\r\n return TileLoadStatus.Ready;\r\n }\r\n case TileState.NotFound: {\r\n assert(undefined === this.request);\r\n return TileLoadStatus.NotFound;\r\n }\r\n default: {\r\n assert(TileState.Abandoned === this._state);\r\n return TileLoadStatus.Abandoned;\r\n }\r\n }\r\n }\r\n\r\n /** Produce the graphics that should be drawn. */\r\n public produceGraphics(): RenderGraphic | undefined {\r\n return this._graphic;\r\n }\r\n\r\n protected setGraphic(graphic: RenderGraphic | undefined): void {\r\n dispose(this._graphic);\r\n this._graphic = graphic;\r\n this.setIsReady();\r\n }\r\n\r\n /** Set this tile's content to the result of [[readContent]] */\r\n public setContent(content: TileContent): void {\r\n const { graphic, isLeaf, contentRange } = content;\r\n this.setGraphic(graphic);\r\n\r\n if (undefined !== isLeaf && isLeaf !== this._isLeaf) {\r\n if (isLeaf)\r\n this.setLeaf();\r\n else\r\n this._isLeaf = false;\r\n }\r\n\r\n if (undefined !== contentRange)\r\n this._contentRange = contentRange;\r\n\r\n this.setIsReady();\r\n }\r\n\r\n /** Disclose any resources owned by this tile, other than its [[RenderGraphic]].\r\n * @internal\r\n */\r\n protected _collectStatistics(_stats: RenderMemory.Statistics): void { }\r\n\r\n /** Disclose resources owned by this tile and (by default) all of its child tiles.\r\n * @note Do not override this method! Override `_collectStatistics` instead.\r\n * @internal\r\n */\r\n public collectStatistics(stats: RenderMemory.Statistics, includeChildren = true): void {\r\n if (undefined !== this._graphic)\r\n this._graphic.collectStatistics(stats);\r\n\r\n this._collectStatistics(stats);\r\n if (!includeChildren)\r\n return;\r\n\r\n const children = this.children;\r\n if (undefined !== children)\r\n for (const child of children)\r\n child.collectStatistics(stats);\r\n }\r\n\r\n /** If this tile's child tiles have not yet been requested, enqueue an asynchronous request to load them.\r\n * @note This function itself is *not* asynchronous - it immediately returns the current loading status.\r\n * @note Do not override this method - implement [[_loadChildren]].\r\n */\r\n protected loadChildren(): TileTreeLoadStatus {\r\n if (this._childrenLoadStatus !== TileTreeLoadStatus.NotLoaded)\r\n return this._childrenLoadStatus;\r\n\r\n this._childrenLoadStatus = TileTreeLoadStatus.Loading;\r\n\r\n this._loadChildren((children: Tile[] | undefined) => {\r\n this._children = children;\r\n this._childrenLoadStatus = TileTreeLoadStatus.Loaded;\r\n\r\n if (undefined === children || 0 === children.length)\r\n this._isLeaf = true;\r\n\r\n IModelApp.tileAdmin.onTileChildrenLoad.raiseEvent(this);\r\n }, (_error: Error) => {\r\n this._isLeaf = true;\r\n this._childrenLoadStatus = TileTreeLoadStatus.NotFound;\r\n\r\n IModelApp.tileAdmin.onTileChildrenLoad.raiseEvent(this);\r\n });\r\n\r\n return this._childrenLoadStatus;\r\n }\r\n\r\n /** Dispose of this tile's child tiles and mark them as \"not loaded\". */\r\n protected disposeChildren(): void {\r\n const children = this.children;\r\n if (undefined === children)\r\n return;\r\n\r\n for (const child of children)\r\n child.dispose();\r\n\r\n this._childrenLoadStatus = TileTreeLoadStatus.NotLoaded;\r\n this._children = undefined;\r\n }\r\n\r\n /** Returns true if this tile's bounding volume is culled by the frustum or clip volumes specified by `args`. */\r\n protected isRegionCulled(args: TileDrawArgs): boolean {\r\n return this.isCulled(this.range, args, true, this.boundingSphere);\r\n }\r\n\r\n /** Returns true if this tile's content bounding volume is culled by the frustum or clip volumes specified by `args`. */\r\n protected isContentCulled(args: TileDrawArgs): boolean {\r\n return this.isCulled(this.contentRange, args, false);\r\n }\r\n\r\n private isCulled(range: ElementAlignedBox3d, args: TileDrawArgs, testClipIntersection: boolean, sphere?: BoundingSphere) {\r\n const box = Frustum.fromRange(range, scratchRootFrustum);\r\n return this.isFrustumCulled(box, args, testClipIntersection, sphere);\r\n }\r\n\r\n protected isFrustumCulled(box: Frustum, args: TileDrawArgs, testClipIntersection: boolean, sphere?: BoundingSphere) {\r\n const worldBox = box.transformBy(args.location, scratchWorldFrustum);\r\n const worldSphere = sphere?.transformBy(args.location, scratchWorldSphere);\r\n\r\n // Test against frustum.\r\n if (FrustumPlanes.Containment.Outside === args.frustumPlanes.computeFrustumContainment(worldBox, worldSphere))\r\n return true;\r\n\r\n // Test against TileTree's own clip volume, if any.\r\n if (undefined !== args.clip && ClipPlaneContainment.StronglyOutside === args.clip.classifyPointContainment(worldBox.points))\r\n return true;\r\n\r\n // Test against view clip, if any (will be undefined if TileTree does not want view clip applied to it).\r\n if (undefined !== args.viewClip && ClipPlaneContainment.StronglyOutside === args.viewClip.classifyPointContainment(worldBox.points))\r\n return true;\r\n\r\n // Test against intersection clip - reject if tile doesn't intersect (used for section-cut graphics).\r\n if (testClipIntersection && undefined !== args.intersectionClip && ClipPlaneContainment.Ambiguous !== args.intersectionClip.classifyPointContainment(worldBox.points))\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n /** Determine the visibility of this tile according to the specified args. */\r\n public computeVisibility(args: TileDrawArgs): TileVisibility {\r\n // NB: We test for region culling before isDisplayable - otherwise we will never unload children of undisplayed tiles when\r\n // they are outside frustum\r\n if (this.isEmpty || this.isRegionCulled(args))\r\n return TileVisibility.OutsideFrustum;\r\n\r\n // some nodes are merely for structure and don't have any geometry\r\n if (!this.isDisplayable)\r\n return TileVisibility.TooCoarse;\r\n\r\n if (this.isLeaf) {\r\n if (this.hasContentRange && this.isContentCulled(args))\r\n return TileVisibility.OutsideFrustum;\r\n else\r\n return TileVisibility.Visible;\r\n }\r\n\r\n const pixelSize = args.getPixelSize(this) * args.pixelSizeScaleFactor;\r\n const maxSize = this.maximumSize * args.tileSizeModifier;\r\n\r\n return pixelSize > maxSize ? TileVisibility.TooCoarse : TileVisibility.Visible;\r\n }\r\n\r\n /** @internal */\r\n public extendRangeForContent(range: Range3d, matrix: Matrix4d, treeTransform: Transform, frustumPlanes?: FrustumPlanes): void {\r\n if (this.isEmpty || this.contentRange.isNull)\r\n return;\r\n\r\n const box = Frustum.fromRange(this.contentRange, scratchFrustum);\r\n box.transformBy(treeTransform, box);\r\n if (frustumPlanes !== undefined && FrustumPlanes.Containment.Outside === frustumPlanes.computeFrustumContainment(box))\r\n return;\r\n\r\n if (this.children === undefined) {\r\n for (const boxPoint of box.points) {\r\n const pt = matrix.multiplyPoint3d(boxPoint, 1, scratchPoint4d);\r\n if (pt.w > .0001)\r\n range.extendXYZW(pt.x, pt.y, pt.z, pt.w);\r\n else\r\n range.high.z = Math.max(1.0, range.high.z); // behind eye plane...\r\n }\r\n } else {\r\n for (const child of this.children)\r\n child.extendRangeForContent(range, matrix, treeTransform, frustumPlanes);\r\n }\r\n }\r\n\r\n /** Primarily for debugging purposes, compute the number of tiles below this one in the [[TileTree]]. */\r\n public countDescendants(): number {\r\n const children = this.children;\r\n if (undefined === children || 0 === children.length)\r\n return 0;\r\n\r\n let count = 0;\r\n for (const child of children)\r\n count += child.countDescendants();\r\n\r\n return count;\r\n }\r\n\r\n /** Output this tile's graphics. */\r\n public drawGraphics(args: TileDrawArgs): void {\r\n const gfx = this.produceGraphics();\r\n if (undefined === gfx)\r\n return;\r\n\r\n args.graphics.add(gfx);\r\n const rangeGfx = this.getRangeGraphic(args.context);\r\n if (undefined !== rangeGfx)\r\n args.graphics.add(rangeGfx);\r\n }\r\n\r\n /** @internal */\r\n protected get rangeGraphicColor(): ColorDef {\r\n return this.isLeaf ? ColorDef.blue : ColorDef.green;\r\n }\r\n\r\n /** @internal */\r\n public getRangeGraphic(context: SceneContext): RenderGraphic | undefined {\r\n const type = context.viewport.debugBoundingBoxes;\r\n if (type === this._rangeGraphicType)\r\n return this._rangeGraphic;\r\n\r\n this._rangeGraphic = dispose(this._rangeGraphic);\r\n this._rangeGraphicType = type;\r\n if (TileBoundingBoxes.None !== type) {\r\n const builder = context.createSceneGraphicBuilder();\r\n this.addRangeGraphic(builder, type);\r\n this._rangeGraphic = builder.finish();\r\n }\r\n\r\n return this._rangeGraphic;\r\n }\r\n\r\n /** @internal */\r\n protected addRangeGraphic(builder: GraphicBuilder, type: TileBoundingBoxes): void {\r\n if (TileBoundingBoxes.Both === type) {\r\n builder.setSymbology(ColorDef.blue, ColorDef.blue, 1);\r\n addRangeGraphic(builder, this.range, this.tree.is2d);\r\n\r\n if (this.hasContentRange) {\r\n builder.setSymbology(ColorDef.red, ColorDef.red, 1);\r\n addRangeGraphic(builder, this.contentRange, this.tree.is2d);\r\n }\r\n } else if (TileBoundingBoxes.Sphere === type) {\r\n builder.setSymbology(ColorDef.green, ColorDef.green, 1);\r\n\r\n const x = new Vector3d(this.radius, 0, 0);\r\n const y = new Vector3d(0, this.radius, 0);\r\n const z = new Vector3d(0, 0, this.radius);\r\n\r\n builder.addArc(Arc3d.create(this.center, x, y), false, false);\r\n builder.addArc(Arc3d.create(this.center, x, z), false, false);\r\n builder.addArc(Arc3d.create(this.center, y, z), false, false);\r\n } else {\r\n const color = this.rangeGraphicColor;\r\n builder.setSymbology(color, color, 1);\r\n const range = TileBoundingBoxes.Content === type ? this.contentRange : this.range;\r\n addRangeGraphic(builder, range, this.tree.is2d);\r\n }\r\n }\r\n\r\n /** Optional corners used to compute the screen size of the tile. These are used, e.g., by reality tiles with oriented bounding boxes to\r\n * produce more accurate size calculation.\r\n */\r\n public getSizeProjectionCorners(): Point3d[] | undefined { return undefined; }\r\n}\r\n\r\n/** Describes the current status of a [[Tile]]'s content. Tile content is loaded via an asynchronous [[TileRequest]].\r\n * @see [[Tile.loadStatus]].\r\n * @public\r\n */\r\nexport enum TileLoadStatus {\r\n /** No attempt to load the tile's content has been made, or the tile has since been unloaded. It currently has no graphics. */\r\n NotLoaded = 0,\r\n /** A request has been dispatched to load the tile's contents, and a response is pending. */\r\n Queued = 1,\r\n /** A response has been received and the tile's graphics and other data are being loaded on the frontend. */\r\n Loading = 2,\r\n /** The tile has been loaded, and if the tile is displayable it has graphics. */\r\n Ready = 3,\r\n /** A request to load the tile's contents failed. */\r\n NotFound = 4,\r\n /** The tile has been disposed. */\r\n Abandoned = 5,\r\n}\r\n\r\n/**\r\n * Describes the visibility of a tile based on its size and a view frustum.\r\n * @public\r\n */\r\nexport enum TileVisibility {\r\n /** The tile is entirely outside of the viewing frustum. */\r\n OutsideFrustum,\r\n /** The tile's graphics are of too low a resolution for the viewing frustum. */\r\n TooCoarse,\r\n /** The tile's graphics are of appropriate resolution for the viewing frustum. */\r\n Visible,\r\n}\r\n\r\n/**\r\n * Loosely describes the \"importance\" of a [[Tile]]. Requests for tiles of greater \"importance\" are prioritized for loading.\r\n * @note A lower priority value indicates higher importance.\r\n * @public\r\n */\r\nexport enum TileLoadPriority {\r\n /** Contents of geometric models that are being interactively edited. */\r\n Dynamic = 5,\r\n /** Background map tiles. */\r\n Map = 15,\r\n /** Typically, tiles generated from the contents of geometric models. */\r\n Primary = 20,\r\n /** 3d terrain tiles onto which background map imagery is draped. */\r\n Terrain = 10,\r\n /** Typically, reality models. */\r\n Context = 40,\r\n /** Supplementary tiles used to classify the contents of geometric or reality models. */\r\n Classifier = 50,\r\n}\r\n\r\n/**\r\n * Options for displaying tile bounding boxes for debugging purposes.\r\n *\r\n * Bounding boxes are color-coded based on refinement strategy:\r\n * - Blue: A leaf tile (has no child tiles).\r\n * - Green: An ordinary tile (sub-divides into 4 or 8 child tiles).\r\n * - Red: A tile which refines to a single higher-resolution child occupying the same volume.\r\n * @see [[Viewport.debugBoundingBoxes]]\r\n * @public\r\n */\r\nexport enum TileBoundingBoxes {\r\n /** Display no bounding boxes */\r\n None = 0,\r\n /** Display boxes representing the tile's full volume. */\r\n Volume,\r\n /** Display boxes representing the range of the tile's contents, which may be tighter than (but never larger than) the tile's full volume. */\r\n Content,\r\n /** Display both volume and content boxes. */\r\n Both,\r\n /** Display boxes for direct children, where blue boxes indicate empty volumes. */\r\n ChildVolumes,\r\n /** Display bounding sphere. */\r\n Sphere,\r\n}\r\n\r\n// TileLoadStatus is computed from the combination of Tile._state and, if Tile.request is defined, Tile.request.state.\r\nconst enum TileState {// eslint-disable-line no-restricted-syntax\r\n NotReady = TileLoadStatus.NotLoaded, // Tile requires loading, but no request has yet completed.\r\n Ready = TileLoadStatus.Ready, // request completed successfully, or no loading was required.\r\n NotFound = TileLoadStatus.NotFound, // request failed.\r\n Abandoned = TileLoadStatus.Abandoned, // tile was abandoned.\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../src/tile/Tile.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAY,OAAO,EAAW,OAAO,EAAsB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACtI,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAuB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC3G,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAQzC,OAAO,EACmD,WAAW,EAAgC,kBAAkB,EAAE,eAAe,GACvI,MAAM,YAAY,CAAC;AAEpB,uCAAuC;AAEvC,MAAM,cAAc,GAAG,CAAC,IAAI,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,CAAC,CAAC;AAEpF,gBAAgB;AAChB,MAAM,UAAU,eAAe,CAAC,OAAuB,EAAE,KAAc,EAAE,IAAa;IACpF,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3B,OAAO;KACR;IAED,wEAAwE;IACxE,MAAM,GAAG,GAAG,cAAc,CAAC;IAC3B,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACrC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI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G;AACH,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,2DAA2D;IAC3D,uEAAc,CAAA;IACd,+EAA+E;IAC/E,6DAAS,CAAA;IACT,iFAAiF;IACjF,yDAAO,CAAA;AACT,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,gBAaX;AAbD,WAAY,gBAAgB;IAC1B,wEAAwE;IACxE,6DAAW,CAAA;IACX,4BAA4B;IAC5B,sDAAQ,CAAA;IACR,wEAAwE;IACxE,8DAAY,CAAA;IACZ,oEAAoE;IACpE,8DAAY,CAAA;IACZ,iCAAiC;IACjC,8DAAY,CAAA;IACZ,wFAAwF;IACxF,oEAAe,CAAA;AACjB,CAAC,EAbW,gBAAgB,KAAhB,gBAAgB,QAa3B;AAED;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IAC3B,gCAAgC;IAChC,yDAAQ,CAAA;IACR,yDAAyD;IACzD,6DAAM,CAAA;IACN,6IAA6I;IAC7I,+DAAO,CAAA;IACP,6CAA6C;IAC7C,yDAAI,CAAA;IACJ,kFAAkF;IAClF,yEAAY,CAAA;IACZ,+BAA+B;IAC/B,6DAAM,CAAA;AACR,CAAC,EAbW,iBAAiB,KAAjB,iBAAiB,QAa5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { assert, dispose } from \"@itwin/core-bentley\";\r\nimport { Arc3d, ClipPlaneContainment, Matrix4d, Point2d, Point3d, Point4d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\nimport { BoundingSphere, ColorDef, ElementAlignedBox3d, Frustum, FrustumPlanes } from \"@itwin/core-common\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { GraphicBuilder } from \"../render/GraphicBuilder\";\r\nimport { RenderGraphic } from \"../render/RenderGraphic\";\r\nimport { RenderMemory } from \"../render/RenderMemory\";\r\nimport { RenderSystem } from \"../render/RenderSystem\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport {\r\n LRUTileListNode, TileContent, TileDrawArgs, TileParams, TileRequest, TileRequestChannel, TileTree, TileTreeLoadStatus, TileUsageMarker, ViewportIdSet,\r\n} from \"./internal\";\r\n\r\n// cSpell:ignore undisplayable bitfield\r\n\r\nconst scratchRange2d = [new Point2d(), new Point2d(), new Point2d(), new Point2d()];\r\n\r\n/** @internal */\r\nexport function addRangeGraphic(builder: GraphicBuilder, range: Range3d, is2d: boolean): void {\r\n if (!is2d) {\r\n builder.addRangeBox(range);\r\n return;\r\n }\r\n\r\n // 3d box is useless in 2d and will be clipped by near/far planes anyway\r\n const pts = scratchRange2d;\r\n pts[0].set(range.low.x, range.low.y);\r\n pts[1].set(range.high.x, range.low.y);\r\n pts[2].set(range.high.x, range.high.y);\r\n pts[3].set(range.low.x, range.high.y);\r\n builder.addLineString2d(pts, 0);\r\n}\r\n\r\nconst scratchWorldFrustum = new Frustum();\r\nconst scratchRootFrustum = new Frustum();\r\nconst scratchWorldSphere = new BoundingSphere();\r\nconst scratchPoint4d = Point4d.createZero();\r\nconst scratchFrustum = new Frustum();\r\n\r\n/** A 3d tile within a [[TileTree]].\r\n *\r\n * 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.\r\n * 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\r\n * 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.\r\n * 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\r\n * [[Tile.dispose]].\r\n *\r\n * 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.\r\n * For example, [[loadChildren]] should not be overridden, but it calls [[_loadChildren]], which must be overridden because it is abstract.\r\n * @public\r\n */\r\nexport abstract class Tile {\r\n private _state: TileState = TileState.NotReady;\r\n private _children: Tile[] | undefined;\r\n private _rangeGraphic?: RenderGraphic;\r\n private _rangeGraphicType: TileBoundingBoxes = TileBoundingBoxes.None;\r\n /** This tile's renderable content. */\r\n protected _graphic?: RenderGraphic;\r\n /** True if this tile ever had graphics loaded. Used to determine when a tile's graphics were later freed to conserve memory. */\r\n protected _hadGraphics = false;\r\n /** Uniquely identifies this tile's content in the context of its tree. */\r\n protected _contentId: string;\r\n /** The current loading state of this tile's children. Child tiles are loaded on-demand, potentially asynchronously. */\r\n protected _childrenLoadStatus: TileTreeLoadStatus;\r\n /** @internal */\r\n protected _request?: TileRequest;\r\n /** @internal */\r\n protected _isLeaf: boolean;\r\n /** A volume no larger than this tile's `range`, and optionally more tightly encompassing its contents, used for more accurate culling.\r\n * [[contentRange]] uses this range if defined; otherwise it uses [[range]].\r\n */\r\n protected _contentRange?: ElementAlignedBox3d;\r\n /** The maximum size in pixels this tile can be drawn. If the size of the tile on screen exceeds this maximum, a higher-resolution tile should be drawn in its place. */\r\n protected _maximumSize: number;\r\n /** The [[TileTree]] to which this tile belongs. */\r\n public readonly tree: TileTree;\r\n /** The volume of space occupied by this tile. Its children are guaranteed to also be contained within this volume. */\r\n public readonly range: ElementAlignedBox3d;\r\n /** The parent of this tile, or undefined if it is the [[TileTree]]'s root tile. */\r\n public readonly parent: Tile | undefined;\r\n /** The depth of this tile within its [[TileTree]]. The root tile has a depth of zero. */\r\n public readonly depth: number;\r\n /** The bounding sphere for this tile. */\r\n public readonly boundingSphere: BoundingSphere;\r\n /** The point at the center of this tile's volume. */\r\n public get center(): Point3d { return this.boundingSphere.center; }\r\n /** The radius of a sphere fully encompassing this tile's volume - used for culling. */\r\n public get radius(): number { return this.boundingSphere.radius; }\r\n /** Tracks the usage of this tile. After a period of disuse, the tile may be [[prune]]d to free up memory. */\r\n public readonly usageMarker = new TileUsageMarker();\r\n\r\n /** Exclusively for use by LRUTileList. @internal */\r\n public previous?: LRUTileListNode;\r\n /** Exclusively for use by LRUTileList. @internal */\r\n public next?: LRUTileListNode;\r\n /** Exclusively for use by LRUTileList. @internal */\r\n public bytesUsed = 0;\r\n /** Exclusively for use by LRUTileList. @internal */\r\n public viewportIds?: ViewportIdSet;\r\n\r\n /** Load this tile's children, possibly asynchronously. Pass them to `resolve`, or an error to `reject`. */\r\n protected abstract _loadChildren(resolve: (children: Tile[] | undefined) => void, reject: (error: Error) => void): void;\r\n\r\n /** Return the channel via which this tile's content should be requested.\r\n * @note The channel *must* be registered with `IModelApp.tileAdmin.channels`.\r\n * @see [[TileRequestChannels.getForHttp]] to create a channel that requests content over HTTP.\r\n * @see [[TileAdmin.channels]].\r\n * @public\r\n */\r\n public abstract get channel(): TileRequestChannel;\r\n\r\n /** Return a Promise that resolves to the raw data representing this tile's content. */\r\n public abstract requestContent(isCanceled: () => boolean): Promise<TileRequest.Response>;\r\n\r\n /** Return a Promise that deserializes this tile's content from raw format produced by [[requestContent]]. */\r\n public abstract readContent(data: TileRequest.ResponseData, system: RenderSystem, isCanceled?: () => boolean): Promise<TileContent>;\r\n\r\n /** Constructor */\r\n protected constructor(params: TileParams, tree: TileTree) {\r\n this.tree = tree;\r\n this.parent = params.parent;\r\n this.depth = undefined !== this.parent ? this.parent.depth + 1 : 0;\r\n this.range = params.range;\r\n this._maximumSize = params.maximumSize;\r\n this._contentRange = params.contentRange;\r\n this._contentId = params.contentId;\r\n\r\n const center = this.range.low.interpolate(0.5, this.range.high);\r\n const radius = 0.5 * this.range.low.distance(this.range.high);\r\n this.boundingSphere = new BoundingSphere(center, radius);\r\n\r\n if (params.maximumSize <= 0)\r\n this.setIsReady();\r\n\r\n this._isLeaf = true === params.isLeaf;\r\n this._childrenLoadStatus = (undefined !== tree.maxDepth && this.depth < tree.maxDepth) ? TileTreeLoadStatus.NotLoaded : TileTreeLoadStatus.Loaded;\r\n }\r\n\r\n /** Free memory-consuming resources owned by this tile to reduce memory pressure.\r\n * By default, this calls [[disposeContents]]. Problematic subclasses (MapTile, ImageryMapTile) may opt out for now by overriding this method to do nothing.\r\n * That option may be removed in the future.\r\n * @alpha\r\n */\r\n public freeMemory(): void {\r\n this.disposeContents();\r\n }\r\n\r\n /** Dispose of resources held by this tile. */\r\n public disposeContents(): void {\r\n this._state = TileState.NotReady;\r\n this._graphic = dispose(this._graphic);\r\n this._rangeGraphic = dispose(this._rangeGraphic);\r\n this._rangeGraphicType = TileBoundingBoxes.None;\r\n IModelApp.tileAdmin.onTileContentDisposed(this);\r\n }\r\n\r\n /** Dispose of resources held by this tile and all of its children, marking it and all of its children as \"abandoned\". */\r\n public dispose(): void {\r\n this.disposeContents();\r\n this._state = TileState.Abandoned;\r\n this.disposeChildren();\r\n }\r\n\r\n /** This tile's child tiles, if they exist and are loaded. The children are fully contained within this tile's volume and provide higher-resolution graphics than this tile.\r\n * @see [[loadChildren]]\r\n */\r\n public get children(): Tile[] | undefined { return this._children; }\r\n /** The [[IModelConnection]] to which this tile belongs. */\r\n public get iModel(): IModelConnection { return this.tree.iModel; }\r\n /** Uniquely identifies this tile's content. */\r\n public get contentId(): string { return this._contentId; }\r\n\r\n /** True if this tile's content is currently being loaded. */\r\n public get isLoading(): boolean { return TileLoadStatus.Loading === this.loadStatus; }\r\n /** True if a request for this tile's content has been enqueued. */\r\n public get isQueued(): boolean { return TileLoadStatus.Queued === this.loadStatus; }\r\n /** True if an attempt to load this tile's content failed. */\r\n public get isNotFound(): boolean { return TileLoadStatus.NotFound === this.loadStatus; }\r\n /** True if this tile's content has been loaded and is ready to be drawn. */\r\n public get isReady(): boolean { return TileLoadStatus.Ready === this.loadStatus; }\r\n\r\n /** @public */\r\n public setNotFound(): void {\r\n this._state = TileState.NotFound;\r\n }\r\n\r\n /** @public */\r\n public setIsReady(): void {\r\n if (this.hasGraphics)\r\n this._hadGraphics = true;\r\n\r\n this._state = TileState.Ready;\r\n IModelApp.tileAdmin.onTileContentLoaded(this);\r\n }\r\n\r\n /** @public */\r\n public setLeaf(): void {\r\n // Don't potentially re-request the children later.\r\n this.disposeChildren();\r\n this._isLeaf = true;\r\n this._childrenLoadStatus = TileTreeLoadStatus.Loaded;\r\n }\r\n\r\n /** True if this tile has no child tiles. */\r\n public get isLeaf(): boolean { return this._isLeaf; }\r\n /** @internal */\r\n public get isEmpty(): boolean { return this.isReady && !this.hasGraphics && this.isLeaf; }\r\n /** @internal */\r\n public get isDisplayable(): boolean { return 0 < this.maximumSize; }\r\n /** The maximum size in pixels this tile can be drawn. If the size of the tile on screen exceeds this maximum, a higher-resolution tile should be drawn in its place. */\r\n public get maximumSize(): number { return this._maximumSize; }\r\n /** @internal */\r\n public get isParentDisplayable(): boolean { return undefined !== this.parent && this.parent.isDisplayable; }\r\n /** @internal */\r\n public get isUndisplayableRootTile(): boolean { return undefined === this.parent && !this.isDisplayable; }\r\n\r\n /** @internal */\r\n public get request(): TileRequest | undefined { return this._request; }\r\n public set request(request: TileRequest | undefined) {\r\n assert(undefined === request || undefined === this.request);\r\n this._request = request;\r\n }\r\n\r\n /** Compute the load priority of this tile. This determines which tiles' contents are requested first.\r\n * @param _viewports The viewports for which the tile has been requested for display.\r\n * @returns The priority.\r\n * @see [[TileLoadPriority]] for suggested priority values.\r\n */\r\n public computeLoadPriority(_viewports: Iterable<Viewport>): number {\r\n return this.depth;\r\n }\r\n\r\n /** True if this tile has graphics ready to draw. */\r\n public get hasGraphics(): boolean { return undefined !== this._graphic; }\r\n /** True if this tile has a known volume tightly encompassing its graphics. */\r\n public get hasContentRange(): boolean { return undefined !== this._contentRange; }\r\n /** A volume no larger than this tile's `range`, and optionally more tightly encompassing its contents, used for more accurate culling. */\r\n public get contentRange(): ElementAlignedBox3d {\r\n if (undefined !== this._contentRange)\r\n return this._contentRange;\r\n else if (undefined === this.parent && undefined !== this.tree.contentRange)\r\n return this.tree.contentRange;\r\n else\r\n return this.range;\r\n }\r\n\r\n /** Tile contents are loaded asynchronously on demand. This member tracks the current loading status of this tile's contents. */\r\n public get loadStatus(): TileLoadStatus {\r\n switch (this._state) {\r\n case TileState.NotReady: {\r\n if (undefined === this.request)\r\n return TileLoadStatus.NotLoaded;\r\n else if (TileRequest.State.Loading === this.request.state)\r\n return TileLoadStatus.Loading;\r\n\r\n assert(TileRequest.State.Completed !== this.request.state && TileRequest.State.Failed !== this.request.state); // this.request should be undefined in these cases...\r\n return TileLoadStatus.Queued;\r\n }\r\n case TileState.Ready: {\r\n assert(undefined === this.request);\r\n return TileLoadStatus.Ready;\r\n }\r\n case TileState.NotFound: {\r\n assert(undefined === this.request);\r\n return TileLoadStatus.NotFound;\r\n }\r\n default: {\r\n assert(TileState.Abandoned === this._state);\r\n return TileLoadStatus.Abandoned;\r\n }\r\n }\r\n }\r\n\r\n /** Produce the graphics that should be drawn. */\r\n public produceGraphics(): RenderGraphic | undefined {\r\n return this._graphic;\r\n }\r\n\r\n protected setGraphic(graphic: RenderGraphic | undefined): void {\r\n dispose(this._graphic);\r\n this._graphic = graphic;\r\n this.setIsReady();\r\n }\r\n\r\n /** Set this tile's content to the result of [[readContent]] */\r\n public setContent(content: TileContent): void {\r\n const { graphic, isLeaf, contentRange } = content;\r\n this.setGraphic(graphic);\r\n\r\n if (undefined !== isLeaf && isLeaf !== this._isLeaf) {\r\n if (isLeaf)\r\n this.setLeaf();\r\n else\r\n this._isLeaf = false;\r\n }\r\n\r\n if (undefined !== contentRange)\r\n this._contentRange = contentRange;\r\n\r\n this.setIsReady();\r\n }\r\n\r\n /** Disclose any resources owned by this tile, other than its [[RenderGraphic]].\r\n * @internal\r\n */\r\n protected _collectStatistics(_stats: RenderMemory.Statistics): void { }\r\n\r\n /** Disclose resources owned by this tile and (by default) all of its child tiles.\r\n * @note Do not override this method! Override `_collectStatistics` instead.\r\n * @internal\r\n */\r\n public collectStatistics(stats: RenderMemory.Statistics, includeChildren = true): void {\r\n if (undefined !== this._graphic)\r\n this._graphic.collectStatistics(stats);\r\n\r\n this._collectStatistics(stats);\r\n if (!includeChildren)\r\n return;\r\n\r\n const children = this.children;\r\n if (undefined !== children)\r\n for (const child of children)\r\n child.collectStatistics(stats);\r\n }\r\n\r\n /** If this tile's child tiles have not yet been requested, enqueue an asynchronous request to load them.\r\n * @note This function itself is *not* asynchronous - it immediately returns the current loading status.\r\n * @note Do not override this method - implement [[_loadChildren]].\r\n */\r\n protected loadChildren(): TileTreeLoadStatus {\r\n if (this._childrenLoadStatus !== TileTreeLoadStatus.NotLoaded)\r\n return this._childrenLoadStatus;\r\n\r\n this._childrenLoadStatus = TileTreeLoadStatus.Loading;\r\n\r\n this._loadChildren((children: Tile[] | undefined) => {\r\n this._children = children;\r\n this._childrenLoadStatus = TileTreeLoadStatus.Loaded;\r\n\r\n if (undefined === children || 0 === children.length)\r\n this._isLeaf = true;\r\n\r\n IModelApp.tileAdmin.onTileChildrenLoad.raiseEvent(this);\r\n }, (_error: Error) => {\r\n this._isLeaf = true;\r\n this._childrenLoadStatus = TileTreeLoadStatus.NotFound;\r\n\r\n IModelApp.tileAdmin.onTileChildrenLoad.raiseEvent(this);\r\n });\r\n\r\n return this._childrenLoadStatus;\r\n }\r\n\r\n /** Dispose of this tile's child tiles and mark them as \"not loaded\". */\r\n protected disposeChildren(): void {\r\n const children = this.children;\r\n if (undefined === children)\r\n return;\r\n\r\n for (const child of children)\r\n child.dispose();\r\n\r\n this._childrenLoadStatus = TileTreeLoadStatus.NotLoaded;\r\n this._children = undefined;\r\n }\r\n\r\n /** Returns true if this tile's bounding volume is culled by the frustum or clip volumes specified by `args`. */\r\n protected isRegionCulled(args: TileDrawArgs): boolean {\r\n return this.isCulled(this.range, args, true, this.boundingSphere);\r\n }\r\n\r\n /** Returns true if this tile's content bounding volume is culled by the frustum or clip volumes specified by `args`. */\r\n protected isContentCulled(args: TileDrawArgs): boolean {\r\n return this.isCulled(this.contentRange, args, false);\r\n }\r\n\r\n private isCulled(range: ElementAlignedBox3d, args: TileDrawArgs, testClipIntersection: boolean, sphere?: BoundingSphere) {\r\n const box = Frustum.fromRange(range, scratchRootFrustum);\r\n return this.isFrustumCulled(box, args, testClipIntersection, sphere);\r\n }\r\n\r\n protected isFrustumCulled(box: Frustum, args: TileDrawArgs, testClipIntersection: boolean, sphere?: BoundingSphere) {\r\n const worldBox = box.transformBy(args.location, scratchWorldFrustum);\r\n const worldSphere = sphere?.transformBy(args.location, scratchWorldSphere);\r\n\r\n // Test against frustum.\r\n if (FrustumPlanes.Containment.Outside === args.frustumPlanes.computeFrustumContainment(worldBox, worldSphere))\r\n return true;\r\n\r\n // Test against TileTree's own clip volume, if any.\r\n if (undefined !== args.clip && ClipPlaneContainment.StronglyOutside === args.clip.classifyPointContainment(worldBox.points))\r\n return true;\r\n\r\n // Test against view clip, if any (will be undefined if TileTree does not want view clip applied to it).\r\n if (undefined !== args.viewClip && ClipPlaneContainment.StronglyOutside === args.viewClip.classifyPointContainment(worldBox.points))\r\n return true;\r\n\r\n // Test against intersection clip - reject if tile doesn't intersect (used for section-cut graphics).\r\n if (testClipIntersection && undefined !== args.intersectionClip && ClipPlaneContainment.Ambiguous !== args.intersectionClip.classifyPointContainment(worldBox.points))\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n /** Determine the visibility of this tile according to the specified args. */\r\n public computeVisibility(args: TileDrawArgs): TileVisibility {\r\n if (this.isEmpty)\r\n return TileVisibility.OutsideFrustum;\r\n\r\n if (args.boundingRange && !args.boundingRange.intersectsRange(this.range))\r\n return TileVisibility.OutsideFrustum;\r\n\r\n // NB: We test for region culling before isDisplayable - otherwise we will never unload children of undisplayed tiles when\r\n // they are outside frustum\r\n if (this.isRegionCulled(args))\r\n return TileVisibility.OutsideFrustum;\r\n\r\n // some nodes are merely for structure and don't have any geometry\r\n if (!this.isDisplayable)\r\n return TileVisibility.TooCoarse;\r\n\r\n if (this.isLeaf) {\r\n if (this.hasContentRange && this.isContentCulled(args))\r\n return TileVisibility.OutsideFrustum;\r\n else\r\n return TileVisibility.Visible;\r\n }\r\n\r\n const pixelSize = args.getPixelSize(this) * args.pixelSizeScaleFactor;\r\n const maxSize = this.maximumSize * args.tileSizeModifier;\r\n\r\n return pixelSize > maxSize ? TileVisibility.TooCoarse : TileVisibility.Visible;\r\n }\r\n\r\n /** @internal */\r\n public extendRangeForContent(range: Range3d, matrix: Matrix4d, treeTransform: Transform, frustumPlanes?: FrustumPlanes): void {\r\n if (this.isEmpty || this.contentRange.isNull)\r\n return;\r\n\r\n const box = Frustum.fromRange(this.contentRange, scratchFrustum);\r\n box.transformBy(treeTransform, box);\r\n if (frustumPlanes !== undefined && FrustumPlanes.Containment.Outside === frustumPlanes.computeFrustumContainment(box))\r\n return;\r\n\r\n if (this.children === undefined) {\r\n for (const boxPoint of box.points) {\r\n const pt = matrix.multiplyPoint3d(boxPoint, 1, scratchPoint4d);\r\n if (pt.w > .0001)\r\n range.extendXYZW(pt.x, pt.y, pt.z, pt.w);\r\n else\r\n range.high.z = Math.max(1.0, range.high.z); // behind eye plane...\r\n }\r\n } else {\r\n for (const child of this.children)\r\n child.extendRangeForContent(range, matrix, treeTransform, frustumPlanes);\r\n }\r\n }\r\n\r\n /** Primarily for debugging purposes, compute the number of tiles below this one in the [[TileTree]]. */\r\n public countDescendants(): number {\r\n const children = this.children;\r\n if (undefined === children || 0 === children.length)\r\n return 0;\r\n\r\n let count = 0;\r\n for (const child of children)\r\n count += child.countDescendants();\r\n\r\n return count;\r\n }\r\n\r\n /** Output this tile's graphics. */\r\n public drawGraphics(args: TileDrawArgs): void {\r\n const gfx = this.produceGraphics();\r\n if (undefined === gfx)\r\n return;\r\n\r\n args.graphics.add(gfx);\r\n const rangeGfx = this.getRangeGraphic(args.context);\r\n if (undefined !== rangeGfx)\r\n args.graphics.add(rangeGfx);\r\n }\r\n\r\n /** @internal */\r\n protected get rangeGraphicColor(): ColorDef {\r\n return this.isLeaf ? ColorDef.blue : ColorDef.green;\r\n }\r\n\r\n /** @internal */\r\n public getRangeGraphic(context: SceneContext): RenderGraphic | undefined {\r\n const type = context.viewport.debugBoundingBoxes;\r\n if (type === this._rangeGraphicType)\r\n return this._rangeGraphic;\r\n\r\n this._rangeGraphic = dispose(this._rangeGraphic);\r\n this._rangeGraphicType = type;\r\n if (TileBoundingBoxes.None !== type) {\r\n const builder = context.createSceneGraphicBuilder();\r\n this.addRangeGraphic(builder, type);\r\n this._rangeGraphic = builder.finish();\r\n }\r\n\r\n return this._rangeGraphic;\r\n }\r\n\r\n /** @internal */\r\n protected addRangeGraphic(builder: GraphicBuilder, type: TileBoundingBoxes): void {\r\n if (TileBoundingBoxes.Both === type) {\r\n builder.setSymbology(ColorDef.blue, ColorDef.blue, 1);\r\n addRangeGraphic(builder, this.range, this.tree.is2d);\r\n\r\n if (this.hasContentRange) {\r\n builder.setSymbology(ColorDef.red, ColorDef.red, 1);\r\n addRangeGraphic(builder, this.contentRange, this.tree.is2d);\r\n }\r\n } else if (TileBoundingBoxes.Sphere === type) {\r\n builder.setSymbology(ColorDef.green, ColorDef.green, 1);\r\n\r\n const x = new Vector3d(this.radius, 0, 0);\r\n const y = new Vector3d(0, this.radius, 0);\r\n const z = new Vector3d(0, 0, this.radius);\r\n\r\n builder.addArc(Arc3d.create(this.center, x, y), false, false);\r\n builder.addArc(Arc3d.create(this.center, x, z), false, false);\r\n builder.addArc(Arc3d.create(this.center, y, z), false, false);\r\n } else {\r\n const color = this.rangeGraphicColor;\r\n builder.setSymbology(color, color, 1);\r\n const range = TileBoundingBoxes.Content === type ? this.contentRange : this.range;\r\n addRangeGraphic(builder, range, this.tree.is2d);\r\n }\r\n }\r\n\r\n /** Optional corners used to compute the screen size of the tile. These are used, e.g., by reality tiles with oriented bounding boxes to\r\n * produce more accurate size calculation.\r\n */\r\n public getSizeProjectionCorners(): Point3d[] | undefined { return undefined; }\r\n}\r\n\r\n/** Describes the current status of a [[Tile]]'s content. Tile content is loaded via an asynchronous [[TileRequest]].\r\n * @see [[Tile.loadStatus]].\r\n * @public\r\n */\r\nexport enum TileLoadStatus {\r\n /** No attempt to load the tile's content has been made, or the tile has since been unloaded. It currently has no graphics. */\r\n NotLoaded = 0,\r\n /** A request has been dispatched to load the tile's contents, and a response is pending. */\r\n Queued = 1,\r\n /** A response has been received and the tile's graphics and other data are being loaded on the frontend. */\r\n Loading = 2,\r\n /** The tile has been loaded, and if the tile is displayable it has graphics. */\r\n Ready = 3,\r\n /** A request to load the tile's contents failed. */\r\n NotFound = 4,\r\n /** The tile has been disposed. */\r\n Abandoned = 5,\r\n}\r\n\r\n/**\r\n * Describes the visibility of a tile based on its size and a view frustum.\r\n * @public\r\n */\r\nexport enum TileVisibility {\r\n /** The tile is entirely outside of the viewing frustum. */\r\n OutsideFrustum,\r\n /** The tile's graphics are of too low a resolution for the viewing frustum. */\r\n TooCoarse,\r\n /** The tile's graphics are of appropriate resolution for the viewing frustum. */\r\n Visible,\r\n}\r\n\r\n/**\r\n * Loosely describes the \"importance\" of a [[Tile]]. Requests for tiles of greater \"importance\" are prioritized for loading.\r\n * @note A lower priority value indicates higher importance.\r\n * @public\r\n */\r\nexport enum TileLoadPriority {\r\n /** Contents of geometric models that are being interactively edited. */\r\n Dynamic = 5,\r\n /** Background map tiles. */\r\n Map = 15,\r\n /** Typically, tiles generated from the contents of geometric models. */\r\n Primary = 20,\r\n /** 3d terrain tiles onto which background map imagery is draped. */\r\n Terrain = 10,\r\n /** Typically, reality models. */\r\n Context = 40,\r\n /** Supplementary tiles used to classify the contents of geometric or reality models. */\r\n Classifier = 50,\r\n}\r\n\r\n/**\r\n * Options for displaying tile bounding boxes for debugging purposes.\r\n *\r\n * Bounding boxes are color-coded based on refinement strategy:\r\n * - Blue: A leaf tile (has no child tiles).\r\n * - Green: An ordinary tile (sub-divides into 4 or 8 child tiles).\r\n * - Red: A tile which refines to a single higher-resolution child occupying the same volume.\r\n * @see [[Viewport.debugBoundingBoxes]]\r\n * @public\r\n */\r\nexport enum TileBoundingBoxes {\r\n /** Display no bounding boxes */\r\n None = 0,\r\n /** Display boxes representing the tile's full volume. */\r\n Volume,\r\n /** Display boxes representing the range of the tile's contents, which may be tighter than (but never larger than) the tile's full volume. */\r\n Content,\r\n /** Display both volume and content boxes. */\r\n Both,\r\n /** Display boxes for direct children, where blue boxes indicate empty volumes. */\r\n ChildVolumes,\r\n /** Display bounding sphere. */\r\n Sphere,\r\n}\r\n\r\n// TileLoadStatus is computed from the combination of Tile._state and, if Tile.request is defined, Tile.request.state.\r\nconst enum TileState {// eslint-disable-line no-restricted-syntax\r\n NotReady = TileLoadStatus.NotLoaded, // Tile requires loading, but no request has yet completed.\r\n Ready = TileLoadStatus.Ready, // request completed successfully, or no loading was required.\r\n NotFound = TileLoadStatus.NotFound, // request failed.\r\n Abandoned = TileLoadStatus.Abandoned, // tile was abandoned.\r\n}\r\n"]}
|
|
@@ -39,6 +39,13 @@ export interface TileDrawArgParams {
|
|
|
39
39
|
hiddenLineSettings?: HiddenLine.Settings;
|
|
40
40
|
/** If defined, tiles should be culled if they do not intersect this clip. */
|
|
41
41
|
intersectionClip?: ClipVector;
|
|
42
|
+
/** If defined, the Id of a node in the scene's [RenderSchedule.Script]($common) that applies a transform to the graphics;
|
|
43
|
+
* or "0xffffffff" for any node that does *not* apply a transform.
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
animationTransformNodeId?: number;
|
|
47
|
+
/** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */
|
|
48
|
+
boundingRange?: Range3d;
|
|
42
49
|
}
|
|
43
50
|
/**
|
|
44
51
|
* Provides context used when selecting and drawing [[Tile]]s.
|
|
@@ -85,8 +92,12 @@ export declare class TileDrawArgs {
|
|
|
85
92
|
get symbologyOverrides(): FeatureSymbology.Overrides | undefined;
|
|
86
93
|
/** If defined, tiles will be culled if they do not intersect this clip. */
|
|
87
94
|
intersectionClip?: ClipVector;
|
|
95
|
+
/** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */
|
|
96
|
+
boundingRange?: Range3d;
|
|
88
97
|
/** @internal */
|
|
89
98
|
readonly pixelSizeScaleFactor: number;
|
|
99
|
+
/** @internal */
|
|
100
|
+
readonly animationTransformNodeId?: number;
|
|
90
101
|
/** Compute the size in pixels of the specified tile at the point on its bounding sphere closest to the camera. */
|
|
91
102
|
getPixelSize(tile: Tile): number;
|
|
92
103
|
/** If the tile provides corners (from an OBB) then this produces most accurate representation of the tile size */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileDrawArgs.d.ts","sourceRoot":"","sources":["../../../src/tile/TileDrawArgs.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAY,KAAK,EAAY,OAAO,EAAoB,OAAO,EAAE,SAAS,EAAY,MAAM,sBAAsB,CAAC;AACtI,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAS7D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,qEAAqE;IACrE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AsB;CACpF"}
|
|
@@ -35,6 +35,8 @@ export class TileDrawArgs {
|
|
|
35
35
|
this.now = now;
|
|
36
36
|
this._appearanceProvider = params.appearanceProvider;
|
|
37
37
|
this.hiddenLineSettings = params.hiddenLineSettings;
|
|
38
|
+
this.animationTransformNodeId = params.animationTransformNodeId;
|
|
39
|
+
this.boundingRange = params.boundingRange;
|
|
38
40
|
// Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.
|
|
39
41
|
if (undefined !== clipVolume && !context.viewport.view.displayStyle.settings.clipStyle.outsideColor)
|
|
40
42
|
this.clipVolume = clipVolume;
|
|
@@ -223,7 +225,10 @@ export class TileDrawArgs {
|
|
|
223
225
|
appearanceProvider: this.appearanceProvider,
|
|
224
226
|
hline: this.hiddenLineSettings,
|
|
225
227
|
};
|
|
226
|
-
|
|
228
|
+
let graphic = this.context.createGraphicBranch(graphics, this.location, opts);
|
|
229
|
+
if (undefined !== this.animationTransformNodeId)
|
|
230
|
+
graphic = this.context.renderSystem.createAnimationTransformNode(graphic, this.animationTransformNodeId);
|
|
231
|
+
return graphic;
|
|
227
232
|
}
|
|
228
233
|
/** Output graphics for all accumulated tiles. */
|
|
229
234
|
drawGraphics() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileDrawArgs.js","sourceRoot":"","sources":["../../../src/tile/TileDrawArgs.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAc,QAAQ,EAAS,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACtI,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAiC,MAAM,oBAAoB,CAAC;AAE7G,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAOxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,YAAY,GAAG,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IAAU;QAC7B,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,mEAAmE;IAC5D,mBAAmB;QACxB,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;IACrC,CAAC;IAED,oVAAoV;IAC7U,QAAQ,CAAC,IAAU;QACxB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACI,SAAS,CAAC,IAAU;QACzB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,oBAAoB,CAAC,MAAc,IAAU,CAAC;IAErD,eAAe;IACf,IAAW,4BAA4B,KAAyB,OAAO,SAAS,CAAC,CAAC,CAAC;CACpF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { BeTimePoint } from \"@itwin/core-bentley\";\r\nimport { ClipVector, Geometry, Map4d, Matrix4d, Point3d, Point4d, Range1d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\nimport { FeatureAppearanceProvider, FrustumPlanes, HiddenLine, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\r\nimport { GraphicBranch } from \"../render/GraphicBranch\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderGraphic } from \"../render/RenderGraphic\";\r\nimport { RenderPlanarClassifier } from \"../render/RenderPlanarClassifier\";\r\nimport { RenderTextureDrape } from \"../render/RenderSystem\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { ViewingSpace } from \"../ViewingSpace\";\r\nimport { CoordSystem } from \"../CoordSystem\";\r\nimport { Tile, TileGraphicType, TileTree } from \"./internal\";\r\n\r\nconst scratchRange = new Range3d();\r\nconst scratchPoint = Point3d.create();\r\nconst scratchPoint4d = Point4d.create();\r\nconst scratchXRange = Range1d.createNull();\r\nconst scratchYRange = Range1d.createNull();\r\nconst scratchMatrix4d = Matrix4d.createIdentity();\r\n\r\n/** Parameters used to construct [[TileDrawArgs]].\r\n * @public\r\n */\r\nexport interface TileDrawArgParams {\r\n /** Context for the scene into which the tiles are to be rendered. */\r\n context: SceneContext;\r\n /** Transform to be applied when drawing the tiles. */\r\n location: Transform;\r\n /** The tile tree from which to obtain tiles. */\r\n tree: TileTree;\r\n /** The time at which these args were created. */\r\n now: BeTimePoint;\r\n /** Overrides to apply to the view's [ViewFlags]($common) when drawing the tiles. */\r\n viewFlagOverrides: ViewFlagOverrides;\r\n /** Clip volume used to clip the tiles. */\r\n clipVolume?: RenderClipVolume;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n parentsAndChildrenExclusive: boolean;\r\n /** Symbology overrides to apply to the tiles. */\r\n symbologyOverrides: FeatureSymbology.Overrides | undefined;\r\n /** Optionally customizes the view's symbology overrides for the tiles. */\r\n appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optionally overrides the view's hidden line settings. */\r\n hiddenLineSettings?: HiddenLine.Settings;\r\n /** If defined, tiles should be culled if they do not intersect this clip. */\r\n intersectionClip?: ClipVector;\r\n}\r\n/**\r\n * Provides context used when selecting and drawing [[Tile]]s.\r\n * @see [[TileTree.selectTiles]]\r\n * @see [[TileTree.draw]]\r\n * @public\r\n */\r\nexport class TileDrawArgs {\r\n /** Transform to the location in iModel coordinates at which the tiles are to be drawn. */\r\n public readonly location: Transform;\r\n /** The tile tree being drawn. */\r\n public readonly tree: TileTree;\r\n /** Optional clip volume applied to the tiles. */\r\n public clipVolume: RenderClipVolume | undefined;\r\n /** The context in which the tiles will be drawn, exposing, e.g., the [[Viewport]] and accepting [[RenderGraphic]]s to be drawn. */\r\n public readonly context: SceneContext;\r\n /** Describes the viewed volume. */\r\n public viewingSpace: ViewingSpace;\r\n /** Holds the tile graphics to be drawn. */\r\n public readonly graphics: GraphicBranch = new GraphicBranch();\r\n /** @internal */\r\n public readonly now: BeTimePoint;\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n protected _frustumPlanes?: FrustumPlanes;\r\n /** @internal */\r\n public planarClassifier?: RenderPlanarClassifier;\r\n /** @internal */\r\n public drape?: RenderTextureDrape;\r\n /** Optional clip volume applied to all tiles in the view. */\r\n public readonly viewClip?: ClipVector;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n public parentsAndChildrenExclusive: boolean;\r\n /** @internal */\r\n private _appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optional overrides for the view's hidden line settings. */\r\n public hiddenLineSettings?: HiddenLine.Settings;\r\n /** Tiles that we want to draw and that are ready to draw. May not actually be selected, e.g. if sibling tiles are not yet ready. */\r\n public readonly readyTiles = new Set<Tile>();\r\n /** For perspective views, the view-Z of the near plane. */\r\n private readonly _nearFrontCenter?: Point3d;\r\n /** Overrides applied to the view's [ViewFlags]($common) when drawing the tiles. */\r\n public get viewFlagOverrides(): ViewFlagOverrides { return this.graphics.viewFlagOverrides; }\r\n /** If defined, replaces the view's own symbology overrides when drawing the tiles. */\r\n public get symbologyOverrides(): FeatureSymbology.Overrides | undefined { return this.graphics.symbologyOverrides; }\r\n /** If defined, tiles will be culled if they do not intersect this clip. */\r\n public intersectionClip?: ClipVector;\r\n /** @internal */\r\n public readonly pixelSizeScaleFactor;\r\n\r\n /** Compute the size in pixels of the specified tile at the point on its bounding sphere closest to the camera. */\r\n public getPixelSize(tile: Tile): number {\r\n const sizeFromProjection = this.getPixelSizeFromProjection(tile);\r\n if (undefined !== sizeFromProjection)\r\n return sizeFromProjection;\r\n\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(radius / pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** If the tile provides corners (from an OBB) then this produces most accurate representation of the tile size */\r\n private getPixelSizeFromProjection(tile: Tile): number | undefined {\r\n const sizeProjectionCorners = tile.getSizeProjectionCorners();\r\n if (!sizeProjectionCorners)\r\n return undefined;\r\n\r\n /* For maps or global reality models we use the projected screen rectangle rather than sphere to calculate pixel size to avoid excessive tiles at horizon. */\r\n const tileToView = this.worldToViewMap.transform0.multiplyMatrixMatrix(Matrix4d.createTransform(this.location, scratchMatrix4d), scratchMatrix4d);\r\n scratchXRange.setNull();\r\n scratchYRange.setNull();\r\n\r\n let behindEye = false;\r\n for (const corner of sizeProjectionCorners) {\r\n const viewCorner = tileToView.multiplyPoint3d(corner, 1, scratchPoint4d);\r\n if (viewCorner.w < 0.0) {\r\n behindEye = true;\r\n break;\r\n }\r\n\r\n scratchXRange.extendX(viewCorner.x / viewCorner.w);\r\n scratchYRange.extendX(viewCorner.y / viewCorner.w);\r\n }\r\n if (behindEye)\r\n return undefined;\r\n\r\n return scratchXRange.isNull ? 1.0E-3 : this.context.adjustPixelSizeForLOD(Math.sqrt(scratchXRange.length() * scratchYRange.length()));\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on the tile's bounding sphere closest to the camera. */\r\n public getPixelSizeInMetersAtClosestPoint(tile: Tile): number {\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on a sphere closest to the camera.\r\n * Device scaling is not applied.\r\n */\r\n protected computePixelSizeInMetersAtClosestPoint(center: Point3d, radius: number): number {\r\n if (this.context.viewport.view.is3d() && this.context.viewport.isCameraOn && this._nearFrontCenter) {\r\n const toFront = Vector3d.createStartEnd(center, this._nearFrontCenter);\r\n const viewZ = this.context.viewport.rotation.rowZ();\r\n // If the sphere overlaps the near front plane just use near front point. This also handles behind eye conditions.\r\n if (viewZ.dotProduct(toFront) < radius) {\r\n center = this._nearFrontCenter;\r\n } else {\r\n // Find point on sphere closest to eye.\r\n const toEye = center.unitVectorTo(this.context.viewport.view.camera.eye);\r\n\r\n if (toEye) { // Only if tile is not already behind the eye.\r\n toEye.scaleInPlace(radius);\r\n center.addInPlace(toEye);\r\n }\r\n }\r\n }\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n return this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n }\r\n\r\n /** Compute this size of a sphere on screen in pixels */\r\n public getRangePixelSize(range: Range3d): number {\r\n const transformedRange = this.location.multiplyRange(range, scratchRange);\r\n const center = transformedRange.localXYZToWorld(.5, .5, .5, scratchPoint)!;\r\n const radius = transformedRange.diagonal().magnitude();\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n const pixelSizeAtPt = this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n return 0 !== pixelSizeAtPt ? radius / pixelSizeAtPt : 1.0e-3;\r\n }\r\n\r\n /** @internal */\r\n public getTileGraphics(tile: Tile) {\r\n return tile.produceGraphics();\r\n }\r\n\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n public get frustumPlanes(): FrustumPlanes {\r\n return this._frustumPlanes !== undefined ? this._frustumPlanes : this.context.frustumPlanes;\r\n }\r\n\r\n /** Provides conversions between [[CoordSystem.World]] and [[CoordSystem.View]]. */\r\n public get worldToViewMap(): Map4d {\r\n return this.viewingSpace.worldToViewMap;\r\n }\r\n\r\n private computePixelSizeScaleFactor(): number {\r\n // Check to see if a model display transform with non-uniform scaling is being used.\r\n const tf = this.context.viewport.view.getModelDisplayTransform(this.tree.modelId, Transform.createIdentity());\r\n const scale = [];\r\n scale[0] = tf.matrix.getColumn(0).magnitude();\r\n scale[1] = tf.matrix.getColumn(1).magnitude();\r\n scale[2] = tf.matrix.getColumn(2).magnitude();\r\n if (Math.abs(scale[0] - scale[1]) <= Geometry.smallMetricDistance && Math.abs(scale[0] - scale[2]) <= Geometry.smallMetricDistance)\r\n return 1;\r\n // If the component with the largest scale is not the same as the component with the largest tile range use it to adjust the pixel size.\r\n const rangeDiag = this.tree.range.diagonal();\r\n let maxS = 0;\r\n let maxR = 0;\r\n if (scale[0] > scale[1]) {\r\n maxS = (scale[0] > scale[2] ? 0 : 2);\r\n } else {\r\n maxS = (scale[1] > scale[2] ? 1 : 2);\r\n }\r\n if (rangeDiag.x > rangeDiag.y) {\r\n maxR = (rangeDiag.x > rangeDiag.z ? 0 : 2);\r\n } else {\r\n maxR = (rangeDiag.y > rangeDiag.z ? 1 : 2);\r\n }\r\n if (maxS !== maxR)\r\n return scale[maxS];\r\n return 1;\r\n }\r\n\r\n /** Constructor */\r\n public constructor(params: TileDrawArgParams) {\r\n const { location, tree, context, now, viewFlagOverrides, clipVolume, parentsAndChildrenExclusive, symbologyOverrides } = params;\r\n this.location = location;\r\n this.tree = tree;\r\n this.context = context;\r\n this.now = now;\r\n this._appearanceProvider = params.appearanceProvider;\r\n this.hiddenLineSettings = params.hiddenLineSettings;\r\n\r\n // Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.\r\n if (undefined !== clipVolume && !context.viewport.view.displayStyle.settings.clipStyle.outsideColor)\r\n this.clipVolume = clipVolume;\r\n\r\n this.graphics.setViewFlagOverrides(viewFlagOverrides);\r\n this.graphics.symbologyOverrides = symbologyOverrides;\r\n this.graphics.animationId = tree.modelId;\r\n\r\n this.viewingSpace = context.viewingSpace;\r\n this._frustumPlanes = new FrustumPlanes(this.viewingSpace.getFrustum());\r\n\r\n this.planarClassifier = context.getPlanarClassifierForModel(tree.modelId);\r\n this.drape = context.getTextureDrapeForModel(tree.modelId);\r\n\r\n // NB: If the tile tree has its own clip, do not also apply the view's clip.\r\n if (context.viewFlags.clipVolume && false !== viewFlagOverrides.clipVolume && undefined === clipVolume) {\r\n const outsideClipColor = context.viewport.displayStyle.settings.clipStyle.outsideColor;\r\n this.viewClip = undefined === outsideClipColor ? context.viewport.view.getViewClip() : undefined;\r\n }\r\n\r\n this.parentsAndChildrenExclusive = parentsAndChildrenExclusive;\r\n if (context.viewport.isCameraOn)\r\n this._nearFrontCenter = context.viewport.getFrustum(CoordSystem.World).frontCenter;\r\n\r\n this.pixelSizeScaleFactor = this.computePixelSizeScaleFactor();\r\n }\r\n\r\n /** A multiplier applied to a [[Tile]]'s `maximumSize` property to adjust level of detail.\r\n * @see [[Viewport.tileSizeModifier]].\r\n * @public\r\n */\r\n public get tileSizeModifier(): number { return this.context.viewport.tileSizeModifier; }\r\n\r\n /** @internal */\r\n public getTileCenter(tile: Tile): Point3d { return this.location.multiplyPoint3d(tile.center); }\r\n\r\n /** @internal */\r\n public getTileRadius(tile: Tile): number {\r\n let range: Range3d = tile.range.clone(scratchRange);\r\n if (tile.tree.is2d) {\r\n // 2d tiles have a fixed Z range of [-1, 1]. Sometimes (e.g., hypermodeling) we draw them within a 3d view. Prevent Z from artificially expanding the radius.\r\n range.low.z = range.high.z = 0;\r\n }\r\n\r\n range = this.location.multiplyRange(range, range);\r\n return 0.5 * range.low.distance(range.high);\r\n }\r\n\r\n /** @internal */\r\n public get clip(): ClipVector | undefined {\r\n return undefined !== this.clipVolume ? this.clipVolume.clipVector : undefined;\r\n }\r\n\r\n /** Add a provider to supplement or override the symbology overrides for the view.\r\n * @note If a provider already exists, the new provider will be chained such that it sees the base overrides\r\n * after they have potentially been modified by the existing provider.\r\n * @public\r\n */\r\n public addAppearanceProvider(provider: FeatureAppearanceProvider): void {\r\n this._appearanceProvider = this._appearanceProvider ? FeatureAppearanceProvider.chain(this._appearanceProvider, provider) : provider;\r\n }\r\n\r\n /** Optionally customizes aspects of the view's [[FeatureSymbology.Overrides]]. */\r\n public get appearanceProvider(): FeatureAppearanceProvider | undefined {\r\n return this._appearanceProvider;\r\n }\r\n\r\n /** @internal */\r\n public produceGraphics(): RenderGraphic | undefined {\r\n return this._produceGraphicBranch(this.graphics);\r\n }\r\n\r\n /** @internal */\r\n private _produceGraphicBranch(graphics: GraphicBranch): RenderGraphic | undefined {\r\n if (graphics.isEmpty)\r\n return undefined;\r\n\r\n const opts = {\r\n iModel: this.tree.iModel,\r\n clipVolume: this.clipVolume,\r\n classifierOrDrape: this.planarClassifier ?? this.drape,\r\n appearanceProvider: this.appearanceProvider,\r\n hline: this.hiddenLineSettings,\r\n };\r\n\r\n return this.context.createGraphicBranch(graphics, this.location, opts);\r\n }\r\n\r\n /** Output graphics for all accumulated tiles. */\r\n public drawGraphics(): void {\r\n const graphics = this.produceGraphics();\r\n if (undefined !== graphics)\r\n this.context.outputGraphic(graphics);\r\n }\r\n\r\n /** Output graphics of the specified type for all accumulated tiles. */\r\n public drawGraphicsWithType(graphicType: TileGraphicType, graphics: GraphicBranch): void {\r\n const branch = this._produceGraphicBranch(graphics);\r\n if (undefined !== branch)\r\n this.context.withGraphicType(graphicType, () => this.context.outputGraphic(branch));\r\n }\r\n\r\n /** Indicate that graphics for the specified tile are desired but not yet available. Subsequently a request will be enqueued to load the tile's graphics. */\r\n public insertMissing(tile: Tile): void {\r\n this.context.insertMissingTile(tile);\r\n }\r\n\r\n /** Indicate that some requested child tiles are not yet loaded. */\r\n public markChildrenLoading(): void {\r\n this.context.markChildrenLoading();\r\n }\r\n\r\n /** Indicate that the specified tile is being used for some purpose by the [[SceneContext]]'s [[Viewport]]. Typically \"used\" means \"displayed\", but the exact meaning is up to the [[TileTree]] - for example, \"used\" might also mean that the tile's children are being used. A tile that is \"in use\" by any [[Viewport]] will not be discarded. */\r\n public markUsed(tile: Tile): void {\r\n tile.usageMarker.mark(this.context.viewport, this.now);\r\n }\r\n\r\n /** Indicate that the specified tile should be displayed and that its graphics are ready to be displayed. The number of \"ready\" tiles is used in conjunction with the number of \"missing\" tiles to convey to the user how complete the current view is.\r\n * @see [[insertMissing]]\r\n */\r\n public markReady(tile: Tile): void {\r\n this.readyTiles.add(tile);\r\n }\r\n\r\n /** Invoked by [[TileTree.selectTiles]]. This exists chiefly for [[SolarShadowMap]].\r\n * @internal\r\n */\r\n public processSelectedTiles(_tiles: Tile[]): void { }\r\n\r\n /* @internal */\r\n public get maxRealityTreeSelectionCount(): number | undefined { return undefined; }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"TileDrawArgs.js","sourceRoot":"","sources":["../../../src/tile/TileDrawArgs.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAc,QAAQ,EAAS,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACtI,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAiC,MAAM,oBAAoB,CAAC;AAE7G,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAOxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,YAAY,GAAG,IAAI,OAAO,EAAE,CAAC;AACnC,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AACtC,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AACxC,MAAM,aAAa,GAAG,OAAO,CAAC,UAA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,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IACxF,CAAC;IAED,4JAA4J;IACrJ,aAAa,CAAC,IAAU;QAC7B,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,mEAAmE;IAC5D,mBAAmB;QACxB,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;IACrC,CAAC;IAED,oVAAoV;IAC7U,QAAQ,CAAC,IAAU;QACxB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACI,SAAS,CAAC,IAAU;QACzB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,oBAAoB,CAAC,MAAc,IAAU,CAAC;IAErD,eAAe;IACf,IAAW,4BAA4B,KAAyB,OAAO,SAAS,CAAC,CAAC,CAAC;CACpF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { BeTimePoint } from \"@itwin/core-bentley\";\r\nimport { ClipVector, Geometry, Map4d, Matrix4d, Point3d, Point4d, Range1d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\nimport { FeatureAppearanceProvider, FrustumPlanes, HiddenLine, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\r\nimport { GraphicBranch } from \"../render/GraphicBranch\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderGraphic } from \"../render/RenderGraphic\";\r\nimport { RenderPlanarClassifier } from \"../render/RenderPlanarClassifier\";\r\nimport { RenderTextureDrape } from \"../render/RenderSystem\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { ViewingSpace } from \"../ViewingSpace\";\r\nimport { CoordSystem } from \"../CoordSystem\";\r\nimport { Tile, TileGraphicType, TileTree } from \"./internal\";\r\n\r\nconst scratchRange = new Range3d();\r\nconst scratchPoint = Point3d.create();\r\nconst scratchPoint4d = Point4d.create();\r\nconst scratchXRange = Range1d.createNull();\r\nconst scratchYRange = Range1d.createNull();\r\nconst scratchMatrix4d = Matrix4d.createIdentity();\r\n\r\n/** Parameters used to construct [[TileDrawArgs]].\r\n * @public\r\n */\r\nexport interface TileDrawArgParams {\r\n /** Context for the scene into which the tiles are to be rendered. */\r\n context: SceneContext;\r\n /** Transform to be applied when drawing the tiles. */\r\n location: Transform;\r\n /** The tile tree from which to obtain tiles. */\r\n tree: TileTree;\r\n /** The time at which these args were created. */\r\n now: BeTimePoint;\r\n /** Overrides to apply to the view's [ViewFlags]($common) when drawing the tiles. */\r\n viewFlagOverrides: ViewFlagOverrides;\r\n /** Clip volume used to clip the tiles. */\r\n clipVolume?: RenderClipVolume;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n parentsAndChildrenExclusive: boolean;\r\n /** Symbology overrides to apply to the tiles. */\r\n symbologyOverrides: FeatureSymbology.Overrides | undefined;\r\n /** Optionally customizes the view's symbology overrides for the tiles. */\r\n appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optionally overrides the view's hidden line settings. */\r\n hiddenLineSettings?: HiddenLine.Settings;\r\n /** If defined, tiles should be culled if they do not intersect this clip. */\r\n intersectionClip?: ClipVector;\r\n /** If defined, the Id of a node in the scene's [RenderSchedule.Script]($common) that applies a transform to the graphics;\r\n * or \"0xffffffff\" for any node that does *not* apply a transform.\r\n * @internal\r\n */\r\n animationTransformNodeId?: number;\r\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\r\n boundingRange?: Range3d;\r\n}\r\n/**\r\n * Provides context used when selecting and drawing [[Tile]]s.\r\n * @see [[TileTree.selectTiles]]\r\n * @see [[TileTree.draw]]\r\n * @public\r\n */\r\nexport class TileDrawArgs {\r\n /** Transform to the location in iModel coordinates at which the tiles are to be drawn. */\r\n public readonly location: Transform;\r\n /** The tile tree being drawn. */\r\n public readonly tree: TileTree;\r\n /** Optional clip volume applied to the tiles. */\r\n public clipVolume: RenderClipVolume | undefined;\r\n /** The context in which the tiles will be drawn, exposing, e.g., the [[Viewport]] and accepting [[RenderGraphic]]s to be drawn. */\r\n public readonly context: SceneContext;\r\n /** Describes the viewed volume. */\r\n public viewingSpace: ViewingSpace;\r\n /** Holds the tile graphics to be drawn. */\r\n public readonly graphics: GraphicBranch = new GraphicBranch();\r\n /** @internal */\r\n public readonly now: BeTimePoint;\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n protected _frustumPlanes?: FrustumPlanes;\r\n /** @internal */\r\n public planarClassifier?: RenderPlanarClassifier;\r\n /** @internal */\r\n public drape?: RenderTextureDrape;\r\n /** Optional clip volume applied to all tiles in the view. */\r\n public readonly viewClip?: ClipVector;\r\n /** True if a tile and its child tiles should not be drawn simultaneously. */\r\n public parentsAndChildrenExclusive: boolean;\r\n /** @internal */\r\n private _appearanceProvider?: FeatureAppearanceProvider;\r\n /** Optional overrides for the view's hidden line settings. */\r\n public hiddenLineSettings?: HiddenLine.Settings;\r\n /** Tiles that we want to draw and that are ready to draw. May not actually be selected, e.g. if sibling tiles are not yet ready. */\r\n public readonly readyTiles = new Set<Tile>();\r\n /** For perspective views, the view-Z of the near plane. */\r\n private readonly _nearFrontCenter?: Point3d;\r\n /** Overrides applied to the view's [ViewFlags]($common) when drawing the tiles. */\r\n public get viewFlagOverrides(): ViewFlagOverrides { return this.graphics.viewFlagOverrides; }\r\n /** If defined, replaces the view's own symbology overrides when drawing the tiles. */\r\n public get symbologyOverrides(): FeatureSymbology.Overrides | undefined { return this.graphics.symbologyOverrides; }\r\n /** If defined, tiles will be culled if they do not intersect this clip. */\r\n public intersectionClip?: ClipVector;\r\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\r\n public boundingRange?: Range3d;\r\n /** @internal */\r\n public readonly pixelSizeScaleFactor;\r\n /** @internal */\r\n public readonly animationTransformNodeId?: number;\r\n\r\n /** Compute the size in pixels of the specified tile at the point on its bounding sphere closest to the camera. */\r\n public getPixelSize(tile: Tile): number {\r\n const sizeFromProjection = this.getPixelSizeFromProjection(tile);\r\n if (undefined !== sizeFromProjection)\r\n return sizeFromProjection;\r\n\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(radius / pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** If the tile provides corners (from an OBB) then this produces most accurate representation of the tile size */\r\n private getPixelSizeFromProjection(tile: Tile): number | undefined {\r\n const sizeProjectionCorners = tile.getSizeProjectionCorners();\r\n if (!sizeProjectionCorners)\r\n return undefined;\r\n\r\n /* For maps or global reality models we use the projected screen rectangle rather than sphere to calculate pixel size to avoid excessive tiles at horizon. */\r\n const tileToView = this.worldToViewMap.transform0.multiplyMatrixMatrix(Matrix4d.createTransform(this.location, scratchMatrix4d), scratchMatrix4d);\r\n scratchXRange.setNull();\r\n scratchYRange.setNull();\r\n\r\n let behindEye = false;\r\n for (const corner of sizeProjectionCorners) {\r\n const viewCorner = tileToView.multiplyPoint3d(corner, 1, scratchPoint4d);\r\n if (viewCorner.w < 0.0) {\r\n behindEye = true;\r\n break;\r\n }\r\n\r\n scratchXRange.extendX(viewCorner.x / viewCorner.w);\r\n scratchYRange.extendX(viewCorner.y / viewCorner.w);\r\n }\r\n if (behindEye)\r\n return undefined;\r\n\r\n return scratchXRange.isNull ? 1.0E-3 : this.context.adjustPixelSizeForLOD(Math.sqrt(scratchXRange.length() * scratchYRange.length()));\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on the tile's bounding sphere closest to the camera. */\r\n public getPixelSizeInMetersAtClosestPoint(tile: Tile): number {\r\n const radius = this.getTileRadius(tile); // use a sphere to test pixel size. We don't know the orientation of the image within the bounding box.\r\n const center = this.getTileCenter(tile);\r\n\r\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\r\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(pixelSizeAtPt) : 1.0e-3;\r\n }\r\n\r\n /** Compute the size in meters of one pixel at the point on a sphere closest to the camera.\r\n * Device scaling is not applied.\r\n */\r\n protected computePixelSizeInMetersAtClosestPoint(center: Point3d, radius: number): number {\r\n if (this.context.viewport.view.is3d() && this.context.viewport.isCameraOn && this._nearFrontCenter) {\r\n const toFront = Vector3d.createStartEnd(center, this._nearFrontCenter);\r\n const viewZ = this.context.viewport.rotation.rowZ();\r\n // If the sphere overlaps the near front plane just use near front point. This also handles behind eye conditions.\r\n if (viewZ.dotProduct(toFront) < radius) {\r\n center = this._nearFrontCenter;\r\n } else {\r\n // Find point on sphere closest to eye.\r\n const toEye = center.unitVectorTo(this.context.viewport.view.camera.eye);\r\n\r\n if (toEye) { // Only if tile is not already behind the eye.\r\n toEye.scaleInPlace(radius);\r\n center.addInPlace(toEye);\r\n }\r\n }\r\n }\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n return this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n }\r\n\r\n /** Compute this size of a sphere on screen in pixels */\r\n public getRangePixelSize(range: Range3d): number {\r\n const transformedRange = this.location.multiplyRange(range, scratchRange);\r\n const center = transformedRange.localXYZToWorld(.5, .5, .5, scratchPoint)!;\r\n const radius = transformedRange.diagonal().magnitude();\r\n\r\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\r\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\r\n const pixelSizeAtPt = this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\r\n return 0 !== pixelSizeAtPt ? radius / pixelSizeAtPt : 1.0e-3;\r\n }\r\n\r\n /** @internal */\r\n public getTileGraphics(tile: Tile) {\r\n return tile.produceGraphics();\r\n }\r\n\r\n /** The planes of the viewing frustum, used for frustum culling. */\r\n public get frustumPlanes(): FrustumPlanes {\r\n return this._frustumPlanes !== undefined ? this._frustumPlanes : this.context.frustumPlanes;\r\n }\r\n\r\n /** Provides conversions between [[CoordSystem.World]] and [[CoordSystem.View]]. */\r\n public get worldToViewMap(): Map4d {\r\n return this.viewingSpace.worldToViewMap;\r\n }\r\n\r\n private computePixelSizeScaleFactor(): number {\r\n // Check to see if a model display transform with non-uniform scaling is being used.\r\n const tf = this.context.viewport.view.getModelDisplayTransform(this.tree.modelId, Transform.createIdentity());\r\n const scale = [];\r\n scale[0] = tf.matrix.getColumn(0).magnitude();\r\n scale[1] = tf.matrix.getColumn(1).magnitude();\r\n scale[2] = tf.matrix.getColumn(2).magnitude();\r\n if (Math.abs(scale[0] - scale[1]) <= Geometry.smallMetricDistance && Math.abs(scale[0] - scale[2]) <= Geometry.smallMetricDistance)\r\n return 1;\r\n // If the component with the largest scale is not the same as the component with the largest tile range use it to adjust the pixel size.\r\n const rangeDiag = this.tree.range.diagonal();\r\n let maxS = 0;\r\n let maxR = 0;\r\n if (scale[0] > scale[1]) {\r\n maxS = (scale[0] > scale[2] ? 0 : 2);\r\n } else {\r\n maxS = (scale[1] > scale[2] ? 1 : 2);\r\n }\r\n if (rangeDiag.x > rangeDiag.y) {\r\n maxR = (rangeDiag.x > rangeDiag.z ? 0 : 2);\r\n } else {\r\n maxR = (rangeDiag.y > rangeDiag.z ? 1 : 2);\r\n }\r\n if (maxS !== maxR)\r\n return scale[maxS];\r\n return 1;\r\n }\r\n\r\n /** Constructor */\r\n public constructor(params: TileDrawArgParams) {\r\n const { location, tree, context, now, viewFlagOverrides, clipVolume, parentsAndChildrenExclusive, symbologyOverrides } = params;\r\n this.location = location;\r\n this.tree = tree;\r\n this.context = context;\r\n this.now = now;\r\n this._appearanceProvider = params.appearanceProvider;\r\n this.hiddenLineSettings = params.hiddenLineSettings;\r\n this.animationTransformNodeId = params.animationTransformNodeId;\r\n this.boundingRange = params.boundingRange;\r\n\r\n // Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.\r\n if (undefined !== clipVolume && !context.viewport.view.displayStyle.settings.clipStyle.outsideColor)\r\n this.clipVolume = clipVolume;\r\n\r\n this.graphics.setViewFlagOverrides(viewFlagOverrides);\r\n this.graphics.symbologyOverrides = symbologyOverrides;\r\n this.graphics.animationId = tree.modelId;\r\n\r\n this.viewingSpace = context.viewingSpace;\r\n this._frustumPlanes = new FrustumPlanes(this.viewingSpace.getFrustum());\r\n\r\n this.planarClassifier = context.getPlanarClassifierForModel(tree.modelId);\r\n this.drape = context.getTextureDrapeForModel(tree.modelId);\r\n\r\n // NB: If the tile tree has its own clip, do not also apply the view's clip.\r\n if (context.viewFlags.clipVolume && false !== viewFlagOverrides.clipVolume && undefined === clipVolume) {\r\n const outsideClipColor = context.viewport.displayStyle.settings.clipStyle.outsideColor;\r\n this.viewClip = undefined === outsideClipColor ? context.viewport.view.getViewClip() : undefined;\r\n }\r\n\r\n this.parentsAndChildrenExclusive = parentsAndChildrenExclusive;\r\n if (context.viewport.isCameraOn)\r\n this._nearFrontCenter = context.viewport.getFrustum(CoordSystem.World).frontCenter;\r\n\r\n this.pixelSizeScaleFactor = this.computePixelSizeScaleFactor();\r\n }\r\n\r\n /** A multiplier applied to a [[Tile]]'s `maximumSize` property to adjust level of detail.\r\n * @see [[Viewport.tileSizeModifier]].\r\n * @public\r\n */\r\n public get tileSizeModifier(): number { return this.context.viewport.tileSizeModifier; }\r\n\r\n /** @internal */\r\n public getTileCenter(tile: Tile): Point3d { return this.location.multiplyPoint3d(tile.center); }\r\n\r\n /** @internal */\r\n public getTileRadius(tile: Tile): number {\r\n let range: Range3d = tile.range.clone(scratchRange);\r\n if (tile.tree.is2d) {\r\n // 2d tiles have a fixed Z range of [-1, 1]. Sometimes (e.g., hypermodeling) we draw them within a 3d view. Prevent Z from artificially expanding the radius.\r\n range.low.z = range.high.z = 0;\r\n }\r\n\r\n range = this.location.multiplyRange(range, range);\r\n return 0.5 * range.low.distance(range.high);\r\n }\r\n\r\n /** @internal */\r\n public get clip(): ClipVector | undefined {\r\n return undefined !== this.clipVolume ? this.clipVolume.clipVector : undefined;\r\n }\r\n\r\n /** Add a provider to supplement or override the symbology overrides for the view.\r\n * @note If a provider already exists, the new provider will be chained such that it sees the base overrides\r\n * after they have potentially been modified by the existing provider.\r\n * @public\r\n */\r\n public addAppearanceProvider(provider: FeatureAppearanceProvider): void {\r\n this._appearanceProvider = this._appearanceProvider ? FeatureAppearanceProvider.chain(this._appearanceProvider, provider) : provider;\r\n }\r\n\r\n /** Optionally customizes aspects of the view's [[FeatureSymbology.Overrides]]. */\r\n public get appearanceProvider(): FeatureAppearanceProvider | undefined {\r\n return this._appearanceProvider;\r\n }\r\n\r\n /** @internal */\r\n public produceGraphics(): RenderGraphic | undefined {\r\n return this._produceGraphicBranch(this.graphics);\r\n }\r\n\r\n /** @internal */\r\n private _produceGraphicBranch(graphics: GraphicBranch): RenderGraphic | undefined {\r\n if (graphics.isEmpty)\r\n return undefined;\r\n\r\n const opts = {\r\n iModel: this.tree.iModel,\r\n clipVolume: this.clipVolume,\r\n classifierOrDrape: this.planarClassifier ?? this.drape,\r\n appearanceProvider: this.appearanceProvider,\r\n hline: this.hiddenLineSettings,\r\n };\r\n\r\n let graphic = this.context.createGraphicBranch(graphics, this.location, opts);\r\n if (undefined !== this.animationTransformNodeId)\r\n graphic = this.context.renderSystem.createAnimationTransformNode(graphic, this.animationTransformNodeId);\r\n\r\n return graphic;\r\n }\r\n\r\n /** Output graphics for all accumulated tiles. */\r\n public drawGraphics(): void {\r\n const graphics = this.produceGraphics();\r\n if (undefined !== graphics)\r\n this.context.outputGraphic(graphics);\r\n }\r\n\r\n /** Output graphics of the specified type for all accumulated tiles. */\r\n public drawGraphicsWithType(graphicType: TileGraphicType, graphics: GraphicBranch): void {\r\n const branch = this._produceGraphicBranch(graphics);\r\n if (undefined !== branch)\r\n this.context.withGraphicType(graphicType, () => this.context.outputGraphic(branch));\r\n }\r\n\r\n /** Indicate that graphics for the specified tile are desired but not yet available. Subsequently a request will be enqueued to load the tile's graphics. */\r\n public insertMissing(tile: Tile): void {\r\n this.context.insertMissingTile(tile);\r\n }\r\n\r\n /** Indicate that some requested child tiles are not yet loaded. */\r\n public markChildrenLoading(): void {\r\n this.context.markChildrenLoading();\r\n }\r\n\r\n /** Indicate that the specified tile is being used for some purpose by the [[SceneContext]]'s [[Viewport]]. Typically \"used\" means \"displayed\", but the exact meaning is up to the [[TileTree]] - for example, \"used\" might also mean that the tile's children are being used. A tile that is \"in use\" by any [[Viewport]] will not be discarded. */\r\n public markUsed(tile: Tile): void {\r\n tile.usageMarker.mark(this.context.viewport, this.now);\r\n }\r\n\r\n /** Indicate that the specified tile should be displayed and that its graphics are ready to be displayed. The number of \"ready\" tiles is used in conjunction with the number of \"missing\" tiles to convey to the user how complete the current view is.\r\n * @see [[insertMissing]]\r\n */\r\n public markReady(tile: Tile): void {\r\n this.readyTiles.add(tile);\r\n }\r\n\r\n /** Invoked by [[TileTree.selectTiles]]. This exists chiefly for [[SolarShadowMap]].\r\n * @internal\r\n */\r\n public processSelectedTiles(_tiles: Tile[]): void { }\r\n\r\n /* @internal */\r\n public get maxRealityTreeSelectionCount(): number | undefined { return undefined; }\r\n}\r\n"]}
|
|
@@ -70,6 +70,8 @@ export declare abstract class TileTreeReference {
|
|
|
70
70
|
* Returns undefined if, e.g., the tile tree is not yet loaded.
|
|
71
71
|
*/
|
|
72
72
|
createDrawArgs(context: SceneContext): TileDrawArgs | undefined;
|
|
73
|
+
/** @internal */
|
|
74
|
+
protected getAnimationTransformNodeId(_tree: TileTree): number | undefined;
|
|
73
75
|
/** Supply transform from this tile tree reference's location to iModel coordinate space.
|
|
74
76
|
* @returns undefined if the TileTree is not yet loaded.
|
|
75
77
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileTreeReference.d.ts","sourceRoot":"","sources":["../../../src/tile/TileTreeReference.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,aAAa,EAAE,UAAU,EAA0B,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1J,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,QAAQ,EAAsB,aAAa,EAAE,MAAM,YAAY,CAAC;AAE7G;;GAEG;AACH,oBAAY,eAAe;IACzB,wDAAwD;IACxD,aAAa,IAAI;IACjB,2CAA2C;IAC3C,KAAK,IAAI;IACT,+CAA+C;IAC/C,OAAO,IAAI;CACZ;AAED;;;;;;;;;GASG;AACH,8BAAsB,iBAAiB;IACrC,uJAAuJ;IACvJ,aAAoB,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IAAI,SAAS,GAAG,SAAS;IAK3C,2HAA2H;IAC3H,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS;IAIrD;;OAEG;IACI,wBAAwB,IAAI,mBAAmB;IAStD,4EAA4E;IAC5E,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,gBAAgB,GAAG,SAAS;IAIrE,iIAAiI;IACjI,SAAS,CAAC,oBAAoB,CAAC,IAAI,EAAE,QAAQ,GAAG,iBAAiB;IAIjE,gEAAgE;IAChE,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,QAAQ,GAAG,gBAAgB,CAAC,SAAS,GAAG,SAAS;IAIxF,4EAA4E;IAC5E,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,QAAQ,GAAG,yBAAyB,GAAG,SAAS;IAIvF,yEAAyE;IACzE,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,QAAQ,GAAG,UAAU,CAAC,QAAQ,GAAG,SAAS;IAO1E,0BAA0B,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,EAAE,aAAa;IASjG,gBAAgB;IACT,gBAAgB,CAAC,eAAe,EAAE,OAAO,GAAG,IAAI;IAEvD,6GAA6G;IAC7G,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED,iKAAiK;IACjK,IAAW,QAAQ,IAAI,OAAO,CAAkB;IAEhD;;;OAGG;IACH,IAAW,sBAAsB,IAAI,MAAM,CAA+C;IAE1F,iGAAiG;IAC1F,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI;CACzE"}
|
|
@@ -112,8 +112,13 @@ export class TileTreeReference /* implements RenderMemory.Consumer */ {
|
|
|
112
112
|
symbologyOverrides: this.getSymbologyOverrides(tree),
|
|
113
113
|
appearanceProvider: this.getAppearanceProvider(tree),
|
|
114
114
|
hiddenLineSettings: this.getHiddenLineSettings(tree),
|
|
115
|
+
animationTransformNodeId: this.getAnimationTransformNodeId(tree),
|
|
115
116
|
});
|
|
116
117
|
}
|
|
118
|
+
/** @internal */
|
|
119
|
+
getAnimationTransformNodeId(_tree) {
|
|
120
|
+
return undefined;
|
|
121
|
+
}
|
|
117
122
|
/** Supply transform from this tile tree reference's location to iModel coordinate space.
|
|
118
123
|
* @returns undefined if the TileTree is not yet loaded.
|
|
119
124
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileTreeReference.js","sourceRoot":"","sources":["../../../src/tile/TileTreeReference.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAqB,OAAO,EAAa,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAA6E,sBAAsB,EAAqB,MAAM,oBAAoB,CAAC;AAO1J,OAAO,EAAwB,YAAY,EAAY,kBAAkB,EAAiB,MAAM,YAAY,CAAC;AAE7G;;GAEG;AACH,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,wDAAwD;IACxD,uEAAiB,CAAA;IACjB,2CAA2C;IAC3C,uDAAS,CAAA;IACT,+CAA+C;IAC/C,2DAAW,CAAA;AACb,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AAED;;;;;;;;;GASG;AACH,MAAM,OAAgB,iBAAiB,CAAC,sCAAsC;IAI5E;;;OAGG;IACI,iBAAiB,CAAC,KAA2B;QAClD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QACrC,IAAI,SAAS,KAAK,IAAI;YACpB,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,qFAAqF;IAC9E,UAAU,CAAC,OAAqB;QACrC,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,SAAS,KAAK,IAAI;Y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CAAC;IACf,CAAC;IAED,4EAA4E;IAClE,aAAa,CAAC,IAAc;QACpC,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,iIAAiI;IACvH,oBAAoB,CAAC,IAAc;QAC3C,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAED,gEAAgE;IACtD,qBAAqB,CAAC,KAAe;QAC7C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,4EAA4E;IAClE,qBAAqB,CAAC,KAAe;QAC7C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,yEAAyE;IAC/D,qBAAqB,CAAC,KAAe;QAC7C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,0BAA0B,CAAC,KAAc,EAAE,MAAgB,EAAE,aAA6B;QAC/F,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QACrC,IAAI,SAAS,KAAK,IAAI;YACpB,OAAO;QAET,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;IAC1E,CAAC;IAED,gBAAgB;IACT,gBAAgB,CAAC,eAAwB,IAAU,CAAC;IAE3D,6GAA6G;IAC7G,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,iKAAiK;IACjK,IAAW,QAAQ,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAEhD;;;OAGG;IACH,IAAW,sBAAsB,KAAa,OAAO,sBAAsB,CAAC,WAAW,CAAC,CAAC,CAAC;IAE1F,iGAAiG;IAC1F,YAAY,CAAC,MAAwB,EAAE,GAAmB,IAAU,CAAC;CAC7E","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { BeTimePoint } from \"@itwin/core-bentley\";\r\nimport { Matrix4d, Range1d, Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { ElementAlignedBox3d, FeatureAppearanceProvider, FrustumPlanes, HiddenLine, PlanarClipMaskPriority, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { HitDetail } from \"../HitDetail\";\r\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderMemory } from \"../render/RenderMemory\";\r\nimport { DecorateContext, SceneContext } from \"../ViewContext\";\r\nimport { ScreenViewport } from \"../Viewport\";\r\nimport { DisclosedTileTreeSet, TileDrawArgs, TileTree, TileTreeLoadStatus, TileTreeOwner } from \"./internal\";\r\n\r\n/** Describes the type of graphics produced by a [[TileTreeReference]].\r\n * @public\r\n */\r\nexport enum TileGraphicType {\r\n /** Rendered behind all other geometry without depth. */\r\n BackgroundMap = 0,\r\n /** Rendered with normal scene graphics. */\r\n Scene = 1,\r\n /** Rendered in front of all other geometry. */\r\n Overlay = 2,\r\n}\r\n\r\n/** 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\r\n * way of the tree [[TileTreeOwner]].\r\n * The specific [[TileTree]] referenced by this object may change based on the current state of the Viewport in which it is drawn - for example,\r\n * as a result of changing the RenderMode, or animation settings, or classification settings, etc.\r\n * A reference to a TileTree is typically associated with a [[ViewState]], a [[DisplayStyleState]], or a [[Viewport]].\r\n * 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\r\n * differing levels of transparency.\r\n * @see [[TiledGraphicsProvider]] to supply custom [[TileTreeReference]]s to be drawn within a [[Viewport]].\r\n * @public\r\n */\r\nexport abstract class TileTreeReference /* implements RenderMemory.Consumer */ {\r\n /** The owner of the currently-referenced [[TileTree]]. Do not store a direct reference to it, because it may change or become disposed at any time. */\r\n public abstract get treeOwner(): TileTreeOwner;\r\n\r\n /** Disclose *all* TileTrees use by this reference. This may include things like map tiles used for draping on terrain.\r\n * Override this and call super if you have such auxiliary trees.\r\n * @note Any tree *NOT* disclosed becomes a candidate for *purging* (being unloaded from memory along with all of its tiles and graphics).\r\n */\r\n public discloseTileTrees(trees: DisclosedTileTreeSet): void {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree)\r\n trees.add(tree);\r\n }\r\n\r\n /** Adds this reference's graphics to the scene. By default this invokes [[draw]]. */\r\n public addToScene(context: SceneContext): void {\r\n const args = this.createDrawArgs(context);\r\n if (undefined !== args)\r\n this.draw(args);\r\n }\r\n\r\n /** Adds this reference's graphics to the scene. By default this invokes [[TileTree.draw]] on the referenced TileTree, if it is loaded. */\r\n public draw(args: TileDrawArgs): void {\r\n args.tree.draw(args);\r\n }\r\n\r\n /** Optionally return a tooltip describing the hit. */\r\n public async getToolTip(_hit: HitDetail): Promise<HTMLElement | string | undefined> { return undefined; }\r\n\r\n /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.\r\n * @note This is currently only invoked for background maps and TiledGraphicsProviders - others have no decorations, but if they did implement this it would not be called.\r\n */\r\n public decorate(_context: DecorateContext): void { }\r\n\r\n /** Unions this reference's range with the supplied range to help compute a volume in world space for fitting a viewport to its contents.\r\n * Override this function if a reference's range should not be included in the fit range, or a range different from its tile tree's range should be used.\r\n */\r\n public unionFitRange(union: Range3d): void {\r\n const contentRange = this.computeWorldContentRange();\r\n if (!contentRange.isNull)\r\n union.extendRange(contentRange);\r\n }\r\n\r\n /** @internal */\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree)\r\n tree.collectStatistics(stats);\r\n }\r\n\r\n /** Return true if the tile tree is fully loaded and ready to draw.\r\n * The default implementation returns true if the tile tree loading process completed (whether it resulted in success or failure).\r\n * @note Do *not* override this property - override [[_isLoadingComplete]] instead..\r\n * @public\r\n */\r\n public get isLoadingComplete(): boolean {\r\n switch (this.treeOwner.loadStatus) {\r\n case TileTreeLoadStatus.NotLoaded:\r\n case TileTreeLoadStatus.Loading:\r\n return false;\r\n case TileTreeLoadStatus.NotFound:\r\n return true; // we tried, and failed, to load.\r\n case TileTreeLoadStatus.Loaded:\r\n return this._isLoadingComplete;\r\n }\r\n }\r\n\r\n /** Override if additional asynchronous loading is required after the tile tree is successfully loaded, to indicate when that loading has completed.\r\n * @public\r\n */\r\n protected get _isLoadingComplete(): boolean {\r\n return true;\r\n }\r\n\r\n /** Create context for drawing the tile tree, if it is ready for drawing.\r\n * TileTreeReferences can override individual portions of the context, e.g. apply their own transform.\r\n * Returns undefined if, e.g., the tile tree is not yet loaded.\r\n */\r\n public createDrawArgs(context: SceneContext): TileDrawArgs | undefined {\r\n const tree = this.treeOwner.load();\r\n if (undefined === tree)\r\n return undefined;\r\n\r\n return new TileDrawArgs({\r\n context,\r\n tree,\r\n now: BeTimePoint.now(),\r\n location: this.computeTransform(tree),\r\n viewFlagOverrides: this.getViewFlagOverrides(tree),\r\n clipVolume: this.getClipVolume(tree),\r\n parentsAndChildrenExclusive: tree.parentsAndChildrenExclusive,\r\n symbologyOverrides: this.getSymbologyOverrides(tree),\r\n appearanceProvider: this.getAppearanceProvider(tree),\r\n hiddenLineSettings: this.getHiddenLineSettings(tree),\r\n });\r\n }\r\n\r\n /** Supply transform from this tile tree reference's location to iModel coordinate space.\r\n * @returns undefined if the TileTree is not yet loaded.\r\n */\r\n public getLocation(): Transform | undefined {\r\n const tree = this.treeOwner.load();\r\n return undefined !== tree ? this.computeTransform(tree) : undefined;\r\n }\r\n\r\n /** Compute a transform from this tile tree reference's coordinate space to the [[IModelConnection]]'s coordinate space. */\r\n protected computeTransform(tree: TileTree): Transform {\r\n return tree.iModelTransform.clone();\r\n }\r\n\r\n /** Compute the range of this tile tree's contents in world coordinates.\r\n * @returns The content range in world coodinates, or a null range if the tile tree is not loaded or has a null content range.\r\n */\r\n public computeWorldContentRange(): ElementAlignedBox3d {\r\n const range = new Range3d();\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree && !tree.rootTile.contentRange.isNull)\r\n this.computeTransform(tree).multiplyRange(tree.rootTile.contentRange, range);\r\n\r\n return range;\r\n }\r\n\r\n /** Return the clip volume applied to this reference's tile tree, if any. */\r\n protected getClipVolume(tree: TileTree): RenderClipVolume | undefined {\r\n return tree.clipVolume;\r\n }\r\n\r\n /** Supply overrides that should be applied to the [[ViewState]]'s [ViewFlags]($common) when drawing this tile tree reference. */\r\n protected getViewFlagOverrides(tree: TileTree): ViewFlagOverrides {\r\n return tree.viewFlagOverrides;\r\n }\r\n\r\n /** Return overrides that *replace* any defined for the view. */\r\n protected getSymbologyOverrides(_tree: TileTree): FeatureSymbology.Overrides | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Return a provider that can supplement the view's symbology overrides. */\r\n protected getAppearanceProvider(_tree: TileTree): FeatureAppearanceProvider | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Return hidden line settings to replace those defined for the view. */\r\n protected getHiddenLineSettings(_tree: TileTree): HiddenLine.Settings | undefined {\r\n return undefined;\r\n }\r\n\r\n /* Extend range to include transformed range of this tile tree.\r\n * @internal\r\n */\r\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, frustumPlanes?: FrustumPlanes) {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined === tree)\r\n return;\r\n\r\n const location = this.computeTransform(tree);\r\n tree.accumulateTransformedRange(range, matrix, location, frustumPlanes);\r\n }\r\n\r\n /** @internal */\r\n public getTerrainHeight(_terrainHeights: Range1d): void { }\r\n\r\n /** Return whether the geometry exposed by this tile tree reference should cast shadows on other geometry. */\r\n public get castsShadows(): boolean {\r\n return true;\r\n }\r\n\r\n /** Return whether this reference has global coverage. Mapping data is global and some non-primary models such as the OSM building layer have global coverage */\r\n public get isGlobal(): boolean { return false; }\r\n\r\n /** Return the clip mask priority for this model - models will be clipped by any other viewed model with a higher proirity.\r\n * BIM models have highest prioirty and are never clipped.\r\n * @alpha\r\n */\r\n public get planarclipMaskPriority(): number { return PlanarClipMaskPriority.DesignModel; }\r\n\r\n /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div. */\r\n public addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void { }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"TileTreeReference.js","sourceRoot":"","sources":["../../../src/tile/TileTreeReference.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAqB,OAAO,EAAa,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAA6E,sBAAsB,EAAqB,MAAM,oBAAoB,CAAC;AAO1J,OAAO,EAAwB,YAAY,EAAY,kBAAkB,EAAiB,MAAM,YAAY,CAAC;AAE7G;;GAEG;AACH,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,wDAAwD;IACxD,uEAAiB,CAAA;IACjB,2CAA2C;IAC3C,uDAAS,CAAA;IACT,+CAA+C;IAC/C,2DAAW,CAAA;AACb,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AAED;;;;;;;;;GASG;AACH,MAAM,OAAgB,iBAAiB,CAAC,sCAAsC;IAI5E;;;OAGG;IACI,iBAAiB,CAAC,KAA2B;QAClD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QACrC,IAAI,SAAS,KAAK,IAAI;YACpB,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,qFAAqF;IAC9E,UAAU,CAAC,OAAqB;QACrC,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,SAAS,KAAK,IAAI;YACpB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,C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------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { BeTimePoint } from \"@itwin/core-bentley\";\r\nimport { Matrix4d, Range1d, Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { ElementAlignedBox3d, FeatureAppearanceProvider, FrustumPlanes, HiddenLine, PlanarClipMaskPriority, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { HitDetail } from \"../HitDetail\";\r\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\r\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\r\nimport { RenderMemory } from \"../render/RenderMemory\";\r\nimport { DecorateContext, SceneContext } from \"../ViewContext\";\r\nimport { ScreenViewport } from \"../Viewport\";\r\nimport { DisclosedTileTreeSet, TileDrawArgs, TileTree, TileTreeLoadStatus, TileTreeOwner } from \"./internal\";\r\n\r\n/** Describes the type of graphics produced by a [[TileTreeReference]].\r\n * @public\r\n */\r\nexport enum TileGraphicType {\r\n /** Rendered behind all other geometry without depth. */\r\n BackgroundMap = 0,\r\n /** Rendered with normal scene graphics. */\r\n Scene = 1,\r\n /** Rendered in front of all other geometry. */\r\n Overlay = 2,\r\n}\r\n\r\n/** 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\r\n * way of the tree [[TileTreeOwner]].\r\n * The specific [[TileTree]] referenced by this object may change based on the current state of the Viewport in which it is drawn - for example,\r\n * as a result of changing the RenderMode, or animation settings, or classification settings, etc.\r\n * A reference to a TileTree is typically associated with a [[ViewState]], a [[DisplayStyleState]], or a [[Viewport]].\r\n * 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\r\n * differing levels of transparency.\r\n * @see [[TiledGraphicsProvider]] to supply custom [[TileTreeReference]]s to be drawn within a [[Viewport]].\r\n * @public\r\n */\r\nexport abstract class TileTreeReference /* implements RenderMemory.Consumer */ {\r\n /** The owner of the currently-referenced [[TileTree]]. Do not store a direct reference to it, because it may change or become disposed at any time. */\r\n public abstract get treeOwner(): TileTreeOwner;\r\n\r\n /** Disclose *all* TileTrees use by this reference. This may include things like map tiles used for draping on terrain.\r\n * Override this and call super if you have such auxiliary trees.\r\n * @note Any tree *NOT* disclosed becomes a candidate for *purging* (being unloaded from memory along with all of its tiles and graphics).\r\n */\r\n public discloseTileTrees(trees: DisclosedTileTreeSet): void {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree)\r\n trees.add(tree);\r\n }\r\n\r\n /** Adds this reference's graphics to the scene. By default this invokes [[draw]]. */\r\n public addToScene(context: SceneContext): void {\r\n const args = this.createDrawArgs(context);\r\n if (undefined !== args)\r\n this.draw(args);\r\n }\r\n\r\n /** Adds this reference's graphics to the scene. By default this invokes [[TileTree.draw]] on the referenced TileTree, if it is loaded. */\r\n public draw(args: TileDrawArgs): void {\r\n args.tree.draw(args);\r\n }\r\n\r\n /** Optionally return a tooltip describing the hit. */\r\n public async getToolTip(_hit: HitDetail): Promise<HTMLElement | string | undefined> { return undefined; }\r\n\r\n /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.\r\n * @note This is currently only invoked for background maps and TiledGraphicsProviders - others have no decorations, but if they did implement this it would not be called.\r\n */\r\n public decorate(_context: DecorateContext): void { }\r\n\r\n /** Unions this reference's range with the supplied range to help compute a volume in world space for fitting a viewport to its contents.\r\n * Override this function if a reference's range should not be included in the fit range, or a range different from its tile tree's range should be used.\r\n */\r\n public unionFitRange(union: Range3d): void {\r\n const contentRange = this.computeWorldContentRange();\r\n if (!contentRange.isNull)\r\n union.extendRange(contentRange);\r\n }\r\n\r\n /** @internal */\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree)\r\n tree.collectStatistics(stats);\r\n }\r\n\r\n /** Return true if the tile tree is fully loaded and ready to draw.\r\n * The default implementation returns true if the tile tree loading process completed (whether it resulted in success or failure).\r\n * @note Do *not* override this property - override [[_isLoadingComplete]] instead..\r\n * @public\r\n */\r\n public get isLoadingComplete(): boolean {\r\n switch (this.treeOwner.loadStatus) {\r\n case TileTreeLoadStatus.NotLoaded:\r\n case TileTreeLoadStatus.Loading:\r\n return false;\r\n case TileTreeLoadStatus.NotFound:\r\n return true; // we tried, and failed, to load.\r\n case TileTreeLoadStatus.Loaded:\r\n return this._isLoadingComplete;\r\n }\r\n }\r\n\r\n /** Override if additional asynchronous loading is required after the tile tree is successfully loaded, to indicate when that loading has completed.\r\n * @public\r\n */\r\n protected get _isLoadingComplete(): boolean {\r\n return true;\r\n }\r\n\r\n /** Create context for drawing the tile tree, if it is ready for drawing.\r\n * TileTreeReferences can override individual portions of the context, e.g. apply their own transform.\r\n * Returns undefined if, e.g., the tile tree is not yet loaded.\r\n */\r\n public createDrawArgs(context: SceneContext): TileDrawArgs | undefined {\r\n const tree = this.treeOwner.load();\r\n if (undefined === tree)\r\n return undefined;\r\n\r\n return new TileDrawArgs({\r\n context,\r\n tree,\r\n now: BeTimePoint.now(),\r\n location: this.computeTransform(tree),\r\n viewFlagOverrides: this.getViewFlagOverrides(tree),\r\n clipVolume: this.getClipVolume(tree),\r\n parentsAndChildrenExclusive: tree.parentsAndChildrenExclusive,\r\n symbologyOverrides: this.getSymbologyOverrides(tree),\r\n appearanceProvider: this.getAppearanceProvider(tree),\r\n hiddenLineSettings: this.getHiddenLineSettings(tree),\r\n animationTransformNodeId: this.getAnimationTransformNodeId(tree),\r\n });\r\n }\r\n\r\n /** @internal */\r\n protected getAnimationTransformNodeId(_tree: TileTree): number | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Supply transform from this tile tree reference's location to iModel coordinate space.\r\n * @returns undefined if the TileTree is not yet loaded.\r\n */\r\n public getLocation(): Transform | undefined {\r\n const tree = this.treeOwner.load();\r\n return undefined !== tree ? this.computeTransform(tree) : undefined;\r\n }\r\n\r\n /** Compute a transform from this tile tree reference's coordinate space to the [[IModelConnection]]'s coordinate space. */\r\n protected computeTransform(tree: TileTree): Transform {\r\n return tree.iModelTransform.clone();\r\n }\r\n\r\n /** Compute the range of this tile tree's contents in world coordinates.\r\n * @returns The content range in world coodinates, or a null range if the tile tree is not loaded or has a null content range.\r\n */\r\n public computeWorldContentRange(): ElementAlignedBox3d {\r\n const range = new Range3d();\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined !== tree && !tree.rootTile.contentRange.isNull)\r\n this.computeTransform(tree).multiplyRange(tree.rootTile.contentRange, range);\r\n\r\n return range;\r\n }\r\n\r\n /** Return the clip volume applied to this reference's tile tree, if any. */\r\n protected getClipVolume(tree: TileTree): RenderClipVolume | undefined {\r\n return tree.clipVolume;\r\n }\r\n\r\n /** Supply overrides that should be applied to the [[ViewState]]'s [ViewFlags]($common) when drawing this tile tree reference. */\r\n protected getViewFlagOverrides(tree: TileTree): ViewFlagOverrides {\r\n return tree.viewFlagOverrides;\r\n }\r\n\r\n /** Return overrides that *replace* any defined for the view. */\r\n protected getSymbologyOverrides(_tree: TileTree): FeatureSymbology.Overrides | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Return a provider that can supplement the view's symbology overrides. */\r\n protected getAppearanceProvider(_tree: TileTree): FeatureAppearanceProvider | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Return hidden line settings to replace those defined for the view. */\r\n protected getHiddenLineSettings(_tree: TileTree): HiddenLine.Settings | undefined {\r\n return undefined;\r\n }\r\n\r\n /* Extend range to include transformed range of this tile tree.\r\n * @internal\r\n */\r\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, frustumPlanes?: FrustumPlanes) {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined === tree)\r\n return;\r\n\r\n const location = this.computeTransform(tree);\r\n tree.accumulateTransformedRange(range, matrix, location, frustumPlanes);\r\n }\r\n\r\n /** @internal */\r\n public getTerrainHeight(_terrainHeights: Range1d): void { }\r\n\r\n /** Return whether the geometry exposed by this tile tree reference should cast shadows on other geometry. */\r\n public get castsShadows(): boolean {\r\n return true;\r\n }\r\n\r\n /** Return whether this reference has global coverage. Mapping data is global and some non-primary models such as the OSM building layer have global coverage */\r\n public get isGlobal(): boolean { return false; }\r\n\r\n /** Return the clip mask priority for this model - models will be clipped by any other viewed model with a higher proirity.\r\n * BIM models have highest prioirty and are never clipped.\r\n * @alpha\r\n */\r\n public get planarclipMaskPriority(): number { return PlanarClipMaskPriority.DesignModel; }\r\n\r\n /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div. */\r\n public addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void { }\r\n}\r\n"]}
|
|
@@ -353,7 +353,7 @@ export class ElementSetTool extends PrimitiveTool {
|
|
|
353
353
|
ids.add(id);
|
|
354
354
|
try {
|
|
355
355
|
const ecsql = `SELECT ECInstanceId as id, Parent.Id as parentId FROM BisCore.GeometricElement WHERE Parent.Id IN (SELECT Parent.Id as parentId FROM BisCore.GeometricElement WHERE parent.Id != 0 AND ECInstanceId IN (${id}))`;
|
|
356
|
-
for await (const row of this.iModel.query(ecsql, undefined, QueryRowFormat.UseJsPropertyNames)) {
|
|
356
|
+
for await (const row of this.iModel.query(ecsql, undefined, { rowFormat: QueryRowFormat.UseJsPropertyNames })) {
|
|
357
357
|
ids.add(row.parentId);
|
|
358
358
|
ids.add(row.id);
|
|
359
359
|
}
|