@itwin/core-frontend 4.10.0-dev.18 → 4.10.0-dev.20
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/common/WorkerProxy.d.ts +8 -4
- package/lib/cjs/common/WorkerProxy.d.ts.map +1 -1
- package/lib/cjs/common/WorkerProxy.js.map +1 -1
- package/lib/cjs/common/internal/render/OvrFlags.d.ts +4 -2
- package/lib/cjs/common/internal/render/OvrFlags.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/OvrFlags.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +4 -0
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/RealityMeshGraphicParams.d.ts +1 -0
- package/lib/cjs/render/RealityMeshGraphicParams.d.ts.map +1 -1
- package/lib/cjs/render/RealityMeshGraphicParams.js.map +1 -1
- package/lib/cjs/render/RenderSystem.d.ts +1 -1
- package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
- package/lib/cjs/render/RenderSystem.js +2 -2
- package/lib/cjs/render/RenderSystem.js.map +1 -1
- package/lib/cjs/render/webgl/BranchState.d.ts +5 -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/BranchUniforms.d.ts +1 -0
- package/lib/cjs/render/webgl/BranchUniforms.d.ts.map +1 -1
- package/lib/cjs/render/webgl/BranchUniforms.js +13 -0
- package/lib/cjs/render/webgl/BranchUniforms.js.map +1 -1
- package/lib/cjs/render/webgl/EdgeSettings.js +1 -1
- package/lib/cjs/render/webgl/EdgeSettings.js.map +1 -1
- package/lib/cjs/render/webgl/FeatureOverrides.d.ts +1 -0
- package/lib/cjs/render/webgl/FeatureOverrides.d.ts.map +1 -1
- package/lib/cjs/render/webgl/FeatureOverrides.js +45 -26
- package/lib/cjs/render/webgl/FeatureOverrides.js.map +1 -1
- package/lib/cjs/render/webgl/Graphic.d.ts +1 -0
- package/lib/cjs/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Graphic.js +1 -0
- package/lib/cjs/render/webgl/Graphic.js.map +1 -1
- package/lib/cjs/render/webgl/RealityMesh.js +1 -1
- package/lib/cjs/render/webgl/RealityMesh.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/FeatureSymbology.js +17 -11
- package/lib/cjs/render/webgl/glsl/FeatureSymbology.js.map +1 -1
- package/lib/cjs/tile/map/MapTile.js +1 -1
- package/lib/cjs/tile/map/MapTile.js.map +1 -1
- package/lib/esm/common/WorkerProxy.d.ts +8 -4
- package/lib/esm/common/WorkerProxy.d.ts.map +1 -1
- package/lib/esm/common/WorkerProxy.js.map +1 -1
- package/lib/esm/common/internal/render/OvrFlags.d.ts +4 -2
- package/lib/esm/common/internal/render/OvrFlags.d.ts.map +1 -1
- package/lib/esm/common/internal/render/OvrFlags.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +4 -0
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/RealityMeshGraphicParams.d.ts +1 -0
- package/lib/esm/render/RealityMeshGraphicParams.d.ts.map +1 -1
- package/lib/esm/render/RealityMeshGraphicParams.js.map +1 -1
- package/lib/esm/render/RenderSystem.d.ts +1 -1
- package/lib/esm/render/RenderSystem.d.ts.map +1 -1
- package/lib/esm/render/RenderSystem.js +2 -2
- package/lib/esm/render/RenderSystem.js.map +1 -1
- package/lib/esm/render/webgl/BranchState.d.ts +5 -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/BranchUniforms.d.ts +1 -0
- package/lib/esm/render/webgl/BranchUniforms.d.ts.map +1 -1
- package/lib/esm/render/webgl/BranchUniforms.js +13 -0
- package/lib/esm/render/webgl/BranchUniforms.js.map +1 -1
- package/lib/esm/render/webgl/EdgeSettings.js +1 -1
- package/lib/esm/render/webgl/EdgeSettings.js.map +1 -1
- package/lib/esm/render/webgl/FeatureOverrides.d.ts +1 -0
- package/lib/esm/render/webgl/FeatureOverrides.d.ts.map +1 -1
- package/lib/esm/render/webgl/FeatureOverrides.js +45 -26
- package/lib/esm/render/webgl/FeatureOverrides.js.map +1 -1
- package/lib/esm/render/webgl/Graphic.d.ts +1 -0
- package/lib/esm/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/esm/render/webgl/Graphic.js +1 -0
- package/lib/esm/render/webgl/Graphic.js.map +1 -1
- package/lib/esm/render/webgl/RealityMesh.js +1 -1
- package/lib/esm/render/webgl/RealityMesh.js.map +1 -1
- package/lib/esm/render/webgl/glsl/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/FeatureSymbology.js +17 -11
- package/lib/esm/render/webgl/glsl/FeatureSymbology.js.map +1 -1
- package/lib/esm/tile/map/MapTile.js +1 -1
- package/lib/esm/tile/map/MapTile.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 +18 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapTile.js","sourceRoot":"","sources":["../../../../src/tile/map/MapTile.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAsD;AACtD,oDAAwH;AACxH,wDAAwR;AACxR,+CAA4C;AAE5C,sEAAmE;AACnE,sFAAmF;AAGnF,4DAAgG;AAEhG,0CAGqB;AAErB,gBAAgB;AAChB,MAAa,eAAe;IAC1B,YAAmB,OAAkB,EAAS,MAAgB,EAAU,YAAoB;QAA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SAAS,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,KAAK,yBAAc,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAE3J,QAAQ,CAAC,IAAkB;QACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC;CACF;AAjDD,4CAiDC","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, dispose } from \"@itwin/core-bentley\";\nimport { ColorByName, ColorDef, FrustumPlanes, GlobeMode, PackedFeatureTable, RenderTexture } from \"@itwin/core-common\";\nimport { AxisOrder, BilinearPatch, ClipPlane, ClipPrimitive, ClipShape, ClipVector, Constant, ConvexClipPlaneSet, EllipsoidPatch, LongitudeLatitudeNumber, Matrix3d, Point3d, PolygonOps, Range1d, Range2d, Range3d, Ray3d, Transform, Vector2d, Vector3d } from \"@itwin/core-geometry\";\nimport { IModelApp } from \"../../IModelApp\";\nimport { GraphicBuilder } from \"../../render/GraphicBuilder\";\nimport { RealityMeshParams } from \"../../render/RealityMeshParams\";\nimport { upsampleRealityMeshParams } from \"../../render/UpsampleRealityMeshParams\";\nimport { RenderGraphic } from \"../../render/RenderGraphic\";\nimport { RenderMemory } from \"../../render/RenderMemory\";\nimport { RenderSystem, RenderTerrainGeometry, TerrainTexture } from \"../../render/RenderSystem\";\nimport { ViewingSpace } from \"../../ViewingSpace\";\nimport {\n ImageryMapTile, MapCartoRectangle, MapTileLoader, MapTileTree, QuadId, RealityTile, RealityTileParams, Tile, TileContent, TileDrawArgs, TileGraphicType,\n TileLoadStatus, TileTreeLoadStatus, TraversalSelectionContext,\n} from \"../internal\";\n\n/** @internal */\nexport class PlanarTilePatch {\n constructor(public corners: Point3d[], public normal: Vector3d, private _chordHeight: number) {\n }\n\n public getRangeCorners(heightRange: Range1d, result: Point3d[]): Point3d[] {\n let index = 0;\n for (const corner of this.corners)\n corner.plusScaled(this.normal, heightRange.low - this._chordHeight, result[index++]);\n\n for (const corner of this.corners)\n corner.plusScaled(this.normal, heightRange.high + this._chordHeight, result[index++]);\n\n return result;\n }\n public getClipShape(): Point3d[] {\n return [this.corners[0], this.corners[1], this.corners[3], this.corners[2]];\n }\n}\n\n/** @internal */\nexport type TilePatch = PlanarTilePatch | EllipsoidPatch;\n\n/** Projects points within the rectangular region of a [[MapTile]] into 3d space.\n * @see [[MapTile.getProjection]] to obtain the projection for a [[MapTile]].\n * @public\n */\nexport abstract class MapTileProjection {\n /** The extents of the volume of space associated with the projected [[MapTile]]. */\n public abstract get localRange(): Range3d;\n /** @alpha */\n public abstract get transformFromLocal(): Transform;\n\n /** Given parametric coordinates in [0, 1] within the tile's rectangular region, and an elevation above the Earth,\n * compute the 3d position in space.\n */\n public abstract getPoint(u: number, v: number, height: number, result?: Point3d): Point3d;\n\n /** @alpha */\n public get ellipsoidPatch(): EllipsoidPatch | undefined { return undefined; }\n\n /** @alpha */\n public getGlobalPoint(u: number, v: number, z: number, result?: Point3d): Point3d {\n const point = this.getPoint(u, v, z, result);\n return this.transformFromLocal.multiplyPoint3d(point, point);\n }\n}\n\n/** @alpha */\nclass EllipsoidProjection extends MapTileProjection {\n public transformFromLocal = Transform.createIdentity();\n public localRange: Range3d;\n constructor(private _patch: EllipsoidPatch, heightRange?: Range1d) {\n super();\n this.localRange = _patch.range();\n this.localRange.expandInPlace(heightRange ? (heightRange.high - heightRange.low) : 0);\n }\n private static _scratchAngles = LongitudeLatitudeNumber.createZero();\n private static _scratchRay = Ray3d.createZero();\n public getPoint(u: number, v: number, height: number, result?: Point3d): Point3d {\n const angles = this._patch.uvFractionToAngles(u, v, height, EllipsoidProjection._scratchAngles);\n const ray = this._patch.anglesToUnitNormalRay(angles, EllipsoidProjection._scratchRay);\n return Point3d.createFrom(ray!.origin, result);\n }\n public override get ellipsoidPatch() { return this._patch; }\n}\n\n/** @alpha */\nclass PlanarProjection extends MapTileProjection {\n private _bilinearPatch: BilinearPatch;\n public transformFromLocal: Transform;\n public localRange: Range3d;\n constructor(patch: PlanarTilePatch, heightRange?: Range1d) {\n super();\n this.transformFromLocal = Transform.createOriginAndMatrix(patch.corners[0], Matrix3d.createRigidHeadsUp(patch.normal, AxisOrder.ZYX));\n const planeCorners = this.transformFromLocal.multiplyInversePoint3dArray([patch.corners[0], patch.corners[1], patch.corners[2], patch.corners[3]])!;\n this.localRange = Range3d.createArray(planeCorners);\n this.localRange.low.z += heightRange ? heightRange.low : 0;\n this.localRange.high.z += heightRange ? heightRange.high : 0;\n this._bilinearPatch = new BilinearPatch(planeCorners[0], planeCorners[1], planeCorners[2], planeCorners[3]);\n }\n public getPoint(u: number, v: number, z: number, result?: Point3d): Point3d {\n result = this._bilinearPatch.uvFractionToPoint(u, v, result);\n result.z += z;\n return result;\n }\n}\n\n/** @internal */\nexport interface TerrainTileContent extends TileContent {\n terrain?: {\n renderGeometry?: RenderTerrainGeometry;\n /** Used on leaves to support up-sampling. */\n mesh?: RealityMeshParams;\n };\n}\n\nconst scratchNormal = Vector3d.create();\nconst scratchViewZ = Vector3d.create();\nconst scratchPoint = Point3d.create();\nconst scratchClipPlanes = [ClipPlane.createNormalAndPoint(scratchNormal, scratchPoint), ClipPlane.createNormalAndPoint(scratchNormal, scratchPoint), ClipPlane.createNormalAndPoint(scratchNormal, scratchPoint), ClipPlane.createNormalAndPoint(scratchNormal, scratchPoint)];\nconst scratchCorners = [Point3d.createZero(), Point3d.createZero(), Point3d.createZero(), Point3d.createZero(), Point3d.createZero(), Point3d.createZero(), Point3d.createZero(), Point3d.createZero()];\n\n/** A [[Tile]] belonging to a [[MapTileTree]] representing a rectangular region of a map of the Earth.\n * @public\n */\nexport class MapTile extends RealityTile {\n private static _maxParentHeightDepth = 4;\n private _imageryTiles?: ImageryMapTile[];\n private _hiddenTiles?: ImageryMapTile[];\n private _highResolutionReplacementTiles?: ImageryMapTile[];\n /** @internal */\n public everLoaded = false; // If the tile is only required for availability metadata, load it once and then allow it to be unloaded.\n /** @internal */\n protected _heightRange: Range1d | undefined;\n /** @internal */\n protected _renderGeometry?: RenderTerrainGeometry;\n /** @internal */\n protected _mesh?: RealityMeshParams; // Primitive retained on leaves only for upsampling.\n /** @internal */\n public override get isReady(): boolean {\n return super.isReady && this.baseImageryIsReady;\n }\n\n /** @internal */\n public override get hasGraphics(): boolean {\n return this._renderGeometry !== undefined;\n }\n\n /** @internal */\n public get renderGeometry() { return this._renderGeometry; }\n /** @internal */\n public get mesh() { return this._mesh; }\n /** @internal */\n public get loadableTerrainTile() { return this.loadableTile as MapTile; }\n /** @internal */\n public get isPlanar(): boolean { return this._patch instanceof PlanarTilePatch; }\n /** @internal */\n public get imageryTiles(): ImageryMapTile[] | undefined { return this._imageryTiles; }\n /** List of selected tiles but are currently in hidden state (i.e. scale range visibility)\n * @internal\n */\n public get hiddenImageryTiles(): ImageryMapTile[] | undefined { return this._hiddenTiles; }\n\n /** List of leafs tiles that have been selected as a replacement for missing high resolution tiles.\n * When this list is non-empty this means we are past the maximum LOD available of the tile tree.\n * By using those tiles, you are likely to get a display where tiles looks pixelated..\n * in some cases this is preferred to have no tile at all.\n * @internal\n */\n public get highResolutionReplacementTiles(): ImageryMapTile[] | undefined { return this._highResolutionReplacementTiles; }\n\n /** The [[MapTileTree]] to which this tile belongs. */\n public readonly mapTree: MapTileTree;\n /** Uniquely identifies this tile within its [[mapTree]]. */\n public readonly quadId: QuadId;\n private _patch: TilePatch;\n /** The area of the surface of the Earth that this tile represents. */\n public readonly rectangle: MapCartoRectangle;\n /** @internal */\n protected _cornerRays?: Ray3d[];\n\n /** @internal */\n constructor(params: RealityTileParams, mapTree: MapTileTree, quadId: QuadId, patch: TilePatch, rectangle: MapCartoRectangle, heightRange: Range1d | undefined, cornerRays: Ray3d[] | undefined) {\n super(params, mapTree);\n this.mapTree = mapTree;\n this.quadId = quadId;\n this._patch = patch;\n this.rectangle = rectangle;\n this._cornerRays = cornerRays;\n this._heightRange = heightRange?.clone();\n }\n\n /** @internal */\n public getRangeCorners(result: Point3d[]): Point3d[] {\n return this._patch instanceof PlanarTilePatch ? this._patch.getRangeCorners(this.heightRange!, result) : this.range.corners(result);\n }\n\n /** @internal */\n public override getSizeProjectionCorners(): Point3d[] | undefined {\n // Use only the first 4 corners -- On terrain tiles the height is initially exagerated to world height range which can cause excessive tile loading.\n const rangeCorners = this.getRangeCorners(scratchCorners);\n return rangeCorners.slice(0, 4);\n }\n\n /** @internal */\n public override markUsed(args: TileDrawArgs) {\n super.markUsed(args);\n if (this._imageryTiles)\n for (const imageryTile of this._imageryTiles)\n imageryTile.markUsed(args);\n }\n\n /** @internal */\n public override get graphicType() {\n if (this.mapTree.isOverlay)\n return TileGraphicType.Overlay;\n\n return (this.mapTree.useDepthBuffer || this._forceDepthBuffer) ? TileGraphicType.Scene : TileGraphicType.BackgroundMap;\n }\n\n /** @internal */\n public get mapLoader() { return this.realityRoot.loader as MapTileLoader; }\n /** @internal */\n public get isUpsampled() { return false; }\n\n /** @internal */\n public tileFromQuadId(quadId: QuadId): MapTile | undefined {\n if (0 === quadId.compare(this.quadId))\n return this;\n\n assert(quadId.level > this.quadId.level);\n if (quadId.level <= this.quadId.level)\n return undefined;\n\n if (this.children) {\n const shift = quadId.level - this.quadId.level - 1;\n const childRow = quadId.row >> shift;\n const childColumn = quadId.column >> shift;\n for (const child of this.children) {\n const mapChild = child as MapTile;\n const childQuadId = mapChild.quadId;\n if (childQuadId.row === childRow && childQuadId.column === childColumn)\n return mapChild.tileFromQuadId(quadId);\n }\n }\n\n return undefined;\n }\n\n private get _forceDepthBuffer() {\n // For large ellipsoidal globe tile force the depth buffer on to avoid anomalies at horizon.\n return this.mapTree.globeMode === GlobeMode.Ellipsoid && this.depth < 8;\n }\n\n /** @internal */\n public override addBoundingGraphic(builder: GraphicBuilder, color: ColorDef) {\n if (!this.isDisplayable)\n return;\n\n const heightRange = (this.heightRange === undefined) ? Range1d.createXX(-1, 1) : this.heightRange;\n const lows = [], highs = [], reorder = [0, 1, 3, 2, 0];\n const cornerRays = this._cornerRays!;\n if (this._patch instanceof PlanarTilePatch) {\n const normal = this._patch.normal;\n for (let i = 0; i < 5; i++) {\n const corner = this._patch.corners[reorder[i]];\n lows.push(corner.plusScaled(normal, heightRange.low));\n highs.push(corner.plusScaled(normal, heightRange.high));\n }\n } else {\n for (let i = 0; i < 5; i++) {\n const cornerRay = cornerRays[reorder[i]];\n lows.push(cornerRay.origin.plusScaled(cornerRay.direction, heightRange.low));\n highs.push(cornerRay.origin.plusScaled(cornerRay.direction, heightRange.high));\n }\n }\n\n builder.setSymbology(color, color, 1);\n builder.addLineString(lows);\n builder.addLineString(highs);\n for (let i = 0; i < 4; i++)\n builder.addLineString([lows[i], highs[i]]);\n\n const inColor = ColorDef.create(ColorByName.cornflowerBlue);\n const outColor = ColorDef.create(ColorByName.chartreuse);\n const transitionColor = ColorDef.create(ColorByName.aquamarine);\n\n const inPoints = [], outPoints = [], transitionPoints = [];\n\n for (const point of highs)\n if (this.mapTree.cartesianRange.containsPoint(point))\n inPoints.push(point);\n else if (this.mapTree.cartesianRange.distanceToPoint(point) < this.mapTree.cartesianTransitionDistance)\n transitionPoints.push(point);\n else\n outPoints.push(point);\n\n builder.setSymbology(inColor, inColor, 15);\n builder.addPointString(inPoints);\n builder.setSymbology(outColor, outColor, 15);\n builder.addPointString(outPoints);\n builder.setSymbology(transitionColor, transitionColor, 31);\n builder.addPointString(transitionPoints);\n }\n\n /** @internal */\n public override getContentClip(): ClipVector | undefined {\n const points = this.getClipShape();\n if (points.length < 3)\n return undefined;\n if (this.mapTree.globeMode === GlobeMode.Ellipsoid) {\n const normal = PolygonOps.areaNormal(points);\n const globeOrigin = this.mapTree.globeOrigin;\n const globeNormal = Vector3d.createStartEnd(globeOrigin, points[0]);\n const negate = normal.dotProduct(globeNormal) < 0;\n const clipPlanes = [];\n for (let i = 0; i < 4; i++) {\n const point = points[i];\n const clipNormal = globeOrigin.crossProductToPoints(point, points[(i + 1) % 4], scratchNormal);\n if (negate)\n clipNormal.negate(clipNormal);\n\n const clipPlane = ClipPlane.createNormalAndPoint(clipNormal, point, false, false, scratchClipPlanes[i]);\n if (clipPlane !== undefined) // Undefined at pole tiles...\n clipPlanes.push(clipPlane);\n }\n\n const planeSet = ConvexClipPlaneSet.createPlanes(clipPlanes);\n const clipPrimitive = ClipPrimitive.createCapture(planeSet);\n\n return ClipVector.createCapture([clipPrimitive]);\n } else {\n return ClipVector.createCapture([ClipShape.createShape(points)!]);\n }\n }\n\n /** @internal */\n public override setNotFound(): void {\n super.setNotFound();\n\n // For map tiles assume that an unfound tile implies descendants and siblings will also be unfound.\n if (undefined !== this.parent)\n this.parent.setLeaf();\n }\n\n /** @internal */\n public getGraphic(_system: RenderSystem, _texture: RenderTexture): RenderGraphic | undefined {\n return undefined;\n }\n\n /** For globe tiles displaying less then depth 2 appears distorted\n * @internal\n */\n public override get isDisplayable() {\n return this.mapTree.globeMode === GlobeMode.Ellipsoid ? (this.depth >= MapTileTree.minDisplayableDepth) : super.isDisplayable;\n }\n\n /** @internal */\n public override isOccluded(viewingSpace: ViewingSpace): boolean {\n if (undefined === this._cornerRays || this.mapTree.globeMode !== GlobeMode.Ellipsoid)\n return false;\n\n if (viewingSpace.eyePoint !== undefined) {\n if (!this.mapTree.pointAboveEllipsoid(viewingSpace.eyePoint))\n return false;\n\n for (const cornerNormal of this._cornerRays) {\n const eyeNormal = Vector3d.createStartEnd(viewingSpace.eyePoint, cornerNormal.origin, scratchNormal);\n eyeNormal.normalizeInPlace();\n if (eyeNormal.dotProduct(cornerNormal.direction) < .01)\n return false;\n }\n } else {\n const viewZ = viewingSpace.rotation.getRow(2, scratchViewZ);\n for (const cornerNormal of this._cornerRays)\n if (cornerNormal.direction.dotProduct(viewZ) > 0)\n return false;\n }\n\n return true;\n }\n\n /** @internal */\n protected override _loadChildren(resolve: (children: Tile[] | undefined) => void, _reject: (error: Error) => void): void {\n const mapTree = this.mapTree;\n const childLevel = this.quadId.level + 1;\n const rowCount = mapTree.sourceTilingScheme.getNumberOfYChildrenAtLevel(childLevel);\n const columnCount = mapTree.sourceTilingScheme.getNumberOfXChildrenAtLevel(childLevel);\n\n const resolveChildren = (children: Tile[]) => {\n const childrenRange = Range3d.createNull();\n for (const child of children)\n childrenRange.extendRange(child.range);\n\n if (!this.range.containsRange(childrenRange))\n this.range.extendRange(childrenRange);\n\n resolve(children);\n };\n\n if (mapTree.doCreateGlobeChildren(this)) {\n this.createGlobeChildren(columnCount, rowCount, resolveChildren);\n return;\n }\n\n const resolvePlanarChildren = (childCorners: Point3d[][]) => {\n const level = this.quadId.level + 1;\n const column = this.quadId.column * 2;\n const row = this.quadId.row * 2;\n const children = [];\n const childrenAreLeaves = (this.depth + 1) === mapTree.loader.maxDepth;\n const globeMode = this.mapTree.globeMode;\n for (let j = 0; j < rowCount; j++) {\n for (let i = 0; i < columnCount; i++) {\n const quadId = new QuadId(level, column + i, row + j);\n const corners = childCorners[j * columnCount + i];\n const rectangle = mapTree.getTileRectangle(quadId);\n const normal = PolygonOps.areaNormal([corners[0], corners[1], corners[3], corners[2]]);\n normal.normalizeInPlace();\n\n const heightRange = this.mapTree.getChildHeightRange(quadId, rectangle, this);\n const diagonal = Math.max(corners[0].distance(corners[3]), corners[1].distance(corners[2])) / 2.0;\n const chordHeight = globeMode === GlobeMode.Ellipsoid ? Math.sqrt(diagonal * diagonal + Constant.earthRadiusWGS84.equator * Constant.earthRadiusWGS84.equator) - Constant.earthRadiusWGS84.equator : 0.0;\n const rangeCorners = MapTile.computeRangeCorners(corners, normal, chordHeight, undefined, heightRange);\n const range = Range3d.createArray(rangeCorners);\n const child = this.mapTree.createPlanarChild({ contentId: quadId.contentId, maximumSize: 512, range, parent: this, isLeaf: childrenAreLeaves }, quadId, corners, normal, rectangle, chordHeight, heightRange);\n if (child)\n children.push(child);\n }\n }\n\n resolveChildren(children);\n };\n\n mapTree.getPlanarChildCorners(this, columnCount, rowCount, resolvePlanarChildren);\n }\n\n private createGlobeChildren(columnCount: number, rowCount: number, resolve: (children: MapTile[]) => void) {\n const level = this.quadId.level + 1;\n const column = this.quadId.column * 2;\n const row = this.quadId.row * 2;\n const mapTree = this.mapTree;\n const children = [];\n\n for (let j = 0; j < rowCount; j++) {\n for (let i = 0; i < columnCount; i++) {\n const quadId = new QuadId(level, column + i, row + j);\n const angleSweep = quadId.getAngleSweep(mapTree.sourceTilingScheme);\n const ellipsoidPatch = EllipsoidPatch.createCapture(this.mapTree.earthEllipsoid, angleSweep.longitude, angleSweep.latitude);\n const range = ellipsoidPatch.range();\n const rectangle = mapTree.getTileRectangle(quadId);\n const heightRange = this.mapTree.getChildHeightRange(quadId, rectangle, this);\n if (undefined !== heightRange)\n range.expandInPlace(heightRange.high - heightRange.low);\n\n children.push(this.mapTree.createGlobeChild({ contentId: quadId.contentId, maximumSize: 512, range, parent: this, isLeaf: false }, quadId, range.corners(), rectangle, ellipsoidPatch, heightRange));\n }\n }\n\n resolve(children);\n return children;\n }\n\n /** @internal */\n public static computeRangeCorners(corners: Point3d[], normal: Vector3d, chordHeight: number, result?: Point3d[], heightRange?: Range1d) {\n if (result === undefined) {\n result = [];\n for (let i = 0; i < 8; i++)\n result.push(Point3d.create());\n }\n\n let index = 0;\n assert(corners.length === 4);\n const deltaLow = normal.scale(- chordHeight + (heightRange ? heightRange.low : 0));\n const deltaHigh = normal.scale(chordHeight + (heightRange ? heightRange.high : 0));\n\n for (const corner of corners)\n corner.plus(deltaLow, result[index++]);\n\n for (const corner of corners)\n corner.plus(deltaHigh, result[index++]);\n\n return result;\n }\n\n /** @internal */\n public override isRegionCulled(args: TileDrawArgs): boolean {\n return this.isContentCulled(args);\n }\n\n /** @internal */\n public override isContentCulled(args: TileDrawArgs): boolean {\n return FrustumPlanes.Containment.Outside === args.frustumPlanes.computeContainment(this.getRangeCorners(scratchCorners));\n }\n\n /** @internal */\n public clearLayers() {\n this.clearImageryTiles();\n this._graphic = undefined;\n if (this.children)\n for (const child of this.children)\n (child as MapTile).clearLayers();\n }\n\n private clearImageryTiles() {\n if (this._imageryTiles) {\n this._imageryTiles.forEach((tile) => tile.releaseMapTileUsage());\n this._imageryTiles = undefined;\n }\n if (this._hiddenTiles) {\n this._hiddenTiles = undefined;\n }\n if (this._highResolutionReplacementTiles) {\n this._highResolutionReplacementTiles = undefined;\n }\n }\n\n /** @internal */\n public override produceGraphics(): RenderGraphic | undefined {\n if (undefined !== this._graphic && this.imageryIsReady)\n return this._graphic;\n\n const geometry = this.renderGeometry;\n if (undefined === geometry)\n return undefined;\n\n const textures = this.getDrapeTextures();\n const { baseColor, baseTransparent, layerClassifiers } = this.mapTree;\n const graphic = IModelApp.renderSystem.createRealityMeshGraphic({ realityMesh: geometry, projection: this.getProjection(), tileRectangle: this.rectangle, featureTable: PackedFeatureTable.pack(this.mapLoader.featureTable), tileId: this.contentId, baseColor, baseTransparent, textures, layerClassifiers }, true);\n\n // If there are no layer classifiers then we can save this graphic for re-use. If layer classifiers exist they are regenerated based on view and we must collate them with the imagery.\n if (this.imageryIsReady && 0 === this.mapTree.layerClassifiers.size)\n this._graphic = graphic;\n\n return graphic;\n }\n\n /** @internal */\n public getClipShape(): Point3d[] {\n return (this._patch instanceof PlanarTilePatch) ? this._patch.getClipShape() : [this._cornerRays![0].origin, this._cornerRays![1].origin, this._cornerRays![3].origin, this._cornerRays![2].origin];\n }\n\n /** @internal */\n protected override _collectStatistics(stats: RenderMemory.Statistics): void {\n super._collectStatistics(stats);\n\n this._renderGeometry?.collectStatistics(stats);\n if (this._mesh) {\n stats.addTerrain(this._mesh.indices.byteLength\n + this._mesh.positions.points.byteLength\n + this._mesh.uvs.points.byteLength\n + (this._mesh.normals ? this._mesh.normals.byteLength : 0),\n );\n }\n }\n\n /** Height range is along with the tile corners to detect if tile intersects view frustum.\n * Range will be single value fo ron-terrain tiles -- if terrain tile is not loaded it will\n * inherit height from ancestors.\n * @internal\n */\n public get heightRange(): Range1d | undefined {\n if (undefined !== this._heightRange)\n return this._heightRange;\n\n for (let parent = this.parent; undefined !== parent; parent = parent.parent) {\n const mapParent = parent as MapTile;\n if (undefined !== mapParent._heightRange)\n return mapParent._heightRange;\n }\n\n assert(false);\n return Range1d.createNull();\n }\n\n /** @internal */\n public get mapTilingScheme() {\n return this.mapTree.sourceTilingScheme;\n }\n\n /** Adjust the minimum and maximum elevations of the terrain within this tile. */\n public adjustHeights(minHeight: number, maxHeight: number) {\n if (undefined === this._heightRange)\n this._heightRange = Range1d.createXX(minHeight, maxHeight);\n else {\n this._heightRange.low = Math.max(this.heightRange!.low, minHeight);\n this._heightRange.high = Math.min(this.heightRange!.high, maxHeight);\n }\n\n if (this.rangeCorners && this._patch instanceof PlanarTilePatch)\n this._patch.getRangeCorners(this.heightRange!, this.rangeCorners);\n }\n\n /** Obtain a [[MapTileProjection]] to project positions within this tile's area into 3d space. */\n public getProjection(heightRange?: Range1d): MapTileProjection {\n return this._patch instanceof PlanarTilePatch ? new PlanarProjection(this._patch, heightRange) : new EllipsoidProjection(this._patch, heightRange);\n }\n\n /** @internal */\n public get baseImageryIsReady(): boolean {\n if (undefined !== this.mapTree.baseColor || 0 === this.mapTree.layerImageryTrees.length)\n return true;\n\n if (undefined === this._imageryTiles)\n return false;\n\n const baseTreeId = this.mapTree.layerImageryTrees[0].tree.modelId;\n return this._imageryTiles.every((imageryTile) => imageryTile.imageryTree.modelId !== baseTreeId || imageryTile.isReady);\n }\n\n /** @internal */\n public get imageryIsReady(): boolean {\n if (undefined === this._imageryTiles)\n return 0 === this.mapTree.layerImageryTrees.length;\n\n return this._imageryTiles.every((tile) => tile.isReady);\n }\n\n /** Select secondary (imagery) tiles\n * @internal\n */\n public override selectSecondaryTiles(args: TileDrawArgs, context: TraversalSelectionContext) {\n if (0 === this.mapTree.layerImageryTrees.length || this.imageryIsReady)\n return;\n\n this.clearImageryTiles();\n this._imageryTiles = new Array<ImageryMapTile>();\n this._hiddenTiles = new Array<ImageryMapTile>();\n this._highResolutionReplacementTiles = new Array<ImageryMapTile>();\n for (const layerImageryTree of this.mapTree.layerImageryTrees) {\n let tmpTiles = new Array<ImageryMapTile>();\n const tmpLeafTiles = new Array<ImageryMapTile>();\n if (TileTreeLoadStatus.Loaded !== layerImageryTree.tree.selectCartoDrapeTiles(tmpTiles, tmpLeafTiles, this, args)) {\n this._imageryTiles = undefined;\n return;\n }\n\n // When the base layer is zoomed-in beyond it's max resolution,\n // we display leaf tiles and stretched them if needed.\n // We don't want the same behavior non-base layers, in the case,\n // the layer will simply disappear past its max resolution.\n // Note: Replacement leaf tiles are kept as a mean to determine which\n // imagery tree has reached it's maximum zoom level.\n if (layerImageryTree.baseImageryLayer) {\n tmpTiles = [...tmpTiles, ...tmpLeafTiles];\n } else {\n this._highResolutionReplacementTiles = [...this._highResolutionReplacementTiles, ...tmpLeafTiles];\n }\n\n // MapTileTree might include a non-visible imagery tree, we need to check for that.\n if (layerImageryTree.settings.visible && !layerImageryTree.settings.allSubLayersInvisible) {\n for (const imageryTile of tmpTiles) {\n imageryTile.markMapTileUsage();\n if (imageryTile.isReady)\n args.markReady(imageryTile);\n else\n context.missing.push(imageryTile);\n this._imageryTiles.push(imageryTile);\n }\n } else {\n // Even though those selected imagery tile are not visible,\n // we keep track of them for scale range reporting.\n for (const imageryTile of tmpTiles) {\n this._hiddenTiles.push(imageryTile);\n }\n }\n }\n }\n\n private static _scratchRectangle1 = MapCartoRectangle.createZero();\n private static _scratchRectangle2 = MapCartoRectangle.createZero();\n\n /** The height range for terrain tiles is not known until the tiles are unloaded. We use \"ApproximateTerrainHeight\" for first 6 levels but below\n * that the tiles inherit height range from parents. This is problematic as tiles with large height range will be unnecessarily selected as\n * they apparently intersect view frustum. To avoid this force loading of terrain tiles if they exceed \"_maxParentHightDepth\".\n * @internal\n */\n protected override forceSelectRealityTile(): boolean {\n let parentHeightDepth = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n for (let parent: MapTile = this; parent !== undefined && parent._heightRange === undefined; parent = parent.parent as MapTile)\n parentHeightDepth++;\n\n return parentHeightDepth > MapTile._maxParentHeightDepth;\n }\n\n /** @internal */\n protected override minimumVisibleFactor(): number {\n // if minimumVisibleFactor is more than 0, it stops parents from loading when children are not ready, to fill in gaps\n return 0.0;\n }\n\n private static _scratchThisDiagonal = Vector2d.create();\n private static _scratchDrapeDiagonal = Vector2d.create();\n\n /** @internal */\n public getDrapeTextures(): TerrainTexture[] | undefined {\n if (undefined === this._imageryTiles)\n return undefined;\n\n const drapeTextures: TerrainTexture[] = [];\n const thisRectangle = this.loadableTerrainTile.rectangle;\n const thisDiagonal = thisRectangle.diagonal(MapTile._scratchThisDiagonal);\n const bordersNorthPole = this.quadId.bordersNorthPole(this.mapTree.sourceTilingScheme);\n const bordersSouthPole = this.quadId.bordersSouthPole(this.mapTree.sourceTilingScheme);\n for (const imageryTile of this._imageryTiles) {\n if (imageryTile.texture) {\n drapeTextures.push(this.computeDrapeTexture(thisRectangle, thisDiagonal, imageryTile, imageryTile.rectangle));\n\n if ((bordersNorthPole && imageryTile.quadId.bordersNorthPole(imageryTile.tilingScheme) && imageryTile.rectangle.high.y < thisRectangle.high.y) ||\n (bordersSouthPole && imageryTile.quadId.bordersSouthPole(imageryTile.tilingScheme) && imageryTile.rectangle.low.y > thisRectangle.low.y)) {\n // Add separate texture stretching last sliver of tile imagery to cover pole.\n const sliverRectangle = imageryTile.rectangle.clone(MapTile._scratchRectangle1);\n const clipRectangle = thisRectangle.clone(MapTile._scratchRectangle2);\n const sliverHeight = sliverRectangle.high.y - sliverRectangle.low.y;\n\n if (bordersSouthPole) {\n clipRectangle.high.y = sliverRectangle.low.y;\n sliverRectangle.low.y = thisRectangle.low.y;\n sliverRectangle.high.y += 1 / sliverHeight;\n } else {\n clipRectangle.low.y = sliverRectangle.high.y;\n sliverRectangle.high.y = thisRectangle.high.y;\n sliverRectangle.low.y -= 1 / sliverHeight;\n }\n\n drapeTextures.push(this.computeDrapeTexture(thisRectangle, thisDiagonal, imageryTile, sliverRectangle, clipRectangle));\n }\n } else {\n for (let parent = imageryTile.parent; undefined !== parent; parent = parent.parent) {\n const mapTile = parent as ImageryMapTile;\n if (mapTile.texture) {\n drapeTextures.push(this.computeDrapeTexture(thisRectangle, thisDiagonal, mapTile, mapTile.rectangle, imageryTile.rectangle));\n break;\n }\n }\n }\n }\n\n return drapeTextures.length > 0 ? drapeTextures : undefined;\n }\n\n private static _scratchIntersectRange = Range2d.createNull();\n\n private computeDrapeTexture(thisRectangle: Range2d, thisDiagonal: Vector2d, imageryTile: ImageryMapTile, drapeRectangle: Range2d, clipRectangle?: Range2d): TerrainTexture {\n assert(imageryTile.texture !== undefined);\n\n // Compute transformation from the terrain tile texture coordinates (0-1) to the drape tile texture coordinates.\n const drapeDiagonal = drapeRectangle.diagonal(MapTile._scratchDrapeDiagonal);\n const translate = Vector2d.create((thisRectangle.low.x - drapeRectangle.low.x) / drapeDiagonal.x, (thisRectangle.low.y - drapeRectangle.low.y) / drapeDiagonal.y);\n const scale = Vector2d.create(thisDiagonal.x / drapeDiagonal.x, thisDiagonal.y / drapeDiagonal.y);\n const featureIndex = this.mapLoader.getFeatureIndex(imageryTile.imageryTree.modelId);\n let clipRect;\n if (undefined !== clipRectangle) {\n const intersect = clipRectangle.intersect(drapeRectangle, MapTile._scratchIntersectRange);\n assert(!intersect.isNull);\n clipRect = Range2d.createXYXY((intersect.low.x - drapeRectangle.low.x) / drapeDiagonal.x, (intersect.low.y - drapeRectangle.low.y) / drapeDiagonal.y, (intersect.high.x - drapeRectangle.low.x) / drapeDiagonal.x, (intersect.high.y - drapeRectangle.low.y) / drapeDiagonal.y);\n }\n\n const imageryModelId = imageryTile.tree.modelId;\n return new TerrainTexture(imageryTile.texture, featureIndex, scale, translate, drapeRectangle, this.mapTree.getLayerIndex(imageryModelId), this.mapTree.getLayerTransparency(imageryModelId), clipRect);\n }\n\n /** @internal */\n public override setContent(content: TerrainTileContent): void {\n\n if (this.quadId.level < this.maxDepth) {\n const childIds = this.quadId.getChildIds();\n for (const childId of childIds) {\n if (!this.mapLoader.isTileAvailable(childId)) {\n this._mesh = content.terrain?.mesh; // If a child is unavailable retain mesh for upsampling.\n break;\n }\n }\n }\n\n if (this.mapTree.produceGeometry) {\n const iModelTransform = this.mapTree.iModelTransform;\n const geometryTransform = content.terrain?.renderGeometry?.transform;\n const transform = geometryTransform ? iModelTransform.multiplyTransformTransform(geometryTransform) : iModelTransform;\n const polyface = content.terrain?.mesh ? RealityMeshParams.toPolyface(content.terrain.mesh, { transform }) : undefined;\n this._geometry = polyface ? { polyfaces: [polyface] } : undefined;\n\n } else {\n dispose(this._renderGeometry);\n this._renderGeometry = content.terrain?.renderGeometry;\n }\n\n this.everLoaded = true;\n\n if (undefined !== content.contentRange)\n this._contentRange = content.contentRange;\n\n this.setIsReady();\n }\n\n /** @internal */\n public override freeMemory(): void {\n // ###TODO MapTiles and ImageryMapTiles share resources and don't currently interact well with TileAdmin.freeMemory(). Opt out for now.\n }\n\n /** @internal */\n public override disposeContents() {\n super.disposeContents();\n this._renderGeometry = dispose(this._renderGeometry);\n this.clearImageryTiles();\n // Note - don't dispose of mesh - these should only ever exist on terrain leaf tile and are required by children. Let garbage collector handle them.\n }\n}\n\n/** A child tile that has no content of its own available. It instead produces content by up-sampling the content of an ancestor tile.\n * @internal\n */\nexport class UpsampledMapTile extends MapTile {\n /** The ancestor tile whose content will be up-sampled. */\n private readonly _loadableTile: MapTile;\n\n constructor(params: RealityTileParams, mapTree: MapTileTree, quadId: QuadId, patch: TilePatch, rectangle: MapCartoRectangle, heightRange: Range1d | undefined, cornerRays: Ray3d[] | undefined, loadableTile: MapTile) {\n super(params, mapTree, quadId, patch, rectangle, heightRange, cornerRays);\n this._loadableTile = loadableTile;\n }\n\n public override get isUpsampled() { return true; }\n public override get isEmpty() { return false; }\n public override get loadableTile(): RealityTile { return this._loadableTile; }\n\n private upsampleFromParent() {\n const parent = this.loadableTerrainTile;\n const parentMesh = parent.mesh;\n if (undefined === parentMesh) {\n return undefined;\n }\n const thisId = this.quadId, parentId = parent.quadId;\n const levelDelta = thisId.level - parentId.level;\n const thisColumn = thisId.column - (parentId.column << levelDelta);\n const thisRow = thisId.row - (parentId.row << levelDelta);\n const scale = 1.0 / (1 << levelDelta);\n const parentParameterRange = Range2d.createXYXY(scale * thisColumn, scale * thisRow, scale * (thisColumn + 1), scale * (thisRow + 1));\n const upsample = upsampleRealityMeshParams(parentMesh, parentParameterRange);\n this.adjustHeights(upsample.heightRange.low, upsample.heightRange.high);\n return upsample;\n }\n\n public override get renderGeometry() {\n if (undefined === this._renderGeometry) {\n const upsample = this.upsampleFromParent();\n const projection = this.loadableTerrainTile.getProjection(this.heightRange);\n if (upsample)\n this._renderGeometry = IModelApp.renderSystem.createTerrainMesh(upsample.mesh, projection.transformFromLocal, true);\n }\n return this._renderGeometry;\n }\n\n public override get isLoading(): boolean { return this.loadableTile.isLoading; }\n public override get isQueued(): boolean { return this.loadableTile.isQueued; }\n public override get isNotFound(): boolean { return this.loadableTile.isNotFound; }\n public override get isReady(): boolean { return (this._renderGeometry !== undefined || this.loadableTile.loadStatus === TileLoadStatus.Ready) && this.baseImageryIsReady; }\n\n public override markUsed(args: TileDrawArgs): void {\n args.markUsed(this);\n args.markUsed(this.loadableTile);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MapTile.js","sourceRoot":"","sources":["../../../../src/tile/map/MapTile.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAsD;AACtD,oDAAwH;AACxH,wDAAwR;AACxR,+CAA4C;AAE5C,sEAAmE;AACnE,sFAAmF;AAGnF,4DAAgG;AAEhG,0CAGqB;AAErB,gBAAgB;AAChB,MAAa,eAAe;IAC1B,YAAmB,OAAkB,EAAS,MAAgB,EAAU,YAAoB;QAAzE,YAAO,GAA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,eAAe,KAAK,SAAS,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,KAAK,yBAAc,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAE3J,QAAQ,CAAC,IAAkB;QACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC;CACF;AAjDD,4CAiDC","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, dispose } from \"@itwin/core-bentley\";\nimport { ColorByName, ColorDef, FrustumPlanes, GlobeMode, PackedFeatureTable, RenderTexture } from \"@itwin/core-common\";\nimport { AxisOrder, BilinearPatch, ClipPlane, ClipPrimitive, ClipShape, ClipVector, Constant, ConvexClipPlaneSet, EllipsoidPatch, LongitudeLatitudeNumber, Matrix3d, Point3d, PolygonOps, Range1d, Range2d, Range3d, Ray3d, Transform, Vector2d, Vector3d } from \"@itwin/core-geometry\";\nimport { IModelApp } from \"../../IModelApp\";\nimport { GraphicBuilder } from \"../../render/GraphicBuilder\";\nimport { RealityMeshParams } from \"../../render/RealityMeshParams\";\nimport { upsampleRealityMeshParams } from \"../../render/UpsampleRealityMeshParams\";\nimport { RenderGraphic } from \"../../render/RenderGraphic\";\nimport { RenderMemory } from \"../../render/RenderMemory\";\nimport { RenderSystem, RenderTerrainGeometry, TerrainTexture } from \"../../render/RenderSystem\";\nimport { ViewingSpace } from \"../../ViewingSpace\";\nimport {\n ImageryMapTile, MapCartoRectangle, MapTileLoader, MapTileTree, QuadId, RealityTile, RealityTileParams, Tile, TileContent, TileDrawArgs, TileGraphicType,\n TileLoadStatus, TileTreeLoadStatus, TraversalSelectionContext,\n} from \"../internal\";\n\n/** @internal */\nexport class PlanarTilePatch {\n constructor(public corners: Point3d[], public normal: Vector3d, private _chordHeight: number) {\n }\n\n public getRangeCorners(heightRange: Range1d, result: Point3d[]): Point3d[] {\n let index = 0;\n for (const corner of this.corners)\n corner.plusScaled(this.normal, heightRange.low - this._chordHeight, result[index++]);\n\n for (const corner of this.corners)\n corner.plusScaled(this.normal, heightRange.high + this._chordHeight, result[index++]);\n\n return result;\n }\n public getClipShape(): Point3d[] {\n return [this.corners[0], this.corners[1], this.corners[3], this.corners[2]];\n }\n}\n\n/** @internal */\nexport type TilePatch = PlanarTilePatch | EllipsoidPatch;\n\n/** Projects points within the rectangular region of a [[MapTile]] into 3d space.\n * @see [[MapTile.getProjection]] to obtain the projection for a [[MapTile]].\n * @public\n */\nexport abstract class MapTileProjection {\n /** The extents of the volume of space associated with the projected [[MapTile]]. */\n public abstract get localRange(): Range3d;\n /** @alpha */\n public abstract get transformFromLocal(): Transform;\n\n /** Given parametric coordinates in [0, 1] within the tile's rectangular region, and an elevation above the Earth,\n * compute the 3d position in space.\n */\n public abstract getPoint(u: number, v: number, height: number, result?: Point3d): Point3d;\n\n /** @alpha */\n public get ellipsoidPatch(): EllipsoidPatch | undefined { return undefined; }\n\n /** @alpha */\n public getGlobalPoint(u: number, v: number, z: number, result?: Point3d): Point3d {\n const point = this.getPoint(u, v, z, result);\n return this.transformFromLocal.multiplyPoint3d(point, point);\n }\n}\n\n/** @alpha */\nclass EllipsoidProjection extends MapTileProjection {\n public transformFromLocal = Transform.createIdentity();\n public localRange: Range3d;\n constructor(private _patch: EllipsoidPatch, heightRange?: Range1d) {\n super();\n this.localRange = _patch.range();\n this.localRange.expandInPlace(heightRange ? (heightRange.high - heightRange.low) : 0);\n }\n private static _scratchAngles = LongitudeLatitudeNumber.createZero();\n private static _scratchRay = Ray3d.createZero();\n public getPoint(u: number, v: number, height: number, result?: Point3d): Point3d {\n const angles = this._patch.uvFractionToAngles(u, v, height, EllipsoidProjection._scratchAngles);\n const ray = this._patch.anglesToUnitNormalRay(angles, EllipsoidProjection._scratchRay);\n return Point3d.createFrom(ray!.origin, result);\n }\n public override get ellipsoidPatch() { return this._patch; }\n}\n\n/** @alpha */\nclass PlanarProjection extends MapTileProjection {\n private _bilinearPatch: BilinearPatch;\n public transformFromLocal: Transform;\n public localRange: Range3d;\n constructor(patch: PlanarTilePatch, heightRange?: Range1d) {\n super();\n this.transformFromLocal = Transform.createOriginAndMatrix(patch.corners[0], Matrix3d.createRigidHeadsUp(patch.normal, AxisOrder.ZYX));\n const planeCorners = this.transformFromLocal.multiplyInversePoint3dArray([patch.corners[0], patch.corners[1], patch.corners[2], patch.corners[3]])!;\n this.localRange = Range3d.createArray(planeCorners);\n this.localRange.low.z += heightRange ? heightRange.low : 0;\n this.localRange.high.z += heightRange ? heightRange.high : 0;\n this._bilinearPatch = new BilinearPatch(planeCorners[0], planeCorners[1], planeCorners[2], planeCorners[3]);\n }\n public getPoint(u: number, v: number, z: number, result?: Point3d): Point3d {\n result = this._bilinearPatch.uvFractionToPoint(u, v, result);\n result.z += z;\n return result;\n }\n}\n\n/** @internal */\nexport interface TerrainTileContent extends TileContent {\n terrain?: {\n renderGeometry?: RenderTerrainGeometry;\n /** Used on leaves to support up-sampling. */\n mesh?: RealityMeshParams;\n };\n}\n\nconst scratchNormal = Vector3d.create();\nconst scratchViewZ = Vector3d.create();\nconst scratchPoint = Point3d.create();\nconst scratchClipPlanes = [ClipPlane.createNormalAndPoint(scratchNormal, scratchPoint), ClipPlane.createNormalAndPoint(scratchNormal, scratchPoint), ClipPlane.createNormalAndPoint(scratchNormal, scratchPoint), ClipPlane.createNormalAndPoint(scratchNormal, scratchPoint)];\nconst scratchCorners = [Point3d.createZero(), Point3d.createZero(), Point3d.createZero(), Point3d.createZero(), Point3d.createZero(), Point3d.createZero(), Point3d.createZero(), Point3d.createZero()];\n\n/** A [[Tile]] belonging to a [[MapTileTree]] representing a rectangular region of a map of the Earth.\n * @public\n */\nexport class MapTile extends RealityTile {\n private static _maxParentHeightDepth = 4;\n private _imageryTiles?: ImageryMapTile[];\n private _hiddenTiles?: ImageryMapTile[];\n private _highResolutionReplacementTiles?: ImageryMapTile[];\n /** @internal */\n public everLoaded = false; // If the tile is only required for availability metadata, load it once and then allow it to be unloaded.\n /** @internal */\n protected _heightRange: Range1d | undefined;\n /** @internal */\n protected _renderGeometry?: RenderTerrainGeometry;\n /** @internal */\n protected _mesh?: RealityMeshParams; // Primitive retained on leaves only for upsampling.\n /** @internal */\n public override get isReady(): boolean {\n return super.isReady && this.baseImageryIsReady;\n }\n\n /** @internal */\n public override get hasGraphics(): boolean {\n return this._renderGeometry !== undefined;\n }\n\n /** @internal */\n public get renderGeometry() { return this._renderGeometry; }\n /** @internal */\n public get mesh() { return this._mesh; }\n /** @internal */\n public get loadableTerrainTile() { return this.loadableTile as MapTile; }\n /** @internal */\n public get isPlanar(): boolean { return this._patch instanceof PlanarTilePatch; }\n /** @internal */\n public get imageryTiles(): ImageryMapTile[] | undefined { return this._imageryTiles; }\n /** List of selected tiles but are currently in hidden state (i.e. scale range visibility)\n * @internal\n */\n public get hiddenImageryTiles(): ImageryMapTile[] | undefined { return this._hiddenTiles; }\n\n /** List of leafs tiles that have been selected as a replacement for missing high resolution tiles.\n * When this list is non-empty this means we are past the maximum LOD available of the tile tree.\n * By using those tiles, you are likely to get a display where tiles looks pixelated..\n * in some cases this is preferred to have no tile at all.\n * @internal\n */\n public get highResolutionReplacementTiles(): ImageryMapTile[] | undefined { return this._highResolutionReplacementTiles; }\n\n /** The [[MapTileTree]] to which this tile belongs. */\n public readonly mapTree: MapTileTree;\n /** Uniquely identifies this tile within its [[mapTree]]. */\n public readonly quadId: QuadId;\n private _patch: TilePatch;\n /** The area of the surface of the Earth that this tile represents. */\n public readonly rectangle: MapCartoRectangle;\n /** @internal */\n protected _cornerRays?: Ray3d[];\n\n /** @internal */\n constructor(params: RealityTileParams, mapTree: MapTileTree, quadId: QuadId, patch: TilePatch, rectangle: MapCartoRectangle, heightRange: Range1d | undefined, cornerRays: Ray3d[] | undefined) {\n super(params, mapTree);\n this.mapTree = mapTree;\n this.quadId = quadId;\n this._patch = patch;\n this.rectangle = rectangle;\n this._cornerRays = cornerRays;\n this._heightRange = heightRange?.clone();\n }\n\n /** @internal */\n public getRangeCorners(result: Point3d[]): Point3d[] {\n return this._patch instanceof PlanarTilePatch ? this._patch.getRangeCorners(this.heightRange!, result) : this.range.corners(result);\n }\n\n /** @internal */\n public override getSizeProjectionCorners(): Point3d[] | undefined {\n // Use only the first 4 corners -- On terrain tiles the height is initially exagerated to world height range which can cause excessive tile loading.\n const rangeCorners = this.getRangeCorners(scratchCorners);\n return rangeCorners.slice(0, 4);\n }\n\n /** @internal */\n public override markUsed(args: TileDrawArgs) {\n super.markUsed(args);\n if (this._imageryTiles)\n for (const imageryTile of this._imageryTiles)\n imageryTile.markUsed(args);\n }\n\n /** @internal */\n public override get graphicType() {\n if (this.mapTree.isOverlay)\n return TileGraphicType.Overlay;\n\n return (this.mapTree.useDepthBuffer || this._forceDepthBuffer) ? TileGraphicType.Scene : TileGraphicType.BackgroundMap;\n }\n\n /** @internal */\n public get mapLoader() { return this.realityRoot.loader as MapTileLoader; }\n /** @internal */\n public get isUpsampled() { return false; }\n\n /** @internal */\n public tileFromQuadId(quadId: QuadId): MapTile | undefined {\n if (0 === quadId.compare(this.quadId))\n return this;\n\n assert(quadId.level > this.quadId.level);\n if (quadId.level <= this.quadId.level)\n return undefined;\n\n if (this.children) {\n const shift = quadId.level - this.quadId.level - 1;\n const childRow = quadId.row >> shift;\n const childColumn = quadId.column >> shift;\n for (const child of this.children) {\n const mapChild = child as MapTile;\n const childQuadId = mapChild.quadId;\n if (childQuadId.row === childRow && childQuadId.column === childColumn)\n return mapChild.tileFromQuadId(quadId);\n }\n }\n\n return undefined;\n }\n\n private get _forceDepthBuffer() {\n // For large ellipsoidal globe tile force the depth buffer on to avoid anomalies at horizon.\n return this.mapTree.globeMode === GlobeMode.Ellipsoid && this.depth < 8;\n }\n\n /** @internal */\n public override addBoundingGraphic(builder: GraphicBuilder, color: ColorDef) {\n if (!this.isDisplayable)\n return;\n\n const heightRange = (this.heightRange === undefined) ? Range1d.createXX(-1, 1) : this.heightRange;\n const lows = [], highs = [], reorder = [0, 1, 3, 2, 0];\n const cornerRays = this._cornerRays!;\n if (this._patch instanceof PlanarTilePatch) {\n const normal = this._patch.normal;\n for (let i = 0; i < 5; i++) {\n const corner = this._patch.corners[reorder[i]];\n lows.push(corner.plusScaled(normal, heightRange.low));\n highs.push(corner.plusScaled(normal, heightRange.high));\n }\n } else {\n for (let i = 0; i < 5; i++) {\n const cornerRay = cornerRays[reorder[i]];\n lows.push(cornerRay.origin.plusScaled(cornerRay.direction, heightRange.low));\n highs.push(cornerRay.origin.plusScaled(cornerRay.direction, heightRange.high));\n }\n }\n\n builder.setSymbology(color, color, 1);\n builder.addLineString(lows);\n builder.addLineString(highs);\n for (let i = 0; i < 4; i++)\n builder.addLineString([lows[i], highs[i]]);\n\n const inColor = ColorDef.create(ColorByName.cornflowerBlue);\n const outColor = ColorDef.create(ColorByName.chartreuse);\n const transitionColor = ColorDef.create(ColorByName.aquamarine);\n\n const inPoints = [], outPoints = [], transitionPoints = [];\n\n for (const point of highs)\n if (this.mapTree.cartesianRange.containsPoint(point))\n inPoints.push(point);\n else if (this.mapTree.cartesianRange.distanceToPoint(point) < this.mapTree.cartesianTransitionDistance)\n transitionPoints.push(point);\n else\n outPoints.push(point);\n\n builder.setSymbology(inColor, inColor, 15);\n builder.addPointString(inPoints);\n builder.setSymbology(outColor, outColor, 15);\n builder.addPointString(outPoints);\n builder.setSymbology(transitionColor, transitionColor, 31);\n builder.addPointString(transitionPoints);\n }\n\n /** @internal */\n public override getContentClip(): ClipVector | undefined {\n const points = this.getClipShape();\n if (points.length < 3)\n return undefined;\n if (this.mapTree.globeMode === GlobeMode.Ellipsoid) {\n const normal = PolygonOps.areaNormal(points);\n const globeOrigin = this.mapTree.globeOrigin;\n const globeNormal = Vector3d.createStartEnd(globeOrigin, points[0]);\n const negate = normal.dotProduct(globeNormal) < 0;\n const clipPlanes = [];\n for (let i = 0; i < 4; i++) {\n const point = points[i];\n const clipNormal = globeOrigin.crossProductToPoints(point, points[(i + 1) % 4], scratchNormal);\n if (negate)\n clipNormal.negate(clipNormal);\n\n const clipPlane = ClipPlane.createNormalAndPoint(clipNormal, point, false, false, scratchClipPlanes[i]);\n if (clipPlane !== undefined) // Undefined at pole tiles...\n clipPlanes.push(clipPlane);\n }\n\n const planeSet = ConvexClipPlaneSet.createPlanes(clipPlanes);\n const clipPrimitive = ClipPrimitive.createCapture(planeSet);\n\n return ClipVector.createCapture([clipPrimitive]);\n } else {\n return ClipVector.createCapture([ClipShape.createShape(points)!]);\n }\n }\n\n /** @internal */\n public override setNotFound(): void {\n super.setNotFound();\n\n // For map tiles assume that an unfound tile implies descendants and siblings will also be unfound.\n if (undefined !== this.parent)\n this.parent.setLeaf();\n }\n\n /** @internal */\n public getGraphic(_system: RenderSystem, _texture: RenderTexture): RenderGraphic | undefined {\n return undefined;\n }\n\n /** For globe tiles displaying less then depth 2 appears distorted\n * @internal\n */\n public override get isDisplayable() {\n return this.mapTree.globeMode === GlobeMode.Ellipsoid ? (this.depth >= MapTileTree.minDisplayableDepth) : super.isDisplayable;\n }\n\n /** @internal */\n public override isOccluded(viewingSpace: ViewingSpace): boolean {\n if (undefined === this._cornerRays || this.mapTree.globeMode !== GlobeMode.Ellipsoid)\n return false;\n\n if (viewingSpace.eyePoint !== undefined) {\n if (!this.mapTree.pointAboveEllipsoid(viewingSpace.eyePoint))\n return false;\n\n for (const cornerNormal of this._cornerRays) {\n const eyeNormal = Vector3d.createStartEnd(viewingSpace.eyePoint, cornerNormal.origin, scratchNormal);\n eyeNormal.normalizeInPlace();\n if (eyeNormal.dotProduct(cornerNormal.direction) < .01)\n return false;\n }\n } else {\n const viewZ = viewingSpace.rotation.getRow(2, scratchViewZ);\n for (const cornerNormal of this._cornerRays)\n if (cornerNormal.direction.dotProduct(viewZ) > 0)\n return false;\n }\n\n return true;\n }\n\n /** @internal */\n protected override _loadChildren(resolve: (children: Tile[] | undefined) => void, _reject: (error: Error) => void): void {\n const mapTree = this.mapTree;\n const childLevel = this.quadId.level + 1;\n const rowCount = mapTree.sourceTilingScheme.getNumberOfYChildrenAtLevel(childLevel);\n const columnCount = mapTree.sourceTilingScheme.getNumberOfXChildrenAtLevel(childLevel);\n\n const resolveChildren = (children: Tile[]) => {\n const childrenRange = Range3d.createNull();\n for (const child of children)\n childrenRange.extendRange(child.range);\n\n if (!this.range.containsRange(childrenRange))\n this.range.extendRange(childrenRange);\n\n resolve(children);\n };\n\n if (mapTree.doCreateGlobeChildren(this)) {\n this.createGlobeChildren(columnCount, rowCount, resolveChildren);\n return;\n }\n\n const resolvePlanarChildren = (childCorners: Point3d[][]) => {\n const level = this.quadId.level + 1;\n const column = this.quadId.column * 2;\n const row = this.quadId.row * 2;\n const children = [];\n const childrenAreLeaves = (this.depth + 1) === mapTree.loader.maxDepth;\n const globeMode = this.mapTree.globeMode;\n for (let j = 0; j < rowCount; j++) {\n for (let i = 0; i < columnCount; i++) {\n const quadId = new QuadId(level, column + i, row + j);\n const corners = childCorners[j * columnCount + i];\n const rectangle = mapTree.getTileRectangle(quadId);\n const normal = PolygonOps.areaNormal([corners[0], corners[1], corners[3], corners[2]]);\n normal.normalizeInPlace();\n\n const heightRange = this.mapTree.getChildHeightRange(quadId, rectangle, this);\n const diagonal = Math.max(corners[0].distance(corners[3]), corners[1].distance(corners[2])) / 2.0;\n const chordHeight = globeMode === GlobeMode.Ellipsoid ? Math.sqrt(diagonal * diagonal + Constant.earthRadiusWGS84.equator * Constant.earthRadiusWGS84.equator) - Constant.earthRadiusWGS84.equator : 0.0;\n const rangeCorners = MapTile.computeRangeCorners(corners, normal, chordHeight, undefined, heightRange);\n const range = Range3d.createArray(rangeCorners);\n const child = this.mapTree.createPlanarChild({ contentId: quadId.contentId, maximumSize: 512, range, parent: this, isLeaf: childrenAreLeaves }, quadId, corners, normal, rectangle, chordHeight, heightRange);\n if (child)\n children.push(child);\n }\n }\n\n resolveChildren(children);\n };\n\n mapTree.getPlanarChildCorners(this, columnCount, rowCount, resolvePlanarChildren);\n }\n\n private createGlobeChildren(columnCount: number, rowCount: number, resolve: (children: MapTile[]) => void) {\n const level = this.quadId.level + 1;\n const column = this.quadId.column * 2;\n const row = this.quadId.row * 2;\n const mapTree = this.mapTree;\n const children = [];\n\n for (let j = 0; j < rowCount; j++) {\n for (let i = 0; i < columnCount; i++) {\n const quadId = new QuadId(level, column + i, row + j);\n const angleSweep = quadId.getAngleSweep(mapTree.sourceTilingScheme);\n const ellipsoidPatch = EllipsoidPatch.createCapture(this.mapTree.earthEllipsoid, angleSweep.longitude, angleSweep.latitude);\n const range = ellipsoidPatch.range();\n const rectangle = mapTree.getTileRectangle(quadId);\n const heightRange = this.mapTree.getChildHeightRange(quadId, rectangle, this);\n if (undefined !== heightRange)\n range.expandInPlace(heightRange.high - heightRange.low);\n\n children.push(this.mapTree.createGlobeChild({ contentId: quadId.contentId, maximumSize: 512, range, parent: this, isLeaf: false }, quadId, range.corners(), rectangle, ellipsoidPatch, heightRange));\n }\n }\n\n resolve(children);\n return children;\n }\n\n /** @internal */\n public static computeRangeCorners(corners: Point3d[], normal: Vector3d, chordHeight: number, result?: Point3d[], heightRange?: Range1d) {\n if (result === undefined) {\n result = [];\n for (let i = 0; i < 8; i++)\n result.push(Point3d.create());\n }\n\n let index = 0;\n assert(corners.length === 4);\n const deltaLow = normal.scale(- chordHeight + (heightRange ? heightRange.low : 0));\n const deltaHigh = normal.scale(chordHeight + (heightRange ? heightRange.high : 0));\n\n for (const corner of corners)\n corner.plus(deltaLow, result[index++]);\n\n for (const corner of corners)\n corner.plus(deltaHigh, result[index++]);\n\n return result;\n }\n\n /** @internal */\n public override isRegionCulled(args: TileDrawArgs): boolean {\n return this.isContentCulled(args);\n }\n\n /** @internal */\n public override isContentCulled(args: TileDrawArgs): boolean {\n return FrustumPlanes.Containment.Outside === args.frustumPlanes.computeContainment(this.getRangeCorners(scratchCorners));\n }\n\n /** @internal */\n public clearLayers() {\n this.clearImageryTiles();\n this._graphic = undefined;\n if (this.children)\n for (const child of this.children)\n (child as MapTile).clearLayers();\n }\n\n private clearImageryTiles() {\n if (this._imageryTiles) {\n this._imageryTiles.forEach((tile) => tile.releaseMapTileUsage());\n this._imageryTiles = undefined;\n }\n if (this._hiddenTiles) {\n this._hiddenTiles = undefined;\n }\n if (this._highResolutionReplacementTiles) {\n this._highResolutionReplacementTiles = undefined;\n }\n }\n\n /** @internal */\n public override produceGraphics(): RenderGraphic | undefined {\n if (undefined !== this._graphic && this.imageryIsReady)\n return this._graphic;\n\n const geometry = this.renderGeometry;\n if (undefined === geometry)\n return undefined;\n\n const textures = this.getDrapeTextures();\n const { baseColor, baseTransparent, layerClassifiers } = this.mapTree;\n const graphic = IModelApp.renderSystem.createRealityMeshGraphic({ realityMesh: geometry, projection: this.getProjection(), tileRectangle: this.rectangle, featureTable: PackedFeatureTable.pack(this.mapLoader.featureTable), tileId: this.contentId, baseColor, baseTransparent, textures, layerClassifiers, disableClipStyle: true }, true);\n\n // If there are no layer classifiers then we can save this graphic for re-use. If layer classifiers exist they are regenerated based on view and we must collate them with the imagery.\n if (this.imageryIsReady && 0 === this.mapTree.layerClassifiers.size)\n this._graphic = graphic;\n\n return graphic;\n }\n\n /** @internal */\n public getClipShape(): Point3d[] {\n return (this._patch instanceof PlanarTilePatch) ? this._patch.getClipShape() : [this._cornerRays![0].origin, this._cornerRays![1].origin, this._cornerRays![3].origin, this._cornerRays![2].origin];\n }\n\n /** @internal */\n protected override _collectStatistics(stats: RenderMemory.Statistics): void {\n super._collectStatistics(stats);\n\n this._renderGeometry?.collectStatistics(stats);\n if (this._mesh) {\n stats.addTerrain(this._mesh.indices.byteLength\n + this._mesh.positions.points.byteLength\n + this._mesh.uvs.points.byteLength\n + (this._mesh.normals ? this._mesh.normals.byteLength : 0),\n );\n }\n }\n\n /** Height range is along with the tile corners to detect if tile intersects view frustum.\n * Range will be single value fo ron-terrain tiles -- if terrain tile is not loaded it will\n * inherit height from ancestors.\n * @internal\n */\n public get heightRange(): Range1d | undefined {\n if (undefined !== this._heightRange)\n return this._heightRange;\n\n for (let parent = this.parent; undefined !== parent; parent = parent.parent) {\n const mapParent = parent as MapTile;\n if (undefined !== mapParent._heightRange)\n return mapParent._heightRange;\n }\n\n assert(false);\n return Range1d.createNull();\n }\n\n /** @internal */\n public get mapTilingScheme() {\n return this.mapTree.sourceTilingScheme;\n }\n\n /** Adjust the minimum and maximum elevations of the terrain within this tile. */\n public adjustHeights(minHeight: number, maxHeight: number) {\n if (undefined === this._heightRange)\n this._heightRange = Range1d.createXX(minHeight, maxHeight);\n else {\n this._heightRange.low = Math.max(this.heightRange!.low, minHeight);\n this._heightRange.high = Math.min(this.heightRange!.high, maxHeight);\n }\n\n if (this.rangeCorners && this._patch instanceof PlanarTilePatch)\n this._patch.getRangeCorners(this.heightRange!, this.rangeCorners);\n }\n\n /** Obtain a [[MapTileProjection]] to project positions within this tile's area into 3d space. */\n public getProjection(heightRange?: Range1d): MapTileProjection {\n return this._patch instanceof PlanarTilePatch ? new PlanarProjection(this._patch, heightRange) : new EllipsoidProjection(this._patch, heightRange);\n }\n\n /** @internal */\n public get baseImageryIsReady(): boolean {\n if (undefined !== this.mapTree.baseColor || 0 === this.mapTree.layerImageryTrees.length)\n return true;\n\n if (undefined === this._imageryTiles)\n return false;\n\n const baseTreeId = this.mapTree.layerImageryTrees[0].tree.modelId;\n return this._imageryTiles.every((imageryTile) => imageryTile.imageryTree.modelId !== baseTreeId || imageryTile.isReady);\n }\n\n /** @internal */\n public get imageryIsReady(): boolean {\n if (undefined === this._imageryTiles)\n return 0 === this.mapTree.layerImageryTrees.length;\n\n return this._imageryTiles.every((tile) => tile.isReady);\n }\n\n /** Select secondary (imagery) tiles\n * @internal\n */\n public override selectSecondaryTiles(args: TileDrawArgs, context: TraversalSelectionContext) {\n if (0 === this.mapTree.layerImageryTrees.length || this.imageryIsReady)\n return;\n\n this.clearImageryTiles();\n this._imageryTiles = new Array<ImageryMapTile>();\n this._hiddenTiles = new Array<ImageryMapTile>();\n this._highResolutionReplacementTiles = new Array<ImageryMapTile>();\n for (const layerImageryTree of this.mapTree.layerImageryTrees) {\n let tmpTiles = new Array<ImageryMapTile>();\n const tmpLeafTiles = new Array<ImageryMapTile>();\n if (TileTreeLoadStatus.Loaded !== layerImageryTree.tree.selectCartoDrapeTiles(tmpTiles, tmpLeafTiles, this, args)) {\n this._imageryTiles = undefined;\n return;\n }\n\n // When the base layer is zoomed-in beyond it's max resolution,\n // we display leaf tiles and stretched them if needed.\n // We don't want the same behavior non-base layers, in the case,\n // the layer will simply disappear past its max resolution.\n // Note: Replacement leaf tiles are kept as a mean to determine which\n // imagery tree has reached it's maximum zoom level.\n if (layerImageryTree.baseImageryLayer) {\n tmpTiles = [...tmpTiles, ...tmpLeafTiles];\n } else {\n this._highResolutionReplacementTiles = [...this._highResolutionReplacementTiles, ...tmpLeafTiles];\n }\n\n // MapTileTree might include a non-visible imagery tree, we need to check for that.\n if (layerImageryTree.settings.visible && !layerImageryTree.settings.allSubLayersInvisible) {\n for (const imageryTile of tmpTiles) {\n imageryTile.markMapTileUsage();\n if (imageryTile.isReady)\n args.markReady(imageryTile);\n else\n context.missing.push(imageryTile);\n this._imageryTiles.push(imageryTile);\n }\n } else {\n // Even though those selected imagery tile are not visible,\n // we keep track of them for scale range reporting.\n for (const imageryTile of tmpTiles) {\n this._hiddenTiles.push(imageryTile);\n }\n }\n }\n }\n\n private static _scratchRectangle1 = MapCartoRectangle.createZero();\n private static _scratchRectangle2 = MapCartoRectangle.createZero();\n\n /** The height range for terrain tiles is not known until the tiles are unloaded. We use \"ApproximateTerrainHeight\" for first 6 levels but below\n * that the tiles inherit height range from parents. This is problematic as tiles with large height range will be unnecessarily selected as\n * they apparently intersect view frustum. To avoid this force loading of terrain tiles if they exceed \"_maxParentHightDepth\".\n * @internal\n */\n protected override forceSelectRealityTile(): boolean {\n let parentHeightDepth = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n for (let parent: MapTile = this; parent !== undefined && parent._heightRange === undefined; parent = parent.parent as MapTile)\n parentHeightDepth++;\n\n return parentHeightDepth > MapTile._maxParentHeightDepth;\n }\n\n /** @internal */\n protected override minimumVisibleFactor(): number {\n // if minimumVisibleFactor is more than 0, it stops parents from loading when children are not ready, to fill in gaps\n return 0.0;\n }\n\n private static _scratchThisDiagonal = Vector2d.create();\n private static _scratchDrapeDiagonal = Vector2d.create();\n\n /** @internal */\n public getDrapeTextures(): TerrainTexture[] | undefined {\n if (undefined === this._imageryTiles)\n return undefined;\n\n const drapeTextures: TerrainTexture[] = [];\n const thisRectangle = this.loadableTerrainTile.rectangle;\n const thisDiagonal = thisRectangle.diagonal(MapTile._scratchThisDiagonal);\n const bordersNorthPole = this.quadId.bordersNorthPole(this.mapTree.sourceTilingScheme);\n const bordersSouthPole = this.quadId.bordersSouthPole(this.mapTree.sourceTilingScheme);\n for (const imageryTile of this._imageryTiles) {\n if (imageryTile.texture) {\n drapeTextures.push(this.computeDrapeTexture(thisRectangle, thisDiagonal, imageryTile, imageryTile.rectangle));\n\n if ((bordersNorthPole && imageryTile.quadId.bordersNorthPole(imageryTile.tilingScheme) && imageryTile.rectangle.high.y < thisRectangle.high.y) ||\n (bordersSouthPole && imageryTile.quadId.bordersSouthPole(imageryTile.tilingScheme) && imageryTile.rectangle.low.y > thisRectangle.low.y)) {\n // Add separate texture stretching last sliver of tile imagery to cover pole.\n const sliverRectangle = imageryTile.rectangle.clone(MapTile._scratchRectangle1);\n const clipRectangle = thisRectangle.clone(MapTile._scratchRectangle2);\n const sliverHeight = sliverRectangle.high.y - sliverRectangle.low.y;\n\n if (bordersSouthPole) {\n clipRectangle.high.y = sliverRectangle.low.y;\n sliverRectangle.low.y = thisRectangle.low.y;\n sliverRectangle.high.y += 1 / sliverHeight;\n } else {\n clipRectangle.low.y = sliverRectangle.high.y;\n sliverRectangle.high.y = thisRectangle.high.y;\n sliverRectangle.low.y -= 1 / sliverHeight;\n }\n\n drapeTextures.push(this.computeDrapeTexture(thisRectangle, thisDiagonal, imageryTile, sliverRectangle, clipRectangle));\n }\n } else {\n for (let parent = imageryTile.parent; undefined !== parent; parent = parent.parent) {\n const mapTile = parent as ImageryMapTile;\n if (mapTile.texture) {\n drapeTextures.push(this.computeDrapeTexture(thisRectangle, thisDiagonal, mapTile, mapTile.rectangle, imageryTile.rectangle));\n break;\n }\n }\n }\n }\n\n return drapeTextures.length > 0 ? drapeTextures : undefined;\n }\n\n private static _scratchIntersectRange = Range2d.createNull();\n\n private computeDrapeTexture(thisRectangle: Range2d, thisDiagonal: Vector2d, imageryTile: ImageryMapTile, drapeRectangle: Range2d, clipRectangle?: Range2d): TerrainTexture {\n assert(imageryTile.texture !== undefined);\n\n // Compute transformation from the terrain tile texture coordinates (0-1) to the drape tile texture coordinates.\n const drapeDiagonal = drapeRectangle.diagonal(MapTile._scratchDrapeDiagonal);\n const translate = Vector2d.create((thisRectangle.low.x - drapeRectangle.low.x) / drapeDiagonal.x, (thisRectangle.low.y - drapeRectangle.low.y) / drapeDiagonal.y);\n const scale = Vector2d.create(thisDiagonal.x / drapeDiagonal.x, thisDiagonal.y / drapeDiagonal.y);\n const featureIndex = this.mapLoader.getFeatureIndex(imageryTile.imageryTree.modelId);\n let clipRect;\n if (undefined !== clipRectangle) {\n const intersect = clipRectangle.intersect(drapeRectangle, MapTile._scratchIntersectRange);\n assert(!intersect.isNull);\n clipRect = Range2d.createXYXY((intersect.low.x - drapeRectangle.low.x) / drapeDiagonal.x, (intersect.low.y - drapeRectangle.low.y) / drapeDiagonal.y, (intersect.high.x - drapeRectangle.low.x) / drapeDiagonal.x, (intersect.high.y - drapeRectangle.low.y) / drapeDiagonal.y);\n }\n\n const imageryModelId = imageryTile.tree.modelId;\n return new TerrainTexture(imageryTile.texture, featureIndex, scale, translate, drapeRectangle, this.mapTree.getLayerIndex(imageryModelId), this.mapTree.getLayerTransparency(imageryModelId), clipRect);\n }\n\n /** @internal */\n public override setContent(content: TerrainTileContent): void {\n\n if (this.quadId.level < this.maxDepth) {\n const childIds = this.quadId.getChildIds();\n for (const childId of childIds) {\n if (!this.mapLoader.isTileAvailable(childId)) {\n this._mesh = content.terrain?.mesh; // If a child is unavailable retain mesh for upsampling.\n break;\n }\n }\n }\n\n if (this.mapTree.produceGeometry) {\n const iModelTransform = this.mapTree.iModelTransform;\n const geometryTransform = content.terrain?.renderGeometry?.transform;\n const transform = geometryTransform ? iModelTransform.multiplyTransformTransform(geometryTransform) : iModelTransform;\n const polyface = content.terrain?.mesh ? RealityMeshParams.toPolyface(content.terrain.mesh, { transform }) : undefined;\n this._geometry = polyface ? { polyfaces: [polyface] } : undefined;\n\n } else {\n dispose(this._renderGeometry);\n this._renderGeometry = content.terrain?.renderGeometry;\n }\n\n this.everLoaded = true;\n\n if (undefined !== content.contentRange)\n this._contentRange = content.contentRange;\n\n this.setIsReady();\n }\n\n /** @internal */\n public override freeMemory(): void {\n // ###TODO MapTiles and ImageryMapTiles share resources and don't currently interact well with TileAdmin.freeMemory(). Opt out for now.\n }\n\n /** @internal */\n public override disposeContents() {\n super.disposeContents();\n this._renderGeometry = dispose(this._renderGeometry);\n this.clearImageryTiles();\n // Note - don't dispose of mesh - these should only ever exist on terrain leaf tile and are required by children. Let garbage collector handle them.\n }\n}\n\n/** A child tile that has no content of its own available. It instead produces content by up-sampling the content of an ancestor tile.\n * @internal\n */\nexport class UpsampledMapTile extends MapTile {\n /** The ancestor tile whose content will be up-sampled. */\n private readonly _loadableTile: MapTile;\n\n constructor(params: RealityTileParams, mapTree: MapTileTree, quadId: QuadId, patch: TilePatch, rectangle: MapCartoRectangle, heightRange: Range1d | undefined, cornerRays: Ray3d[] | undefined, loadableTile: MapTile) {\n super(params, mapTree, quadId, patch, rectangle, heightRange, cornerRays);\n this._loadableTile = loadableTile;\n }\n\n public override get isUpsampled() { return true; }\n public override get isEmpty() { return false; }\n public override get loadableTile(): RealityTile { return this._loadableTile; }\n\n private upsampleFromParent() {\n const parent = this.loadableTerrainTile;\n const parentMesh = parent.mesh;\n if (undefined === parentMesh) {\n return undefined;\n }\n const thisId = this.quadId, parentId = parent.quadId;\n const levelDelta = thisId.level - parentId.level;\n const thisColumn = thisId.column - (parentId.column << levelDelta);\n const thisRow = thisId.row - (parentId.row << levelDelta);\n const scale = 1.0 / (1 << levelDelta);\n const parentParameterRange = Range2d.createXYXY(scale * thisColumn, scale * thisRow, scale * (thisColumn + 1), scale * (thisRow + 1));\n const upsample = upsampleRealityMeshParams(parentMesh, parentParameterRange);\n this.adjustHeights(upsample.heightRange.low, upsample.heightRange.high);\n return upsample;\n }\n\n public override get renderGeometry() {\n if (undefined === this._renderGeometry) {\n const upsample = this.upsampleFromParent();\n const projection = this.loadableTerrainTile.getProjection(this.heightRange);\n if (upsample)\n this._renderGeometry = IModelApp.renderSystem.createTerrainMesh(upsample.mesh, projection.transformFromLocal, true);\n }\n return this._renderGeometry;\n }\n\n public override get isLoading(): boolean { return this.loadableTile.isLoading; }\n public override get isQueued(): boolean { return this.loadableTile.isQueued; }\n public override get isNotFound(): boolean { return this.loadableTile.isNotFound; }\n public override get isReady(): boolean { return (this._renderGeometry !== undefined || this.loadableTile.loadStatus === TileLoadStatus.Ready) && this.baseImageryIsReady; }\n\n public override markUsed(args: TileDrawArgs): void {\n args.markUsed(this);\n args.markUsed(this.loadableTile);\n }\n}\n"]}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Utils
|
|
3
|
+
*/
|
|
4
|
+
import { MaybePromise } from "@itwin/core-bentley";
|
|
1
5
|
/** Given an interface T that defines the operations provided by a worker, produce an interface that can be used to asynchronously invoke those operations
|
|
2
6
|
* from the main thread, optionally passing an array of values to be transferred from the main thread to the worker.
|
|
3
7
|
* - Every return type is converted to a `Promise` (i.e., every function becomes `async`)>.
|
|
@@ -12,14 +16,14 @@ export type WorkerInterface<T> = {
|
|
|
12
16
|
[P in keyof T]: T[P] extends () => any ? () => Promise<ReturnType<T[P]>> : (T[P] extends (arg: any) => any ? (arg: Parameters<T[P]>[0], transfer?: Transferable[]) => Promise<ReturnType<T[P]>> : (T[P] extends (...args: any) => any ? (args: Parameters<T[P]>, transfer?: Transferable[]) => Promise<ReturnType<T[P]>> : never));
|
|
13
17
|
};
|
|
14
18
|
/** Augments each method of `T` with the ability to specify values to be transferred from the worker thread to the main thread.
|
|
15
|
-
* Each return type `R` is replaced with `R | { result: R; transfer: Transferable[]; }
|
|
19
|
+
* Each return type `R` is replaced with `R | { result: R; transfer: Transferable[]; }`, or a promise that resolves to such a type.
|
|
16
20
|
* @see [[WorkerImplementation]].
|
|
17
21
|
* @beta
|
|
18
22
|
*/
|
|
19
|
-
export type WorkerReturnType<T extends (...args: any) => any> = ReturnType<T> | {
|
|
20
|
-
result: ReturnType<T
|
|
23
|
+
export type WorkerReturnType<T extends (...args: any) => any> = MaybePromise<ReturnType<T> | {
|
|
24
|
+
result: Awaited<ReturnType<T>>;
|
|
21
25
|
transfer: Transferable[];
|
|
22
|
-
}
|
|
26
|
+
}>;
|
|
23
27
|
/** Given an interface T that defines the operations provided by a worker, produce an interface to which the implementation of those operations must conform.
|
|
24
28
|
* The return type of each function is enhanced to permit supplying a list of values to be transferred from the worker to the main thread.
|
|
25
29
|
* Multi-argument functions are converted to functions accepting a single tuple of arguments.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkerProxy.d.ts","sourceRoot":"","sources":["../../../src/common/WorkerProxy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkerProxy.d.ts","sourceRoot":"","sources":["../../../src/common/WorkerProxy.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAU,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAyB3D;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;KA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EAAE,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACpF,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAClG;CACJ,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,GAAG;IAChD,4BAA4B;IAC5B,SAAS,IAAI,IAAI,CAAC;IAClB,qDAAqD;IACrD,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CA+CzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkerProxy.js","sourceRoot":"","sources":["../../../src/common/WorkerProxy.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WorkerProxy.js","sourceRoot":"","sources":["../../../src/common/WorkerProxy.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAiF3D;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAI,YAAoB;IACvD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAgB,CAAC;IACtC,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,UAAU,GAAG,KAAK,CAAC;IAEvB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AE,CAAC;gBAC9B,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC;gBACpB,UAAU,GAAG,IAAI,CAAC;gBAClB,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YAClC,CAAC;iBAAM,IAAI,SAAS,KAAK,cAAc,EAAE,CAAC;gBACxC,OAAO,UAAU,CAAC;YACpB,CAAC;iBAAM,CAAC;gBACN,OAAO,KAAK,EAAE,GAAG,IAAW,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;oBAC/D,MAAM,KAAK,GAAG,EAAE,QAAQ,CAAC;oBACzB,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;oBACtC,MAAM,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC5E,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC","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 Utils\n */\nimport { assert, MaybePromise } from \"@itwin/core-bentley\";\n\n/** Holds callbacks for a Promise produced for a particular call to postMessage. */\ninterface Task {\n reject: (result: any) => void;\n resolve: (error: Error) => void;\n}\n\n/** The successful result of a worker operation, correlated with the id of the caller to resolve with the result. */\ninterface WorkerResult {\n msgId: number;\n result: any;\n error?: never;\n}\n\n/** An error resulting from a worker operation, correlated with the id of the caller to reject with the error. */\ninterface WorkerError {\n msgId: number;\n error: Error;\n result?: never;\n}\n\n/** Response to `postMessage` produced by a worker operation. */\ntype WorkerResponse = WorkerResult | WorkerError;\n\n/** Given an interface T that defines the operations provided by a worker, produce an interface that can be used to asynchronously invoke those operations\n * from the main thread, optionally passing an array of values to be transferred from the main thread to the worker.\n * - Every return type is converted to a `Promise` (i.e., every function becomes `async`)>.\n * - `zeroArgFunc(): R` becomes `async zeroArgFunc(): Promise<R>`.\n * - `oneArgFunc(arg: U): R` becomes `async oneArgFunc(arg: U, transfer?: Transferable[]): Promise<R>`.\n * - `multiArgFunc(arg1: U, arg2: V): R` becomes `async multiArgFunc(args: [U, V], transfer?: Transferable[]): Promise<R>`.\n * @note All parameters of all methods of `T` must support [structured cloning](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm) -\n * attempts to pass functions, instances of classes, DOM nodes, WebGL resources, and other non-cloneable types will compile but fail at run-time.\n * @beta\n */\nexport type WorkerInterface<T> = {\n [P in keyof T]: T[P] extends () => any ? () => Promise<ReturnType<T[P]>> :\n (T[P] extends (arg: any) => any ? (arg: Parameters<T[P]>[0], transfer?: Transferable[]) => Promise<ReturnType<T[P]>> :\n (T[P] extends (...args: any) => any ? (args: Parameters<T[P]>, transfer?: Transferable[]) => Promise<ReturnType<T[P]>> : never)\n )\n};\n\n/** Augments each method of `T` with the ability to specify values to be transferred from the worker thread to the main thread.\n * Each return type `R` is replaced with `R | { result: R; transfer: Transferable[]; }`, or a promise that resolves to such a type.\n * @see [[WorkerImplementation]].\n * @beta\n */\nexport type WorkerReturnType<T extends (...args: any) => any> = MaybePromise<ReturnType<T> | { result: Awaited<ReturnType<T>>, transfer: Transferable[] }>;\n\n/** Given an interface T that defines the operations provided by a worker, produce an interface to which the implementation of those operations must conform.\n * The return type of each function is enhanced to permit supplying a list of values to be transferred from the worker to the main thread.\n * Multi-argument functions are converted to functions accepting a single tuple of arguments.\n * - Every return type `R` is converted to `WorkerReturnType<R>`.\n * - `zeroArgFunc(): R` becomes `zeroArgFunc(): R | { result: R; transfer: Transferable[]; }`.\n * - `oneArgFunc(arg: U): R` becomes `oneArgFunc(arg: U): R | { result: R; transfer: Transferable[]; }`.\n * - `multiArgFunc(arg1: U, arg2: V): R` becomes `multiArgFunc([U, V]): R | { result: R; transfer: Transferable[]; }`.\n * @note All parameters of all methods of `T` must support [structured cloning](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm) -\n * attempts to pass functions, instances of classes, DOM nodes, WebGL resources, and other non-cloneable types will compile but fail at run-time.\n * @beta\n */\nexport type WorkerImplementation<T> = {\n [P in keyof T]: T[P] extends () => any ? () => WorkerReturnType<T[P]> :\n (T[P] extends (arg: any) => any ? (arg: Parameters<T[P]>[0]) => WorkerReturnType<T[P]> :\n (T[P] extends (...args: any) => any ? (args: Parameters<T[P]>) => WorkerReturnType<T[P]> : never)\n )\n};\n\n/** A proxy for a [web worker](https://developer.mozilla.org/en-US/docs/Web/API/Worker) that provides the operations specified by\n * the methods of `T`.\n * To use a worker proxy, define a worker script that provides [[registerWorker]] with an implementation of `T`, and obtain a proxy\n * via [[createWorkerProxy]] on the main thread. The proxy can then be used to asynchronously invoke methods of `T` on the worker.\n * See [this article]($docs/learning/frontend/WorkerProxy.md) for more details and examples.\n * @beta\n */\nexport type WorkerProxy<T> = WorkerInterface<T> & {\n /** Terminate the worker. */\n terminate(): void;\n /** Returns true if [[terminate]] has been called. */\n readonly isTerminated: boolean;\n};\n\n/** Create a [[WorkerProxy]] implementing the methods of `T` using the specified worker script.\n * See [this article]($docs/learning/frontend/WorkerProxy.md) for more details and examples.\n * @beta\n */\nexport function createWorkerProxy<T>(workerJsPath: string): WorkerProxy<T> {\n const tasks = new Map<number, Task>();\n let curMsgId = 0;\n let terminated = false;\n\n let worker: Worker;\n const sameOrigin = workerJsPath.substring(0, globalThis.origin.length) === globalThis.origin;\n if (sameOrigin || !workerJsPath.startsWith(\"http\")) {\n worker = new Worker(workerJsPath);\n } else {\n const workerBlob = new Blob([`importScripts(\"${workerJsPath}\");`]);\n const workerBlobUrl = URL.createObjectURL(workerBlob);\n worker = new Worker(workerBlobUrl);\n }\n\n worker.onmessage = (e: MessageEvent) => {\n const response = e.data as WorkerResponse;\n assert(typeof response === \"object\");\n assert(\"result\" in response || \"error\" in response);\n\n const task = tasks.get(response.msgId);\n if (task) {\n tasks.delete(response.msgId);\n if (response.error)\n task.reject(response.error);\n else\n task.resolve(response.result);\n }\n };\n\n return new Proxy({} as WorkerProxy<T>, {\n get(_target, operation: string) {\n if (operation === \"terminate\") {\n assert(!terminated);\n terminated = true;\n return () => worker.terminate();\n } else if (operation === \"isTerminated\") {\n return terminated;\n } else {\n return async (...args: any[]) => new Promise((resolve, reject) => {\n const msgId = ++curMsgId;\n tasks.set(msgId, { resolve, reject });\n worker.postMessage({ operation, payload: args[0], msgId }, args[1] ?? []);\n });\n }\n },\n });\n}\n"]}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const enum OvrFlags {
|
|
9
9
|
None = 0,
|
|
10
|
-
|
|
10
|
+
LineRgb = 1,
|
|
11
11
|
Rgb = 2,
|
|
12
12
|
Alpha = 4,
|
|
13
13
|
/** ignore material color, specular properties, and texture. */
|
|
14
|
-
|
|
14
|
+
LineAlpha = 8,
|
|
15
15
|
Flashed = 16,
|
|
16
16
|
NonLocatable = 32,
|
|
17
17
|
LineCode = 64,
|
|
@@ -20,6 +20,8 @@ export declare const enum OvrFlags {
|
|
|
20
20
|
Emphasized = 512,
|
|
21
21
|
ViewIndependentTransparency = 1024,
|
|
22
22
|
InvisibleDuringPick = 2048,
|
|
23
|
+
Visibility = 4096,
|
|
24
|
+
IgnoreMaterial = 8192,
|
|
23
25
|
Rgba = 6
|
|
24
26
|
}
|
|
25
27
|
//# sourceMappingURL=OvrFlags.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OvrFlags.d.ts","sourceRoot":"","sources":["../../../../../src/common/internal/render/OvrFlags.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;GAGG;AACH,0BAAkB,QAAQ;IACxB,IAAI,IAAI;IACR,
|
|
1
|
+
{"version":3,"file":"OvrFlags.d.ts","sourceRoot":"","sources":["../../../../../src/common/internal/render/OvrFlags.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;GAGG;AACH,0BAAkB,QAAQ;IACxB,IAAI,IAAI;IACR,OAAO,IAAS;IAChB,GAAG,IAAS;IACZ,KAAK,IAAS;IACd,+DAA+D;IAC/D,SAAS,IAAS;IAClB,OAAO,KAAS;IAEhB,YAAY,KAAS;IACrB,QAAQ,KAAS;IACjB,MAAM,MAAS;IACf,OAAO,MAAS;IAEhB,UAAU,MAAS;IACnB,2BAA2B,OAAU;IAOrC,mBAAmB,OAAU;IAC7B,UAAU,OAAU;IACpB,cAAc,OAAU;IAExB,IAAI,IAAc;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OvrFlags.js","sourceRoot":"","sources":["../../../../../src/common/internal/render/OvrFlags.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 WebGL\n */\n\n/** 16-bit flags indicating what aspects of a feature's symbology are overridden.\n * These are used for FeatureOverrides and InstancedGraphicParams.\n * The flags are interpreted in the vertex shader.\n */\nexport const enum OvrFlags { // eslint-disable-line no-restricted-syntax\n None = 0,\n
|
|
1
|
+
{"version":3,"file":"OvrFlags.js","sourceRoot":"","sources":["../../../../../src/common/internal/render/OvrFlags.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 WebGL\n */\n\n/** 16-bit flags indicating what aspects of a feature's symbology are overridden.\n * These are used for FeatureOverrides and InstancedGraphicParams.\n * The flags are interpreted in the vertex shader.\n */\nexport const enum OvrFlags { // eslint-disable-line no-restricted-syntax\n None = 0,\n LineRgb = 1 << 0,\n Rgb = 1 << 1,\n Alpha = 1 << 2,\n /** ignore material color, specular properties, and texture. */\n LineAlpha = 1 << 3,\n Flashed = 1 << 4,\n /* do not draw during pick - allows geometry beneath to be picked. */\n NonLocatable = 1 << 5,\n LineCode = 1 << 6,\n Weight = 1 << 7,\n Hilited = 1 << 8,\n /* rendered with \"emphasis\" hilite settings (silhouette etc). */\n Emphasized = 1 << 9,\n ViewIndependentTransparency = 1 << 10,\n /* Different from both NonLocatable and Visibility, but with the same effect as NonLocatable - don't draw during pick.\n * It's a separate flag because it is temporarily set during readPixels if a list of elements to hide is supplied, and then reset\n * immediately afterward.\n * We want to be able to efficiently change just that flag in the FeatureOverrides texture, and then flip it back off without worrying about\n * interfering with the other 2 flags.\n */\n InvisibleDuringPick = 1 << 11,\n Visibility = 1 << 12,\n IgnoreMaterial = 1 << 13,\n\n Rgba = Rgb | Alpha,\n}\n\n"]}
|
|
@@ -117,6 +117,10 @@ export interface GraphicBranchOptions {
|
|
|
117
117
|
* @internal
|
|
118
118
|
*/
|
|
119
119
|
viewAttachmentId?: Id64String;
|
|
120
|
+
/** If true, the view's [DisplayStyleSettings.clipStyle]($common) will be disabled for this branch.
|
|
121
|
+
* No [ClipStyle.insideColor]($common), [ClipStyle.outsideColor]($common), or [ClipStyle.intersectionStyle]($common) will be applied.
|
|
122
|
+
*/
|
|
123
|
+
disableClipStyle?: true;
|
|
120
124
|
}
|
|
121
125
|
/** Clip/Transform for a branch that are varied over time.
|
|
122
126
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphicBranch.d.ts","sourceRoot":"","sources":["../../../src/render/GraphicBranch.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAgB,UAAU,EAAE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AAgB,EAAE,MAAM,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IAnBe,gCAAU,aAmBzB,CAAA;AACH,CAAC,EArBgB,qBAAqB,KAArB,qBAAqB,QAqBrC","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 Rendering\n */\n\nimport { disposeArray, Id64String, IDisposable } from \"@itwin/core-bentley\";\nimport {\n FeatureAppearanceProvider, HiddenLine, RealityModelDisplaySettings, RenderSchedule, ViewFlagOverrides, ViewFlags,\n} from \"@itwin/core-common\";\nimport { IModelConnection } from \"../IModelConnection\";\nimport { IModelApp } from \"../IModelApp\";\nimport { FeatureSymbology } from \"./FeatureSymbology\";\nimport { RenderClipVolume } from \"./RenderClipVolume\";\nimport { RenderGraphic } from \"./RenderGraphic\";\nimport { RenderMemory } from \"./RenderMemory\";\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\nimport { RenderTextureDrape } from \"./RenderSystem\";\nimport { Range3d, Transform } from \"@itwin/core-geometry\";\nimport { AnimationNodeId } from \"../common/internal/render/AnimationNodeId\";\n\n/** Carries information in a GraphicBranchOptions about a GraphicBranch produced by drawing one view into the context of another.\n * @internal\n */\nexport interface GraphicBranchFrustum {\n is3d: boolean;\n scale: {\n x: number;\n y: number;\n };\n}\n\n/**\n * A node in a scene graph. The branch itself is not renderable. Instead it contains a list of RenderGraphics,\n * and a transform, symbology overrides, and clip volume which are to be applied when rendering them.\n * Branches can be nested to build an arbitrarily-complex scene graph.\n * @see [[RenderSystem.createBranch]]\n * @public\n * @extensions\n */\nexport class GraphicBranch implements IDisposable /* , RenderMemory.Consumer */ {\n /** The child nodes of this branch */\n public readonly entries: RenderGraphic[] = [];\n /** If true, when the branch is disposed of, the RenderGraphics in its entries array will also be disposed */\n public readonly ownsEntries: boolean;\n /** Selectively overrides the view's [ViewFlags]($common) while drawing graphics within this branch. The default overrides nothing.\n * @see [[setViewFlagOverrides]].\n */\n public viewFlagOverrides: ViewFlagOverrides = {};\n /** Controls how reality models are displayed within this branch.\n * @beta\n */\n public realityModelDisplaySettings?: RealityModelDisplaySettings;\n /** @internal */\n public realityModelRange?: Range3d;\n /** Optional symbology overrides to be applied to all graphics in this branch */\n public symbologyOverrides?: FeatureSymbology.Overrides;\n /** Optional animation branch Id that incorporates the model Id and, for element timelines, the batch Id.\n * @internal\n */\n public animationId?: string;\n /** Identifies the node in the [RenderSchedule.Script]($backend) with which this branch is associated.\n * @internal\n */\n public animationNodeId?: AnimationNodeId | number;\n\n /** Identifies the \"group\" to which this branch belongs.\n * Groups represent cross-cutting subsets of a tile tree's contents.\n * For example, if a tile tree contains geometry from multiple models, each model (or smaller groups of multiple models) could be considered a group.\n * The top-level branches containing graphics from multiple tiles will each specify the group they represent, and the child branches within each\n * tile will likewise specify the group to which they belong.\n * When drawing, only the graphics within a tile that correlate with the current group will be drawn.\n * Groups cannot nest.\n * @internal\n */\n public groupNodeId?: number;\n\n /** Constructor\n * @param ownsEntries If true, when this branch is [[dispose]]d, all of the [[RenderGraphic]]s it contains will also be disposed.\n */\n public constructor(ownsEntries: boolean = false) {\n this.ownsEntries = ownsEntries;\n }\n\n /** Add a graphic to this branch. */\n public add(graphic: RenderGraphic): void {\n this.entries.push(graphic);\n }\n\n /** Compute the view flags that result from applying this branch's [[viewFlagOverrides]] to the input flags.\n * @param flags The input view flags, e.g., from the view's [[DisplayStyleState]].\n * @returns The result of applying [[viewFlagOverrides]] to `flags`.\n */\n public getViewFlags(flags: ViewFlags): ViewFlags {\n return flags.override(this.viewFlagOverrides);\n }\n\n /** Set [[viewFlagOverrides]] to override **all** ViewFlags as specified by `flags`. */\n public setViewFlags(flags: ViewFlags): void {\n this.viewFlagOverrides = { ...flags };\n }\n\n /** Change [[viewFlagOverrides]]. */\n public setViewFlagOverrides(ovr: ViewFlagOverrides): void {\n this.viewFlagOverrides = { ...ovr };\n }\n\n /** Disposes of all graphics in this branch, if and only if [[ownsEntries]] is true. */\n public dispose() {\n this.clear();\n }\n\n /** Returns true if this branch contains no graphics. */\n public get isEmpty(): boolean {\n return 0 === this.entries.length;\n }\n\n /** Empties the list of [[RenderGraphic]]s contained in this branch, and if the [[ownsEntries]] flag is set, also disposes of them. */\n public clear(): void {\n if (this.ownsEntries)\n disposeArray(this.entries);\n else\n this.entries.length = 0;\n }\n\n /** @internal */\n public collectStatistics(stats: RenderMemory.Statistics): void {\n for (const entry of this.entries)\n entry.collectStatistics(stats);\n }\n}\n\n/** Options passed to [[RenderSystem.createGraphicBranch]].\n * @public\n * @extensions\n */\nexport interface GraphicBranchOptions {\n /** Clip applied to the graphics in the branch. */\n clipVolume?: RenderClipVolume;\n /** @internal */\n classifierOrDrape?: RenderPlanarClassifier | RenderTextureDrape;\n /** Optionally replaces the view's hidden line settings when drawing the branch. */\n hline?: HiddenLine.Settings;\n /** The iModel from which the graphics originate, if different than that associated with the view. */\n iModel?: IModelConnection;\n /** An optional transform from the coordinate system of [[iModel]] to those of a different [[IModelConnection]].\n * This is used by [[AccuSnap]] when displaying one iModel in the context of another iModel (i.e., the iModel associated\n * with the [[Viewport]]).\n */\n transformFromIModel?: Transform;\n /** @internal */\n frustum?: GraphicBranchFrustum;\n /** Supplements the view's [[FeatureSymbology.Overrides]] for graphics in the branch. */\n appearanceProvider?: FeatureAppearanceProvider;\n /** @internal Secondary planar classifiers (map layers) */\n secondaryClassifiers?: Map<number, RenderPlanarClassifier>;\n /** The Id of the [ViewAttachment]($backend) from which this branch's graphics originated.\n * @internal\n */\n viewAttachmentId?: Id64String;\n}\n\n/** Clip/Transform for a branch that are varied over time.\n * @internal\n */\nexport interface AnimationBranchState {\n readonly clip?: RenderClipVolume;\n readonly omit?: boolean;\n}\n\n/** @internal */\nexport function formatAnimationBranchId(modelId: Id64String, branchId: number): string {\n if (branchId < 0)\n return modelId;\n\n return `${modelId}_Node_${branchId.toString()}`;\n}\n\nfunction addAnimationBranch(modelId: Id64String, timeline: RenderSchedule.Timeline, branchId: number, branches: Map<string, AnimationBranchState>, time: number): void {\n const clipVector = timeline.getClipVector(time);\n const clip = clipVector ? IModelApp.renderSystem.createClipVolume(clipVector) : undefined;\n if (clip)\n branches.set(formatAnimationBranchId(modelId, branchId), { clip });\n}\n\n/** Mapping from node/branch IDs to animation branch state\n * @internal\n */\nexport interface AnimationBranchStates {\n /** Maps node Id to branch state. */\n readonly branchStates: Map<string, AnimationBranchState>;\n /** Ids of nodes that apply a transform. */\n readonly transformNodeIds: ReadonlySet<number>;\n}\n\n/** @internal */\nexport namespace AnimationBranchStates {\n export function fromScript(script: RenderSchedule.Script, time: number): AnimationBranchStates | undefined {\n if (!script.containsModelClipping && !script.requiresBatching)\n return undefined;\n\n const branches = new Map<string, AnimationBranchState>();\n for (const model of script.modelTimelines) {\n addAnimationBranch(model.modelId, model, -1, branches, time);\n for (const elem of model.elementTimelines) {\n if (elem.getVisibility(time) <= 0)\n branches.set(formatAnimationBranchId(model.modelId, elem.batchId), { omit: true });\n else\n addAnimationBranch(model.modelId, elem, elem.batchId, branches, time);\n }\n }\n\n return {\n branchStates: branches,\n transformNodeIds: script.transformBatchIds,\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GraphicBranch.js","sourceRoot":"","sources":["../../../src/render/GraphicBranch.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,YAAY,EAA2B,MAAM,qBAAqB,CAAC;AAK5E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAqBzC;;;;;;;GAOG;AACH,MAAM,OAAO,aAAa;IAqCxB;;OAEG;IACH,YAAmB,cAAuB,KAAK;QAvC/C,qCAAqC;QACrB,YAAO,GAAoB,EAAE,CAAC;QAG9C;;WAEG;QACI,sBAAiB,GAAsB,EAAE,CAAC;QAiC/C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACj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EAAE,QAAQ;YACtB,gBAAgB,EAAE,MAAM,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IAnBe,gCAAU,aAmBzB,CAAA;AACH,CAAC,EArBgB,qBAAqB,KAArB,qBAAqB,QAqBrC","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 Rendering\n */\n\nimport { disposeArray, Id64String, IDisposable } from \"@itwin/core-bentley\";\nimport {\n FeatureAppearanceProvider, HiddenLine, RealityModelDisplaySettings, RenderSchedule, ViewFlagOverrides, ViewFlags,\n} from \"@itwin/core-common\";\nimport { IModelConnection } from \"../IModelConnection\";\nimport { IModelApp } from \"../IModelApp\";\nimport { FeatureSymbology } from \"./FeatureSymbology\";\nimport { RenderClipVolume } from \"./RenderClipVolume\";\nimport { RenderGraphic } from \"./RenderGraphic\";\nimport { RenderMemory } from \"./RenderMemory\";\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\nimport { RenderTextureDrape } from \"./RenderSystem\";\nimport { Range3d, Transform } from \"@itwin/core-geometry\";\nimport { AnimationNodeId } from \"../common/internal/render/AnimationNodeId\";\n\n/** Carries information in a GraphicBranchOptions about a GraphicBranch produced by drawing one view into the context of another.\n * @internal\n */\nexport interface GraphicBranchFrustum {\n is3d: boolean;\n scale: {\n x: number;\n y: number;\n };\n}\n\n/**\n * A node in a scene graph. The branch itself is not renderable. Instead it contains a list of RenderGraphics,\n * and a transform, symbology overrides, and clip volume which are to be applied when rendering them.\n * Branches can be nested to build an arbitrarily-complex scene graph.\n * @see [[RenderSystem.createBranch]]\n * @public\n * @extensions\n */\nexport class GraphicBranch implements IDisposable /* , RenderMemory.Consumer */ {\n /** The child nodes of this branch */\n public readonly entries: RenderGraphic[] = [];\n /** If true, when the branch is disposed of, the RenderGraphics in its entries array will also be disposed */\n public readonly ownsEntries: boolean;\n /** Selectively overrides the view's [ViewFlags]($common) while drawing graphics within this branch. The default overrides nothing.\n * @see [[setViewFlagOverrides]].\n */\n public viewFlagOverrides: ViewFlagOverrides = {};\n /** Controls how reality models are displayed within this branch.\n * @beta\n */\n public realityModelDisplaySettings?: RealityModelDisplaySettings;\n /** @internal */\n public realityModelRange?: Range3d;\n /** Optional symbology overrides to be applied to all graphics in this branch */\n public symbologyOverrides?: FeatureSymbology.Overrides;\n /** Optional animation branch Id that incorporates the model Id and, for element timelines, the batch Id.\n * @internal\n */\n public animationId?: string;\n /** Identifies the node in the [RenderSchedule.Script]($backend) with which this branch is associated.\n * @internal\n */\n public animationNodeId?: AnimationNodeId | number;\n\n /** Identifies the \"group\" to which this branch belongs.\n * Groups represent cross-cutting subsets of a tile tree's contents.\n * For example, if a tile tree contains geometry from multiple models, each model (or smaller groups of multiple models) could be considered a group.\n * The top-level branches containing graphics from multiple tiles will each specify the group they represent, and the child branches within each\n * tile will likewise specify the group to which they belong.\n * When drawing, only the graphics within a tile that correlate with the current group will be drawn.\n * Groups cannot nest.\n * @internal\n */\n public groupNodeId?: number;\n\n /** Constructor\n * @param ownsEntries If true, when this branch is [[dispose]]d, all of the [[RenderGraphic]]s it contains will also be disposed.\n */\n public constructor(ownsEntries: boolean = false) {\n this.ownsEntries = ownsEntries;\n }\n\n /** Add a graphic to this branch. */\n public add(graphic: RenderGraphic): void {\n this.entries.push(graphic);\n }\n\n /** Compute the view flags that result from applying this branch's [[viewFlagOverrides]] to the input flags.\n * @param flags The input view flags, e.g., from the view's [[DisplayStyleState]].\n * @returns The result of applying [[viewFlagOverrides]] to `flags`.\n */\n public getViewFlags(flags: ViewFlags): ViewFlags {\n return flags.override(this.viewFlagOverrides);\n }\n\n /** Set [[viewFlagOverrides]] to override **all** ViewFlags as specified by `flags`. */\n public setViewFlags(flags: ViewFlags): void {\n this.viewFlagOverrides = { ...flags };\n }\n\n /** Change [[viewFlagOverrides]]. */\n public setViewFlagOverrides(ovr: ViewFlagOverrides): void {\n this.viewFlagOverrides = { ...ovr };\n }\n\n /** Disposes of all graphics in this branch, if and only if [[ownsEntries]] is true. */\n public dispose() {\n this.clear();\n }\n\n /** Returns true if this branch contains no graphics. */\n public get isEmpty(): boolean {\n return 0 === this.entries.length;\n }\n\n /** Empties the list of [[RenderGraphic]]s contained in this branch, and if the [[ownsEntries]] flag is set, also disposes of them. */\n public clear(): void {\n if (this.ownsEntries)\n disposeArray(this.entries);\n else\n this.entries.length = 0;\n }\n\n /** @internal */\n public collectStatistics(stats: RenderMemory.Statistics): void {\n for (const entry of this.entries)\n entry.collectStatistics(stats);\n }\n}\n\n/** Options passed to [[RenderSystem.createGraphicBranch]].\n * @public\n * @extensions\n */\nexport interface GraphicBranchOptions {\n /** Clip applied to the graphics in the branch. */\n clipVolume?: RenderClipVolume;\n /** @internal */\n classifierOrDrape?: RenderPlanarClassifier | RenderTextureDrape;\n /** Optionally replaces the view's hidden line settings when drawing the branch. */\n hline?: HiddenLine.Settings;\n /** The iModel from which the graphics originate, if different than that associated with the view. */\n iModel?: IModelConnection;\n /** An optional transform from the coordinate system of [[iModel]] to those of a different [[IModelConnection]].\n * This is used by [[AccuSnap]] when displaying one iModel in the context of another iModel (i.e., the iModel associated\n * with the [[Viewport]]).\n */\n transformFromIModel?: Transform;\n /** @internal */\n frustum?: GraphicBranchFrustum;\n /** Supplements the view's [[FeatureSymbology.Overrides]] for graphics in the branch. */\n appearanceProvider?: FeatureAppearanceProvider;\n /** @internal Secondary planar classifiers (map layers) */\n secondaryClassifiers?: Map<number, RenderPlanarClassifier>;\n /** The Id of the [ViewAttachment]($backend) from which this branch's graphics originated.\n * @internal\n */\n viewAttachmentId?: Id64String;\n /** If true, the view's [DisplayStyleSettings.clipStyle]($common) will be disabled for this branch.\n * No [ClipStyle.insideColor]($common), [ClipStyle.outsideColor]($common), or [ClipStyle.intersectionStyle]($common) will be applied.\n */\n disableClipStyle?: true;\n}\n\n/** Clip/Transform for a branch that are varied over time.\n * @internal\n */\nexport interface AnimationBranchState {\n readonly clip?: RenderClipVolume;\n readonly omit?: boolean;\n}\n\n/** @internal */\nexport function formatAnimationBranchId(modelId: Id64String, branchId: number): string {\n if (branchId < 0)\n return modelId;\n\n return `${modelId}_Node_${branchId.toString()}`;\n}\n\nfunction addAnimationBranch(modelId: Id64String, timeline: RenderSchedule.Timeline, branchId: number, branches: Map<string, AnimationBranchState>, time: number): void {\n const clipVector = timeline.getClipVector(time);\n const clip = clipVector ? IModelApp.renderSystem.createClipVolume(clipVector) : undefined;\n if (clip)\n branches.set(formatAnimationBranchId(modelId, branchId), { clip });\n}\n\n/** Mapping from node/branch IDs to animation branch state\n * @internal\n */\nexport interface AnimationBranchStates {\n /** Maps node Id to branch state. */\n readonly branchStates: Map<string, AnimationBranchState>;\n /** Ids of nodes that apply a transform. */\n readonly transformNodeIds: ReadonlySet<number>;\n}\n\n/** @internal */\nexport namespace AnimationBranchStates {\n export function fromScript(script: RenderSchedule.Script, time: number): AnimationBranchStates | undefined {\n if (!script.containsModelClipping && !script.requiresBatching)\n return undefined;\n\n const branches = new Map<string, AnimationBranchState>();\n for (const model of script.modelTimelines) {\n addAnimationBranch(model.modelId, model, -1, branches, time);\n for (const elem of model.elementTimelines) {\n if (elem.getVisibility(time) <= 0)\n branches.set(formatAnimationBranchId(model.modelId, elem.batchId), { omit: true });\n else\n addAnimationBranch(model.modelId, elem, elem.batchId, branches, time);\n }\n }\n\n return {\n branchStates: branches,\n transformNodeIds: script.transformBatchIds,\n };\n }\n}\n"]}
|
|
@@ -15,5 +15,6 @@ export interface RealityMeshGraphicParams {
|
|
|
15
15
|
readonly baseTransparent: boolean;
|
|
16
16
|
readonly textures?: TerrainTexture[];
|
|
17
17
|
readonly layerClassifiers?: MapLayerClassifiers;
|
|
18
|
+
readonly disableClipStyle?: true;
|
|
18
19
|
}
|
|
19
20
|
//# sourceMappingURL=RealityMeshGraphicParams.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityMeshGraphicParams.d.ts","sourceRoot":"","sources":["../../../src/render/RealityMeshGraphicParams.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAG,qBAAqB,EAAG,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE9F,gBAAgB;AAChB,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,WAAW,EAAE,qBAAqB,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,aAAa,EAAE,iBAAiB,CAAC;IAC1C,QAAQ,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,QAAQ,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;IACrC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"RealityMeshGraphicParams.d.ts","sourceRoot":"","sources":["../../../src/render/RealityMeshGraphicParams.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAG,qBAAqB,EAAG,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE9F,gBAAgB;AAChB,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,WAAW,EAAE,qBAAqB,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,aAAa,EAAE,iBAAiB,CAAC;IAC1C,QAAQ,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,QAAQ,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;IACrC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;IAChD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC;CAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityMeshGraphicParams.js","sourceRoot":"","sources":["../../../src/render/RealityMeshGraphicParams.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Rendering\n */\n\nimport { ColorDef, PackedFeatureTable } from \"@itwin/core-common\";\nimport { MapCartoRectangle, MapTileProjection } from \"../tile/internal\";\nimport { MapLayerClassifiers, RenderTerrainGeometry, TerrainTexture } from \"./RenderSystem\";\n\n/** @internal */\nexport interface RealityMeshGraphicParams {\n readonly realityMesh: RenderTerrainGeometry;\n readonly projection: MapTileProjection;\n readonly tileRectangle: MapCartoRectangle;\n readonly featureTable: PackedFeatureTable;\n readonly tileId: string | undefined;\n readonly baseColor: ColorDef | undefined;\n readonly baseTransparent: boolean;\n readonly textures?: TerrainTexture[];\n readonly layerClassifiers?: MapLayerClassifiers;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RealityMeshGraphicParams.js","sourceRoot":"","sources":["../../../src/render/RealityMeshGraphicParams.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Rendering\n */\n\nimport { ColorDef, PackedFeatureTable } from \"@itwin/core-common\";\nimport { MapCartoRectangle, MapTileProjection } from \"../tile/internal\";\nimport { MapLayerClassifiers, RenderTerrainGeometry, TerrainTexture } from \"./RenderSystem\";\n\n/** @internal */\nexport interface RealityMeshGraphicParams {\n readonly realityMesh: RenderTerrainGeometry;\n readonly projection: MapTileProjection;\n readonly tileRectangle: MapCartoRectangle;\n readonly featureTable: PackedFeatureTable;\n readonly tileId: string | undefined;\n readonly baseColor: ColorDef | undefined;\n readonly baseTransparent: boolean;\n readonly textures?: TerrainTexture[];\n readonly layerClassifiers?: MapLayerClassifiers;\n readonly disableClipStyle?: true;\n}\n"]}
|
|
@@ -397,7 +397,7 @@ export declare abstract class RenderSystem implements IDisposable {
|
|
|
397
397
|
/** Create a RenderGraphic consisting of a list of Graphics to be drawn together. */
|
|
398
398
|
abstract createGraphicList(primitives: RenderGraphic[]): RenderGraphic;
|
|
399
399
|
/** Create a RenderGraphic consisting of a list of Graphics, with optional transform and symbology overrides applied to the list */
|
|
400
|
-
createBranch(branch: GraphicBranch, transform: Transform): RenderGraphic;
|
|
400
|
+
createBranch(branch: GraphicBranch, transform: Transform, options?: GraphicBranchOptions): RenderGraphic;
|
|
401
401
|
/** Create a graphic from a [[GraphicBranch]]. */
|
|
402
402
|
abstract createGraphicBranch(branch: GraphicBranch, transform: Transform, options?: GraphicBranchOptions): RenderGraphic;
|
|
403
403
|
/** Create a node in the scene graph corresponding to a transform node in the scene's schedule script.
|