@itwin/core-frontend 4.4.0-dev.8 → 4.5.0-dev.0
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/CHANGELOG.md +8 -1
- package/lib/cjs/DisplayStyleState.d.ts +3 -0
- package/lib/cjs/DisplayStyleState.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleState.js +10 -0
- package/lib/cjs/DisplayStyleState.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +5 -0
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +6 -0
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/common/gltf/GltfSchema.d.ts +20 -3
- package/lib/cjs/common/gltf/GltfSchema.d.ts.map +1 -1
- package/lib/cjs/common/gltf/GltfSchema.js.map +1 -1
- package/lib/cjs/common/imdl/ImdlModel.d.ts +15 -1
- package/lib/cjs/common/imdl/ImdlModel.d.ts.map +1 -1
- package/lib/cjs/common/imdl/ImdlModel.js +11 -3
- package/lib/cjs/common/imdl/ImdlModel.js.map +1 -1
- package/lib/cjs/common/imdl/ParseImdlDocument.d.ts +3 -1
- package/lib/cjs/common/imdl/ParseImdlDocument.d.ts.map +1 -1
- package/lib/cjs/common/imdl/ParseImdlDocument.js +66 -11
- package/lib/cjs/common/imdl/ParseImdlDocument.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +10 -0
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/webgl/BranchState.d.ts +2 -0
- package/lib/cjs/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/cjs/render/webgl/BranchState.js +2 -0
- package/lib/cjs/render/webgl/BranchState.js.map +1 -1
- package/lib/cjs/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Graphic.js +3 -0
- package/lib/cjs/render/webgl/Graphic.js.map +1 -1
- package/lib/cjs/render/webgl/InstancedGeometry.d.ts +1 -0
- package/lib/cjs/render/webgl/InstancedGeometry.d.ts.map +1 -1
- package/lib/cjs/render/webgl/InstancedGeometry.js +1 -0
- package/lib/cjs/render/webgl/InstancedGeometry.js.map +1 -1
- package/lib/cjs/request/utils.d.ts +18 -0
- package/lib/cjs/request/utils.d.ts.map +1 -0
- package/lib/cjs/request/utils.js +45 -0
- package/lib/cjs/request/utils.js.map +1 -0
- package/lib/cjs/tile/BatchedTileIdMap.d.ts +1 -2
- package/lib/cjs/tile/BatchedTileIdMap.d.ts.map +1 -1
- package/lib/cjs/tile/BatchedTileIdMap.js +3 -3
- package/lib/cjs/tile/BatchedTileIdMap.js.map +1 -1
- package/lib/cjs/tile/GltfReader.d.ts +4 -1
- package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
- package/lib/cjs/tile/GltfReader.js +125 -26
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/cjs/tile/ImdlDecoder.d.ts +7 -1
- package/lib/cjs/tile/ImdlDecoder.d.ts.map +1 -1
- package/lib/cjs/tile/ImdlDecoder.js.map +1 -1
- package/lib/cjs/tile/ImdlGraphicsCreator.d.ts.map +1 -1
- package/lib/cjs/tile/ImdlGraphicsCreator.js +28 -17
- package/lib/cjs/tile/ImdlGraphicsCreator.js.map +1 -1
- package/lib/cjs/tile/ImdlReader.d.ts +2 -1
- package/lib/cjs/tile/ImdlReader.d.ts.map +1 -1
- package/lib/cjs/tile/ImdlReader.js +1 -0
- package/lib/cjs/tile/ImdlReader.js.map +1 -1
- package/lib/cjs/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/RealityModelTileTree.js +2 -3
- package/lib/cjs/tile/RealityModelTileTree.js.map +1 -1
- package/lib/cjs/tile/RealityTileTree.d.ts +31 -0
- package/lib/cjs/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/RealityTileTree.js +6 -0
- package/lib/cjs/tile/RealityTileTree.js.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.d.ts +6 -0
- package/lib/cjs/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.js +7 -0
- 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/tile/map/ArcGISTileMap.d.ts +6 -2
- package/lib/cjs/tile/map/ArcGISTileMap.d.ts.map +1 -1
- package/lib/cjs/tile/map/ArcGISTileMap.js +127 -69
- package/lib/cjs/tile/map/ArcGISTileMap.js.map +1 -1
- package/lib/cjs/tile/map/ArcGisUtilities.d.ts.map +1 -1
- package/lib/cjs/tile/map/ArcGisUtilities.js +5 -0
- package/lib/cjs/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISImageryProvider.js +61 -39
- package/lib/cjs/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +6 -0
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +47 -7
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/WmsCapabilities.d.ts.map +1 -1
- package/lib/cjs/tile/map/WmsCapabilities.js +1 -15
- package/lib/cjs/tile/map/WmsCapabilities.js.map +1 -1
- package/lib/cjs/tile/map/WmsUtilities.d.ts +7 -0
- package/lib/cjs/tile/map/WmsUtilities.d.ts.map +1 -1
- package/lib/cjs/tile/map/WmsUtilities.js +22 -0
- package/lib/cjs/tile/map/WmsUtilities.js.map +1 -1
- package/lib/cjs/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/cjs/tile/map/WmtsCapabilities.js +2 -16
- package/lib/cjs/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/cjs/tools/SelectTool.d.ts +1 -0
- package/lib/cjs/tools/SelectTool.d.ts.map +1 -1
- package/lib/cjs/tools/SelectTool.js +19 -13
- package/lib/cjs/tools/SelectTool.js.map +1 -1
- package/lib/esm/DisplayStyleState.d.ts +3 -0
- package/lib/esm/DisplayStyleState.d.ts.map +1 -1
- package/lib/esm/DisplayStyleState.js +10 -0
- package/lib/esm/DisplayStyleState.js.map +1 -1
- package/lib/esm/Viewport.d.ts +5 -0
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +6 -0
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/common/gltf/GltfSchema.d.ts +20 -3
- package/lib/esm/common/gltf/GltfSchema.d.ts.map +1 -1
- package/lib/esm/common/gltf/GltfSchema.js.map +1 -1
- package/lib/esm/common/imdl/ImdlModel.d.ts +15 -1
- package/lib/esm/common/imdl/ImdlModel.d.ts.map +1 -1
- package/lib/esm/common/imdl/ImdlModel.js +11 -3
- package/lib/esm/common/imdl/ImdlModel.js.map +1 -1
- package/lib/esm/common/imdl/ParseImdlDocument.d.ts +3 -1
- package/lib/esm/common/imdl/ParseImdlDocument.d.ts.map +1 -1
- package/lib/esm/common/imdl/ParseImdlDocument.js +67 -12
- package/lib/esm/common/imdl/ParseImdlDocument.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +10 -0
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/webgl/BranchState.d.ts +2 -0
- package/lib/esm/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/esm/render/webgl/BranchState.js +2 -0
- package/lib/esm/render/webgl/BranchState.js.map +1 -1
- package/lib/esm/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/esm/render/webgl/Graphic.js +3 -0
- package/lib/esm/render/webgl/Graphic.js.map +1 -1
- package/lib/esm/render/webgl/InstancedGeometry.d.ts +1 -0
- package/lib/esm/render/webgl/InstancedGeometry.d.ts.map +1 -1
- package/lib/esm/render/webgl/InstancedGeometry.js +1 -0
- package/lib/esm/render/webgl/InstancedGeometry.js.map +1 -1
- package/lib/esm/request/utils.d.ts +18 -0
- package/lib/esm/request/utils.d.ts.map +1 -0
- package/lib/esm/request/utils.js +40 -0
- package/lib/esm/request/utils.js.map +1 -0
- package/lib/esm/tile/BatchedTileIdMap.d.ts +1 -2
- package/lib/esm/tile/BatchedTileIdMap.d.ts.map +1 -1
- package/lib/esm/tile/BatchedTileIdMap.js +3 -3
- package/lib/esm/tile/BatchedTileIdMap.js.map +1 -1
- package/lib/esm/tile/GltfReader.d.ts +4 -1
- package/lib/esm/tile/GltfReader.d.ts.map +1 -1
- package/lib/esm/tile/GltfReader.js +126 -27
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/lib/esm/tile/ImdlDecoder.d.ts +7 -1
- package/lib/esm/tile/ImdlDecoder.d.ts.map +1 -1
- package/lib/esm/tile/ImdlDecoder.js.map +1 -1
- package/lib/esm/tile/ImdlGraphicsCreator.d.ts.map +1 -1
- package/lib/esm/tile/ImdlGraphicsCreator.js +28 -17
- package/lib/esm/tile/ImdlGraphicsCreator.js.map +1 -1
- package/lib/esm/tile/ImdlReader.d.ts +2 -1
- package/lib/esm/tile/ImdlReader.d.ts.map +1 -1
- package/lib/esm/tile/ImdlReader.js +1 -0
- package/lib/esm/tile/ImdlReader.js.map +1 -1
- package/lib/esm/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/esm/tile/RealityModelTileTree.js +2 -3
- package/lib/esm/tile/RealityModelTileTree.js.map +1 -1
- package/lib/esm/tile/RealityTileTree.d.ts +31 -0
- package/lib/esm/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/esm/tile/RealityTileTree.js +6 -0
- package/lib/esm/tile/RealityTileTree.js.map +1 -1
- package/lib/esm/tile/TileDrawArgs.d.ts +6 -0
- package/lib/esm/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/esm/tile/TileDrawArgs.js +8 -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/tile/map/ArcGISTileMap.d.ts +6 -2
- package/lib/esm/tile/map/ArcGISTileMap.d.ts.map +1 -1
- package/lib/esm/tile/map/ArcGISTileMap.js +130 -71
- package/lib/esm/tile/map/ArcGISTileMap.js.map +1 -1
- package/lib/esm/tile/map/ArcGisUtilities.d.ts.map +1 -1
- package/lib/esm/tile/map/ArcGisUtilities.js +5 -0
- package/lib/esm/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISImageryProvider.js +61 -39
- package/lib/esm/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +6 -0
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +48 -8
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/WmsCapabilities.d.ts.map +1 -1
- package/lib/esm/tile/map/WmsCapabilities.js +1 -15
- package/lib/esm/tile/map/WmsCapabilities.js.map +1 -1
- package/lib/esm/tile/map/WmsUtilities.d.ts +7 -0
- package/lib/esm/tile/map/WmsUtilities.d.ts.map +1 -1
- package/lib/esm/tile/map/WmsUtilities.js +22 -0
- package/lib/esm/tile/map/WmsUtilities.js.map +1 -1
- package/lib/esm/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/esm/tile/map/WmtsCapabilities.js +2 -16
- package/lib/esm/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/esm/tools/SelectTool.d.ts +1 -0
- package/lib/esm/tools/SelectTool.d.ts.map +1 -1
- package/lib/esm/tools/SelectTool.js +19 -13
- package/lib/esm/tools/SelectTool.js.map +1 -1
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +20 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityTileTree.js","sourceRoot":"","sources":["../../../src/tile/RealityTileTree.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2E;AAC3E,wDAE8B;AAC9B,oDAA+F;AAC/F,oEAAiE;AAEjE,4CAAyC;AACzC,2DAAwD;AAGxD,yCAGoB;AAEpB,gBAAgB;AAChB,MAAa,gBAAgB;IAA7B;QACS,mBAAc,GAAG,IAAI,KAAK,EAAQ,CAAC;QACnC,qBAAgB,GAAG,KAAK,CAAC;QACzB,uBAAkB,GAAG,KAAK,CAAC;IAOpC,CAAC;IALQ,UAAU;QACf,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAC9B,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClC,CAAC;CACF;AAVD,4CAUC;AAED,gBAAgB;AAChB,MAAa,wBAAwB;IAArC;QACU,kBAAa,GAAuB,EAAE,CAAC;IA2BjD,CAAC;IAzBQ,UAAU;QACf,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,aAAa;YACpC,KAA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AG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAClC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;SAC1D;QAED,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,WAAW,IAAI,GAAG,GAAG,KAAK,KAAK,KAAK,CAAC,CAAC;QACvE,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,KAAK,KAAK,SAAS,GAAG,SAAS,GAAG,YAAY,WAAW,EAAE,CAAC,CAAC;IACnF,CAAC;CACF;AA5VD,0CA4VC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { assert, BeTimePoint, ProcessDetector } from \"@itwin/core-bentley\";\nimport {\n Matrix3d, Point3d, Range3d, Transform, Vector3d, XYZProps,\n} from \"@itwin/core-geometry\";\nimport { Cartographic, ColorDef, GeoCoordStatus, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { BackgroundMapGeometry } from \"../BackgroundMapGeometry\";\nimport { GeoConverter } from \"../GeoServices\";\nimport { IModelApp } from \"../IModelApp\";\nimport { GraphicBranch } from \"../render/GraphicBranch\";\nimport { GraphicBuilder } from \"../render/GraphicBuilder\";\nimport { SceneContext } from \"../ViewContext\";\nimport {\n GraphicsCollectorDrawArgs, MapTile, RealityTile, RealityTileLoader, RealityTileParams, Tile, TileDrawArgs, TileGeometryCollector,\n TileGraphicType, TileParams, TileTree, TileTreeParams,\n} from \"./internal\";\n\n/** @internal */\nexport class TraversalDetails {\n public queuedChildren = new Array<Tile>();\n public childrenSelected = false;\n public shouldSelectParent = false;\n\n public initialize() {\n this.queuedChildren.length = 0;\n this.childrenSelected = false;\n this.shouldSelectParent = false;\n }\n}\n\n/** @internal */\nexport class TraversalChildrenDetails {\n private _childDetails: TraversalDetails[] = [];\n\n public initialize() {\n for (const child of this._childDetails)\n child.initialize();\n }\n\n public getChildDetail(index: number) {\n while (this._childDetails.length <= index)\n this._childDetails.push(new TraversalDetails());\n\n return this._childDetails[index];\n }\n\n public combine(parentDetails: TraversalDetails) {\n parentDetails.queuedChildren.length = 0;\n parentDetails.childrenSelected = false;\n parentDetails.shouldSelectParent = false;\n\n for (const child of this._childDetails) {\n parentDetails.childrenSelected = parentDetails.childrenSelected || child.childrenSelected;\n parentDetails.shouldSelectParent = parentDetails.shouldSelectParent || child.shouldSelectParent;\n\n for (const queuedChild of child.queuedChildren)\n parentDetails.queuedChildren.push(queuedChild);\n }\n }\n}\n\n/** @internal */\nexport class TraversalSelectionContext {\n public preloaded = new Set<RealityTile>();\n public missing = new Array<RealityTile>();\n public get selectionCountExceeded() { return this._maxSelectionCount === undefined ? false : (this.missing.length + this.selected.length) > this._maxSelectionCount; } // Avoid selecting excessive number of tiles.\n constructor(public selected: Tile[], public displayedDescendants: Tile[][], public preloadDebugBuilder?: GraphicBuilder, private _maxSelectionCount?: number) { }\n\n public selectOrQueue(tile: RealityTile, args: TileDrawArgs, traversalDetails: TraversalDetails) {\n tile.selectSecondaryTiles(args, this);\n tile.markUsed(args);\n traversalDetails.shouldSelectParent = true;\n\n if (tile.isReady) {\n args.markReady(tile);\n this.selected.push(tile);\n tile.markDisplayed();\n this.displayedDescendants.push((traversalDetails.childrenSelected) ? traversalDetails.queuedChildren.slice() : []);\n traversalDetails.queuedChildren.length = 0;\n traversalDetails.childrenSelected = true;\n traversalDetails.shouldSelectParent = false;\n } else if (!tile.isNotFound) {\n traversalDetails.queuedChildren.push(tile);\n if (!tile.isLoaded)\n this.missing.push(tile);\n }\n }\n\n public preload(tile: RealityTile, args: TileDrawArgs): void {\n if (!this.preloaded.has(tile)) {\n if (this.preloadDebugBuilder)\n tile.addBoundingGraphic(this.preloadDebugBuilder, ColorDef.red);\n\n tile.markUsed(args);\n tile.selectSecondaryTiles(args, this);\n this.preloaded.add(tile);\n if (!tile.isNotFound && !tile.isLoaded)\n this.missing.push(tile);\n }\n }\n\n public select(tiles: RealityTile[], args: TileDrawArgs): void {\n for (const tile of tiles) {\n tile.markUsed(args);\n this.selected.push(tile);\n this.displayedDescendants.push([]);\n }\n }\n}\n\nconst scratchCarto = Cartographic.createZero();\nconst scratchPoint = Point3d.createZero(), scratchOrigin = Point3d.createZero();\nconst scratchRange = Range3d.createNull();\nconst scratchX = Vector3d.createZero(), scratchY = Vector3d.createZero(), scratchZ = Vector3d.createZero();\nconst scratchMatrix = Matrix3d.createZero(), scratchTransform = Transform.createZero();\n\ninterface ChildReprojection {\n child: RealityTile;\n ecefCenter: Point3d;\n dbPoints: Point3d[]; // Center, xEnd, yEnd, zEnd\n}\n\n/** @internal */\nexport interface RealityTileTreeParams extends TileTreeParams {\n readonly loader: RealityTileLoader;\n readonly yAxisUp?: boolean;\n readonly rootTile: RealityTileParams;\n readonly rootToEcef?: Transform;\n readonly gcsConverterAvailable: boolean;\n}\n\n/** Base class for a [[TileTree]] representing a reality model (e.g., a point cloud or photogrammetry mesh) or 3d terrain with map imagery.\n * The tiles within the tree are instances of [[RealityTile]]s.\n * @public\n */\nexport class RealityTileTree extends TileTree {\n /** @internal */\n public traversalChildrenByDepth: TraversalChildrenDetails[] = [];\n /** @internal */\n public readonly loader: RealityTileLoader;\n /** @internal */\n public readonly yAxisUp: boolean;\n /** @internal */\n public cartesianRange: Range3d;\n /** @internal */\n public cartesianTransitionDistance: number;\n /** @internal */\n protected _gcsConverter: GeoConverter | undefined;\n /** @internal */\n protected _rootTile: RealityTile;\n /** @internal */\n protected _rootToEcef?: Transform;\n /** @internal */\n protected _ecefToDb?: Transform;\n\n /** @internal */\n public constructor(params: RealityTileTreeParams) {\n super(params);\n this.loader = params.loader;\n this.yAxisUp = true === params.yAxisUp;\n this._rootTile = this.createTile(params.rootTile);\n this.cartesianRange = BackgroundMapGeometry.getCartesianRange(this.iModel);\n this.cartesianTransitionDistance = this.cartesianRange.diagonal().magnitudeXY() * .25; // Transition distance from elliptical to cartesian.\n this._gcsConverter = params.gcsConverterAvailable ? params.iModel.geoServices.getConverter(\"WGS84\") : undefined;\n if (params.rootToEcef) {\n this._rootToEcef = params.rootToEcef;\n const dbToRoot = this.iModelTransform.inverse();\n if (dbToRoot) {\n const dbToEcef = this._rootToEcef.multiplyTransformTransform(dbToRoot);\n this._ecefToDb = dbToEcef.inverse();\n }\n }\n }\n\n /** @internal */\n public get rootTile(): RealityTile { return this._rootTile; }\n /** @internal */\n public get is3d() { return true; }\n /** @internal */\n public get maxDepth() { return this.loader.maxDepth; }\n /** @internal */\n public get minDepth() { return this.loader.minDepth; }\n /** @internal */\n public override get isContentUnbounded() { return this.loader.isContentUnbounded; }\n /** @internal */\n public get isTransparent() { return false; }\n\n /** @internal */\n protected _selectTiles(args: TileDrawArgs): Tile[] { return this.selectRealityTiles(args, []); }\n /** @internal */\n public get viewFlagOverrides(): ViewFlagOverrides { return this.loader.viewFlagOverrides; }\n /** @internal */\n public override get parentsAndChildrenExclusive() { return this.loader.parentsAndChildrenExclusive; }\n\n /** @internal */\n public createTile(props: TileParams): RealityTile { return new RealityTile(props, this); }\n\n /** Collect tiles from this tile tree based on the criteria implemented by `collector`.\n * @internal\n */\n public override collectTileGeometry(collector: TileGeometryCollector): void {\n this.rootTile.collectTileGeometry(collector);\n }\n\n /** @internal */\n public prune(): void {\n const olderThan = BeTimePoint.now().minus(this.expirationTime);\n this.rootTile.purgeContents(olderThan, !ProcessDetector.isMobileBrowser);\n }\n\n /** @internal */\n public draw(args: TileDrawArgs): void {\n const displayedTileDescendants = new Array<RealityTile[]>();\n const debugControl = args.context.target.debugControl;\n const selectBuilder = (debugControl && debugControl.displayRealityTileRanges) ? args.context.createSceneGraphicBuilder() : undefined;\n const preloadDebugBuilder = (debugControl && debugControl.displayRealityTilePreload) ? args.context.createSceneGraphicBuilder() : undefined;\n const graphicTypeBranches = new Map<TileGraphicType, GraphicBranch>();\n\n const selectedTiles = this.selectRealityTiles(args, displayedTileDescendants, preloadDebugBuilder);\n args.processSelectedTiles(selectedTiles);\n let sortIndices;\n\n if (!this.parentsAndChildrenExclusive) {\n sortIndices = selectedTiles.map((_x, i) => i);\n sortIndices.sort((a, b) => selectedTiles[a].depth - selectedTiles[b].depth);\n }\n\n if (!(args instanceof GraphicsCollectorDrawArgs))\n this.collectClassifierGraphics(args, selectedTiles);\n\n assert(selectedTiles.length === displayedTileDescendants.length);\n for (let i = 0; i < selectedTiles.length; i++) {\n const index = sortIndices ? sortIndices[i] : i;\n const selectedTile = selectedTiles[index];\n const graphics = args.getTileGraphics(selectedTile);\n const tileGraphicType = selectedTile.graphicType;\n let targetBranch;\n if (undefined !== tileGraphicType && tileGraphicType !== args.context.graphicType) {\n if (!(targetBranch = graphicTypeBranches.get(tileGraphicType))) {\n graphicTypeBranches.set(tileGraphicType, targetBranch = new GraphicBranch(false));\n targetBranch.setViewFlagOverrides(args.graphics.viewFlagOverrides);\n targetBranch.symbologyOverrides = args.graphics.symbologyOverrides;\n }\n }\n\n if (!targetBranch)\n targetBranch = args.graphics;\n\n if (undefined !== graphics) {\n const displayedDescendants = displayedTileDescendants[index];\n if (0 === displayedDescendants.length || !this.loader.parentsAndChildrenExclusive || selectedTile.allChildrenIncluded(displayedDescendants)) {\n targetBranch.add(graphics);\n if (selectBuilder)\n selectedTile.addBoundingGraphic(selectBuilder, ColorDef.green);\n } else {\n if (selectBuilder)\n selectedTile.addBoundingGraphic(selectBuilder, ColorDef.red);\n\n for (const displayedDescendant of displayedDescendants) {\n const clipVector = displayedDescendant.getContentClip();\n if (selectBuilder)\n displayedDescendant.addBoundingGraphic(selectBuilder, ColorDef.blue);\n\n if (undefined === clipVector) {\n targetBranch.add(graphics);\n } else {\n clipVector.transformInPlace(args.location);\n if (!this.isTransparent)\n for (const primitive of clipVector.clips)\n for (const clipPlanes of primitive.fetchClipPlanesRef()!.convexSets)\n for (const plane of clipPlanes.planes)\n plane.offsetDistance(-displayedDescendant.radius * .05); // Overlap with existing (high resolution) tile slightly to avoid cracks.\n\n const branch = new GraphicBranch(false);\n branch.add(graphics);\n const clipVolume = args.context.target.renderSystem.createClipVolume(clipVector);\n targetBranch.add(args.context.createGraphicBranch(branch, Transform.createIdentity(), { clipVolume }));\n }\n }\n }\n if (preloadDebugBuilder)\n targetBranch.add(preloadDebugBuilder.finish());\n\n if (selectBuilder)\n targetBranch.add(selectBuilder.finish());\n\n const rangeGraphic = selectedTile.getRangeGraphic(args.context);\n if (undefined !== rangeGraphic)\n targetBranch.add(rangeGraphic);\n }\n }\n\n args.drawGraphics();\n for (const graphicTypeBranch of graphicTypeBranches) {\n args.drawGraphicsWithType(graphicTypeBranch[0], graphicTypeBranch[1]);\n }\n }\n\n /** @internal */\n protected collectClassifierGraphics(args: TileDrawArgs, selectedTiles: RealityTile[]) {\n const classifier = args.context.planarClassifiers.get(this.modelId);\n if (classifier)\n classifier.collectGraphics(args.context, { modelId: this.modelId, tiles: selectedTiles, location: args.location, isPointCloud: this.isPointCloud });\n }\n\n /** @internal */\n public getTraversalChildren(depth: number) {\n while (this.traversalChildrenByDepth.length <= depth)\n this.traversalChildrenByDepth.push(new TraversalChildrenDetails());\n\n return this.traversalChildrenByDepth[depth];\n }\n\n /** @internal */\n public doReprojectChildren(tile: Tile): boolean {\n if (!(tile instanceof RealityTile) || this._gcsConverter === undefined || this._rootToEcef === undefined || undefined === this._ecefToDb)\n return false;\n\n const tileRange = this.iModelTransform.isIdentity ? tile.range : this.iModelTransform.multiplyRange(tile.range, scratchRange);\n\n return this.cartesianRange.intersectsRange(tileRange);\n }\n\n /** @internal */\n public reprojectAndResolveChildren(parent: Tile, children: Tile[], resolve: (children: Tile[] | undefined) => void): void {\n if (!this.doReprojectChildren(parent)) {\n resolve(children);\n return;\n }\n\n const ecefToDb = this._ecefToDb!; // Tested for undefined in doReprojectChildren\n const rootToDb = this.iModelTransform;\n const dbToEcef = ecefToDb.inverse()!;\n const reprojectChildren = new Array<ChildReprojection>();\n for (const child of children) {\n const realityChild = child as RealityTile;\n const childRange = rootToDb.multiplyRange(realityChild.contentRange, scratchRange);\n const dbCenter = childRange.center;\n const ecefCenter = dbToEcef.multiplyPoint3d(dbCenter);\n const dbPoints = [dbCenter, dbCenter.plusXYZ(1), dbCenter.plusXYZ(0, 1), dbCenter.plusXYZ(0, 0, 1)];\n reprojectChildren.push({ child: realityChild, ecefCenter, dbPoints });\n }\n if (reprojectChildren.length === 0)\n resolve(children);\n else {\n const requestProps = new Array<XYZProps>();\n\n for (const reprojection of reprojectChildren) {\n for (const dbPoint of reprojection.dbPoints) {\n const ecefPoint = dbToEcef.multiplyPoint3d(dbPoint);\n const carto = Cartographic.fromEcef(ecefPoint, scratchCarto);\n if (carto)\n requestProps.push({ x: carto.longitudeDegrees, y: carto.latitudeDegrees, z: carto.height });\n\n }\n }\n\n if (requestProps.length !== 4 * reprojectChildren.length)\n resolve(children);\n else {\n this._gcsConverter!.getIModelCoordinatesFromGeoCoordinates(requestProps).then((response) => {\n\n const reprojectedCoords = response.iModelCoords;\n const dbToRoot = rootToDb.inverse()!;\n const getReprojectedPoint = (original: Point3d, reprojectedXYZ: XYZProps) => {\n scratchPoint.setFromJSON(reprojectedXYZ);\n const cartesianDistance = this.cartesianRange.distanceToPoint(scratchPoint);\n if (cartesianDistance < this.cartesianTransitionDistance)\n return scratchPoint.interpolate(cartesianDistance / this.cartesianTransitionDistance, original, scratchPoint);\n else\n return original;\n };\n\n let responseIndex = 0;\n for (const reprojection of reprojectChildren) {\n if (reprojectedCoords.every((coord) => coord.s === GeoCoordStatus.Success)) {\n const reprojectedOrigin = getReprojectedPoint(reprojection.dbPoints[0], reprojectedCoords[responseIndex++].p).clone(scratchOrigin);\n const xVector = Vector3d.createStartEnd(reprojectedOrigin, getReprojectedPoint(reprojection.dbPoints[1], reprojectedCoords[responseIndex++].p), scratchX);\n const yVector = Vector3d.createStartEnd(reprojectedOrigin, getReprojectedPoint(reprojection.dbPoints[2], reprojectedCoords[responseIndex++].p), scratchY);\n const zVector = Vector3d.createStartEnd(reprojectedOrigin, getReprojectedPoint(reprojection.dbPoints[3], reprojectedCoords[responseIndex++].p), scratchZ);\n const matrix = Matrix3d.createColumns(xVector, yVector, zVector, scratchMatrix);\n if (matrix !== undefined) {\n const dbReprojection = Transform.createMatrixPickupPutdown(matrix, reprojection.dbPoints[0], reprojectedOrigin, scratchTransform);\n if (dbReprojection) {\n const rootReprojection = dbToRoot.multiplyTransformTransform(dbReprojection).multiplyTransformTransform(rootToDb);\n reprojection.child.reproject(rootReprojection);\n }\n }\n }\n }\n\n resolve(children);\n }).catch(() => {\n resolve(children); // Error occured in reprojection - just resolve with unprojected corners.\n });\n }\n }\n }\n\n /** @internal */\n public getBaseRealityDepth(_sceneContext: SceneContext) { return -1; }\n\n /** Scan the list of currently selected reality tiles, and fire the viewport's 'onMapLayerScaleRangeVisibilityChanged ' event\n * if any scale range visibility change is detected for one more map-layer definition.\n * @internal\n */\n public reportTileVisibility(_args: TileDrawArgs, _selected: RealityTile[]) { }\n\n /** @internal */\n public selectRealityTiles(args: TileDrawArgs, displayedDescendants: RealityTile[][], preloadDebugBuilder?: GraphicBuilder): RealityTile[] {\n this._lastSelected = BeTimePoint.now();\n const selected: RealityTile[] = [];\n const context = new TraversalSelectionContext(selected, displayedDescendants, preloadDebugBuilder, args.maxRealityTreeSelectionCount);\n const rootTile = this.rootTile;\n const debugControl = args.context.target.debugControl;\n const freezeTiles = debugControl && debugControl.freezeRealityTiles;\n\n rootTile.selectRealityTiles(context, args, new TraversalDetails());\n\n const baseDepth = this.getBaseRealityDepth(args.context);\n\n if (!args.context.target.renderSystem.isMobile && 0 === context.missing.length) { // We skip preloading on mobile devices.\n if (baseDepth > 0) // Maps may force loading of low level globe tiles.\n rootTile.preloadRealityTilesAtDepth(baseDepth, context, args);\n\n if (!freezeTiles)\n rootTile.preloadProtectedTiles(args, context);\n }\n\n if (!freezeTiles)\n for (const tile of context.missing) {\n const loadableTile = tile.loadableTile;\n\n loadableTile.markUsed(args);\n args.insertMissing(loadableTile);\n }\n\n if (debugControl && debugControl.logRealityTiles) {\n this.logTiles(\"Selected: \", selected.values());\n const preloaded = [];\n for (const tile of context.preloaded)\n preloaded.push(tile);\n\n this.logTiles(\"Preloaded: \", preloaded.values());\n this.logTiles(\"Missing: \", context.missing.values());\n\n const imageryTiles: RealityTile[] = [];\n for (const selectedTile of selected) {\n if (selectedTile instanceof MapTile) {\n const selectedImageryTiles = (selectedTile).imageryTiles;\n if (selectedImageryTiles)\n selectedImageryTiles.forEach((tile) => imageryTiles.push(tile));\n }\n }\n if (imageryTiles.length)\n this.logTiles(\"Imagery:\", imageryTiles.values());\n }\n\n this.reportTileVisibility(args, selected);\n\n IModelApp.tileAdmin.addTilesForUser(args.context.viewport, selected, args.readyTiles, args.touchedTiles);\n return selected;\n }\n\n /** @internal */\n protected logTiles(label: string, tiles: IterableIterator<Tile>) {\n let depthString = \"\";\n let min = 10000, max = -10000;\n let count = 0;\n const depthMap = new Map<number, number>();\n for (const tile of tiles) {\n count++;\n const depth = tile.depth;\n min = Math.min(min, tile.depth);\n max = Math.max(max, tile.depth);\n const found = depthMap.get(depth);\n depthMap.set(depth, found === undefined ? 1 : found + 1);\n }\n\n depthMap.forEach((value, key) => depthString += `${key}(x${value}), `);\n // eslint-disable-next-line no-console\n console.log(`${label}: ${count} Min: ${min} Max: ${max} Depths: ${depthString}`);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RealityTileTree.js","sourceRoot":"","sources":["../../../src/tile/RealityTileTree.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuF;AACvF,wDAE8B;AAC9B,oDAA+F;AAC/F,oEAAiE;AAEjE,4CAAyC;AACzC,2DAAwD;AAGxD,yCAGoB;AAEpB,gBAAgB;AACh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CAAC;QACzG,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gBAAgB;IACN,QAAQ,CAAC,KAAa,EAAE,KAA6B;QAC7D,IAAI,WAAW,GAAG,EAAE,CAAC;QACrB,IAAI,GAAG,GAAG,KAAK,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC;QAC9B,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;QAC3C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;YACxB,KAAK,EAAE,CAAC;YACR,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YAChC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YAChC,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAClC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;SAC1D;QAED,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,WAAW,IAAI,GAAG,GAAG,KAAK,KAAK,KAAK,CAAC,CAAC;QACvE,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,KAAK,KAAK,SAAS,GAAG,SAAS,GAAG,YAAY,WAAW,EAAE,CAAC,CAAC;IACnF,CAAC;CACF;AAnWD,0CAmWC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { assert, BeTimePoint, Id64String, ProcessDetector } from \"@itwin/core-bentley\";\nimport {\n Matrix3d, Point3d, Range3d, Transform, Vector3d, XYZProps,\n} from \"@itwin/core-geometry\";\nimport { Cartographic, ColorDef, GeoCoordStatus, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { BackgroundMapGeometry } from \"../BackgroundMapGeometry\";\nimport { GeoConverter } from \"../GeoServices\";\nimport { IModelApp } from \"../IModelApp\";\nimport { GraphicBranch } from \"../render/GraphicBranch\";\nimport { GraphicBuilder } from \"../render/GraphicBuilder\";\nimport { SceneContext } from \"../ViewContext\";\nimport {\n GraphicsCollectorDrawArgs, MapTile, RealityTile, RealityTileLoader, RealityTileParams, Tile, TileDrawArgs, TileGeometryCollector,\n TileGraphicType, TileParams, TileTree, TileTreeParams,\n} from \"./internal\";\n\n/** @internal */\nexport class TraversalDetails {\n public queuedChildren = new Array<Tile>();\n public childrenSelected = false;\n public shouldSelectParent = false;\n\n public initialize() {\n this.queuedChildren.length = 0;\n this.childrenSelected = false;\n this.shouldSelectParent = false;\n }\n}\n\n/** @internal */\nexport class TraversalChildrenDetails {\n private _childDetails: TraversalDetails[] = [];\n\n public initialize() {\n for (const child of this._childDetails)\n child.initialize();\n }\n\n public getChildDetail(index: number) {\n while (this._childDetails.length <= index)\n this._childDetails.push(new TraversalDetails());\n\n return this._childDetails[index];\n }\n\n public combine(parentDetails: TraversalDetails) {\n parentDetails.queuedChildren.length = 0;\n parentDetails.childrenSelected = false;\n parentDetails.shouldSelectParent = false;\n\n for (const child of this._childDetails) {\n parentDetails.childrenSelected = parentDetails.childrenSelected || child.childrenSelected;\n parentDetails.shouldSelectParent = parentDetails.shouldSelectParent || child.shouldSelectParent;\n\n for (const queuedChild of child.queuedChildren)\n parentDetails.queuedChildren.push(queuedChild);\n }\n }\n}\n\n/** @internal */\nexport class TraversalSelectionContext {\n public preloaded = new Set<RealityTile>();\n public missing = new Array<RealityTile>();\n public get selectionCountExceeded() { return this._maxSelectionCount === undefined ? false : (this.missing.length + this.selected.length) > this._maxSelectionCount; } // Avoid selecting excessive number of tiles.\n constructor(public selected: Tile[], public displayedDescendants: Tile[][], public preloadDebugBuilder?: GraphicBuilder, private _maxSelectionCount?: number) { }\n\n public selectOrQueue(tile: RealityTile, args: TileDrawArgs, traversalDetails: TraversalDetails) {\n tile.selectSecondaryTiles(args, this);\n tile.markUsed(args);\n traversalDetails.shouldSelectParent = true;\n\n if (tile.isReady) {\n args.markReady(tile);\n this.selected.push(tile);\n tile.markDisplayed();\n this.displayedDescendants.push((traversalDetails.childrenSelected) ? traversalDetails.queuedChildren.slice() : []);\n traversalDetails.queuedChildren.length = 0;\n traversalDetails.childrenSelected = true;\n traversalDetails.shouldSelectParent = false;\n } else if (!tile.isNotFound) {\n traversalDetails.queuedChildren.push(tile);\n if (!tile.isLoaded)\n this.missing.push(tile);\n }\n }\n\n public preload(tile: RealityTile, args: TileDrawArgs): void {\n if (!this.preloaded.has(tile)) {\n if (this.preloadDebugBuilder)\n tile.addBoundingGraphic(this.preloadDebugBuilder, ColorDef.red);\n\n tile.markUsed(args);\n tile.selectSecondaryTiles(args, this);\n this.preloaded.add(tile);\n if (!tile.isNotFound && !tile.isLoaded)\n this.missing.push(tile);\n }\n }\n\n public select(tiles: RealityTile[], args: TileDrawArgs): void {\n for (const tile of tiles) {\n tile.markUsed(args);\n this.selected.push(tile);\n this.displayedDescendants.push([]);\n }\n }\n}\n\nconst scratchCarto = Cartographic.createZero();\nconst scratchPoint = Point3d.createZero(), scratchOrigin = Point3d.createZero();\nconst scratchRange = Range3d.createNull();\nconst scratchX = Vector3d.createZero(), scratchY = Vector3d.createZero(), scratchZ = Vector3d.createZero();\nconst scratchMatrix = Matrix3d.createZero(), scratchTransform = Transform.createZero();\n\ninterface ChildReprojection {\n child: RealityTile;\n ecefCenter: Point3d;\n dbPoints: Point3d[]; // Center, xEnd, yEnd, zEnd\n}\n\n/** Provides access to per-feature properties within a [[RealityTileTree]].\n * A [[RealityTileTree]] may refer to a tileset in one of the [3D Tiles 1.0](https://docs.ogc.org/cs/18-053r2/18-053r2.html).\n * Tiles within such tilesets may include a [batch table](https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/BatchTable) describing subcomponents (\"features\") within the tile.\n * For example, a tileset representing a building may encode each door, window, and wall as separate features.\n * The batch table may additionally contain metadata in JSON format describing each feature.\n *\n * During tile decoding, iTwin.js assigns unique, transient [Id64String]($bentley)s to each unique feature within the tileset.\n * When interacting with tileset features (e.g., via a [[SelectionSet]] or [[HitDetail]]), the features are identified by these transient Ids.\n * The tile tree's BatchTableProperties maintains the mapping between the transient Ids and the per-feature properties.\n *\n * The following example illustrates one way to obtain the properties of a specific feature within a reality model's batch table:\n * ```ts\n * [[include:GetBatchTableFeatureProperties]]\n * ```\n *\n * @see [[RealityTileTree.batchTableProperties]] to obtain the batch table properties for a TileTree.\n * @beta\n */\nexport interface BatchTableProperties {\n /** Obtain the JSON properties associated with the specified transient Id.\n * @param id The transient Id mapped to the feature of interest.\n * @returns A corresponding JSON object representing the feature's properties, or `undefined` if no such properties exist.\n * @note Treat the JSON properties as read-only - do not modify them.\n */\n getFeatureProperties(id: Id64String): Record<string, any> | undefined;\n}\n\n/** @internal */\nexport interface RealityTileTreeParams extends TileTreeParams {\n readonly loader: RealityTileLoader;\n readonly yAxisUp?: boolean;\n readonly rootTile: RealityTileParams;\n readonly rootToEcef?: Transform;\n readonly gcsConverterAvailable: boolean;\n}\n\n/** Base class for a [[TileTree]] representing a reality model (e.g., a point cloud or photogrammetry mesh) or 3d terrain with map imagery.\n * The tiles within the tree are instances of [[RealityTile]]s.\n * @public\n */\nexport class RealityTileTree extends TileTree {\n /** @internal */\n public traversalChildrenByDepth: TraversalChildrenDetails[] = [];\n /** @internal */\n public readonly loader: RealityTileLoader;\n /** @internal */\n public readonly yAxisUp: boolean;\n /** @internal */\n public cartesianRange: Range3d;\n /** @internal */\n public cartesianTransitionDistance: number;\n /** @internal */\n protected _gcsConverter: GeoConverter | undefined;\n /** @internal */\n protected _rootTile: RealityTile;\n /** @internal */\n protected _rootToEcef?: Transform;\n /** @internal */\n protected _ecefToDb?: Transform;\n\n /** @internal */\n public constructor(params: RealityTileTreeParams) {\n super(params);\n this.loader = params.loader;\n this.yAxisUp = true === params.yAxisUp;\n this._rootTile = this.createTile(params.rootTile);\n this.cartesianRange = BackgroundMapGeometry.getCartesianRange(this.iModel);\n this.cartesianTransitionDistance = this.cartesianRange.diagonal().magnitudeXY() * .25; // Transition distance from elliptical to cartesian.\n this._gcsConverter = params.gcsConverterAvailable ? params.iModel.geoServices.getConverter(\"WGS84\") : undefined;\n if (params.rootToEcef) {\n this._rootToEcef = params.rootToEcef;\n const dbToRoot = this.iModelTransform.inverse();\n if (dbToRoot) {\n const dbToEcef = this._rootToEcef.multiplyTransformTransform(dbToRoot);\n this._ecefToDb = dbToEcef.inverse();\n }\n }\n }\n\n /** The mapping of per-feature JSON properties from this tile tree's batch table, if one is defined.\n * @beta\n */\n public get batchTableProperties(): BatchTableProperties | undefined {\n return this.loader.getBatchIdMap();\n }\n\n /** @internal */\n public get rootTile(): RealityTile { return this._rootTile; }\n /** @internal */\n public get is3d() { return true; }\n /** @internal */\n public get maxDepth() { return this.loader.maxDepth; }\n /** @internal */\n public get minDepth() { return this.loader.minDepth; }\n /** @internal */\n public override get isContentUnbounded() { return this.loader.isContentUnbounded; }\n /** @internal */\n public get isTransparent() { return false; }\n\n /** @internal */\n protected _selectTiles(args: TileDrawArgs): Tile[] { return this.selectRealityTiles(args, []); }\n /** @internal */\n public get viewFlagOverrides(): ViewFlagOverrides { return this.loader.viewFlagOverrides; }\n /** @internal */\n public override get parentsAndChildrenExclusive() { return this.loader.parentsAndChildrenExclusive; }\n\n /** @internal */\n public createTile(props: TileParams): RealityTile { return new RealityTile(props, this); }\n\n /** Collect tiles from this tile tree based on the criteria implemented by `collector`.\n * @internal\n */\n public override collectTileGeometry(collector: TileGeometryCollector): void {\n this.rootTile.collectTileGeometry(collector);\n }\n\n /** @internal */\n public prune(): void {\n const olderThan = BeTimePoint.now().minus(this.expirationTime);\n this.rootTile.purgeContents(olderThan, !ProcessDetector.isMobileBrowser);\n }\n\n /** @internal */\n public draw(args: TileDrawArgs): void {\n const displayedTileDescendants = new Array<RealityTile[]>();\n const debugControl = args.context.target.debugControl;\n const selectBuilder = (debugControl && debugControl.displayRealityTileRanges) ? args.context.createSceneGraphicBuilder() : undefined;\n const preloadDebugBuilder = (debugControl && debugControl.displayRealityTilePreload) ? args.context.createSceneGraphicBuilder() : undefined;\n const graphicTypeBranches = new Map<TileGraphicType, GraphicBranch>();\n\n const selectedTiles = this.selectRealityTiles(args, displayedTileDescendants, preloadDebugBuilder);\n args.processSelectedTiles(selectedTiles);\n let sortIndices;\n\n if (!this.parentsAndChildrenExclusive) {\n sortIndices = selectedTiles.map((_x, i) => i);\n sortIndices.sort((a, b) => selectedTiles[a].depth - selectedTiles[b].depth);\n }\n\n if (!(args instanceof GraphicsCollectorDrawArgs))\n this.collectClassifierGraphics(args, selectedTiles);\n\n assert(selectedTiles.length === displayedTileDescendants.length);\n for (let i = 0; i < selectedTiles.length; i++) {\n const index = sortIndices ? sortIndices[i] : i;\n const selectedTile = selectedTiles[index];\n const graphics = args.getTileGraphics(selectedTile);\n const tileGraphicType = selectedTile.graphicType;\n let targetBranch;\n if (undefined !== tileGraphicType && tileGraphicType !== args.context.graphicType) {\n if (!(targetBranch = graphicTypeBranches.get(tileGraphicType))) {\n graphicTypeBranches.set(tileGraphicType, targetBranch = new GraphicBranch(false));\n targetBranch.setViewFlagOverrides(args.graphics.viewFlagOverrides);\n targetBranch.symbologyOverrides = args.graphics.symbologyOverrides;\n }\n }\n\n if (!targetBranch)\n targetBranch = args.graphics;\n\n if (undefined !== graphics) {\n const displayedDescendants = displayedTileDescendants[index];\n if (0 === displayedDescendants.length || !this.loader.parentsAndChildrenExclusive || selectedTile.allChildrenIncluded(displayedDescendants)) {\n targetBranch.add(graphics);\n if (selectBuilder)\n selectedTile.addBoundingGraphic(selectBuilder, ColorDef.green);\n } else {\n if (selectBuilder)\n selectedTile.addBoundingGraphic(selectBuilder, ColorDef.red);\n\n for (const displayedDescendant of displayedDescendants) {\n const clipVector = displayedDescendant.getContentClip();\n if (selectBuilder)\n displayedDescendant.addBoundingGraphic(selectBuilder, ColorDef.blue);\n\n if (undefined === clipVector) {\n targetBranch.add(graphics);\n } else {\n clipVector.transformInPlace(args.location);\n if (!this.isTransparent)\n for (const primitive of clipVector.clips)\n for (const clipPlanes of primitive.fetchClipPlanesRef()!.convexSets)\n for (const plane of clipPlanes.planes)\n plane.offsetDistance(-displayedDescendant.radius * .05); // Overlap with existing (high resolution) tile slightly to avoid cracks.\n\n const branch = new GraphicBranch(false);\n branch.add(graphics);\n const clipVolume = args.context.target.renderSystem.createClipVolume(clipVector);\n targetBranch.add(args.context.createGraphicBranch(branch, Transform.createIdentity(), { clipVolume }));\n }\n }\n }\n if (preloadDebugBuilder)\n targetBranch.add(preloadDebugBuilder.finish());\n\n if (selectBuilder)\n targetBranch.add(selectBuilder.finish());\n\n const rangeGraphic = selectedTile.getRangeGraphic(args.context);\n if (undefined !== rangeGraphic)\n targetBranch.add(rangeGraphic);\n }\n }\n\n args.drawGraphics();\n for (const graphicTypeBranch of graphicTypeBranches) {\n args.drawGraphicsWithType(graphicTypeBranch[0], graphicTypeBranch[1]);\n }\n }\n\n /** @internal */\n protected collectClassifierGraphics(args: TileDrawArgs, selectedTiles: RealityTile[]) {\n const classifier = args.context.planarClassifiers.get(this.modelId);\n if (classifier)\n classifier.collectGraphics(args.context, { modelId: this.modelId, tiles: selectedTiles, location: args.location, isPointCloud: this.isPointCloud });\n }\n\n /** @internal */\n public getTraversalChildren(depth: number) {\n while (this.traversalChildrenByDepth.length <= depth)\n this.traversalChildrenByDepth.push(new TraversalChildrenDetails());\n\n return this.traversalChildrenByDepth[depth];\n }\n\n /** @internal */\n public doReprojectChildren(tile: Tile): boolean {\n if (!(tile instanceof RealityTile) || this._gcsConverter === undefined || this._rootToEcef === undefined || undefined === this._ecefToDb)\n return false;\n\n const tileRange = this.iModelTransform.isIdentity ? tile.range : this.iModelTransform.multiplyRange(tile.range, scratchRange);\n\n return this.cartesianRange.intersectsRange(tileRange);\n }\n\n /** @internal */\n public reprojectAndResolveChildren(parent: Tile, children: Tile[], resolve: (children: Tile[] | undefined) => void): void {\n if (!this.doReprojectChildren(parent)) {\n resolve(children);\n return;\n }\n\n const ecefToDb = this._ecefToDb!; // Tested for undefined in doReprojectChildren\n const rootToDb = this.iModelTransform;\n const dbToEcef = ecefToDb.inverse()!;\n const reprojectChildren = new Array<ChildReprojection>();\n for (const child of children) {\n const realityChild = child as RealityTile;\n const childRange = rootToDb.multiplyRange(realityChild.contentRange, scratchRange);\n const dbCenter = childRange.center;\n const ecefCenter = dbToEcef.multiplyPoint3d(dbCenter);\n const dbPoints = [dbCenter, dbCenter.plusXYZ(1), dbCenter.plusXYZ(0, 1), dbCenter.plusXYZ(0, 0, 1)];\n reprojectChildren.push({ child: realityChild, ecefCenter, dbPoints });\n }\n if (reprojectChildren.length === 0)\n resolve(children);\n else {\n const requestProps = new Array<XYZProps>();\n\n for (const reprojection of reprojectChildren) {\n for (const dbPoint of reprojection.dbPoints) {\n const ecefPoint = dbToEcef.multiplyPoint3d(dbPoint);\n const carto = Cartographic.fromEcef(ecefPoint, scratchCarto);\n if (carto)\n requestProps.push({ x: carto.longitudeDegrees, y: carto.latitudeDegrees, z: carto.height });\n\n }\n }\n\n if (requestProps.length !== 4 * reprojectChildren.length)\n resolve(children);\n else {\n this._gcsConverter!.getIModelCoordinatesFromGeoCoordinates(requestProps).then((response) => {\n\n const reprojectedCoords = response.iModelCoords;\n const dbToRoot = rootToDb.inverse()!;\n const getReprojectedPoint = (original: Point3d, reprojectedXYZ: XYZProps) => {\n scratchPoint.setFromJSON(reprojectedXYZ);\n const cartesianDistance = this.cartesianRange.distanceToPoint(scratchPoint);\n if (cartesianDistance < this.cartesianTransitionDistance)\n return scratchPoint.interpolate(cartesianDistance / this.cartesianTransitionDistance, original, scratchPoint);\n else\n return original;\n };\n\n let responseIndex = 0;\n for (const reprojection of reprojectChildren) {\n if (reprojectedCoords.every((coord) => coord.s === GeoCoordStatus.Success)) {\n const reprojectedOrigin = getReprojectedPoint(reprojection.dbPoints[0], reprojectedCoords[responseIndex++].p).clone(scratchOrigin);\n const xVector = Vector3d.createStartEnd(reprojectedOrigin, getReprojectedPoint(reprojection.dbPoints[1], reprojectedCoords[responseIndex++].p), scratchX);\n const yVector = Vector3d.createStartEnd(reprojectedOrigin, getReprojectedPoint(reprojection.dbPoints[2], reprojectedCoords[responseIndex++].p), scratchY);\n const zVector = Vector3d.createStartEnd(reprojectedOrigin, getReprojectedPoint(reprojection.dbPoints[3], reprojectedCoords[responseIndex++].p), scratchZ);\n const matrix = Matrix3d.createColumns(xVector, yVector, zVector, scratchMatrix);\n if (matrix !== undefined) {\n const dbReprojection = Transform.createMatrixPickupPutdown(matrix, reprojection.dbPoints[0], reprojectedOrigin, scratchTransform);\n if (dbReprojection) {\n const rootReprojection = dbToRoot.multiplyTransformTransform(dbReprojection).multiplyTransformTransform(rootToDb);\n reprojection.child.reproject(rootReprojection);\n }\n }\n }\n }\n\n resolve(children);\n }).catch(() => {\n resolve(children); // Error occured in reprojection - just resolve with unprojected corners.\n });\n }\n }\n }\n\n /** @internal */\n public getBaseRealityDepth(_sceneContext: SceneContext) { return -1; }\n\n /** Scan the list of currently selected reality tiles, and fire the viewport's 'onMapLayerScaleRangeVisibilityChanged ' event\n * if any scale range visibility change is detected for one more map-layer definition.\n * @internal\n */\n public reportTileVisibility(_args: TileDrawArgs, _selected: RealityTile[]) { }\n\n /** @internal */\n public selectRealityTiles(args: TileDrawArgs, displayedDescendants: RealityTile[][], preloadDebugBuilder?: GraphicBuilder): RealityTile[] {\n this._lastSelected = BeTimePoint.now();\n const selected: RealityTile[] = [];\n const context = new TraversalSelectionContext(selected, displayedDescendants, preloadDebugBuilder, args.maxRealityTreeSelectionCount);\n const rootTile = this.rootTile;\n const debugControl = args.context.target.debugControl;\n const freezeTiles = debugControl && debugControl.freezeRealityTiles;\n\n rootTile.selectRealityTiles(context, args, new TraversalDetails());\n\n const baseDepth = this.getBaseRealityDepth(args.context);\n\n if (!args.context.target.renderSystem.isMobile && 0 === context.missing.length) { // We skip preloading on mobile devices.\n if (baseDepth > 0) // Maps may force loading of low level globe tiles.\n rootTile.preloadRealityTilesAtDepth(baseDepth, context, args);\n\n if (!freezeTiles)\n rootTile.preloadProtectedTiles(args, context);\n }\n\n if (!freezeTiles)\n for (const tile of context.missing) {\n const loadableTile = tile.loadableTile;\n\n loadableTile.markUsed(args);\n args.insertMissing(loadableTile);\n }\n\n if (debugControl && debugControl.logRealityTiles) {\n this.logTiles(\"Selected: \", selected.values());\n const preloaded = [];\n for (const tile of context.preloaded)\n preloaded.push(tile);\n\n this.logTiles(\"Preloaded: \", preloaded.values());\n this.logTiles(\"Missing: \", context.missing.values());\n\n const imageryTiles: RealityTile[] = [];\n for (const selectedTile of selected) {\n if (selectedTile instanceof MapTile) {\n const selectedImageryTiles = (selectedTile).imageryTiles;\n if (selectedImageryTiles)\n selectedImageryTiles.forEach((tile) => imageryTiles.push(tile));\n }\n }\n if (imageryTiles.length)\n this.logTiles(\"Imagery:\", imageryTiles.values());\n }\n\n this.reportTileVisibility(args, selected);\n\n IModelApp.tileAdmin.addTilesForUser(args.context.viewport, selected, args.readyTiles, args.touchedTiles);\n return selected;\n }\n\n /** @internal */\n protected logTiles(label: string, tiles: IterableIterator<Tile>) {\n let depthString = \"\";\n let min = 10000, max = -10000;\n let count = 0;\n const depthMap = new Map<number, number>();\n for (const tile of tiles) {\n count++;\n const depth = tile.depth;\n min = Math.min(min, tile.depth);\n max = Math.max(max, tile.depth);\n const found = depthMap.get(depth);\n depthMap.set(depth, found === undefined ? 1 : found + 1);\n }\n\n depthMap.forEach((value, key) => depthString += `${key}(x${value}), `);\n // eslint-disable-next-line no-console\n console.log(`${label}: ${count} Min: ${min} Max: ${max} Depths: ${depthString}`);\n }\n}\n"]}
|
|
@@ -45,6 +45,10 @@ export interface TileDrawArgParams {
|
|
|
45
45
|
* @internal
|
|
46
46
|
*/
|
|
47
47
|
animationTransformNodeId?: number;
|
|
48
|
+
/** See [[GraphicBranch.groupNodeId]].
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
groupNodeId?: number;
|
|
48
52
|
/** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */
|
|
49
53
|
boundingRange?: Range3d;
|
|
50
54
|
/** @alpha */
|
|
@@ -106,6 +110,8 @@ export declare class TileDrawArgs {
|
|
|
106
110
|
readonly pixelSizeScaleFactor: number;
|
|
107
111
|
/** @internal */
|
|
108
112
|
readonly animationTransformNodeId?: number;
|
|
113
|
+
/** @internal */
|
|
114
|
+
readonly groupNodeId?: number;
|
|
109
115
|
/** @alpha */
|
|
110
116
|
maximumScreenSpaceError: number;
|
|
111
117
|
/** Compute the size in pixels of the specified tile at the point on its bounding sphere closest to the camera. */
|
|
@@ -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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C,IAAI,EAAE,IAAI,GAAG,IAAI;IAIjC;;OAEG;IACI,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAIlC;;OAEG;IACI,oBAAoB,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI;IAGjD,IAAW,4BAA4B,IAAI,MAAM,GAAG,SAAS,CAAsB;CACpF"}
|
|
@@ -156,6 +156,7 @@ class TileDrawArgs {
|
|
|
156
156
|
this._appearanceProvider = params.appearanceProvider;
|
|
157
157
|
this.hiddenLineSettings = params.hiddenLineSettings;
|
|
158
158
|
this.animationTransformNodeId = params.animationTransformNodeId;
|
|
159
|
+
this.groupNodeId = params.groupNodeId;
|
|
159
160
|
this.boundingRange = params.boundingRange;
|
|
160
161
|
this.maximumScreenSpaceError = params.maximumScreenSpaceError ?? 16; // 16 is Cesium's default.
|
|
161
162
|
// Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.
|
|
@@ -234,6 +235,12 @@ class TileDrawArgs {
|
|
|
234
235
|
let graphic = this.context.createGraphicBranch(graphics, this.location, opts);
|
|
235
236
|
if (undefined !== this.animationTransformNodeId)
|
|
236
237
|
graphic = this.context.renderSystem.createAnimationTransformNode(graphic, this.animationTransformNodeId);
|
|
238
|
+
if (undefined !== this.groupNodeId) {
|
|
239
|
+
const branch = new GraphicBranch_1.GraphicBranch();
|
|
240
|
+
branch.add(graphic);
|
|
241
|
+
branch.groupNodeId = this.groupNodeId;
|
|
242
|
+
graphic = this.context.createGraphicBranch(branch, core_geometry_1.Transform.identity);
|
|
243
|
+
}
|
|
237
244
|
return graphic;
|
|
238
245
|
}
|
|
239
246
|
/** Output graphics for all accumulated tiles. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileDrawArgs.js","sourceRoot":"","sources":["../../../src/tile/TileDrawArgs.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAAsI;AACtI,oDAA6G;AAE7G,2DAAwD;A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Ae,EAAE,CAAC;QACxC,IAAI,SAAS,KAAK,QAAQ;YACxB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED,uEAAuE;IAChE,oBAAoB,CAAC,WAA4B,EAAE,QAAuB;QAC/E,MAAM,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QACpD,IAAI,SAAS,KAAK,MAAM;YACtB,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,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;AA/UD,oCA+UC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { BeTimePoint } from \"@itwin/core-bentley\";\nimport { ClipVector, Geometry, Map4d, Matrix4d, Point3d, Point4d, Range1d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\nimport { FeatureAppearanceProvider, FrustumPlanes, HiddenLine, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\nimport { GraphicBranch } from \"../render/GraphicBranch\";\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\nimport { RenderGraphic } from \"../render/RenderGraphic\";\nimport { RenderPlanarClassifier } from \"../render/RenderPlanarClassifier\";\nimport { RenderTextureDrape } from \"../render/RenderSystem\";\nimport { SceneContext } from \"../ViewContext\";\nimport { ViewingSpace } from \"../ViewingSpace\";\nimport { CoordSystem } from \"../CoordSystem\";\nimport { Tile, TileGraphicType, TileTree } from \"./internal\";\n\nconst scratchRange = new Range3d();\nconst scratchPoint = Point3d.create();\nconst scratchPoint4d = Point4d.create();\nconst scratchXRange = Range1d.createNull();\nconst scratchYRange = Range1d.createNull();\nconst scratchMatrix4d = Matrix4d.createIdentity();\n\n/** Parameters used to construct [[TileDrawArgs]].\n * @public\n * @extensions\n */\nexport interface TileDrawArgParams {\n /** Context for the scene into which the tiles are to be rendered. */\n context: SceneContext;\n /** Transform to be applied when drawing the tiles. */\n location: Transform;\n /** The tile tree from which to obtain tiles. */\n tree: TileTree;\n /** The time at which these args were created. */\n now: BeTimePoint;\n /** Overrides to apply to the view's [ViewFlags]($common) when drawing the tiles. */\n viewFlagOverrides: ViewFlagOverrides;\n /** Clip volume used to clip the tiles. */\n clipVolume?: RenderClipVolume;\n /** True if a tile and its child tiles should not be drawn simultaneously. */\n parentsAndChildrenExclusive: boolean;\n /** Symbology overrides to apply to the tiles. */\n symbologyOverrides: FeatureSymbology.Overrides | undefined;\n /** Optionally customizes the view's symbology overrides for the tiles. */\n appearanceProvider?: FeatureAppearanceProvider;\n /** Optionally overrides the view's hidden line settings. */\n hiddenLineSettings?: HiddenLine.Settings;\n /** If defined, tiles should be culled if they do not intersect this clip. */\n intersectionClip?: ClipVector;\n /** If defined, the Id of a node in the scene's [RenderSchedule.Script]($common) that applies a transform to the graphics;\n * or \"0xffffffff\" for any node that does *not* apply a transform.\n * @internal\n */\n animationTransformNodeId?: number;\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\n boundingRange?: Range3d;\n /** @alpha */\n maximumScreenSpaceError?: number;\n}\n\n/**\n * Provides context used when selecting and drawing [[Tile]]s.\n * @see [[TileTree.selectTiles]]\n * @see [[TileTree.draw]]\n * @public\n * @extensions\n */\nexport class TileDrawArgs {\n /** Transform to the location in iModel coordinates at which the tiles are to be drawn. */\n public readonly location: Transform;\n /** The tile tree being drawn. */\n public readonly tree: TileTree;\n /** Optional clip volume applied to the tiles. */\n public clipVolume: RenderClipVolume | undefined;\n /** The context in which the tiles will be drawn, exposing, e.g., the [[Viewport]] and accepting [[RenderGraphic]]s to be drawn. */\n public readonly context: SceneContext;\n /** Describes the viewed volume. */\n public viewingSpace: ViewingSpace;\n /** Holds the tile graphics to be drawn. */\n public readonly graphics: GraphicBranch = new GraphicBranch();\n /** @internal */\n public readonly now: BeTimePoint;\n /** The planes of the viewing frustum, used for frustum culling. */\n protected _frustumPlanes?: FrustumPlanes;\n /** @internal */\n public planarClassifier?: RenderPlanarClassifier;\n /** @internal */\n public drape?: RenderTextureDrape;\n /** Optional clip volume applied to all tiles in the view. */\n public readonly viewClip?: ClipVector;\n /** True if a tile and its child tiles should not be drawn simultaneously. */\n public parentsAndChildrenExclusive: boolean;\n /** @internal */\n private _appearanceProvider?: FeatureAppearanceProvider;\n /** Optional overrides for the view's hidden line settings. */\n public hiddenLineSettings?: HiddenLine.Settings;\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. */\n public readonly readyTiles = new Set<Tile>();\n /** Tiles whose contents should be kept in memory regardless of whether or not they are selected for display.\n * @internal\n */\n public readonly touchedTiles = new Set<Tile>();\n /** For perspective views, the view-Z of the near plane. */\n private readonly _nearFrontCenter?: Point3d;\n /** Overrides applied to the view's [ViewFlags]($common) when drawing the tiles. */\n public get viewFlagOverrides(): ViewFlagOverrides { return this.graphics.viewFlagOverrides; }\n /** If defined, replaces the view's own symbology overrides when drawing the tiles. */\n public get symbologyOverrides(): FeatureSymbology.Overrides | undefined { return this.graphics.symbologyOverrides; }\n /** If defined, tiles will be culled if they do not intersect this clip. */\n public intersectionClip?: ClipVector;\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\n public boundingRange?: Range3d;\n /** @internal */\n public readonly pixelSizeScaleFactor;\n /** @internal */\n public readonly animationTransformNodeId?: number;\n /** @alpha */\n public maximumScreenSpaceError;\n\n /** Compute the size in pixels of the specified tile at the point on its bounding sphere closest to the camera. */\n public getPixelSize(tile: Tile): number {\n const sizeFromProjection = this.getPixelSizeFromProjection(tile);\n if (undefined !== sizeFromProjection)\n return sizeFromProjection;\n\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.\n const center = this.getTileCenter(tile);\n\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(radius / pixelSizeAtPt) : 1.0e-3;\n }\n\n /** If the tile provides corners (from an OBB) then this produces most accurate representation of the tile size */\n private getPixelSizeFromProjection(tile: Tile): number | undefined {\n const sizeProjectionCorners = tile.getSizeProjectionCorners();\n if (!sizeProjectionCorners)\n return undefined;\n\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. */\n const tileToView = this.worldToViewMap.transform0.multiplyMatrixMatrix(Matrix4d.createTransform(this.location, scratchMatrix4d), scratchMatrix4d);\n scratchXRange.setNull();\n scratchYRange.setNull();\n\n let behindEye = false;\n for (const corner of sizeProjectionCorners) {\n const viewCorner = tileToView.multiplyPoint3d(corner, 1, scratchPoint4d);\n if (viewCorner.w < 0.0) {\n behindEye = true;\n break;\n }\n\n scratchXRange.extendX(viewCorner.x / viewCorner.w);\n scratchYRange.extendX(viewCorner.y / viewCorner.w);\n }\n if (behindEye)\n return undefined;\n\n return scratchXRange.isNull ? 1.0E-3 : this.context.adjustPixelSizeForLOD(Math.sqrt(scratchXRange.length() * scratchYRange.length()));\n }\n\n /** Compute the size in meters of one pixel at the point on the tile's bounding sphere closest to the camera. */\n public getPixelSizeInMetersAtClosestPoint(tile: Tile): number {\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.\n const center = this.getTileCenter(tile);\n\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(pixelSizeAtPt) : 1.0e-3;\n }\n\n /** Compute the size in meters of one pixel at the point on a sphere closest to the camera.\n * Device scaling is not applied.\n */\n public computePixelSizeInMetersAtClosestPoint(center: Point3d, radius: number): number {\n if (this.context.viewport.view.is3d() && this.context.viewport.isCameraOn && this._nearFrontCenter) {\n const toFront = Vector3d.createStartEnd(center, this._nearFrontCenter);\n const viewZ = this.context.viewport.rotation.rowZ();\n // If the sphere overlaps the near front plane just use near front point. This also handles behind eye conditions.\n if (viewZ.dotProduct(toFront) < radius) {\n center = this._nearFrontCenter;\n } else {\n // Find point on sphere closest to eye.\n const toEye = center.unitVectorTo(this.context.viewport.view.camera.eye);\n\n if (toEye) { // Only if tile is not already behind the eye.\n toEye.scaleInPlace(radius);\n center.addInPlace(toEye);\n }\n }\n }\n\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\n return this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\n }\n\n /** Compute this size of a sphere on screen in pixels */\n public getRangePixelSize(range: Range3d): number {\n const transformedRange = this.location.multiplyRange(range, scratchRange);\n const center = transformedRange.localXYZToWorld(.5, .5, .5, scratchPoint)!;\n const radius = transformedRange.diagonal().magnitude();\n\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\n const pixelSizeAtPt = this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\n return 0 !== pixelSizeAtPt ? radius / pixelSizeAtPt : 1.0e-3;\n }\n\n /** @internal */\n public getTileGraphics(tile: Tile) {\n return tile.produceGraphics();\n }\n\n /** The planes of the viewing frustum, used for frustum culling. */\n public get frustumPlanes(): FrustumPlanes {\n return this._frustumPlanes !== undefined ? this._frustumPlanes : this.context.frustumPlanes;\n }\n\n /** Provides conversions between [[CoordSystem.World]] and [[CoordSystem.View]]. */\n public get worldToViewMap(): Map4d {\n return this.viewingSpace.worldToViewMap;\n }\n\n private computePixelSizeScaleFactor(): number {\n // Check to see if a model display transform with non-uniform scaling is being used.\n const mat = this.context.viewport.view.modelDisplayTransformProvider?.getModelDisplayTransform(this.tree.modelId)?.transform.matrix;\n if (!mat)\n return 1;\n\n const scale = [0, 1, 2].map((x) => mat.getColumn(x).magnitude());\n if (Math.abs(scale[0] - scale[1]) <= Geometry.smallMetricDistance && Math.abs(scale[0] - scale[2]) <= Geometry.smallMetricDistance)\n return 1;\n\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.\n const rangeDiag = this.tree.range.diagonal();\n let maxS = 0;\n let maxR = 0;\n if (scale[0] > scale[1])\n maxS = (scale[0] > scale[2] ? 0 : 2);\n else\n maxS = (scale[1] > scale[2] ? 1 : 2);\n\n if (rangeDiag.x > rangeDiag.y)\n maxR = (rangeDiag.x > rangeDiag.z ? 0 : 2);\n else\n maxR = (rangeDiag.y > rangeDiag.z ? 1 : 2);\n\n return maxS !== maxR ? scale[maxS] : 1;\n }\n\n /** Constructor */\n public constructor(params: TileDrawArgParams) {\n const { location, tree, context, now, viewFlagOverrides, clipVolume, parentsAndChildrenExclusive, symbologyOverrides } = params;\n this.location = location;\n this.tree = tree;\n this.context = context;\n this.now = now;\n this._appearanceProvider = params.appearanceProvider;\n this.hiddenLineSettings = params.hiddenLineSettings;\n this.animationTransformNodeId = params.animationTransformNodeId;\n this.boundingRange = params.boundingRange;\n this.maximumScreenSpaceError = params.maximumScreenSpaceError ?? 16; // 16 is Cesium's default.\n\n // Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.\n if (undefined !== clipVolume && !context.viewport.view.displayStyle.settings.clipStyle.outsideColor)\n this.clipVolume = clipVolume;\n\n this.graphics.setViewFlagOverrides(viewFlagOverrides);\n this.graphics.symbologyOverrides = symbologyOverrides;\n this.graphics.animationId = tree.modelId;\n\n this.viewingSpace = context.viewingSpace;\n this._frustumPlanes = FrustumPlanes.fromFrustum(this.viewingSpace.getFrustum());\n\n this.planarClassifier = context.getPlanarClassifierForModel(tree.modelId);\n this.drape = context.getTextureDrapeForModel(tree.modelId);\n\n // NB: If the tile tree has its own clip, do not also apply the view's clip.\n if (context.viewFlags.clipVolume && false !== viewFlagOverrides.clipVolume && undefined === clipVolume) {\n const outsideClipColor = context.viewport.displayStyle.settings.clipStyle.outsideColor;\n this.viewClip = undefined === outsideClipColor ? context.viewport.view.getViewClip() : undefined;\n }\n\n this.parentsAndChildrenExclusive = parentsAndChildrenExclusive;\n if (context.viewport.isCameraOn)\n this._nearFrontCenter = context.viewport.getFrustum(CoordSystem.World).frontCenter;\n\n this.pixelSizeScaleFactor = this.computePixelSizeScaleFactor();\n }\n\n /** A multiplier applied to a [[Tile]]'s `maximumSize` property to adjust level of detail.\n * @see [[Viewport.tileSizeModifier]].\n * @public\n */\n public get tileSizeModifier(): number { return this.context.viewport.tileSizeModifier; }\n\n /** @internal */\n public getTileCenter(tile: Tile): Point3d { return this.location.multiplyPoint3d(tile.center); }\n\n /** @internal */\n public getTileRadius(tile: Tile): number {\n let range: Range3d = tile.range.clone(scratchRange);\n if (tile.tree.is2d) {\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.\n range.low.z = range.high.z = 0;\n }\n\n range = this.location.multiplyRange(range, range);\n return 0.5 * range.low.distance(range.high);\n }\n\n /** @internal */\n public get clip(): ClipVector | undefined {\n return undefined !== this.clipVolume ? this.clipVolume.clipVector : undefined;\n }\n\n /** Add a provider to supplement or override the symbology overrides for the view.\n * @note If a provider already exists, the new provider will be chained such that it sees the base overrides\n * after they have potentially been modified by the existing provider.\n * @public\n */\n public addAppearanceProvider(provider: FeatureAppearanceProvider): void {\n this._appearanceProvider = this._appearanceProvider ? FeatureAppearanceProvider.chain(this._appearanceProvider, provider) : provider;\n }\n\n /** Optionally customizes aspects of the view's [[FeatureSymbology.Overrides]]. */\n public get appearanceProvider(): FeatureAppearanceProvider | undefined {\n return this._appearanceProvider;\n }\n\n /** @internal */\n public produceGraphics(): RenderGraphic | undefined {\n return this._produceGraphicBranch(this.graphics);\n }\n /** @internal */\n public get secondaryClassifiers(): Map<number, RenderPlanarClassifier>| undefined {\n return undefined;\n }\n\n /** @internal */\n private _produceGraphicBranch(graphics: GraphicBranch): RenderGraphic | undefined {\n if (graphics.isEmpty)\n return undefined;\n\n const opts = {\n iModel: this.tree.iModel,\n clipVolume: this.clipVolume,\n classifierOrDrape: this.planarClassifier ?? this.drape,\n appearanceProvider: this.appearanceProvider,\n hline: this.hiddenLineSettings,\n secondaryClassifiers: this.secondaryClassifiers,\n };\n\n let graphic = this.context.createGraphicBranch(graphics, this.location, opts);\n if (undefined !== this.animationTransformNodeId)\n graphic = this.context.renderSystem.createAnimationTransformNode(graphic, this.animationTransformNodeId);\n\n return graphic;\n }\n\n /** Output graphics for all accumulated tiles. */\n public drawGraphics(): void {\n const graphics = this.produceGraphics();\n if (undefined !== graphics)\n this.context.outputGraphic(graphics);\n }\n\n /** Output graphics of the specified type for all accumulated tiles. */\n public drawGraphicsWithType(graphicType: TileGraphicType, graphics: GraphicBranch): void {\n const branch = this._produceGraphicBranch(graphics);\n if (undefined !== branch)\n this.context.withGraphicType(graphicType, () => this.context.outputGraphic(branch));\n }\n\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. */\n public insertMissing(tile: Tile): void {\n this.context.insertMissingTile(tile);\n }\n\n /** Indicate that some requested child tiles are not yet loaded. */\n public markChildrenLoading(): void {\n this.context.markChildrenLoading();\n }\n\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. */\n public markUsed(tile: Tile): void {\n tile.usageMarker.mark(this.context.viewport, this.now);\n }\n\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.\n * @see [[insertMissing]]\n */\n public markReady(tile: Tile): void {\n this.readyTiles.add(tile);\n }\n\n /** Invoked by [[TileTree.selectTiles]]. This exists chiefly for [[SolarShadowMap]].\n * @internal\n */\n public processSelectedTiles(_tiles: Tile[]): void { }\n\n /* @internal */\n public get maxRealityTreeSelectionCount(): number | undefined { return undefined; }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TileDrawArgs.js","sourceRoot":"","sources":["../../../src/tile/TileDrawArgs.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAAsI;AACtI,oDAA6G;AAE7G,2DAAwD;AAOxD,gDAA6C;AAG7C,MAAM,YAAY,GAAG,IAAI,uBAAO,EAAE,CAAC;AACnC,MAAM,YAAY,GAAG,uBAAO,CAAC,MAAM,EAAE,CAAC;AACtC,MAAM,cAAc,GAAG,uBAAO,CAAC,MAAM,EAAE,CAAC;AACxC,MAAM,aAAa,GAAG,uBAAO,C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,MAAM,EAAE,yBAAS,CAAC,QAAQ,CAAC,CAAC;SACxE;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,iDAAiD;IAC1C,YAAY;QACjB,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QACxC,IAAI,SAAS,KAAK,QAAQ;YACxB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED,uEAAuE;IAChE,oBAAoB,CAAC,WAA4B,EAAE,QAAuB;QAC/E,MAAM,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QACpD,IAAI,SAAS,KAAK,MAAM;YACtB,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,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;AAzVD,oCAyVC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { BeTimePoint } from \"@itwin/core-bentley\";\nimport { ClipVector, Geometry, Map4d, Matrix4d, Point3d, Point4d, Range1d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\nimport { FeatureAppearanceProvider, FrustumPlanes, HiddenLine, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\nimport { GraphicBranch } from \"../render/GraphicBranch\";\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\nimport { RenderGraphic } from \"../render/RenderGraphic\";\nimport { RenderPlanarClassifier } from \"../render/RenderPlanarClassifier\";\nimport { RenderTextureDrape } from \"../render/RenderSystem\";\nimport { SceneContext } from \"../ViewContext\";\nimport { ViewingSpace } from \"../ViewingSpace\";\nimport { CoordSystem } from \"../CoordSystem\";\nimport { Tile, TileGraphicType, TileTree } from \"./internal\";\n\nconst scratchRange = new Range3d();\nconst scratchPoint = Point3d.create();\nconst scratchPoint4d = Point4d.create();\nconst scratchXRange = Range1d.createNull();\nconst scratchYRange = Range1d.createNull();\nconst scratchMatrix4d = Matrix4d.createIdentity();\n\n/** Parameters used to construct [[TileDrawArgs]].\n * @public\n * @extensions\n */\nexport interface TileDrawArgParams {\n /** Context for the scene into which the tiles are to be rendered. */\n context: SceneContext;\n /** Transform to be applied when drawing the tiles. */\n location: Transform;\n /** The tile tree from which to obtain tiles. */\n tree: TileTree;\n /** The time at which these args were created. */\n now: BeTimePoint;\n /** Overrides to apply to the view's [ViewFlags]($common) when drawing the tiles. */\n viewFlagOverrides: ViewFlagOverrides;\n /** Clip volume used to clip the tiles. */\n clipVolume?: RenderClipVolume;\n /** True if a tile and its child tiles should not be drawn simultaneously. */\n parentsAndChildrenExclusive: boolean;\n /** Symbology overrides to apply to the tiles. */\n symbologyOverrides: FeatureSymbology.Overrides | undefined;\n /** Optionally customizes the view's symbology overrides for the tiles. */\n appearanceProvider?: FeatureAppearanceProvider;\n /** Optionally overrides the view's hidden line settings. */\n hiddenLineSettings?: HiddenLine.Settings;\n /** If defined, tiles should be culled if they do not intersect this clip. */\n intersectionClip?: ClipVector;\n /** If defined, the Id of a node in the scene's [RenderSchedule.Script]($common) that applies a transform to the graphics;\n * or \"0xffffffff\" for any node that does *not* apply a transform.\n * @internal\n */\n animationTransformNodeId?: number;\n /** See [[GraphicBranch.groupNodeId]].\n * @internal\n */\n groupNodeId?: number;\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\n boundingRange?: Range3d;\n /** @alpha */\n maximumScreenSpaceError?: number;\n}\n\n/**\n * Provides context used when selecting and drawing [[Tile]]s.\n * @see [[TileTree.selectTiles]]\n * @see [[TileTree.draw]]\n * @public\n * @extensions\n */\nexport class TileDrawArgs {\n /** Transform to the location in iModel coordinates at which the tiles are to be drawn. */\n public readonly location: Transform;\n /** The tile tree being drawn. */\n public readonly tree: TileTree;\n /** Optional clip volume applied to the tiles. */\n public clipVolume: RenderClipVolume | undefined;\n /** The context in which the tiles will be drawn, exposing, e.g., the [[Viewport]] and accepting [[RenderGraphic]]s to be drawn. */\n public readonly context: SceneContext;\n /** Describes the viewed volume. */\n public viewingSpace: ViewingSpace;\n /** Holds the tile graphics to be drawn. */\n public readonly graphics: GraphicBranch = new GraphicBranch();\n /** @internal */\n public readonly now: BeTimePoint;\n /** The planes of the viewing frustum, used for frustum culling. */\n protected _frustumPlanes?: FrustumPlanes;\n /** @internal */\n public planarClassifier?: RenderPlanarClassifier;\n /** @internal */\n public drape?: RenderTextureDrape;\n /** Optional clip volume applied to all tiles in the view. */\n public readonly viewClip?: ClipVector;\n /** True if a tile and its child tiles should not be drawn simultaneously. */\n public parentsAndChildrenExclusive: boolean;\n /** @internal */\n private _appearanceProvider?: FeatureAppearanceProvider;\n /** Optional overrides for the view's hidden line settings. */\n public hiddenLineSettings?: HiddenLine.Settings;\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. */\n public readonly readyTiles = new Set<Tile>();\n /** Tiles whose contents should be kept in memory regardless of whether or not they are selected for display.\n * @internal\n */\n public readonly touchedTiles = new Set<Tile>();\n /** For perspective views, the view-Z of the near plane. */\n private readonly _nearFrontCenter?: Point3d;\n /** Overrides applied to the view's [ViewFlags]($common) when drawing the tiles. */\n public get viewFlagOverrides(): ViewFlagOverrides { return this.graphics.viewFlagOverrides; }\n /** If defined, replaces the view's own symbology overrides when drawing the tiles. */\n public get symbologyOverrides(): FeatureSymbology.Overrides | undefined { return this.graphics.symbologyOverrides; }\n /** If defined, tiles will be culled if they do not intersect this clip. */\n public intersectionClip?: ClipVector;\n /** If defined, a bounding range in tile tree coordinates outside of which tiles should not be selected. */\n public boundingRange?: Range3d;\n /** @internal */\n public readonly pixelSizeScaleFactor;\n /** @internal */\n public readonly animationTransformNodeId?: number;\n /** @internal */\n public readonly groupNodeId?: number;\n /** @alpha */\n public maximumScreenSpaceError;\n\n /** Compute the size in pixels of the specified tile at the point on its bounding sphere closest to the camera. */\n public getPixelSize(tile: Tile): number {\n const sizeFromProjection = this.getPixelSizeFromProjection(tile);\n if (undefined !== sizeFromProjection)\n return sizeFromProjection;\n\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.\n const center = this.getTileCenter(tile);\n\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(radius / pixelSizeAtPt) : 1.0e-3;\n }\n\n /** If the tile provides corners (from an OBB) then this produces most accurate representation of the tile size */\n private getPixelSizeFromProjection(tile: Tile): number | undefined {\n const sizeProjectionCorners = tile.getSizeProjectionCorners();\n if (!sizeProjectionCorners)\n return undefined;\n\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. */\n const tileToView = this.worldToViewMap.transform0.multiplyMatrixMatrix(Matrix4d.createTransform(this.location, scratchMatrix4d), scratchMatrix4d);\n scratchXRange.setNull();\n scratchYRange.setNull();\n\n let behindEye = false;\n for (const corner of sizeProjectionCorners) {\n const viewCorner = tileToView.multiplyPoint3d(corner, 1, scratchPoint4d);\n if (viewCorner.w < 0.0) {\n behindEye = true;\n break;\n }\n\n scratchXRange.extendX(viewCorner.x / viewCorner.w);\n scratchYRange.extendX(viewCorner.y / viewCorner.w);\n }\n if (behindEye)\n return undefined;\n\n return scratchXRange.isNull ? 1.0E-3 : this.context.adjustPixelSizeForLOD(Math.sqrt(scratchXRange.length() * scratchYRange.length()));\n }\n\n /** Compute the size in meters of one pixel at the point on the tile's bounding sphere closest to the camera. */\n public getPixelSizeInMetersAtClosestPoint(tile: Tile): number {\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.\n const center = this.getTileCenter(tile);\n\n const pixelSizeAtPt = this.computePixelSizeInMetersAtClosestPoint(center, radius);\n return 0 !== pixelSizeAtPt ? this.context.adjustPixelSizeForLOD(pixelSizeAtPt) : 1.0e-3;\n }\n\n /** Compute the size in meters of one pixel at the point on a sphere closest to the camera.\n * Device scaling is not applied.\n */\n public computePixelSizeInMetersAtClosestPoint(center: Point3d, radius: number): number {\n if (this.context.viewport.view.is3d() && this.context.viewport.isCameraOn && this._nearFrontCenter) {\n const toFront = Vector3d.createStartEnd(center, this._nearFrontCenter);\n const viewZ = this.context.viewport.rotation.rowZ();\n // If the sphere overlaps the near front plane just use near front point. This also handles behind eye conditions.\n if (viewZ.dotProduct(toFront) < radius) {\n center = this._nearFrontCenter;\n } else {\n // Find point on sphere closest to eye.\n const toEye = center.unitVectorTo(this.context.viewport.view.camera.eye);\n\n if (toEye) { // Only if tile is not already behind the eye.\n toEye.scaleInPlace(radius);\n center.addInPlace(toEye);\n }\n }\n }\n\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\n return this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\n }\n\n /** Compute this size of a sphere on screen in pixels */\n public getRangePixelSize(range: Range3d): number {\n const transformedRange = this.location.multiplyRange(range, scratchRange);\n const center = transformedRange.localXYZToWorld(.5, .5, .5, scratchPoint)!;\n const radius = transformedRange.diagonal().magnitude();\n\n const viewPt = this.worldToViewMap.transform0.multiplyPoint3dQuietNormalize(center);\n const viewPt2 = new Point3d(viewPt.x + 1.0, viewPt.y, viewPt.z);\n const pixelSizeAtPt = this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt).distance(this.worldToViewMap.transform1.multiplyPoint3dQuietNormalize(viewPt2));\n return 0 !== pixelSizeAtPt ? radius / pixelSizeAtPt : 1.0e-3;\n }\n\n /** @internal */\n public getTileGraphics(tile: Tile) {\n return tile.produceGraphics();\n }\n\n /** The planes of the viewing frustum, used for frustum culling. */\n public get frustumPlanes(): FrustumPlanes {\n return this._frustumPlanes !== undefined ? this._frustumPlanes : this.context.frustumPlanes;\n }\n\n /** Provides conversions between [[CoordSystem.World]] and [[CoordSystem.View]]. */\n public get worldToViewMap(): Map4d {\n return this.viewingSpace.worldToViewMap;\n }\n\n private computePixelSizeScaleFactor(): number {\n // Check to see if a model display transform with non-uniform scaling is being used.\n const mat = this.context.viewport.view.modelDisplayTransformProvider?.getModelDisplayTransform(this.tree.modelId)?.transform.matrix;\n if (!mat)\n return 1;\n\n const scale = [0, 1, 2].map((x) => mat.getColumn(x).magnitude());\n if (Math.abs(scale[0] - scale[1]) <= Geometry.smallMetricDistance && Math.abs(scale[0] - scale[2]) <= Geometry.smallMetricDistance)\n return 1;\n\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.\n const rangeDiag = this.tree.range.diagonal();\n let maxS = 0;\n let maxR = 0;\n if (scale[0] > scale[1])\n maxS = (scale[0] > scale[2] ? 0 : 2);\n else\n maxS = (scale[1] > scale[2] ? 1 : 2);\n\n if (rangeDiag.x > rangeDiag.y)\n maxR = (rangeDiag.x > rangeDiag.z ? 0 : 2);\n else\n maxR = (rangeDiag.y > rangeDiag.z ? 1 : 2);\n\n return maxS !== maxR ? scale[maxS] : 1;\n }\n\n /** Constructor */\n public constructor(params: TileDrawArgParams) {\n const { location, tree, context, now, viewFlagOverrides, clipVolume, parentsAndChildrenExclusive, symbologyOverrides } = params;\n this.location = location;\n this.tree = tree;\n this.context = context;\n this.now = now;\n this._appearanceProvider = params.appearanceProvider;\n this.hiddenLineSettings = params.hiddenLineSettings;\n this.animationTransformNodeId = params.animationTransformNodeId;\n this.groupNodeId = params.groupNodeId;\n this.boundingRange = params.boundingRange;\n this.maximumScreenSpaceError = params.maximumScreenSpaceError ?? 16; // 16 is Cesium's default.\n\n // Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.\n if (undefined !== clipVolume && !context.viewport.view.displayStyle.settings.clipStyle.outsideColor)\n this.clipVolume = clipVolume;\n\n this.graphics.setViewFlagOverrides(viewFlagOverrides);\n this.graphics.symbologyOverrides = symbologyOverrides;\n this.graphics.animationId = tree.modelId;\n\n this.viewingSpace = context.viewingSpace;\n this._frustumPlanes = FrustumPlanes.fromFrustum(this.viewingSpace.getFrustum());\n\n this.planarClassifier = context.getPlanarClassifierForModel(tree.modelId);\n this.drape = context.getTextureDrapeForModel(tree.modelId);\n\n // NB: If the tile tree has its own clip, do not also apply the view's clip.\n if (context.viewFlags.clipVolume && false !== viewFlagOverrides.clipVolume && undefined === clipVolume) {\n const outsideClipColor = context.viewport.displayStyle.settings.clipStyle.outsideColor;\n this.viewClip = undefined === outsideClipColor ? context.viewport.view.getViewClip() : undefined;\n }\n\n this.parentsAndChildrenExclusive = parentsAndChildrenExclusive;\n if (context.viewport.isCameraOn)\n this._nearFrontCenter = context.viewport.getFrustum(CoordSystem.World).frontCenter;\n\n this.pixelSizeScaleFactor = this.computePixelSizeScaleFactor();\n }\n\n /** A multiplier applied to a [[Tile]]'s `maximumSize` property to adjust level of detail.\n * @see [[Viewport.tileSizeModifier]].\n * @public\n */\n public get tileSizeModifier(): number { return this.context.viewport.tileSizeModifier; }\n\n /** @internal */\n public getTileCenter(tile: Tile): Point3d { return this.location.multiplyPoint3d(tile.center); }\n\n /** @internal */\n public getTileRadius(tile: Tile): number {\n let range: Range3d = tile.range.clone(scratchRange);\n if (tile.tree.is2d) {\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.\n range.low.z = range.high.z = 0;\n }\n\n range = this.location.multiplyRange(range, range);\n return 0.5 * range.low.distance(range.high);\n }\n\n /** @internal */\n public get clip(): ClipVector | undefined {\n return undefined !== this.clipVolume ? this.clipVolume.clipVector : undefined;\n }\n\n /** Add a provider to supplement or override the symbology overrides for the view.\n * @note If a provider already exists, the new provider will be chained such that it sees the base overrides\n * after they have potentially been modified by the existing provider.\n * @public\n */\n public addAppearanceProvider(provider: FeatureAppearanceProvider): void {\n this._appearanceProvider = this._appearanceProvider ? FeatureAppearanceProvider.chain(this._appearanceProvider, provider) : provider;\n }\n\n /** Optionally customizes aspects of the view's [[FeatureSymbology.Overrides]]. */\n public get appearanceProvider(): FeatureAppearanceProvider | undefined {\n return this._appearanceProvider;\n }\n\n /** @internal */\n public produceGraphics(): RenderGraphic | undefined {\n return this._produceGraphicBranch(this.graphics);\n }\n /** @internal */\n public get secondaryClassifiers(): Map<number, RenderPlanarClassifier>| undefined {\n return undefined;\n }\n\n /** @internal */\n private _produceGraphicBranch(graphics: GraphicBranch): RenderGraphic | undefined {\n if (graphics.isEmpty)\n return undefined;\n\n const opts = {\n iModel: this.tree.iModel,\n clipVolume: this.clipVolume,\n classifierOrDrape: this.planarClassifier ?? this.drape,\n appearanceProvider: this.appearanceProvider,\n hline: this.hiddenLineSettings,\n secondaryClassifiers: this.secondaryClassifiers,\n };\n\n let graphic = this.context.createGraphicBranch(graphics, this.location, opts);\n if (undefined !== this.animationTransformNodeId)\n graphic = this.context.renderSystem.createAnimationTransformNode(graphic, this.animationTransformNodeId);\n\n if (undefined !== this.groupNodeId) {\n const branch = new GraphicBranch();\n branch.add(graphic);\n branch.groupNodeId = this.groupNodeId;\n graphic = this.context.createGraphicBranch(branch, Transform.identity);\n }\n\n return graphic;\n }\n\n /** Output graphics for all accumulated tiles. */\n public drawGraphics(): void {\n const graphics = this.produceGraphics();\n if (undefined !== graphics)\n this.context.outputGraphic(graphics);\n }\n\n /** Output graphics of the specified type for all accumulated tiles. */\n public drawGraphicsWithType(graphicType: TileGraphicType, graphics: GraphicBranch): void {\n const branch = this._produceGraphicBranch(graphics);\n if (undefined !== branch)\n this.context.withGraphicType(graphicType, () => this.context.outputGraphic(branch));\n }\n\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. */\n public insertMissing(tile: Tile): void {\n this.context.insertMissingTile(tile);\n }\n\n /** Indicate that some requested child tiles are not yet loaded. */\n public markChildrenLoading(): void {\n this.context.markChildrenLoading();\n }\n\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. */\n public markUsed(tile: Tile): void {\n tile.usageMarker.mark(this.context.viewport, this.now);\n }\n\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.\n * @see [[insertMissing]]\n */\n public markReady(tile: Tile): void {\n this.readyTiles.add(tile);\n }\n\n /** Invoked by [[TileTree.selectTiles]]. This exists chiefly for [[SolarShadowMap]].\n * @internal\n */\n public processSelectedTiles(_tiles: Tile[]): void { }\n\n /* @internal */\n public get maxRealityTreeSelectionCount(): number | undefined { return undefined; }\n}\n"]}
|
|
@@ -82,6 +82,8 @@ export declare abstract class TileTreeReference {
|
|
|
82
82
|
createDrawArgs(context: SceneContext): TileDrawArgs | undefined;
|
|
83
83
|
/** @internal */
|
|
84
84
|
protected getAnimationTransformNodeId(_tree: TileTree): number | undefined;
|
|
85
|
+
/** @internal */
|
|
86
|
+
protected getGroupNodeId(_tree: TileTree): number | undefined;
|
|
85
87
|
/** Supply transform from this tile tree reference's location to iModel coordinate space.
|
|
86
88
|
* @returns undefined if the TileTree is not yet loaded.
|
|
87
89
|
*/
|
|
@@ -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,EACL,oBAAoB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,YAAY,EAAE,qBAAqB,EAAE,QAAQ,EAAsB,aAAa,EAC9K,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,oBAAY,eAAe;IACzB,wDAAwD;IACxD,aAAa,IAAI;IACjB,2CAA2C;IAC3C,KAAK,IAAI;IACT,+CAA+C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E,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;IAExE;;;;OAIG;IACH,SAAS,CAAC,4BAA4B,IAAI,yBAAyB,GAAG,SAAS;IAI/E;;OAEG;IACI,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAExE;;OAEG;IACH,SAAS,CAAC,oBAAoB,CAAC,SAAS,EAAE,qBAAqB,GAAG,IAAI;IAatE;;;;;OAKG;IACI,2BAA2B,IAAI,yBAAyB,GAAG,SAAS;CAQ5E"}
|
|
@@ -126,12 +126,17 @@ class TileTreeReference /* implements RenderMemory.Consumer */ {
|
|
|
126
126
|
appearanceProvider: this.getAppearanceProvider(tree),
|
|
127
127
|
hiddenLineSettings: this.getHiddenLineSettings(tree),
|
|
128
128
|
animationTransformNodeId: this.getAnimationTransformNodeId(tree),
|
|
129
|
+
groupNodeId: this.getGroupNodeId(tree),
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
132
|
/** @internal */
|
|
132
133
|
getAnimationTransformNodeId(_tree) {
|
|
133
134
|
return undefined;
|
|
134
135
|
}
|
|
136
|
+
/** @internal */
|
|
137
|
+
getGroupNodeId(_tree) {
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
135
140
|
/** Supply transform from this tile tree reference's location to iModel coordinate space.
|
|
136
141
|
* @returns undefined if the TileTree is not yet loaded.
|
|
137
142
|
*/
|
|
@@ -1 +1 @@
|
|
|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AAI,CAAC,CAAC;gBAC3B,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,6BAAkB,CAAC,OAAO;gBAC7B,SAAS,CAAC,WAAW,EAAE,CAAC;gBACxB,MAAM;SACT;IACH,CAAC;IAED;;;;;OAKG;IACI,2BAA2B;QAChC,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC5B,0KAA0K;YAC1K,OAAO,IAAiC,CAAC;SAC1C;QAED,OAAO,IAAI,CAAC,4BAA4B,EAAE,CAAC;IAC7C,CAAC;CACF;AA/OD,8CA+OC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { assert, BeTimePoint } from \"@itwin/core-bentley\";\nimport { Matrix4d, Range1d, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { ElementAlignedBox3d, FeatureAppearanceProvider, FrustumPlanes, HiddenLine, PlanarClipMaskPriority, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { HitDetail } from \"../HitDetail\";\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\nimport { RenderMemory } from \"../render/RenderMemory\";\nimport { DecorateContext, SceneContext } from \"../ViewContext\";\nimport { ScreenViewport } from \"../Viewport\";\nimport {\n DisclosedTileTreeSet, GeometryTileTreeReference, MapFeatureInfoOptions, MapLayerFeatureInfo, TileDrawArgs, TileGeometryCollector, TileTree, TileTreeLoadStatus, TileTreeOwner,\n} from \"./internal\";\n\n/** Describes the type of graphics produced by a [[TileTreeReference]].\n * @public\n * @extensions\n */\nexport enum TileGraphicType {\n /** Rendered behind all other geometry without depth. */\n BackgroundMap = 0,\n /** Rendered with normal scene graphics. */\n Scene = 1,\n /** Rendered in front of all other geometry. */\n Overlay = 2,\n}\n\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\n * way of the tree's [[TileTreeOwner]].\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,\n * as a result of changing the RenderMode, or animation settings, or classification settings, etc.\n * A reference to a TileTree is typically associated with a [[ViewState]], a [[DisplayStyleState]], or a [[Viewport]].\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\n * differing levels of transparency.\n * @see [[TiledGraphicsProvider]] to supply custom [[TileTreeReference]]s to be drawn within a [[Viewport]].\n * @public\n * @extensions\n */\nexport abstract class TileTreeReference /* implements RenderMemory.Consumer */ {\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. */\n public abstract get treeOwner(): TileTreeOwner;\n\n /** Force a new tree owner / tile tree to be created for the current tile tree reference\n * @internal\n */\n public resetTreeOwner() {}\n\n /** Disclose *all* TileTrees use by this reference. This may include things like map tiles used for draping on terrain.\n * Override this and call super if you have such auxiliary trees.\n * @note Any tree *NOT* disclosed becomes a candidate for *purging* (being unloaded from memory along with all of its tiles and graphics).\n */\n public discloseTileTrees(trees: DisclosedTileTreeSet): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n trees.add(tree);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[draw]]. */\n public addToScene(context: SceneContext): void {\n const args = this.createDrawArgs(context);\n if (undefined !== args)\n this.draw(args);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[TileTree.draw]] on the referenced TileTree, if it is loaded. */\n public draw(args: TileDrawArgs): void {\n args.tree.draw(args);\n }\n\n /** Optionally return a tooltip describing the hit. */\n public async getToolTip(_hit: HitDetail): Promise<HTMLElement | string | undefined> { return undefined; }\n\n /** Optionally return a MapLayerFeatureInfo object describing the hit.].\n * @alpha\n */\n public async getMapFeatureInfo(_hit: HitDetail, _options?: MapFeatureInfoOptions): Promise<MapLayerFeatureInfo[] | undefined> { return undefined; }\n\n /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.\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.\n */\n public decorate(_context: DecorateContext): void { }\n\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.\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.\n */\n public unionFitRange(union: Range3d): void {\n const contentRange = this.computeWorldContentRange();\n if (!contentRange.isNull)\n union.extendRange(contentRange);\n }\n\n /** Record graphics memory consumed by this tile tree reference. */\n public collectStatistics(stats: RenderMemory.Statistics): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n tree.collectStatistics(stats);\n }\n\n /** Return true if the tile tree is fully loaded and ready to draw.\n * The default implementation returns true if the tile tree loading process completed (whether it resulted in success or failure).\n * @note Do *not* override this property - override [[_isLoadingComplete]] instead..\n * @public\n */\n public get isLoadingComplete(): boolean {\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.NotLoaded:\n case TileTreeLoadStatus.Loading:\n return false;\n case TileTreeLoadStatus.NotFound:\n return true; // we tried, and failed, to load.\n case TileTreeLoadStatus.Loaded:\n return this._isLoadingComplete;\n }\n }\n\n /** Override if additional asynchronous loading is required after the tile tree is successfully loaded, to indicate when that loading has completed.\n * @public\n */\n protected get _isLoadingComplete(): boolean {\n return true;\n }\n\n /** Create context for drawing the tile tree, if it is ready for drawing.\n * TileTreeReferences can override individual portions of the context, e.g. apply their own transform.\n * Returns undefined if, e.g., the tile tree is not yet loaded.\n */\n public createDrawArgs(context: SceneContext): TileDrawArgs | undefined {\n const tree = this.treeOwner.load();\n if (undefined === tree)\n return undefined;\n\n return new TileDrawArgs({\n context,\n tree,\n now: BeTimePoint.now(),\n location: this.computeTransform(tree),\n viewFlagOverrides: this.getViewFlagOverrides(tree),\n clipVolume: this.getClipVolume(tree),\n parentsAndChildrenExclusive: tree.parentsAndChildrenExclusive,\n symbologyOverrides: this.getSymbologyOverrides(tree),\n appearanceProvider: this.getAppearanceProvider(tree),\n hiddenLineSettings: this.getHiddenLineSettings(tree),\n animationTransformNodeId: this.getAnimationTransformNodeId(tree),\n });\n }\n\n /** @internal */\n protected getAnimationTransformNodeId(_tree: TileTree): number | undefined {\n return undefined;\n }\n\n /** Supply transform from this tile tree reference's location to iModel coordinate space.\n * @returns undefined if the TileTree is not yet loaded.\n */\n public getLocation(): Transform | undefined {\n const tree = this.treeOwner.load();\n return undefined !== tree ? this.computeTransform(tree) : undefined;\n }\n\n /** Compute a transform from this tile tree reference's coordinate space to the [[IModelConnection]]'s coordinate space. */\n protected computeTransform(tree: TileTree): Transform {\n return tree.iModelTransform.clone();\n }\n\n /** Compute the range of this tile tree's contents in world coordinates.\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.\n */\n public computeWorldContentRange(): ElementAlignedBox3d {\n const range = new Range3d();\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree && !tree.rootTile.contentRange.isNull)\n this.computeTransform(tree).multiplyRange(tree.rootTile.contentRange, range);\n\n return range;\n }\n\n /** Return the clip volume applied to this reference's tile tree, if any. */\n protected getClipVolume(tree: TileTree): RenderClipVolume | undefined {\n return tree.clipVolume;\n }\n\n /** Supply overrides that should be applied to the [[ViewState]]'s [ViewFlags]($common) when drawing this tile tree reference. */\n protected getViewFlagOverrides(tree: TileTree): ViewFlagOverrides {\n return tree.viewFlagOverrides;\n }\n\n /** Return overrides that *replace* any defined for the view. */\n protected getSymbologyOverrides(_tree: TileTree): FeatureSymbology.Overrides | undefined {\n return undefined;\n }\n\n /** Return a provider that can supplement the view's symbology overrides. */\n protected getAppearanceProvider(_tree: TileTree): FeatureAppearanceProvider | undefined {\n return undefined;\n }\n\n /** Return hidden line settings to replace those defined for the view. */\n protected getHiddenLineSettings(_tree: TileTree): HiddenLine.Settings | undefined {\n return undefined;\n }\n\n /* Extend range to include transformed range of this tile tree.\n * @internal\n */\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, frustumPlanes?: FrustumPlanes) {\n const tree = this.treeOwner.tileTree;\n if (undefined === tree)\n return;\n\n const location = this.computeTransform(tree);\n tree.accumulateTransformedRange(range, matrix, location, frustumPlanes);\n }\n\n /** @internal */\n public getTerrainHeight(_terrainHeights: Range1d): void { }\n\n /** Return whether the geometry exposed by this tile tree reference should cast shadows on other geometry. */\n public get castsShadows(): boolean {\n return true;\n }\n\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 */\n public get isGlobal(): boolean { return false; }\n\n /** Return the clip mask priority for this model - models will be clipped by any other viewed model with a higher proirity.\n * BIM models have highest prioirty and are never clipped.\n * @alpha\n */\n public get planarclipMaskPriority(): number { return PlanarClipMaskPriority.DesignModel; }\n\n /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div. */\n public addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void { }\n\n /** Create a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n * Return `undefined` if geometry collection is not supported.\n * @see [[createGeometryTreeReference]].\n * @beta\n */\n protected _createGeometryTreeReference(): GeometryTileTreeReference | undefined {\n return undefined;\n }\n\n /** If defined, supplies the implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n * @beta\n */\n public collectTileGeometry?: (collector: TileGeometryCollector) => void;\n\n /** A function that can be assigned to [[collectTileGeometry]] to enable geometry collection for references to tile trees that support geometry collection.\n * @beta\n */\n protected _collectTileGeometry(collector: TileGeometryCollector): void {\n const tree = this.treeOwner.load();\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.Loaded:\n assert(undefined !== tree);\n tree.collectTileGeometry(collector);\n break;\n case TileTreeLoadStatus.Loading:\n collector.markLoading();\n break;\n }\n }\n\n /** Obtain a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]], or\n * undefined if geometry collection is not supported.\n * Currently, only terrain and reality model tiles support geometry collection.\n * @note Do not override this method - override [[_createGeometryTreeReference]] instead.\n * @beta\n */\n public createGeometryTreeReference(): GeometryTileTreeReference | undefined {\n if (this.collectTileGeometry) {\n // Unclear why compiler doesn't detect that `this` satisfies the GeometryTileTreeReference interface...it must be looking only at the types, not this particular instance.\n return this as GeometryTileTreeReference;\n }\n\n return this._createGeometryTreeReference();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TileTreeReference.js","sourceRoot":"","sources":["../../../src/tile/TileTreeReference.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA0D;AAC1D,wDAA6E;AAC7E,oDAA0J;AAO1J,yCAEoB;AAEpB;;;GAGG;AACH,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,GAAf,uBAAe,KAAf,uBAAe,QAO1B;AAED;;;;;;;;;;GAUG;AACH,MAAsB,iBAAiB,CAAC,sCAAsC;IAI5E;;OAEG;IACI,cAAc,KAAI,CAAC;IAE1B;;;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,CAAC;IACpB,CAAC;IAED,0IAA0I;IACnI,IAAI,CAAC,IAAkB;QAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CA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AAC,WAAW,CAAC,CAAC,CAAC;IAE1F,iGAAiG;IAC1F,YAAY,CAAC,MAAwB,EAAE,GAAmB,IAAU,CAAC;IAE5E;;;;OAIG;IACO,4BAA4B;QACpC,OAAO,SAAS,CAAC;IACnB,CAAC;IAOD;;OAEG;IACO,oBAAoB,CAAC,SAAgC;QAC7D,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACnC,QAAQ,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE;YACjC,KAAK,6BAAkB,CAAC,MAAM;gBAC5B,IAAA,qBAAM,EAAC,SAAS,KAAK,IAAI,CAAC,CAAC;gBAC3B,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,6BAAkB,CAAC,OAAO;gBAC7B,SAAS,CAAC,WAAW,EAAE,CAAC;gBACxB,MAAM;SACT;IACH,CAAC;IAED;;;;;OAKG;IACI,2BAA2B;QAChC,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC5B,0KAA0K;YAC1K,OAAO,IAAiC,CAAC;SAC1C;QAED,OAAO,IAAI,CAAC,4BAA4B,EAAE,CAAC;IAC7C,CAAC;CACF;AApPD,8CAoPC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { assert, BeTimePoint } from \"@itwin/core-bentley\";\nimport { Matrix4d, Range1d, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { ElementAlignedBox3d, FeatureAppearanceProvider, FrustumPlanes, HiddenLine, PlanarClipMaskPriority, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { HitDetail } from \"../HitDetail\";\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\nimport { RenderMemory } from \"../render/RenderMemory\";\nimport { DecorateContext, SceneContext } from \"../ViewContext\";\nimport { ScreenViewport } from \"../Viewport\";\nimport {\n DisclosedTileTreeSet, GeometryTileTreeReference, MapFeatureInfoOptions, MapLayerFeatureInfo, TileDrawArgs, TileGeometryCollector, TileTree, TileTreeLoadStatus, TileTreeOwner,\n} from \"./internal\";\n\n/** Describes the type of graphics produced by a [[TileTreeReference]].\n * @public\n * @extensions\n */\nexport enum TileGraphicType {\n /** Rendered behind all other geometry without depth. */\n BackgroundMap = 0,\n /** Rendered with normal scene graphics. */\n Scene = 1,\n /** Rendered in front of all other geometry. */\n Overlay = 2,\n}\n\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\n * way of the tree's [[TileTreeOwner]].\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,\n * as a result of changing the RenderMode, or animation settings, or classification settings, etc.\n * A reference to a TileTree is typically associated with a [[ViewState]], a [[DisplayStyleState]], or a [[Viewport]].\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\n * differing levels of transparency.\n * @see [[TiledGraphicsProvider]] to supply custom [[TileTreeReference]]s to be drawn within a [[Viewport]].\n * @public\n * @extensions\n */\nexport abstract class TileTreeReference /* implements RenderMemory.Consumer */ {\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. */\n public abstract get treeOwner(): TileTreeOwner;\n\n /** Force a new tree owner / tile tree to be created for the current tile tree reference\n * @internal\n */\n public resetTreeOwner() {}\n\n /** Disclose *all* TileTrees use by this reference. This may include things like map tiles used for draping on terrain.\n * Override this and call super if you have such auxiliary trees.\n * @note Any tree *NOT* disclosed becomes a candidate for *purging* (being unloaded from memory along with all of its tiles and graphics).\n */\n public discloseTileTrees(trees: DisclosedTileTreeSet): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n trees.add(tree);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[draw]]. */\n public addToScene(context: SceneContext): void {\n const args = this.createDrawArgs(context);\n if (undefined !== args)\n this.draw(args);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[TileTree.draw]] on the referenced TileTree, if it is loaded. */\n public draw(args: TileDrawArgs): void {\n args.tree.draw(args);\n }\n\n /** Optionally return a tooltip describing the hit. */\n public async getToolTip(_hit: HitDetail): Promise<HTMLElement | string | undefined> { return undefined; }\n\n /** Optionally return a MapLayerFeatureInfo object describing the hit.].\n * @alpha\n */\n public async getMapFeatureInfo(_hit: HitDetail, _options?: MapFeatureInfoOptions): Promise<MapLayerFeatureInfo[] | undefined> { return undefined; }\n\n /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.\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.\n */\n public decorate(_context: DecorateContext): void { }\n\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.\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.\n */\n public unionFitRange(union: Range3d): void {\n const contentRange = this.computeWorldContentRange();\n if (!contentRange.isNull)\n union.extendRange(contentRange);\n }\n\n /** Record graphics memory consumed by this tile tree reference. */\n public collectStatistics(stats: RenderMemory.Statistics): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n tree.collectStatistics(stats);\n }\n\n /** Return true if the tile tree is fully loaded and ready to draw.\n * The default implementation returns true if the tile tree loading process completed (whether it resulted in success or failure).\n * @note Do *not* override this property - override [[_isLoadingComplete]] instead..\n * @public\n */\n public get isLoadingComplete(): boolean {\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.NotLoaded:\n case TileTreeLoadStatus.Loading:\n return false;\n case TileTreeLoadStatus.NotFound:\n return true; // we tried, and failed, to load.\n case TileTreeLoadStatus.Loaded:\n return this._isLoadingComplete;\n }\n }\n\n /** Override if additional asynchronous loading is required after the tile tree is successfully loaded, to indicate when that loading has completed.\n * @public\n */\n protected get _isLoadingComplete(): boolean {\n return true;\n }\n\n /** Create context for drawing the tile tree, if it is ready for drawing.\n * TileTreeReferences can override individual portions of the context, e.g. apply their own transform.\n * Returns undefined if, e.g., the tile tree is not yet loaded.\n */\n public createDrawArgs(context: SceneContext): TileDrawArgs | undefined {\n const tree = this.treeOwner.load();\n if (undefined === tree)\n return undefined;\n\n return new TileDrawArgs({\n context,\n tree,\n now: BeTimePoint.now(),\n location: this.computeTransform(tree),\n viewFlagOverrides: this.getViewFlagOverrides(tree),\n clipVolume: this.getClipVolume(tree),\n parentsAndChildrenExclusive: tree.parentsAndChildrenExclusive,\n symbologyOverrides: this.getSymbologyOverrides(tree),\n appearanceProvider: this.getAppearanceProvider(tree),\n hiddenLineSettings: this.getHiddenLineSettings(tree),\n animationTransformNodeId: this.getAnimationTransformNodeId(tree),\n groupNodeId: this.getGroupNodeId(tree),\n });\n }\n\n /** @internal */\n protected getAnimationTransformNodeId(_tree: TileTree): number | undefined {\n return undefined;\n }\n /** @internal */\n protected getGroupNodeId(_tree: TileTree): number | undefined {\n return undefined;\n }\n\n /** Supply transform from this tile tree reference's location to iModel coordinate space.\n * @returns undefined if the TileTree is not yet loaded.\n */\n public getLocation(): Transform | undefined {\n const tree = this.treeOwner.load();\n return undefined !== tree ? this.computeTransform(tree) : undefined;\n }\n\n /** Compute a transform from this tile tree reference's coordinate space to the [[IModelConnection]]'s coordinate space. */\n protected computeTransform(tree: TileTree): Transform {\n return tree.iModelTransform.clone();\n }\n\n /** Compute the range of this tile tree's contents in world coordinates.\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.\n */\n public computeWorldContentRange(): ElementAlignedBox3d {\n const range = new Range3d();\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree && !tree.rootTile.contentRange.isNull)\n this.computeTransform(tree).multiplyRange(tree.rootTile.contentRange, range);\n\n return range;\n }\n\n /** Return the clip volume applied to this reference's tile tree, if any. */\n protected getClipVolume(tree: TileTree): RenderClipVolume | undefined {\n return tree.clipVolume;\n }\n\n /** Supply overrides that should be applied to the [[ViewState]]'s [ViewFlags]($common) when drawing this tile tree reference. */\n protected getViewFlagOverrides(tree: TileTree): ViewFlagOverrides {\n return tree.viewFlagOverrides;\n }\n\n /** Return overrides that *replace* any defined for the view. */\n protected getSymbologyOverrides(_tree: TileTree): FeatureSymbology.Overrides | undefined {\n return undefined;\n }\n\n /** Return a provider that can supplement the view's symbology overrides. */\n protected getAppearanceProvider(_tree: TileTree): FeatureAppearanceProvider | undefined {\n return undefined;\n }\n\n /** Return hidden line settings to replace those defined for the view. */\n protected getHiddenLineSettings(_tree: TileTree): HiddenLine.Settings | undefined {\n return undefined;\n }\n\n /* Extend range to include transformed range of this tile tree.\n * @internal\n */\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, frustumPlanes?: FrustumPlanes) {\n const tree = this.treeOwner.tileTree;\n if (undefined === tree)\n return;\n\n const location = this.computeTransform(tree);\n tree.accumulateTransformedRange(range, matrix, location, frustumPlanes);\n }\n\n /** @internal */\n public getTerrainHeight(_terrainHeights: Range1d): void { }\n\n /** Return whether the geometry exposed by this tile tree reference should cast shadows on other geometry. */\n public get castsShadows(): boolean {\n return true;\n }\n\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 */\n public get isGlobal(): boolean { return false; }\n\n /** Return the clip mask priority for this model - models will be clipped by any other viewed model with a higher proirity.\n * BIM models have highest prioirty and are never clipped.\n * @alpha\n */\n public get planarclipMaskPriority(): number { return PlanarClipMaskPriority.DesignModel; }\n\n /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div. */\n public addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void { }\n\n /** Create a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n * Return `undefined` if geometry collection is not supported.\n * @see [[createGeometryTreeReference]].\n * @beta\n */\n protected _createGeometryTreeReference(): GeometryTileTreeReference | undefined {\n return undefined;\n }\n\n /** If defined, supplies the implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n * @beta\n */\n public collectTileGeometry?: (collector: TileGeometryCollector) => void;\n\n /** A function that can be assigned to [[collectTileGeometry]] to enable geometry collection for references to tile trees that support geometry collection.\n * @beta\n */\n protected _collectTileGeometry(collector: TileGeometryCollector): void {\n const tree = this.treeOwner.load();\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.Loaded:\n assert(undefined !== tree);\n tree.collectTileGeometry(collector);\n break;\n case TileTreeLoadStatus.Loading:\n collector.markLoading();\n break;\n }\n }\n\n /** Obtain a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]], or\n * undefined if geometry collection is not supported.\n * Currently, only terrain and reality model tiles support geometry collection.\n * @note Do not override this method - override [[_createGeometryTreeReference]] instead.\n * @beta\n */\n public createGeometryTreeReference(): GeometryTileTreeReference | undefined {\n if (this.collectTileGeometry) {\n // Unclear why compiler doesn't detect that `this` satisfies the GeometryTileTreeReference interface...it must be looking only at the types, not this particular instance.\n return this as GeometryTileTreeReference;\n }\n\n return this._createGeometryTreeReference();\n }\n}\n"]}
|
|
@@ -8,20 +8,24 @@ export type FetchFunction = (url: URL, options?: RequestInit) => Promise<Respons
|
|
|
8
8
|
/** @internal */
|
|
9
9
|
export declare class ArcGISTileMap {
|
|
10
10
|
tileMapRequestSize: number;
|
|
11
|
+
private static maxLod;
|
|
12
|
+
get tileMapOffset(): number;
|
|
11
13
|
fallbackTileMapRequestSize: number;
|
|
12
14
|
private _callQueues;
|
|
13
15
|
private _tilesCache;
|
|
14
16
|
private _restBaseUrl;
|
|
15
17
|
private _fetchFunc;
|
|
16
18
|
private _settings;
|
|
17
|
-
constructor(restBaseUrl: string, settings: ImageMapLayerSettings, fetchFunc: FetchFunction
|
|
19
|
+
constructor(restBaseUrl: string, settings: ImageMapLayerSettings, fetchFunc: FetchFunction);
|
|
18
20
|
protected fetchTileMapFromServer(level: number, row: number, column: number, width: number, height: number): Promise<any>;
|
|
19
21
|
protected getAvailableTilesFromCache(tiles: QuadId[]): {
|
|
20
22
|
allTilesFound: boolean;
|
|
21
23
|
available: boolean[];
|
|
22
24
|
};
|
|
23
25
|
getChildrenAvailability(childIds: QuadId[]): Promise<boolean[]>;
|
|
24
|
-
|
|
26
|
+
private isCacheMissingTile;
|
|
27
|
+
private collectTilesMissingFromCache;
|
|
28
|
+
fetchAndReadTilemap(queryTiles: QuadId[], reqWidth: number, reqHeight: number): Promise<boolean[]>;
|
|
25
29
|
protected getChildrenAvailabilityFromServer(childIds: QuadId[]): Promise<boolean[]>;
|
|
26
30
|
}
|
|
27
31
|
//# sourceMappingURL=ArcGISTileMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArcGISTileMap.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/ArcGISTileMap.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ArcGISTileMap.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/ArcGISTileMap.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,gBAAgB;AAChB,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAInF,gBAAgB;AAChB,qBAAa,aAAa;IAGjB,kBAAkB,SAAK;IAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,CAAM;IAK3B,IAAW,aAAa,WAA4C;IAE5D,0BAA0B,SAAK;IAEvC,OAAO,CAAC,WAAW,CAAwC;IA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