@itwin/core-frontend 5.2.0-dev.1 → 5.2.0-dev.10
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 +43 -1
- package/lib/cjs/BackgroundMapGeometry.js +13 -13
- package/lib/cjs/BackgroundMapGeometry.js.map +1 -1
- package/lib/cjs/BriefcaseConnection.d.ts.map +1 -1
- package/lib/cjs/BriefcaseConnection.js +2 -2
- package/lib/cjs/BriefcaseConnection.js.map +1 -1
- package/lib/cjs/CheckpointConnection.d.ts.map +1 -1
- package/lib/cjs/CheckpointConnection.js +3 -3
- package/lib/cjs/CheckpointConnection.js.map +1 -1
- package/lib/cjs/ContextRealityModelState.js.map +1 -1
- package/lib/cjs/ElementLocateManager.d.ts.map +1 -1
- package/lib/cjs/ElementLocateManager.js +7 -6
- package/lib/cjs/ElementLocateManager.js.map +1 -1
- package/lib/cjs/EmphasizeElements.d.ts.map +1 -1
- package/lib/cjs/EmphasizeElements.js +3 -1
- package/lib/cjs/EmphasizeElements.js.map +1 -1
- package/lib/cjs/EnvironmentDecorations.d.ts.map +1 -1
- package/lib/cjs/EnvironmentDecorations.js +4 -0
- package/lib/cjs/EnvironmentDecorations.js.map +1 -1
- package/lib/cjs/FrustumAnimator.d.ts.map +1 -1
- package/lib/cjs/FrustumAnimator.js +3 -2
- package/lib/cjs/FrustumAnimator.js.map +1 -1
- package/lib/cjs/GlobeAnimator.d.ts.map +1 -1
- package/lib/cjs/GlobeAnimator.js +7 -6
- package/lib/cjs/GlobeAnimator.js.map +1 -1
- package/lib/cjs/HitDetail.d.ts.map +1 -1
- package/lib/cjs/HitDetail.js +12 -7
- package/lib/cjs/HitDetail.js.map +1 -1
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +2 -1
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts +4 -0
- package/lib/cjs/IModelConnection.d.ts.map +1 -1
- package/lib/cjs/IModelConnection.js +156 -14
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/IpcApp.d.ts.map +1 -1
- package/lib/cjs/IpcApp.js +1 -1
- package/lib/cjs/IpcApp.js.map +1 -1
- package/lib/cjs/LinePlaneIntersect.d.ts.map +1 -1
- package/lib/cjs/LinePlaneIntersect.js +2 -0
- package/lib/cjs/LinePlaneIntersect.js.map +1 -1
- package/lib/cjs/LocalhostIpcApp.d.ts.map +1 -1
- package/lib/cjs/LocalhostIpcApp.js +2 -1
- package/lib/cjs/LocalhostIpcApp.js.map +1 -1
- package/lib/cjs/Marker.d.ts.map +1 -1
- package/lib/cjs/Marker.js +4 -3
- package/lib/cjs/Marker.js.map +1 -1
- package/lib/cjs/ModelState.d.ts.map +1 -1
- package/lib/cjs/ModelState.js +2 -2
- package/lib/cjs/ModelState.js.map +1 -1
- package/lib/cjs/NativeApp.d.ts.map +1 -1
- package/lib/cjs/NativeApp.js +5 -4
- package/lib/cjs/NativeApp.js.map +1 -1
- package/lib/cjs/NativeAppLogger.d.ts.map +1 -1
- package/lib/cjs/NativeAppLogger.js +1 -0
- package/lib/cjs/NativeAppLogger.js.map +1 -1
- package/lib/cjs/PlanarClipMaskState.js +3 -3
- package/lib/cjs/PlanarClipMaskState.js.map +1 -1
- package/lib/cjs/SelectionSet.d.ts.map +1 -1
- package/lib/cjs/SelectionSet.js +1 -0
- package/lib/cjs/SelectionSet.js.map +1 -1
- package/lib/cjs/SheetViewState.d.ts.map +1 -1
- package/lib/cjs/SheetViewState.js +5 -5
- package/lib/cjs/SheetViewState.js.map +1 -1
- package/lib/cjs/SpatialViewState.d.ts.map +1 -1
- package/lib/cjs/SpatialViewState.js +1 -1
- package/lib/cjs/SpatialViewState.js.map +1 -1
- package/lib/cjs/Sprites.js +2 -2
- package/lib/cjs/Sprites.js.map +1 -1
- package/lib/cjs/TentativePoint.d.ts.map +1 -1
- package/lib/cjs/TentativePoint.js +10 -9
- package/lib/cjs/TentativePoint.js.map +1 -1
- package/lib/cjs/ViewCreator2d.js +1 -1
- package/lib/cjs/ViewCreator2d.js.map +1 -1
- package/lib/cjs/ViewCreator3d.js +1 -1
- package/lib/cjs/ViewCreator3d.js.map +1 -1
- package/lib/cjs/ViewPose.d.ts.map +1 -1
- package/lib/cjs/ViewPose.js +4 -1
- package/lib/cjs/ViewPose.js.map +1 -1
- package/lib/cjs/ViewState.d.ts.map +1 -1
- package/lib/cjs/ViewState.js +17 -12
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/ViewingSpace.d.ts.map +1 -1
- package/lib/cjs/ViewingSpace.js +2 -0
- package/lib/cjs/ViewingSpace.js.map +1 -1
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +17 -10
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/common/ImageUtil.d.ts.map +1 -1
- package/lib/cjs/common/ImageUtil.js +2 -1
- package/lib/cjs/common/ImageUtil.js.map +1 -1
- package/lib/cjs/common/internal/render/GeometryAccumulator.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/GeometryAccumulator.js +4 -3
- package/lib/cjs/common/internal/render/GeometryAccumulator.js.map +1 -1
- package/lib/cjs/common/internal/render/InstancedGraphicPropsBuilder.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/InstancedGraphicPropsBuilder.js +2 -0
- package/lib/cjs/common/internal/render/InstancedGraphicPropsBuilder.js.map +1 -1
- package/lib/cjs/common/internal/render/MeshBuilder.js +1 -1
- package/lib/cjs/common/internal/render/MeshBuilder.js.map +1 -1
- package/lib/cjs/common/internal/render/VertexTableBuilder.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/VertexTableBuilder.js +16 -7
- package/lib/cjs/common/internal/render/VertexTableBuilder.js.map +1 -1
- package/lib/cjs/extension/ExtensionAdmin.js +2 -2
- package/lib/cjs/extension/ExtensionAdmin.js.map +1 -1
- package/lib/cjs/internal/GoogleMapsDecorator.js +1 -1
- package/lib/cjs/internal/GoogleMapsDecorator.js.map +1 -1
- package/lib/cjs/internal/ScriptUtils.js +1 -0
- package/lib/cjs/internal/ScriptUtils.js.map +1 -1
- package/lib/cjs/internal/render/UpsampleRealityMeshParams.d.ts.map +1 -1
- package/lib/cjs/internal/render/UpsampleRealityMeshParams.js +2 -1
- package/lib/cjs/internal/render/UpsampleRealityMeshParams.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js +7 -2
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.js +5 -3
- package/lib/cjs/internal/render/webgl/AttributeBuffers.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeMap.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeMap.js +2 -0
- package/lib/cjs/internal/render/webgl/AttributeMap.js.map +1 -1
- package/lib/cjs/internal/render/webgl/BackgroundMapDrape.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/BackgroundMapDrape.js +2 -2
- package/lib/cjs/internal/render/webgl/BackgroundMapDrape.js.map +1 -1
- package/lib/cjs/internal/render/webgl/BatchUniforms.js +1 -1
- package/lib/cjs/internal/render/webgl/BatchUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchState.js +2 -1
- package/lib/cjs/internal/render/webgl/BranchState.js.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchUniforms.js +2 -2
- package/lib/cjs/internal/render/webgl/BranchUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/CachedGeometry.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/CachedGeometry.js +2 -2
- package/lib/cjs/internal/render/webgl/CachedGeometry.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ClipStack.js +1 -1
- package/lib/cjs/internal/render/webgl/ClipStack.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ColorInfo.js +1 -1
- package/lib/cjs/internal/render/webgl/ColorInfo.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Contours.js +3 -3
- package/lib/cjs/internal/render/webgl/Contours.js.map +1 -1
- package/lib/cjs/internal/render/webgl/EDL.js +18 -18
- package/lib/cjs/internal/render/webgl/EDL.js.map +1 -1
- package/lib/cjs/internal/render/webgl/FeatureOverrides.js +4 -4
- package/lib/cjs/internal/render/webgl/FeatureOverrides.js.map +1 -1
- package/lib/cjs/internal/render/webgl/FrameBuffer.js +3 -3
- package/lib/cjs/internal/render/webgl/FrameBuffer.js.map +1 -1
- package/lib/cjs/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/FrustumUniforms.js +2 -1
- package/lib/cjs/internal/render/webgl/FrustumUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/GLTimer.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/GLTimer.js +2 -0
- package/lib/cjs/internal/render/webgl/GLTimer.js.map +1 -1
- package/lib/cjs/internal/render/webgl/MapLayerParams.js +2 -2
- package/lib/cjs/internal/render/webgl/MapLayerParams.js.map +1 -1
- package/lib/cjs/internal/render/webgl/MeshData.js +2 -2
- package/lib/cjs/internal/render/webgl/MeshData.js.map +1 -1
- package/lib/cjs/internal/render/webgl/PerformanceMetrics.js +1 -1
- package/lib/cjs/internal/render/webgl/PerformanceMetrics.js.map +1 -1
- package/lib/cjs/internal/render/webgl/PlanarClassifier.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/PlanarClassifier.js +7 -7
- package/lib/cjs/internal/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/cjs/internal/render/webgl/PlanarGrid.js +1 -1
- package/lib/cjs/internal/render/webgl/PlanarGrid.js.map +1 -1
- package/lib/cjs/internal/render/webgl/PlanarTextureProjection.d.ts +0 -3
- package/lib/cjs/internal/render/webgl/PlanarTextureProjection.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/PlanarTextureProjection.js +6 -5
- package/lib/cjs/internal/render/webgl/PlanarTextureProjection.js.map +1 -1
- package/lib/cjs/internal/render/webgl/PointCloud.js +1 -1
- package/lib/cjs/internal/render/webgl/PointCloud.js.map +1 -1
- package/lib/cjs/internal/render/webgl/RealityMesh.js +1 -1
- package/lib/cjs/internal/render/webgl/RealityMesh.js.map +1 -1
- package/lib/cjs/internal/render/webgl/RenderBuffer.js +2 -2
- package/lib/cjs/internal/render/webgl/RenderBuffer.js.map +1 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.js +115 -85
- package/lib/cjs/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ScratchDrawParams.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ScratchDrawParams.js +11 -10
- package/lib/cjs/internal/render/webgl/ScratchDrawParams.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ScreenSpaceEffect.js +3 -3
- package/lib/cjs/internal/render/webgl/ScreenSpaceEffect.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderProgram.js +3 -3
- package/lib/cjs/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ShadowUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ShadowUniforms.js +2 -1
- package/lib/cjs/internal/render/webgl/ShadowUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/SolarShadowMap.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/SolarShadowMap.js +6 -4
- package/lib/cjs/internal/render/webgl/SolarShadowMap.js.map +1 -1
- package/lib/cjs/internal/render/webgl/System.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/System.js +1 -1
- package/lib/cjs/internal/render/webgl/System.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.js +10 -7
- package/lib/cjs/internal/render/webgl/Target.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Texture.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Texture.js +10 -8
- package/lib/cjs/internal/render/webgl/Texture.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Animation.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Animation.js +4 -2
- package/lib/cjs/internal/render/webgl/glsl/Animation.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Color.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Color.js +2 -1
- package/lib/cjs/internal/render/webgl/glsl/Color.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Composite.js +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Composite.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/CopyStencil.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/CopyStencil.js +3 -2
- package/lib/cjs/internal/render/webgl/glsl/CopyStencil.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/PlanarClassification.js +3 -3
- package/lib/cjs/internal/render/webgl/glsl/PlanarClassification.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/PlanarGrid.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/PlanarGrid.js +4 -3
- package/lib/cjs/internal/render/webgl/glsl/PlanarGrid.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/RealityMesh.js +8 -8
- package/lib/cjs/internal/render/webgl/glsl/RealityMesh.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Surface.js +10 -10
- package/lib/cjs/internal/render/webgl/glsl/Surface.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Vertex.js +2 -2
- package/lib/cjs/internal/render/webgl/glsl/Vertex.js.map +1 -1
- package/lib/cjs/internal/tile/B3dmReader.d.ts.map +1 -1
- package/lib/cjs/internal/tile/B3dmReader.js +1 -1
- package/lib/cjs/internal/tile/B3dmReader.js.map +1 -1
- package/lib/cjs/internal/tile/DynamicIModelTile.js +1 -0
- package/lib/cjs/internal/tile/DynamicIModelTile.js.map +1 -1
- package/lib/cjs/internal/tile/FetchCloudStorage.js +1 -1
- package/lib/cjs/internal/tile/FetchCloudStorage.js.map +1 -1
- package/lib/cjs/internal/tile/LRUTileList.d.ts.map +1 -1
- package/lib/cjs/internal/tile/LRUTileList.js +4 -0
- package/lib/cjs/internal/tile/LRUTileList.js.map +1 -1
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.d.ts.map +1 -1
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.js +2 -1
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.js.map +1 -1
- package/lib/cjs/internal/tile/OPCFormatInterpreter.js +4 -4
- package/lib/cjs/internal/tile/OPCFormatInterpreter.js.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.js +2 -2
- package/lib/cjs/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.js +3 -3
- package/lib/cjs/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/RealityTileLoader.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityTileLoader.js +3 -0
- package/lib/cjs/internal/tile/RealityTileLoader.js.map +1 -1
- package/lib/cjs/internal/tile/ThreeDTileFormatInterpreter.js +3 -3
- package/lib/cjs/internal/tile/ThreeDTileFormatInterpreter.js.map +1 -1
- package/lib/cjs/internal/tile/TileUserSet.d.ts.map +1 -1
- package/lib/cjs/internal/tile/TileUserSet.js +4 -0
- package/lib/cjs/internal/tile/TileUserSet.js.map +1 -1
- package/lib/cjs/internal/tile/map/ArcGISTileMap.js +1 -1
- package/lib/cjs/internal/tile/map/ArcGISTileMap.js.map +1 -1
- package/lib/cjs/internal/tile/map/ArcGisUtilities.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ArcGisUtilities.js +4 -0
- package/lib/cjs/internal/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +3 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js +2 -2
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/MapTileAvailability.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/MapTileAvailability.js +5 -2
- package/lib/cjs/internal/tile/map/MapTileAvailability.js.map +1 -1
- package/lib/cjs/internal/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/WmtsCapabilities.js +3 -2
- package/lib/cjs/internal/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.d.ts.map +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.js +2 -0
- package/lib/cjs/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/cjs/quantity-formatting/BaseUnitFormattingSettingsProvider.d.ts.map +1 -1
- package/lib/cjs/quantity-formatting/BaseUnitFormattingSettingsProvider.js +2 -0
- package/lib/cjs/quantity-formatting/BaseUnitFormattingSettingsProvider.js.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.js +7 -4
- package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/cjs/tile/GltfReader.d.ts +5 -2
- package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
- package/lib/cjs/tile/GltfReader.js +54 -16
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/cjs/tile/RealityTile.d.ts.map +1 -1
- package/lib/cjs/tile/RealityTile.js +2 -2
- package/lib/cjs/tile/RealityTile.js.map +1 -1
- package/lib/cjs/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/RealityTileTree.js +5 -5
- package/lib/cjs/tile/RealityTileTree.js.map +1 -1
- package/lib/cjs/tile/TileAdmin.js.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.js +2 -1
- package/lib/cjs/tile/TileDrawArgs.js.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.js +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.js +9 -1
- package/lib/cjs/tile/map/MapLayerSources.js.map +1 -1
- package/lib/cjs/tile/map/MapTile.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTile.js +10 -8
- package/lib/cjs/tile/map/MapTile.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +8 -7
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapTilingScheme.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTilingScheme.js +2 -1
- package/lib/cjs/tile/map/MapTilingScheme.js.map +1 -1
- package/lib/cjs/tools/Tool.js +1 -1
- package/lib/cjs/tools/Tool.js.map +1 -1
- package/lib/esm/BackgroundMapGeometry.js +14 -14
- package/lib/esm/BackgroundMapGeometry.js.map +1 -1
- package/lib/esm/BriefcaseConnection.d.ts.map +1 -1
- package/lib/esm/BriefcaseConnection.js +2 -2
- package/lib/esm/BriefcaseConnection.js.map +1 -1
- package/lib/esm/CheckpointConnection.d.ts.map +1 -1
- package/lib/esm/CheckpointConnection.js +4 -4
- package/lib/esm/CheckpointConnection.js.map +1 -1
- package/lib/esm/ContextRealityModelState.js.map +1 -1
- package/lib/esm/ElementLocateManager.d.ts.map +1 -1
- package/lib/esm/ElementLocateManager.js +8 -7
- package/lib/esm/ElementLocateManager.js.map +1 -1
- package/lib/esm/EmphasizeElements.d.ts.map +1 -1
- package/lib/esm/EmphasizeElements.js +3 -1
- package/lib/esm/EmphasizeElements.js.map +1 -1
- package/lib/esm/EnvironmentDecorations.d.ts.map +1 -1
- package/lib/esm/EnvironmentDecorations.js +4 -0
- package/lib/esm/EnvironmentDecorations.js.map +1 -1
- package/lib/esm/FrustumAnimator.d.ts.map +1 -1
- package/lib/esm/FrustumAnimator.js +3 -2
- package/lib/esm/FrustumAnimator.js.map +1 -1
- package/lib/esm/GlobeAnimator.d.ts.map +1 -1
- package/lib/esm/GlobeAnimator.js +7 -6
- package/lib/esm/GlobeAnimator.js.map +1 -1
- package/lib/esm/HitDetail.d.ts.map +1 -1
- package/lib/esm/HitDetail.js +12 -7
- package/lib/esm/HitDetail.js.map +1 -1
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +4 -3
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts +4 -0
- package/lib/esm/IModelConnection.d.ts.map +1 -1
- package/lib/esm/IModelConnection.js +158 -16
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/IpcApp.d.ts.map +1 -1
- package/lib/esm/IpcApp.js +2 -2
- package/lib/esm/IpcApp.js.map +1 -1
- package/lib/esm/LinePlaneIntersect.d.ts.map +1 -1
- package/lib/esm/LinePlaneIntersect.js +2 -0
- package/lib/esm/LinePlaneIntersect.js.map +1 -1
- package/lib/esm/LocalhostIpcApp.d.ts.map +1 -1
- package/lib/esm/LocalhostIpcApp.js +2 -1
- package/lib/esm/LocalhostIpcApp.js.map +1 -1
- package/lib/esm/Marker.d.ts.map +1 -1
- package/lib/esm/Marker.js +5 -4
- package/lib/esm/Marker.js.map +1 -1
- package/lib/esm/ModelState.d.ts.map +1 -1
- package/lib/esm/ModelState.js +3 -3
- package/lib/esm/ModelState.js.map +1 -1
- package/lib/esm/NativeApp.d.ts.map +1 -1
- package/lib/esm/NativeApp.js +5 -4
- package/lib/esm/NativeApp.js.map +1 -1
- package/lib/esm/NativeAppLogger.d.ts.map +1 -1
- package/lib/esm/NativeAppLogger.js +1 -0
- package/lib/esm/NativeAppLogger.js.map +1 -1
- package/lib/esm/PlanarClipMaskState.js +3 -3
- package/lib/esm/PlanarClipMaskState.js.map +1 -1
- package/lib/esm/SelectionSet.d.ts.map +1 -1
- package/lib/esm/SelectionSet.js +2 -1
- package/lib/esm/SelectionSet.js.map +1 -1
- package/lib/esm/SheetViewState.d.ts.map +1 -1
- package/lib/esm/SheetViewState.js +6 -6
- package/lib/esm/SheetViewState.js.map +1 -1
- package/lib/esm/SpatialViewState.d.ts.map +1 -1
- package/lib/esm/SpatialViewState.js +2 -2
- package/lib/esm/SpatialViewState.js.map +1 -1
- package/lib/esm/Sprites.js +2 -2
- package/lib/esm/Sprites.js.map +1 -1
- package/lib/esm/TentativePoint.d.ts.map +1 -1
- package/lib/esm/TentativePoint.js +10 -9
- package/lib/esm/TentativePoint.js.map +1 -1
- package/lib/esm/ViewCreator2d.js +1 -1
- package/lib/esm/ViewCreator2d.js.map +1 -1
- package/lib/esm/ViewCreator3d.js +1 -1
- package/lib/esm/ViewCreator3d.js.map +1 -1
- package/lib/esm/ViewPose.d.ts.map +1 -1
- package/lib/esm/ViewPose.js +4 -1
- package/lib/esm/ViewPose.js.map +1 -1
- package/lib/esm/ViewState.d.ts.map +1 -1
- package/lib/esm/ViewState.js +18 -13
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/ViewingSpace.d.ts.map +1 -1
- package/lib/esm/ViewingSpace.js +2 -0
- package/lib/esm/ViewingSpace.js.map +1 -1
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +18 -11
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/common/ImageUtil.d.ts.map +1 -1
- package/lib/esm/common/ImageUtil.js +2 -1
- package/lib/esm/common/ImageUtil.js.map +1 -1
- package/lib/esm/common/internal/render/GeometryAccumulator.d.ts.map +1 -1
- package/lib/esm/common/internal/render/GeometryAccumulator.js +4 -3
- package/lib/esm/common/internal/render/GeometryAccumulator.js.map +1 -1
- package/lib/esm/common/internal/render/InstancedGraphicPropsBuilder.d.ts.map +1 -1
- package/lib/esm/common/internal/render/InstancedGraphicPropsBuilder.js +2 -0
- package/lib/esm/common/internal/render/InstancedGraphicPropsBuilder.js.map +1 -1
- package/lib/esm/common/internal/render/MeshBuilder.js +2 -2
- package/lib/esm/common/internal/render/MeshBuilder.js.map +1 -1
- package/lib/esm/common/internal/render/VertexTableBuilder.d.ts.map +1 -1
- package/lib/esm/common/internal/render/VertexTableBuilder.js +17 -8
- package/lib/esm/common/internal/render/VertexTableBuilder.js.map +1 -1
- package/lib/esm/extension/ExtensionAdmin.js +2 -2
- package/lib/esm/extension/ExtensionAdmin.js.map +1 -1
- package/lib/esm/internal/GoogleMapsDecorator.js +1 -1
- package/lib/esm/internal/GoogleMapsDecorator.js.map +1 -1
- package/lib/esm/internal/ScriptUtils.js +1 -0
- package/lib/esm/internal/ScriptUtils.js.map +1 -1
- package/lib/esm/internal/render/UpsampleRealityMeshParams.d.ts.map +1 -1
- package/lib/esm/internal/render/UpsampleRealityMeshParams.js +2 -1
- package/lib/esm/internal/render/UpsampleRealityMeshParams.js.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js +7 -2
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.js +5 -3
- package/lib/esm/internal/render/webgl/AttributeBuffers.js.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeMap.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeMap.js +2 -0
- package/lib/esm/internal/render/webgl/AttributeMap.js.map +1 -1
- package/lib/esm/internal/render/webgl/BackgroundMapDrape.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/BackgroundMapDrape.js +3 -3
- package/lib/esm/internal/render/webgl/BackgroundMapDrape.js.map +1 -1
- package/lib/esm/internal/render/webgl/BatchUniforms.js +1 -1
- package/lib/esm/internal/render/webgl/BatchUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/BranchState.js +2 -1
- package/lib/esm/internal/render/webgl/BranchState.js.map +1 -1
- package/lib/esm/internal/render/webgl/BranchUniforms.js +3 -3
- package/lib/esm/internal/render/webgl/BranchUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/CachedGeometry.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/CachedGeometry.js +3 -3
- package/lib/esm/internal/render/webgl/CachedGeometry.js.map +1 -1
- package/lib/esm/internal/render/webgl/ClipStack.js +1 -1
- package/lib/esm/internal/render/webgl/ClipStack.js.map +1 -1
- package/lib/esm/internal/render/webgl/ColorInfo.js +2 -2
- package/lib/esm/internal/render/webgl/ColorInfo.js.map +1 -1
- package/lib/esm/internal/render/webgl/Contours.js +4 -4
- package/lib/esm/internal/render/webgl/Contours.js.map +1 -1
- package/lib/esm/internal/render/webgl/EDL.js +19 -19
- package/lib/esm/internal/render/webgl/EDL.js.map +1 -1
- package/lib/esm/internal/render/webgl/FeatureOverrides.js +5 -5
- package/lib/esm/internal/render/webgl/FeatureOverrides.js.map +1 -1
- package/lib/esm/internal/render/webgl/FrameBuffer.js +4 -4
- package/lib/esm/internal/render/webgl/FrameBuffer.js.map +1 -1
- package/lib/esm/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/FrustumUniforms.js +2 -1
- package/lib/esm/internal/render/webgl/FrustumUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/GLTimer.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/GLTimer.js +2 -0
- package/lib/esm/internal/render/webgl/GLTimer.js.map +1 -1
- package/lib/esm/internal/render/webgl/MapLayerParams.js +3 -3
- package/lib/esm/internal/render/webgl/MapLayerParams.js.map +1 -1
- package/lib/esm/internal/render/webgl/MeshData.js +3 -3
- package/lib/esm/internal/render/webgl/MeshData.js.map +1 -1
- package/lib/esm/internal/render/webgl/PerformanceMetrics.js +1 -1
- package/lib/esm/internal/render/webgl/PerformanceMetrics.js.map +1 -1
- package/lib/esm/internal/render/webgl/PlanarClassifier.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/PlanarClassifier.js +8 -8
- package/lib/esm/internal/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/esm/internal/render/webgl/PlanarGrid.js +2 -2
- package/lib/esm/internal/render/webgl/PlanarGrid.js.map +1 -1
- package/lib/esm/internal/render/webgl/PlanarTextureProjection.d.ts +0 -3
- package/lib/esm/internal/render/webgl/PlanarTextureProjection.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/PlanarTextureProjection.js +6 -5
- package/lib/esm/internal/render/webgl/PlanarTextureProjection.js.map +1 -1
- package/lib/esm/internal/render/webgl/PointCloud.js +2 -2
- package/lib/esm/internal/render/webgl/PointCloud.js.map +1 -1
- package/lib/esm/internal/render/webgl/RealityMesh.js +2 -2
- package/lib/esm/internal/render/webgl/RealityMesh.js.map +1 -1
- package/lib/esm/internal/render/webgl/RenderBuffer.js +3 -3
- package/lib/esm/internal/render/webgl/RenderBuffer.js.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.js +116 -86
- package/lib/esm/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/esm/internal/render/webgl/ScratchDrawParams.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ScratchDrawParams.js +11 -10
- package/lib/esm/internal/render/webgl/ScratchDrawParams.js.map +1 -1
- package/lib/esm/internal/render/webgl/ScreenSpaceEffect.js +4 -4
- package/lib/esm/internal/render/webgl/ScreenSpaceEffect.js.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderProgram.js +4 -4
- package/lib/esm/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/esm/internal/render/webgl/ShadowUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ShadowUniforms.js +2 -1
- package/lib/esm/internal/render/webgl/ShadowUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/SolarShadowMap.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/SolarShadowMap.js +7 -5
- package/lib/esm/internal/render/webgl/SolarShadowMap.js.map +1 -1
- package/lib/esm/internal/render/webgl/System.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/System.js +2 -2
- package/lib/esm/internal/render/webgl/System.js.map +1 -1
- package/lib/esm/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Target.js +11 -8
- package/lib/esm/internal/render/webgl/Target.js.map +1 -1
- package/lib/esm/internal/render/webgl/Texture.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Texture.js +11 -9
- package/lib/esm/internal/render/webgl/Texture.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Animation.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Animation.js +5 -3
- package/lib/esm/internal/render/webgl/glsl/Animation.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Color.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Color.js +2 -1
- package/lib/esm/internal/render/webgl/glsl/Color.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Composite.js +2 -2
- package/lib/esm/internal/render/webgl/glsl/Composite.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/CopyStencil.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/CopyStencil.js +3 -2
- package/lib/esm/internal/render/webgl/glsl/CopyStencil.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/PlanarClassification.js +4 -4
- package/lib/esm/internal/render/webgl/glsl/PlanarClassification.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/PlanarGrid.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/PlanarGrid.js +4 -3
- package/lib/esm/internal/render/webgl/glsl/PlanarGrid.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/RealityMesh.js +9 -9
- package/lib/esm/internal/render/webgl/glsl/RealityMesh.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Surface.js +11 -11
- package/lib/esm/internal/render/webgl/glsl/Surface.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Vertex.js +3 -3
- package/lib/esm/internal/render/webgl/glsl/Vertex.js.map +1 -1
- package/lib/esm/internal/tile/B3dmReader.d.ts.map +1 -1
- package/lib/esm/internal/tile/B3dmReader.js +2 -2
- package/lib/esm/internal/tile/B3dmReader.js.map +1 -1
- package/lib/esm/internal/tile/DynamicIModelTile.js +1 -0
- package/lib/esm/internal/tile/DynamicIModelTile.js.map +1 -1
- package/lib/esm/internal/tile/FetchCloudStorage.js +1 -1
- package/lib/esm/internal/tile/FetchCloudStorage.js.map +1 -1
- package/lib/esm/internal/tile/LRUTileList.d.ts.map +1 -1
- package/lib/esm/internal/tile/LRUTileList.js +4 -0
- package/lib/esm/internal/tile/LRUTileList.js.map +1 -1
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.d.ts.map +1 -1
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.js +2 -1
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.js.map +1 -1
- package/lib/esm/internal/tile/OPCFormatInterpreter.js +5 -5
- package/lib/esm/internal/tile/OPCFormatInterpreter.js.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.js +3 -3
- package/lib/esm/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.js +4 -4
- package/lib/esm/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/esm/internal/tile/RealityTileLoader.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityTileLoader.js +3 -0
- package/lib/esm/internal/tile/RealityTileLoader.js.map +1 -1
- package/lib/esm/internal/tile/ThreeDTileFormatInterpreter.js +4 -4
- package/lib/esm/internal/tile/ThreeDTileFormatInterpreter.js.map +1 -1
- package/lib/esm/internal/tile/TileUserSet.d.ts.map +1 -1
- package/lib/esm/internal/tile/TileUserSet.js +4 -0
- package/lib/esm/internal/tile/TileUserSet.js.map +1 -1
- package/lib/esm/internal/tile/map/ArcGISTileMap.js +1 -1
- package/lib/esm/internal/tile/map/ArcGISTileMap.js.map +1 -1
- package/lib/esm/internal/tile/map/ArcGisUtilities.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ArcGisUtilities.js +4 -0
- package/lib/esm/internal/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +3 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js +3 -3
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js +2 -2
- package/lib/esm/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/MapTileAvailability.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/MapTileAvailability.js +6 -3
- package/lib/esm/internal/tile/map/MapTileAvailability.js.map +1 -1
- package/lib/esm/internal/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/WmtsCapabilities.js +3 -2
- package/lib/esm/internal/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.d.ts.map +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.js +2 -0
- package/lib/esm/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/esm/quantity-formatting/BaseUnitFormattingSettingsProvider.d.ts.map +1 -1
- package/lib/esm/quantity-formatting/BaseUnitFormattingSettingsProvider.js +2 -0
- package/lib/esm/quantity-formatting/BaseUnitFormattingSettingsProvider.js.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.js +7 -4
- package/lib/esm/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/esm/tile/GltfReader.d.ts +5 -2
- package/lib/esm/tile/GltfReader.d.ts.map +1 -1
- package/lib/esm/tile/GltfReader.js +55 -17
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/lib/esm/tile/RealityTile.d.ts.map +1 -1
- package/lib/esm/tile/RealityTile.js +3 -3
- package/lib/esm/tile/RealityTile.js.map +1 -1
- package/lib/esm/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/esm/tile/RealityTileTree.js +6 -6
- package/lib/esm/tile/RealityTileTree.js.map +1 -1
- package/lib/esm/tile/TileAdmin.js.map +1 -1
- package/lib/esm/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/esm/tile/TileDrawArgs.js +2 -1
- package/lib/esm/tile/TileDrawArgs.js.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.js +2 -2
- package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.js +2 -2
- package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.js +10 -2
- package/lib/esm/tile/map/MapLayerSources.js.map +1 -1
- package/lib/esm/tile/map/MapTile.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTile.js +11 -9
- package/lib/esm/tile/map/MapTile.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTileTree.js +9 -8
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapTilingScheme.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTilingScheme.js +2 -1
- package/lib/esm/tile/map/MapTilingScheme.js.map +1 -1
- package/lib/esm/tools/Tool.js +2 -2
- package/lib/esm/tools/Tool.js.map +1 -1
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +20 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PerformanceMetrics.js","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/PerformanceMetrics.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAG7D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAQlC,gBAAgB;AAChB,MAAM,OAAO,kBAAkB;IACrB,gBAAgB,GAAkB,EAAE,CAAC,CAAC,uBAAuB;IAC7D,eAAe,GAAa,EAAE,CAAC,CAAC,2BAA2B;IAC3D,eAAe,GAAoB,EAAE,CAAC,CAAC,iFAAiF;IACxH,eAA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,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;QAED,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;CACF","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\nimport { BeTimePoint, StopWatch } from \"@itwin/core-bentley\";\nimport { GLTimerResultCallback } from \"../RenderSystemDebugControl\";\nimport { FrameBuffer } from \"./FrameBuffer\";\nimport { System } from \"./System\";\n\ninterface AllTimePoints {\n begin: BeTimePoint;\n end: BeTimePoint;\n name: string;\n}\n\n/** @internal */\nexport class PerformanceMetrics {\n private _beginTimePoints: BeTimePoint[] = []; // stack of time points\n private _operationNames: string[] = []; // stack of operation names\n private _allTimePoints1: AllTimePoints[] = []; // queue 1 of data needed to make frameTimings; use 2 copies for double buffering\n private _allTimePoints2: AllTimePoints[] = []; // queue 2 of data needed to make frameTimings; use 2 copies for double buffering\n private _updateallTimePoints1 = true; // determine which buffer to use for the frame timings; used for double buffering the frame timings\n public frameTimings = new Map<string, number>();\n public gatherGlFinish = false; // Set to true if gathering data for display-performance-test-app\n public gatherCurPerformanceMetrics = false; // Set to true if gathering data for Profile GPU\n public curSpfTimeIndex = 0;\n public spfTimes: number[] = [];\n public spfSum: number = 0;\n public fpsTimer: StopWatch = new StopWatch(undefined, true);\n public fpsTimerStart: number = 0;\n\n public constructor(gatherGlFinish = false, gatherCurPerformanceMetrics = false, gpuResults?: GLTimerResultCallback) {\n this.gatherGlFinish = gatherGlFinish;\n this.gatherCurPerformanceMetrics = gatherCurPerformanceMetrics;\n if (gpuResults)\n System.instance.debugControl.resultsCallback = gpuResults;\n }\n\n public beginFrame(sceneTime: number = 0) {\n this._beginTimePoints = [];\n this._operationNames = [];\n this.frameTimings = new Map<string, number>();\n this.frameTimings.set(\"Scene Time\", sceneTime);\n this._operationNames.push(\"Total Time\");\n this._operationNames.push(\"CPU Total Time\");\n const now = BeTimePoint.now();\n this._beginTimePoints.push(now); // this first time point used to calculate total time at the end\n this._beginTimePoints.push(now); // this second time point used to calculate total cpu time at the end\n }\n\n public beginOperation(operationName: string) {\n this._operationNames.push(operationName);\n this._beginTimePoints.push(BeTimePoint.now());\n }\n\n public endOperation() {\n const endTimePoint = BeTimePoint.now();\n const beginTimePoint = this._beginTimePoints.pop() ?? endTimePoint;\n const operationName = this._operationNames.pop();\n if (operationName) { // Add data to queue now, calculate time later; helps eliminate time spent timing things in 'Total Time'\n if (this._updateallTimePoints1) // Push to currently active allTimePoints buffer\n this._allTimePoints1.push({ begin: beginTimePoint, end: endTimePoint, name: operationName });\n else\n this._allTimePoints2.push({ begin: beginTimePoint, end: endTimePoint, name: operationName });\n }\n }\n\n public endFrame() {\n this.endOperation();\n\n // Use double buffering here to ensure that we grab a COMPLETE set of timings from a SINGLE run when grabbing timing data while continuously rendering\n this._updateallTimePoints1 = !this._updateallTimePoints1; // Switch to other allTimePoints buffer\n if (this._updateallTimePoints1) { // Get data from the old buffer that was just completed\n this._allTimePoints2.forEach((record: AllTimePoints) => this.frameTimings.set(record.name, record.end.milliseconds - record.begin.milliseconds));\n this._allTimePoints2 = []; // Reset to empty\n } else {\n this._allTimePoints1.forEach((record: AllTimePoints) => this.frameTimings.set(record.name, record.end.milliseconds - record.begin.milliseconds));\n this._allTimePoints1 = []; // Reset to empty\n }\n this._beginTimePoints = []; // This should be back to [] at this point\n this._operationNames = []; // This should be back to [] at this point\n }\n\n public completeFrameTimings(fbo: FrameBuffer): void {\n if (this.gatherCurPerformanceMetrics) {\n const fpsTimerElapsed = this.fpsTimer.currentSeconds - this.fpsTimerStart;\n if (this.spfTimes[this.curSpfTimeIndex])\n this.spfSum -= this.spfTimes[this.curSpfTimeIndex];\n\n this.spfSum += fpsTimerElapsed;\n this.spfTimes[this.curSpfTimeIndex] = fpsTimerElapsed;\n\n this.curSpfTimeIndex++;\n if (this.curSpfTimeIndex >= 50)\n this.curSpfTimeIndex = 0;\n\n this.fpsTimerStart = this.fpsTimer.currentSeconds;\n }\n\n const system = System.instance;\n if (this.gatherGlFinish && !system.isGLTimerSupported) {\n this.beginOperation(\"Finish GPU Queue\");\n\n // Ensure all previously queued webgl commands are finished by reading back one pixel since gl.Finish didn't work\n const bytes = new Uint8Array(4);\n const gl = system.context;\n system.frameBufferStack.execute(fbo, true, false, () => {\n gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, bytes);\n });\n\n this.endOperation();\n }\n\n this.endFrame();\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlanarClassifier.d.ts","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/PlanarClassifier.ts"],"names":[],"mappings":"AAUA,OAAO,EACwD,8BAA8B,EAAE,+BAA+B,EAC7H,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAA4D,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAA6B,kCAAkC,EAAqB,MAAM,wBAAwB,CAAC;AAC1H,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAW/C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,OAAO,EAAiB,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,oBAAY,uBAAuB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AAY,CAAC,UAAU,GAAG,IAAI;IAc9D,IAAW,UAAU,IAAI,OAAO,CAAkD;IAE3E,CAAC,MAAM,CAAC,OAAO,CAAC;IAYvB,IAAW,OAAO,IAAI,OAAO,GAAG,SAAS,CAWxC;IACM,4BAA4B,IAAI,OAAO,GAAG,SAAS;IAS1D,OAAO,CAAC,WAAW;IAUnB,IAAW,kBAAkB,uBAE5B;IAEM,cAAc,CAAC,UAAU,EAAE,UAAU;IAMrC,SAAS,CAAC,iBAAiB,CAAC,EAAE,kCAAkC,EAAE,cAAc,CAAC,EAAE,mBAAmB;IAMtG,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,sBAAsB,GAAG,IAAI;IAsF5E,IAAI,CAAC,MAAM,EAAE,MAAM;CA+I3B"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module WebGL
|
|
7
7
|
*/
|
|
8
|
-
import { BeEvent, dispose } from "@itwin/core-bentley";
|
|
8
|
+
import { BeEvent, dispose, expectDefined } from "@itwin/core-bentley";
|
|
9
9
|
import { ColorDef, FrustumPlanes, RenderMode, RenderTexture, SpatialClassifierInsideDisplay, SpatialClassifierOutsideDisplay, TextureTransparency, } from "@itwin/core-common";
|
|
10
10
|
import { Matrix4d, Plane3dByOriginAndUnitNormal, Point3d, Range3d, Vector3d } from "@itwin/core-geometry";
|
|
11
11
|
import { GraphicsCollectorDrawArgs } from "../../../tile/internal";
|
|
@@ -193,7 +193,7 @@ class CombineTexturesFrameBuffer extends SingleTextureFrameBuffer {
|
|
|
193
193
|
}
|
|
194
194
|
class ClassifierCombinationBuffer extends CombineTexturesFrameBuffer {
|
|
195
195
|
static create(width, height, classifierColor, classifierFeature) {
|
|
196
|
-
const combineGeom = CombineTexturesGeometry.createGeometry(classifierColor.texture.getHandle(), classifierFeature.texture.getHandle());
|
|
196
|
+
const combineGeom = CombineTexturesGeometry.createGeometry(expectDefined(classifierColor.texture.getHandle()), expectDefined(classifierFeature.texture.getHandle()));
|
|
197
197
|
if (undefined === combineGeom)
|
|
198
198
|
return undefined;
|
|
199
199
|
const textureFbo = SingleTextureFrameBuffer.createTextureAndFrameBuffer(width, 2 * height);
|
|
@@ -202,7 +202,7 @@ class ClassifierCombinationBuffer extends CombineTexturesFrameBuffer {
|
|
|
202
202
|
}
|
|
203
203
|
class ClassifierAndMaskCombinationBuffer extends CombineTexturesFrameBuffer {
|
|
204
204
|
static create(width, height, classifierColor, classifierFeature, mask) {
|
|
205
|
-
const combineGeom = Combine3TexturesGeometry.createGeometry(classifierColor.texture.getHandle(), classifierFeature.texture.getHandle(), mask.texture.getHandle());
|
|
205
|
+
const combineGeom = Combine3TexturesGeometry.createGeometry(expectDefined(classifierColor.texture.getHandle()), expectDefined(classifierFeature.texture.getHandle()), expectDefined(mask.texture.getHandle()));
|
|
206
206
|
if (undefined === combineGeom)
|
|
207
207
|
return undefined;
|
|
208
208
|
const textureFbo = SingleTextureFrameBuffer.createTextureAndFrameBuffer(width, 3 * height);
|
|
@@ -228,7 +228,7 @@ export class PlanarClassifier extends RenderPlanarClassifier {
|
|
|
228
228
|
_anyOpaque = false;
|
|
229
229
|
_anyTranslucent = false;
|
|
230
230
|
_classifier;
|
|
231
|
-
_plane = Plane3dByOriginAndUnitNormal.create(new Point3d(0, 0, 0), new Vector3d(0, 0, 1)); // TBD -- Support other planes - default to X-Y for now.
|
|
231
|
+
_plane = expectDefined(Plane3dByOriginAndUnitNormal.create(new Point3d(0, 0, 0), new Vector3d(0, 0, 1))); // TBD -- Support other planes - default to X-Y for now.
|
|
232
232
|
_renderState = new RenderState();
|
|
233
233
|
_renderCommands;
|
|
234
234
|
_branchStack = new BranchStack();
|
|
@@ -276,7 +276,7 @@ export class PlanarClassifier extends RenderPlanarClassifier {
|
|
|
276
276
|
get outsideDisplay() { return this._classifier ? this._classifier.flags.outside : SpatialClassifierOutsideDisplay.On; }
|
|
277
277
|
get isClassifyingPointCloud() { return true === this._isClassifyingPointCloud; }
|
|
278
278
|
addGraphic(graphic) {
|
|
279
|
-
this._graphics.push(graphic);
|
|
279
|
+
expectDefined(this._graphics).push(graphic);
|
|
280
280
|
}
|
|
281
281
|
static create(properties, target) {
|
|
282
282
|
return new PlanarClassifier(properties, target);
|
|
@@ -388,7 +388,7 @@ export class PlanarClassifier extends RenderPlanarClassifier {
|
|
|
388
388
|
const drawTree = (treeRef, graphics) => {
|
|
389
389
|
this._graphics = graphics;
|
|
390
390
|
const frustumPlanes = this._frustum ? FrustumPlanes.fromFrustum(this._frustum) : FrustumPlanes.createEmpty();
|
|
391
|
-
const drawArgs = GraphicsCollectorDrawArgs.create(context, this, treeRef, frustumPlanes, projection.worldToViewMap);
|
|
391
|
+
const drawArgs = GraphicsCollectorDrawArgs.create(context, this, treeRef, frustumPlanes, expectDefined(projection.worldToViewMap));
|
|
392
392
|
if (undefined !== drawArgs)
|
|
393
393
|
treeRef.draw(drawArgs);
|
|
394
394
|
this._graphics = undefined;
|
|
@@ -405,13 +405,13 @@ export class PlanarClassifier extends RenderPlanarClassifier {
|
|
|
405
405
|
builder.setSymbology(ColorDef.green, ColorDef.green, 2);
|
|
406
406
|
builder.addFrustum(context.viewingSpace.getFrustum());
|
|
407
407
|
builder.setSymbology(ColorDef.red, ColorDef.red, 2);
|
|
408
|
-
builder.addFrustum(this._debugFrustum);
|
|
408
|
+
builder.addFrustum(expectDefined(this._debugFrustum));
|
|
409
409
|
builder.setSymbology(ColorDef.blue, ColorDef.blue, 2);
|
|
410
410
|
builder.addFrustum(this._frustum);
|
|
411
411
|
builder.setSymbology(ColorDef.from(0, 200, 0, 222), ColorDef.from(0, 200, 0, 222), 2);
|
|
412
412
|
builder.addFrustumSides(context.viewingSpace.getFrustum());
|
|
413
413
|
builder.setSymbology(ColorDef.from(200, 0, 0, 222), ColorDef.from(200, 0, 0, 222), 2);
|
|
414
|
-
builder.addFrustumSides(this._debugFrustum);
|
|
414
|
+
builder.addFrustumSides(expectDefined(this._debugFrustum));
|
|
415
415
|
builder.setSymbology(ColorDef.from(0, 0, 200, 222), ColorDef.from(0, 0, 200, 222), 2);
|
|
416
416
|
builder.addFrustumSides(this._frustum);
|
|
417
417
|
this._debugFrustumGraphic = builder.finish();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlanarClassifier.js","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/PlanarClassifier.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACL,QAAQ,EAAW,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,8BAA8B,EAAE,+BAA+B,EAAE,mBAAmB,GAClJ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,4BAA4B,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE1G,OAAO,EAAE,yBAAyB,EAAyD,MAAM,wBAAwB,CAAC;AAK1H,OAAO,EAA0B,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAkB,wBAAwB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG3H,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE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["/*---------------------------------------------------------------------------------------------\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\n/** @packageDocumentation\n * @module WebGL\n */\n\nimport { BeEvent, dispose } from \"@itwin/core-bentley\";\nimport {\n ColorDef, Frustum, FrustumPlanes, RenderMode, RenderTexture, SpatialClassifierInsideDisplay, SpatialClassifierOutsideDisplay, TextureTransparency,\n} from \"@itwin/core-common\";\nimport { Matrix4d, Plane3dByOriginAndUnitNormal, Point3d, Range3d, Vector3d } from \"@itwin/core-geometry\";\nimport { PlanarClipMaskState } from \"../../../PlanarClipMaskState\";\nimport { GraphicsCollectorDrawArgs, SpatialClassifierTileTreeReference, TileTreeReference } from \"../../../tile/internal\";\nimport { SceneContext } from \"../../../ViewContext\";\nimport { FeatureSymbology } from \"../../../render/FeatureSymbology\";\nimport { RenderGraphic } from \"../../../render/RenderGraphic\";\nimport { RenderMemory } from \"../../../render/RenderMemory\";\nimport { PlanarClassifierTarget, RenderPlanarClassifier } from \"../RenderPlanarClassifier\";\nimport { BatchState } from \"./BatchState\";\nimport { BranchStack } from \"./BranchStack\";\nimport { CachedGeometry, Combine3TexturesGeometry, CombineTexturesGeometry, ViewportQuadGeometry } from \"./CachedGeometry\";\nimport { WebGLDisposable } from \"./Disposable\";\nimport { DrawCommands } from \"./DrawCommand\";\nimport { FrameBuffer } from \"./FrameBuffer\";\nimport { GL } from \"./GL\";\nimport { Batch, Branch } from \"./Graphic\";\nimport { PlanarTextureProjection } from \"./PlanarTextureProjection\";\nimport { RenderCommands } from \"./RenderCommands\";\nimport { RenderPass } from \"./RenderFlags\";\nimport { RenderState } from \"./RenderState\";\nimport { getDrawParams } from \"./ScratchDrawParams\";\nimport { System } from \"./System\";\nimport { Target } from \"./Target\";\nimport { TechniqueId } from \"./TechniqueId\";\nimport { Texture, TextureHandle } from \"./Texture\";\nimport { ActiveSpatialClassifier } from \"../../../SpatialClassifiersState\";\n\nexport enum PlanarClassifierContent { None = 0, MaskOnly = 1, ClassifierOnly = 2, ClassifierAndMask = 3 }\n\nfunction createTexture(handle: TextureHandle): Texture {\n return new Texture({\n handle,\n ownership: \"external\",\n type: RenderTexture.Type.TileSection,\n transparency: TextureTransparency.Opaque,\n });\n}\n\nfunction createTextureHandle(width: number, height: number, heightMult = 1.0) {\n return TextureHandle.createForAttachment(width, height * heightMult, GL.Texture.Format.Rgba, GL.Texture.DataType.UnsignedByte);\n}\n\nclass ClassifierTextures implements WebGLDisposable {\n private constructor(public readonly color: Texture,\n public readonly feature: Texture,\n public readonly hilite: Texture) { }\n\n public get isDisposed(): boolean {\n return this.color.isDisposed\n && this.feature.isDisposed\n && this.hilite.isDisposed;\n }\n\n public [Symbol.dispose](): void {\n dispose(this.color);\n dispose(this.feature);\n dispose(this.hilite);\n }\n\n public collectStatistics(stats: RenderMemory.Statistics): void {\n stats.addPlanarClassifier(this.color.bytesUsed);\n stats.addPlanarClassifier(this.feature.bytesUsed);\n stats.addPlanarClassifier(this.hilite.bytesUsed);\n }\n\n public static create(width: number, height: number): ClassifierTextures | undefined {\n const hColor = createTextureHandle(width, height);\n const hFeature = createTextureHandle(width, height);\n const hHilite = createTextureHandle(width, height);\n if (!hColor || !hFeature || !hHilite)\n return undefined;\n\n const color = createTexture(hColor);\n const feature = createTexture(hFeature);\n const hilite = createTexture(hHilite);\n if (!color || !feature || !hilite)\n return undefined;\n\n return new ClassifierTextures(color, feature, hilite);\n }\n}\n\nclass ClassifierFrameBuffers implements WebGLDisposable {\n private constructor(\n public readonly textures: ClassifierTextures,\n private readonly _hilite: FrameBuffer,\n private readonly _fbo: FrameBuffer,\n private readonly _clearGeom: ViewportQuadGeometry) {\n }\n\n public get isDisposed(): boolean {\n return this.textures.isDisposed && this._hilite.isDisposed && this._fbo.isDisposed && this._clearGeom.isDisposed;\n }\n\n public [Symbol.dispose](): void {\n dispose(this._fbo);\n dispose(this._clearGeom);\n dispose(this.textures);\n dispose(this._hilite);\n }\n\n public draw(cmds: DrawCommands, target: Target): void {\n System.instance.frameBufferStack.execute(this._fbo, true, false, () => {\n target.techniques.draw(getDrawParams(target, this._clearGeom));\n target.techniques.execute(target, cmds, RenderPass.PlanarClassification);\n });\n }\n\n public drawHilite(cmds: DrawCommands, target: Target): void {\n const system = System.instance;\n const gl = system.context;\n system.frameBufferStack.execute(this._hilite, true, false, () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(GL.BufferBit.Color);\n target.techniques.execute(target, cmds, RenderPass.Hilite);\n });\n }\n\n public static create(width: number, height: number): ClassifierFrameBuffers | undefined {\n const textures = ClassifierTextures.create(width, height);\n if (undefined === textures)\n return undefined;\n\n const hiliteFbo = FrameBuffer.create([textures.hilite.texture]);\n if (undefined === hiliteFbo)\n return undefined;\n\n const fbo = FrameBuffer.create([textures.color.texture, textures.feature.texture]);\n if (undefined === fbo)\n return undefined;\n\n const geom = ViewportQuadGeometry.create(TechniqueId.ClearPickAndColor);\n return undefined !== geom ? new this(textures, hiliteFbo, fbo, geom) : undefined;\n }\n}\n\ninterface TextureAndFbo {\n texture: Texture;\n fbo: FrameBuffer;\n}\n\nabstract class SingleTextureFrameBuffer implements WebGLDisposable {\n public texture: Texture;\n protected fbo: FrameBuffer;\n public get isDisposed(): boolean { return this.texture.isDisposed && this.fbo.isDisposed; }\n public collectStatistics(stats: RenderMemory.Statistics): void { stats.addPlanarClassifier(this.texture.bytesUsed); }\n protected constructor(textureAndFbo: TextureAndFbo) {\n this.texture = textureAndFbo.texture;\n this.fbo = textureAndFbo.fbo;\n }\n public [Symbol.dispose](): void {\n dispose(this.texture);\n dispose(this.fbo);\n }\n public static createTextureAndFrameBuffer(width: number, height: number): TextureAndFbo | undefined {\n const hTexture = TextureHandle.createForAttachment(width, height, GL.Texture.Format.Rgba, GL.Texture.DataType.UnsignedByte);\n if (!hTexture)\n return undefined;\n\n const texture = new Texture({ type: RenderTexture.Type.TileSection, ownership: \"external\", handle: hTexture, transparency: TextureTransparency.Opaque });\n if (!texture)\n return undefined;\n\n const fbo = FrameBuffer.create([texture.texture]);\n if (undefined === fbo)\n return undefined;\n\n return { texture, fbo };\n }\n}\nclass MaskFrameBuffer extends SingleTextureFrameBuffer {\n public static create(width: number, height: number): MaskFrameBuffer | undefined {\n const textureFbo = SingleTextureFrameBuffer.createTextureAndFrameBuffer(width, height);\n return undefined === textureFbo ? undefined : new MaskFrameBuffer(textureFbo);\n }\n public draw(cmds: DrawCommands, target: Target): void {\n const system = System.instance;\n const gl = system.context;\n\n system.frameBufferStack.execute(this.fbo, true, false, () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(GL.BufferBit.Color);\n target.techniques.execute(target, cmds, RenderPass.PlanarClassification);\n });\n }\n}\nabstract class CombineTexturesFrameBuffer extends SingleTextureFrameBuffer {\n constructor(textureAndFbo: TextureAndFbo, private _combineGeom: CachedGeometry, private _width: number, private _height: number, private _heightMult: number) { super(textureAndFbo); }\n public compose(target: Target): void {\n const system = System.instance;\n const gl = system.context;\n system.context.viewport(0, 0, this._width, this._heightMult * this._height);\n system.frameBufferStack.execute(this.fbo, true, false, () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(GL.BufferBit.Color);\n target.techniques.draw(getDrawParams(target, this._combineGeom));\n });\n }\n}\n\nclass ClassifierCombinationBuffer extends CombineTexturesFrameBuffer {\n public static create(width: number, height: number, classifierColor: Texture, classifierFeature: Texture): ClassifierAndMaskCombinationBuffer | undefined {\n const combineGeom = CombineTexturesGeometry.createGeometry(classifierColor.texture.getHandle()!, classifierFeature.texture.getHandle()!);\n if (undefined === combineGeom)\n return undefined;\n\n const textureFbo = SingleTextureFrameBuffer.createTextureAndFrameBuffer(width, 2 * height);\n return undefined === textureFbo ? undefined : new ClassifierCombinationBuffer(textureFbo, combineGeom, width, height, 2);\n }\n}\nclass ClassifierAndMaskCombinationBuffer extends CombineTexturesFrameBuffer {\n public static create(width: number, height: number, classifierColor: Texture, classifierFeature: Texture, mask: Texture): ClassifierAndMaskCombinationBuffer | undefined {\n const combineGeom = Combine3TexturesGeometry.createGeometry(classifierColor.texture.getHandle()!, classifierFeature.texture.getHandle()!, mask.texture.getHandle()!);\n if (undefined === combineGeom)\n return undefined;\n\n const textureFbo = SingleTextureFrameBuffer.createTextureAndFrameBuffer(width, 3 * height);\n return undefined === textureFbo ? undefined : new ClassifierAndMaskCombinationBuffer(textureFbo, combineGeom, width, height, 3);\n }\n}\n\nconst scratchPrevRenderState = new RenderState();\n\n/** @internal */\nexport class PlanarClassifier extends RenderPlanarClassifier implements RenderMemory.Consumer, WebGLDisposable {\n private _classifierBuffers?: ClassifierFrameBuffers;\n private _maskBuffer?: MaskFrameBuffer;\n private _classifierCombinedBuffer?: ClassifierCombinationBuffer;\n private _classifierAndMaskCombinedBuffer?: ClassifierAndMaskCombinationBuffer;\n private _projectionMatrix = Matrix4d.createIdentity();\n private _graphics?: RenderGraphic[];\n private readonly _classifierGraphics: RenderGraphic[] = [];\n private readonly _maskGraphics: RenderGraphic[] = [];\n private _frustum?: Frustum;\n private _width = 0;\n private _height = 0;\n private _baseBatchId = 0;\n private _anyHilited = false;\n private _anyOpaque = false;\n private _anyTranslucent = false;\n private _classifier?: ActiveSpatialClassifier;\n private readonly _plane = Plane3dByOriginAndUnitNormal.create(new Point3d(0, 0, 0), new Vector3d(0, 0, 1))!; // TBD -- Support other planes - default to X-Y for now.\n private readonly _renderState = new RenderState();\n private readonly _renderCommands: RenderCommands;\n private readonly _branchStack = new BranchStack();\n private readonly _batchState: BatchState;\n private _planarClipMask?: PlanarClipMaskState;\n private _classifierTreeRef?: SpatialClassifierTileTreeReference;\n private _planarClipMaskOverrides?: FeatureSymbology.Overrides;\n private _contentMode: PlanarClassifierContent = PlanarClassifierContent.None;\n private _removeMe?: () => void;\n private _featureSymbologySource: FeatureSymbology.Source = {\n onSourceDisposed: new BeEvent<() => void>(),\n };;\n\n private static _postProjectionMatrix = Matrix4d.createRowValues(\n 0, 1, 0, 0,\n 0, 0, -1, 0,\n 1, 0, 0, 0,\n 0, 0, 0, 1);\n private _debugFrustum?: Frustum;\n private _doDebugFrustum = false;\n private _debugFrustumGraphic?: RenderGraphic = undefined;\n private _isClassifyingPointCloud?: boolean; // we will detect this the first time we draw\n private readonly _bgColor = ColorDef.from(0, 0, 0, 255);\n\n private constructor(classifier: ActiveSpatialClassifier | undefined, target: Target) {\n super();\n this._classifier = classifier;\n\n const flags = this._renderState.flags;\n flags.depthMask = flags.blend = flags.depthTest = false;\n\n this._batchState = new BatchState(this._branchStack);\n this._renderCommands = new RenderCommands(target, this._branchStack, this._batchState);\n }\n public get textureImageCount(): number { return this._contentMode; }\n\n public getParams(params: Float32Array): void {\n params[0] = this.insideDisplay;\n params[1] = this.outsideDisplay;\n params[2] = this._contentMode;\n if (this._planarClipMask?.settings.invert) // If the mask sense is inverted, negate the contentMode to indicate this to the shader.\n params[2] = - params[2];\n\n params[3] = (this._planarClipMask?.settings.transparency === undefined) ? -1 : this._planarClipMask.settings.transparency;\n\n }\n\n public get hiliteTexture(): Texture | undefined { return undefined !== this._classifierBuffers ? this._classifierBuffers.textures.hilite : undefined; }\n public get projectionMatrix(): Matrix4d { return this._projectionMatrix; }\n // public get properties(): SpatialClassifier { return this._classifier; }\n public get baseBatchId(): number { return this._baseBatchId; }\n public get anyHilited(): boolean { return this._anyHilited; }\n public get anyOpaque(): boolean { return this._anyOpaque; }\n public get anyTranslucent(): boolean { return this._anyTranslucent; }\n public get insideDisplay(): SpatialClassifierInsideDisplay { return this._classifier ? this._classifier.flags.inside : SpatialClassifierInsideDisplay.Off; }\n public get outsideDisplay(): SpatialClassifierOutsideDisplay { return this._classifier ? this._classifier.flags.outside : SpatialClassifierOutsideDisplay.On; }\n public get isClassifyingPointCloud(): boolean { return true === this._isClassifyingPointCloud; }\n\n public addGraphic(graphic: RenderGraphic) {\n this._graphics!.push(graphic);\n }\n\n public static create(properties: ActiveSpatialClassifier | undefined, target: Target): PlanarClassifier {\n return new PlanarClassifier(properties, target);\n }\n\n public collectStatistics(stats: RenderMemory.Statistics): void {\n if (undefined !== this._classifierBuffers)\n this._classifierBuffers.textures.collectStatistics(stats);\n\n if (undefined !== this._maskBuffer)\n this._maskBuffer.collectStatistics(stats);\n\n if (undefined !== this._classifierCombinedBuffer)\n this._classifierCombinedBuffer.collectStatistics(stats);\n\n if (undefined !== this._classifierAndMaskCombinedBuffer)\n this._classifierAndMaskCombinedBuffer.collectStatistics(stats);\n }\n\n public get isDisposed(): boolean { return undefined === this._classifierBuffers; }\n\n public [Symbol.dispose]() {\n this._classifierBuffers = dispose(this._classifierBuffers);\n this._maskBuffer = dispose(this._maskBuffer);\n this._classifierCombinedBuffer = dispose(this._classifierCombinedBuffer);\n this._classifierAndMaskCombinedBuffer = dispose(this._classifierAndMaskCombinedBuffer);\n if (this._removeMe) {\n this._removeMe();\n this._removeMe = undefined;\n }\n this._featureSymbologySource.onSourceDisposed.raiseEvent();\n }\n\n public get texture(): Texture | undefined {\n switch (this._contentMode) {\n case PlanarClassifierContent.None:\n return undefined;\n case PlanarClassifierContent.ClassifierOnly:\n return this._classifierCombinedBuffer?.texture;\n case PlanarClassifierContent.MaskOnly:\n return this._maskBuffer?.texture;\n case PlanarClassifierContent.ClassifierAndMask:\n return this._classifierAndMaskCombinedBuffer?.texture;\n }\n }\n public getOrCreateClassifierTexture(): Texture | undefined {\n if (undefined === this._classifierBuffers)\n this._classifierBuffers = ClassifierFrameBuffers.create(this._width, this._height);\n if (undefined !== this._classifierBuffers && undefined === this._classifierCombinedBuffer)\n this._classifierCombinedBuffer = ClassifierCombinationBuffer.create(this._width, this._height, this._classifierBuffers.textures.color, this._classifierBuffers.textures.feature);\n\n return this._classifierCombinedBuffer?.texture;\n }\n\n private pushBatches(batchState: BatchState, graphics: RenderGraphic[]) {\n graphics.forEach((graphic) => {\n if (graphic instanceof Batch) {\n batchState.push(graphic, true);\n batchState.pop();\n } else if (graphic instanceof Branch) {\n this.pushBatches(batchState, graphic.branch.entries);\n }\n });\n }\n public get sourceTransparency() {\n return this._classifierTreeRef?.transparency;\n }\n\n public pushBatchState(batchState: BatchState) {\n this._baseBatchId = batchState.nextBatchId - 1;\n if (undefined !== this._classifierGraphics)\n this.pushBatches(batchState, this._classifierGraphics);\n }\n\n public setSource(classifierTreeRef?: SpatialClassifierTileTreeReference, planarClipMask?: PlanarClipMaskState) {\n this._classifierTreeRef = classifierTreeRef;\n this._classifier = classifierTreeRef?.activeClassifier;\n this._planarClipMask = planarClipMask;\n }\n\n public collectGraphics(context: SceneContext, target: PlanarClassifierTarget): void {\n this._classifierGraphics.length = this._maskGraphics.length = 0;\n if (undefined === context.viewingSpace)\n return;\n\n const viewState = context.viewingSpace.view;\n if (!viewState.isSpatialView())\n return;\n\n this._doDebugFrustum = context.target.debugControl?.displayMaskFrustum ?? false;\n\n const maxTextureSize = System.instance.maxTexSizeAllow;\n const requiredHeight = maxTextureSize;\n const requiredWidth = maxTextureSize;\n if (requiredWidth !== this._width || requiredHeight !== this._height)\n this[Symbol.dispose]();\n\n this._width = requiredWidth;\n this._height = requiredHeight;\n const maskRange = Range3d.createNull();\n const maskTrees = this._planarClipMask?.getTileTrees(context, target.modelId, maskRange);\n if (!maskTrees && !this._classifierTreeRef)\n return;\n\n const allTrees = maskTrees ? maskTrees.slice() : new Array<TileTreeReference>();\n if (this._classifierTreeRef)\n allTrees.push(this._classifierTreeRef);\n\n const projection = PlanarTextureProjection.computePlanarTextureProjection(this._plane, context, target, allTrees, viewState, this._width, this._height, maskRange);\n if (!projection.textureFrustum || !projection.projectionMatrix || !projection.worldToViewMap)\n return;\n\n this._projectionMatrix = projection.projectionMatrix;\n this._frustum = projection.textureFrustum;\n this._debugFrustum = projection.debugFrustum;\n this._planarClipMaskOverrides = this._planarClipMask?.getPlanarClipMaskSymbologyOverrides(context, this._featureSymbologySource);\n if (!this._planarClipMask?.usingViewportOverrides && this._removeMe) {\n this._removeMe();\n this._removeMe = undefined;\n } else if (this._planarClipMask?.usingViewportOverrides && !this._removeMe) {\n this._removeMe = context.viewport.onFeatureOverridesChanged.addListener(() => {\n this._planarClipMaskOverrides = this._planarClipMask?.getPlanarClipMaskSymbologyOverrides(context, this._featureSymbologySource);\n context.viewport.requestRedraw();\n });\n }\n\n const drawTree = (treeRef: TileTreeReference, graphics: RenderGraphic[]) => {\n this._graphics = graphics;\n const frustumPlanes = this._frustum ? FrustumPlanes.fromFrustum(this._frustum) : FrustumPlanes.createEmpty();\n const drawArgs = GraphicsCollectorDrawArgs.create(context, this, treeRef, frustumPlanes, projection.worldToViewMap!);\n if (undefined !== drawArgs)\n treeRef.draw(drawArgs);\n\n this._graphics = undefined;\n };\n if (this._classifierTreeRef)\n drawTree(this._classifierTreeRef, this._classifierGraphics);\n\n if (maskTrees)\n maskTrees.forEach((maskTree) => drawTree(maskTree, this._maskGraphics));\n\n // Shader behaves slightly differently when classifying surfaces vs point clouds.\n this._isClassifyingPointCloud = target.isPointCloud;\n\n if (this._doDebugFrustum) {\n this._debugFrustumGraphic = dispose(this._debugFrustumGraphic);\n const builder = context.createSceneGraphicBuilder();\n\n builder.setSymbology(ColorDef.green, ColorDef.green, 2);\n builder.addFrustum(context.viewingSpace.getFrustum());\n builder.setSymbology(ColorDef.red, ColorDef.red, 2);\n builder.addFrustum(this._debugFrustum!);\n builder.setSymbology(ColorDef.blue, ColorDef.blue, 2);\n builder.addFrustum(this._frustum);\n\n builder.setSymbology(ColorDef.from(0, 200, 0, 222), ColorDef.from(0, 200, 0, 222), 2);\n builder.addFrustumSides(context.viewingSpace.getFrustum());\n builder.setSymbology(ColorDef.from(200, 0, 0, 222), ColorDef.from(200, 0, 0, 222), 2);\n builder.addFrustumSides(this._debugFrustum!);\n builder.setSymbology(ColorDef.from(0, 0, 200, 222), ColorDef.from(0, 0, 200, 222), 2);\n builder.addFrustumSides(this._frustum);\n this._debugFrustumGraphic = builder.finish();\n context.outputGraphic(this._debugFrustumGraphic);\n }\n }\n\n public draw(target: Target) {\n if (undefined === this._frustum)\n return;\n\n this._contentMode = PlanarClassifierContent.None;\n let combinationBuffer: ClassifierCombinationBuffer | undefined;\n if (this._classifierGraphics.length === 0) {\n if (this._maskGraphics.length === 0) {\n return;\n } else {\n if (undefined === this._maskBuffer) {\n this._maskBuffer = MaskFrameBuffer.create(this._width, this._height);\n if (undefined === this._maskBuffer)\n return;\n }\n this._contentMode = PlanarClassifierContent.MaskOnly;\n }\n } else {\n if (undefined === this._classifierBuffers) {\n this._classifierBuffers = ClassifierFrameBuffers.create(this._width, this._height);\n if (undefined === this._classifierBuffers)\n return;\n }\n if (this._maskGraphics.length === 0) {\n if (undefined === this._classifierCombinedBuffer) {\n combinationBuffer = this._classifierCombinedBuffer = ClassifierCombinationBuffer.create(this._width, this._height, this._classifierBuffers.textures.color, this._classifierBuffers.textures.feature);\n if (undefined === this._classifierCombinedBuffer)\n return;\n }\n this._contentMode = PlanarClassifierContent.ClassifierOnly;\n combinationBuffer = this._classifierCombinedBuffer;\n } else {\n if (undefined === this._maskBuffer) {\n this._maskBuffer = MaskFrameBuffer.create(this._width, this._height);\n if (undefined === this._maskBuffer)\n return;\n }\n if (undefined === this._classifierAndMaskCombinedBuffer) {\n combinationBuffer = this._classifierAndMaskCombinedBuffer = ClassifierAndMaskCombinationBuffer.create(this._width, this._height, this._classifierBuffers.textures.color, this._classifierBuffers.textures.feature, this._maskBuffer.texture);\n if (undefined === this._classifierAndMaskCombinedBuffer)\n return;\n }\n combinationBuffer = this._classifierAndMaskCombinedBuffer;\n this._contentMode = PlanarClassifierContent.ClassifierAndMask;\n }\n }\n\n // Temporarily override the Target's state.\n const system = System.instance;\n const maskViewFlags = {\n renderMode: RenderMode.SmoothShade,\n wiremesh: false,\n transparency: !this.isClassifyingPointCloud, // point clouds don't support transparency.\n textures: false,\n lighting: false,\n shadows: false,\n monochrome: false,\n materials: false,\n ambientOcclusion: false,\n visibleEdges: false,\n hiddenEdges: false,\n };\n const prevState = system.currentRenderState.clone(scratchPrevRenderState);\n system.context.viewport(0, 0, this._width, this._height);\n const vf = target.currentViewFlags.copy(this._classifierTreeRef ? this._classifierTreeRef.viewFlags : maskViewFlags);\n\n system.applyRenderState(this._renderState);\n const prevPlan = target.plan;\n const prevOverrides = target.currentFeatureSymbologyOverrides;\n\n target.uniforms.style.changeBackgroundColor(this._bgColor); // Avoid white on white reversal. Will be reset in changeRenderPlan below.\n target.changeFrustum(this._frustum, this._frustum.getFraction(), true);\n this._anyTranslucent = false;\n\n const prevProjMatrix = target.uniforms.frustum.projectionMatrix;\n target.uniforms.frustum.changeProjectionMatrix(PlanarClassifier._postProjectionMatrix.multiplyMatrixMatrix(prevProjMatrix));\n target.uniforms.branch.changeRenderPlan(vf, target.plan.is3d, target.plan.hline);\n\n const addCmds = (oldCmds: DrawCommands, newCmds: DrawCommands) => {\n if (undefined === newCmds)\n return oldCmds;\n if (newCmds.length > 50000) {\n \t// This method is slower for smaller array sizes, but when the size of newCmds gets larger it's performance is ok.\n return oldCmds.concat(newCmds);\n } else {\n \t// This method runs faster, but gets a stack overflow when the size of newCmds is too large.\n oldCmds.push(...newCmds);\n return oldCmds;\n }\n }\n\n const renderCommands = this._renderCommands;\n const getDrawCommands = (graphics: RenderGraphic[]) => {\n this._batchState.reset();\n renderCommands.reset(target, this._branchStack, this._batchState);\n renderCommands.collectGraphicsForPlanarProjection(graphics);\n\n // Draw the classifiers into our attachments.\n // When using Display.ElementColor, the color and transparency come from the classifier geometry. Therefore we may need to draw the classified geometry\n // in a different pass - or both passes - depending on the transparency of the classifiers.\n // NB: \"Outside\" geometry by definition cannot take color/transparency from element...\n let cmds = renderCommands.getCommands(RenderPass.OpaquePlanar);\n\n // NB: We don't strictly require the classifier geometry to be planar, and sometimes (e.g., \"planar\" polyface/bspsurf) we do not detect planarity.\n cmds = addCmds(cmds, renderCommands.getCommands(RenderPass.OpaqueGeneral));\n cmds = addCmds(cmds, renderCommands.getCommands(RenderPass.OpaqueLinear));\n this._anyOpaque = cmds.length > 0;\n const transCmds = renderCommands.getCommands(RenderPass.Translucent);\n if (transCmds.length > 0) {\n cmds = addCmds(cmds, renderCommands.getCommands(RenderPass.Translucent));\n this._anyTranslucent = true;\n }\n return cmds;\n };\n\n if (this._classifierGraphics.length > 0 && this._classifierBuffers) {\n this._classifierBuffers.draw(getDrawCommands(this._classifierGraphics), target);\n\n // Draw any hilited classifiers.\n const hiliteCommands = renderCommands.getCommands(RenderPass.Hilite);\n this._anyHilited = 0 !== hiliteCommands.length;\n if (this._anyHilited)\n this._classifierBuffers.drawHilite(hiliteCommands, target);\n }\n if (this._maskGraphics.length > 0 && this._maskBuffer) {\n if (this._planarClipMaskOverrides)\n target.overrideFeatureSymbology(this._planarClipMaskOverrides);\n if (this._planarClipMask && this._planarClipMask.settings.transparency !== undefined && this._planarClipMask.settings.transparency > 0.0)\n this._anyTranslucent = true;\n\n this._maskBuffer.draw(getDrawCommands(this._maskGraphics), target);\n\n }\n if (combinationBuffer)\n combinationBuffer.compose(target);\n\n this._batchState.reset();\n target.changeRenderPlan(prevPlan);\n target.overrideFeatureSymbology(prevOverrides);\n\n system.applyRenderState(prevState);\n system.context.viewport(0, 0, target.viewRect.width, target.viewRect.height);\n }\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"PlanarClassifier.js","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/PlanarClassifier.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EACL,QAAQ,EAAW,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,8BAA8B,EAAE,+BAA+B,EAAE,mBAAmB,GAClJ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,4BAA4B,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE1G,OAAO,EAAE,yBAAyB,EAAyD,MAAM,wBAAwB,CAAC;AAK1H,OAAO,EAA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AI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,YAAY,GAAG,GAAG;gBACtI,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;YAE9B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,CAAC;QAErE,CAAC;QACD,IAAI,iBAAiB;YACnB,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEpC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACzB,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAClC,MAAM,CAAC,wBAAwB,CAAC,aAAa,CAAC,CAAC;QAE/C,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;QACnC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/E,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\n/** @packageDocumentation\n * @module WebGL\n */\n\nimport { BeEvent, dispose, expectDefined } from \"@itwin/core-bentley\";\nimport {\n ColorDef, Frustum, FrustumPlanes, RenderMode, RenderTexture, SpatialClassifierInsideDisplay, SpatialClassifierOutsideDisplay, TextureTransparency,\n} from \"@itwin/core-common\";\nimport { Matrix4d, Plane3dByOriginAndUnitNormal, Point3d, Range3d, Vector3d } from \"@itwin/core-geometry\";\nimport { PlanarClipMaskState } from \"../../../PlanarClipMaskState\";\nimport { GraphicsCollectorDrawArgs, SpatialClassifierTileTreeReference, TileTreeReference } from \"../../../tile/internal\";\nimport { SceneContext } from \"../../../ViewContext\";\nimport { FeatureSymbology } from \"../../../render/FeatureSymbology\";\nimport { RenderGraphic } from \"../../../render/RenderGraphic\";\nimport { RenderMemory } from \"../../../render/RenderMemory\";\nimport { PlanarClassifierTarget, RenderPlanarClassifier } from \"../RenderPlanarClassifier\";\nimport { BatchState } from \"./BatchState\";\nimport { BranchStack } from \"./BranchStack\";\nimport { CachedGeometry, Combine3TexturesGeometry, CombineTexturesGeometry, ViewportQuadGeometry } from \"./CachedGeometry\";\nimport { WebGLDisposable } from \"./Disposable\";\nimport { DrawCommands } from \"./DrawCommand\";\nimport { FrameBuffer } from \"./FrameBuffer\";\nimport { GL } from \"./GL\";\nimport { Batch, Branch } from \"./Graphic\";\nimport { PlanarTextureProjection } from \"./PlanarTextureProjection\";\nimport { RenderCommands } from \"./RenderCommands\";\nimport { RenderPass } from \"./RenderFlags\";\nimport { RenderState } from \"./RenderState\";\nimport { getDrawParams } from \"./ScratchDrawParams\";\nimport { System } from \"./System\";\nimport { Target } from \"./Target\";\nimport { TechniqueId } from \"./TechniqueId\";\nimport { Texture, TextureHandle } from \"./Texture\";\nimport { ActiveSpatialClassifier } from \"../../../SpatialClassifiersState\";\n\nexport enum PlanarClassifierContent { None = 0, MaskOnly = 1, ClassifierOnly = 2, ClassifierAndMask = 3 }\n\nfunction createTexture(handle: TextureHandle): Texture {\n return new Texture({\n handle,\n ownership: \"external\",\n type: RenderTexture.Type.TileSection,\n transparency: TextureTransparency.Opaque,\n });\n}\n\nfunction createTextureHandle(width: number, height: number, heightMult = 1.0) {\n return TextureHandle.createForAttachment(width, height * heightMult, GL.Texture.Format.Rgba, GL.Texture.DataType.UnsignedByte);\n}\n\nclass ClassifierTextures implements WebGLDisposable {\n private constructor(public readonly color: Texture,\n public readonly feature: Texture,\n public readonly hilite: Texture) { }\n\n public get isDisposed(): boolean {\n return this.color.isDisposed\n && this.feature.isDisposed\n && this.hilite.isDisposed;\n }\n\n public [Symbol.dispose](): void {\n dispose(this.color);\n dispose(this.feature);\n dispose(this.hilite);\n }\n\n public collectStatistics(stats: RenderMemory.Statistics): void {\n stats.addPlanarClassifier(this.color.bytesUsed);\n stats.addPlanarClassifier(this.feature.bytesUsed);\n stats.addPlanarClassifier(this.hilite.bytesUsed);\n }\n\n public static create(width: number, height: number): ClassifierTextures | undefined {\n const hColor = createTextureHandle(width, height);\n const hFeature = createTextureHandle(width, height);\n const hHilite = createTextureHandle(width, height);\n if (!hColor || !hFeature || !hHilite)\n return undefined;\n\n const color = createTexture(hColor);\n const feature = createTexture(hFeature);\n const hilite = createTexture(hHilite);\n if (!color || !feature || !hilite)\n return undefined;\n\n return new ClassifierTextures(color, feature, hilite);\n }\n}\n\nclass ClassifierFrameBuffers implements WebGLDisposable {\n private constructor(\n public readonly textures: ClassifierTextures,\n private readonly _hilite: FrameBuffer,\n private readonly _fbo: FrameBuffer,\n private readonly _clearGeom: ViewportQuadGeometry) {\n }\n\n public get isDisposed(): boolean {\n return this.textures.isDisposed && this._hilite.isDisposed && this._fbo.isDisposed && this._clearGeom.isDisposed;\n }\n\n public [Symbol.dispose](): void {\n dispose(this._fbo);\n dispose(this._clearGeom);\n dispose(this.textures);\n dispose(this._hilite);\n }\n\n public draw(cmds: DrawCommands, target: Target): void {\n System.instance.frameBufferStack.execute(this._fbo, true, false, () => {\n target.techniques.draw(getDrawParams(target, this._clearGeom));\n target.techniques.execute(target, cmds, RenderPass.PlanarClassification);\n });\n }\n\n public drawHilite(cmds: DrawCommands, target: Target): void {\n const system = System.instance;\n const gl = system.context;\n system.frameBufferStack.execute(this._hilite, true, false, () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(GL.BufferBit.Color);\n target.techniques.execute(target, cmds, RenderPass.Hilite);\n });\n }\n\n public static create(width: number, height: number): ClassifierFrameBuffers | undefined {\n const textures = ClassifierTextures.create(width, height);\n if (undefined === textures)\n return undefined;\n\n const hiliteFbo = FrameBuffer.create([textures.hilite.texture]);\n if (undefined === hiliteFbo)\n return undefined;\n\n const fbo = FrameBuffer.create([textures.color.texture, textures.feature.texture]);\n if (undefined === fbo)\n return undefined;\n\n const geom = ViewportQuadGeometry.create(TechniqueId.ClearPickAndColor);\n return undefined !== geom ? new this(textures, hiliteFbo, fbo, geom) : undefined;\n }\n}\n\ninterface TextureAndFbo {\n texture: Texture;\n fbo: FrameBuffer;\n}\n\nabstract class SingleTextureFrameBuffer implements WebGLDisposable {\n public texture: Texture;\n protected fbo: FrameBuffer;\n public get isDisposed(): boolean { return this.texture.isDisposed && this.fbo.isDisposed; }\n public collectStatistics(stats: RenderMemory.Statistics): void { stats.addPlanarClassifier(this.texture.bytesUsed); }\n protected constructor(textureAndFbo: TextureAndFbo) {\n this.texture = textureAndFbo.texture;\n this.fbo = textureAndFbo.fbo;\n }\n public [Symbol.dispose](): void {\n dispose(this.texture);\n dispose(this.fbo);\n }\n public static createTextureAndFrameBuffer(width: number, height: number): TextureAndFbo | undefined {\n const hTexture = TextureHandle.createForAttachment(width, height, GL.Texture.Format.Rgba, GL.Texture.DataType.UnsignedByte);\n if (!hTexture)\n return undefined;\n\n const texture = new Texture({ type: RenderTexture.Type.TileSection, ownership: \"external\", handle: hTexture, transparency: TextureTransparency.Opaque });\n if (!texture)\n return undefined;\n\n const fbo = FrameBuffer.create([texture.texture]);\n if (undefined === fbo)\n return undefined;\n\n return { texture, fbo };\n }\n}\nclass MaskFrameBuffer extends SingleTextureFrameBuffer {\n public static create(width: number, height: number): MaskFrameBuffer | undefined {\n const textureFbo = SingleTextureFrameBuffer.createTextureAndFrameBuffer(width, height);\n return undefined === textureFbo ? undefined : new MaskFrameBuffer(textureFbo);\n }\n public draw(cmds: DrawCommands, target: Target): void {\n const system = System.instance;\n const gl = system.context;\n\n system.frameBufferStack.execute(this.fbo, true, false, () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(GL.BufferBit.Color);\n target.techniques.execute(target, cmds, RenderPass.PlanarClassification);\n });\n }\n}\nabstract class CombineTexturesFrameBuffer extends SingleTextureFrameBuffer {\n constructor(textureAndFbo: TextureAndFbo, private _combineGeom: CachedGeometry, private _width: number, private _height: number, private _heightMult: number) { super(textureAndFbo); }\n public compose(target: Target): void {\n const system = System.instance;\n const gl = system.context;\n system.context.viewport(0, 0, this._width, this._heightMult * this._height);\n system.frameBufferStack.execute(this.fbo, true, false, () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(GL.BufferBit.Color);\n target.techniques.draw(getDrawParams(target, this._combineGeom));\n });\n }\n}\n\nclass ClassifierCombinationBuffer extends CombineTexturesFrameBuffer {\n public static create(width: number, height: number, classifierColor: Texture, classifierFeature: Texture): ClassifierAndMaskCombinationBuffer | undefined {\n const combineGeom = CombineTexturesGeometry.createGeometry(expectDefined(classifierColor.texture.getHandle()), expectDefined(classifierFeature.texture.getHandle()));\n if (undefined === combineGeom)\n return undefined;\n\n const textureFbo = SingleTextureFrameBuffer.createTextureAndFrameBuffer(width, 2 * height);\n return undefined === textureFbo ? undefined : new ClassifierCombinationBuffer(textureFbo, combineGeom, width, height, 2);\n }\n}\nclass ClassifierAndMaskCombinationBuffer extends CombineTexturesFrameBuffer {\n public static create(width: number, height: number, classifierColor: Texture, classifierFeature: Texture, mask: Texture): ClassifierAndMaskCombinationBuffer | undefined {\n const combineGeom = Combine3TexturesGeometry.createGeometry(expectDefined(classifierColor.texture.getHandle()), expectDefined(classifierFeature.texture.getHandle()), expectDefined(mask.texture.getHandle()));\n if (undefined === combineGeom)\n return undefined;\n\n const textureFbo = SingleTextureFrameBuffer.createTextureAndFrameBuffer(width, 3 * height);\n return undefined === textureFbo ? undefined : new ClassifierAndMaskCombinationBuffer(textureFbo, combineGeom, width, height, 3);\n }\n}\n\nconst scratchPrevRenderState = new RenderState();\n\n/** @internal */\nexport class PlanarClassifier extends RenderPlanarClassifier implements RenderMemory.Consumer, WebGLDisposable {\n private _classifierBuffers?: ClassifierFrameBuffers;\n private _maskBuffer?: MaskFrameBuffer;\n private _classifierCombinedBuffer?: ClassifierCombinationBuffer;\n private _classifierAndMaskCombinedBuffer?: ClassifierAndMaskCombinationBuffer;\n private _projectionMatrix = Matrix4d.createIdentity();\n private _graphics?: RenderGraphic[];\n private readonly _classifierGraphics: RenderGraphic[] = [];\n private readonly _maskGraphics: RenderGraphic[] = [];\n private _frustum?: Frustum;\n private _width = 0;\n private _height = 0;\n private _baseBatchId = 0;\n private _anyHilited = false;\n private _anyOpaque = false;\n private _anyTranslucent = false;\n private _classifier?: ActiveSpatialClassifier;\n private readonly _plane = expectDefined(Plane3dByOriginAndUnitNormal.create(new Point3d(0, 0, 0), new Vector3d(0, 0, 1))); // TBD -- Support other planes - default to X-Y for now.\n private readonly _renderState = new RenderState();\n private readonly _renderCommands: RenderCommands;\n private readonly _branchStack = new BranchStack();\n private readonly _batchState: BatchState;\n private _planarClipMask?: PlanarClipMaskState;\n private _classifierTreeRef?: SpatialClassifierTileTreeReference;\n private _planarClipMaskOverrides?: FeatureSymbology.Overrides;\n private _contentMode: PlanarClassifierContent = PlanarClassifierContent.None;\n private _removeMe?: () => void;\n private _featureSymbologySource: FeatureSymbology.Source = {\n onSourceDisposed: new BeEvent<() => void>(),\n };;\n\n private static _postProjectionMatrix = Matrix4d.createRowValues(\n 0, 1, 0, 0,\n 0, 0, -1, 0,\n 1, 0, 0, 0,\n 0, 0, 0, 1);\n private _debugFrustum?: Frustum;\n private _doDebugFrustum = false;\n private _debugFrustumGraphic?: RenderGraphic = undefined;\n private _isClassifyingPointCloud?: boolean; // we will detect this the first time we draw\n private readonly _bgColor = ColorDef.from(0, 0, 0, 255);\n\n private constructor(classifier: ActiveSpatialClassifier | undefined, target: Target) {\n super();\n this._classifier = classifier;\n\n const flags = this._renderState.flags;\n flags.depthMask = flags.blend = flags.depthTest = false;\n\n this._batchState = new BatchState(this._branchStack);\n this._renderCommands = new RenderCommands(target, this._branchStack, this._batchState);\n }\n public get textureImageCount(): number { return this._contentMode; }\n\n public getParams(params: Float32Array): void {\n params[0] = this.insideDisplay;\n params[1] = this.outsideDisplay;\n params[2] = this._contentMode;\n if (this._planarClipMask?.settings.invert) // If the mask sense is inverted, negate the contentMode to indicate this to the shader.\n params[2] = - params[2];\n\n params[3] = (this._planarClipMask?.settings.transparency === undefined) ? -1 : this._planarClipMask.settings.transparency;\n\n }\n\n public get hiliteTexture(): Texture | undefined { return undefined !== this._classifierBuffers ? this._classifierBuffers.textures.hilite : undefined; }\n public get projectionMatrix(): Matrix4d { return this._projectionMatrix; }\n // public get properties(): SpatialClassifier { return this._classifier; }\n public get baseBatchId(): number { return this._baseBatchId; }\n public get anyHilited(): boolean { return this._anyHilited; }\n public get anyOpaque(): boolean { return this._anyOpaque; }\n public get anyTranslucent(): boolean { return this._anyTranslucent; }\n public get insideDisplay(): SpatialClassifierInsideDisplay { return this._classifier ? this._classifier.flags.inside : SpatialClassifierInsideDisplay.Off; }\n public get outsideDisplay(): SpatialClassifierOutsideDisplay { return this._classifier ? this._classifier.flags.outside : SpatialClassifierOutsideDisplay.On; }\n public get isClassifyingPointCloud(): boolean { return true === this._isClassifyingPointCloud; }\n\n public addGraphic(graphic: RenderGraphic) {\n expectDefined(this._graphics).push(graphic);\n }\n\n public static create(properties: ActiveSpatialClassifier | undefined, target: Target): PlanarClassifier {\n return new PlanarClassifier(properties, target);\n }\n\n public collectStatistics(stats: RenderMemory.Statistics): void {\n if (undefined !== this._classifierBuffers)\n this._classifierBuffers.textures.collectStatistics(stats);\n\n if (undefined !== this._maskBuffer)\n this._maskBuffer.collectStatistics(stats);\n\n if (undefined !== this._classifierCombinedBuffer)\n this._classifierCombinedBuffer.collectStatistics(stats);\n\n if (undefined !== this._classifierAndMaskCombinedBuffer)\n this._classifierAndMaskCombinedBuffer.collectStatistics(stats);\n }\n\n public get isDisposed(): boolean { return undefined === this._classifierBuffers; }\n\n public [Symbol.dispose]() {\n this._classifierBuffers = dispose(this._classifierBuffers);\n this._maskBuffer = dispose(this._maskBuffer);\n this._classifierCombinedBuffer = dispose(this._classifierCombinedBuffer);\n this._classifierAndMaskCombinedBuffer = dispose(this._classifierAndMaskCombinedBuffer);\n if (this._removeMe) {\n this._removeMe();\n this._removeMe = undefined;\n }\n this._featureSymbologySource.onSourceDisposed.raiseEvent();\n }\n\n public get texture(): Texture | undefined {\n switch (this._contentMode) {\n case PlanarClassifierContent.None:\n return undefined;\n case PlanarClassifierContent.ClassifierOnly:\n return this._classifierCombinedBuffer?.texture;\n case PlanarClassifierContent.MaskOnly:\n return this._maskBuffer?.texture;\n case PlanarClassifierContent.ClassifierAndMask:\n return this._classifierAndMaskCombinedBuffer?.texture;\n }\n }\n public getOrCreateClassifierTexture(): Texture | undefined {\n if (undefined === this._classifierBuffers)\n this._classifierBuffers = ClassifierFrameBuffers.create(this._width, this._height);\n if (undefined !== this._classifierBuffers && undefined === this._classifierCombinedBuffer)\n this._classifierCombinedBuffer = ClassifierCombinationBuffer.create(this._width, this._height, this._classifierBuffers.textures.color, this._classifierBuffers.textures.feature);\n\n return this._classifierCombinedBuffer?.texture;\n }\n\n private pushBatches(batchState: BatchState, graphics: RenderGraphic[]) {\n graphics.forEach((graphic) => {\n if (graphic instanceof Batch) {\n batchState.push(graphic, true);\n batchState.pop();\n } else if (graphic instanceof Branch) {\n this.pushBatches(batchState, graphic.branch.entries);\n }\n });\n }\n public get sourceTransparency() {\n return this._classifierTreeRef?.transparency;\n }\n\n public pushBatchState(batchState: BatchState) {\n this._baseBatchId = batchState.nextBatchId - 1;\n if (undefined !== this._classifierGraphics)\n this.pushBatches(batchState, this._classifierGraphics);\n }\n\n public setSource(classifierTreeRef?: SpatialClassifierTileTreeReference, planarClipMask?: PlanarClipMaskState) {\n this._classifierTreeRef = classifierTreeRef;\n this._classifier = classifierTreeRef?.activeClassifier;\n this._planarClipMask = planarClipMask;\n }\n\n public collectGraphics(context: SceneContext, target: PlanarClassifierTarget): void {\n this._classifierGraphics.length = this._maskGraphics.length = 0;\n if (undefined === context.viewingSpace)\n return;\n\n const viewState = context.viewingSpace.view;\n if (!viewState.isSpatialView())\n return;\n\n this._doDebugFrustum = context.target.debugControl?.displayMaskFrustum ?? false;\n\n const maxTextureSize = System.instance.maxTexSizeAllow;\n const requiredHeight = maxTextureSize;\n const requiredWidth = maxTextureSize;\n if (requiredWidth !== this._width || requiredHeight !== this._height)\n this[Symbol.dispose]();\n\n this._width = requiredWidth;\n this._height = requiredHeight;\n const maskRange = Range3d.createNull();\n const maskTrees = this._planarClipMask?.getTileTrees(context, target.modelId, maskRange);\n if (!maskTrees && !this._classifierTreeRef)\n return;\n\n const allTrees = maskTrees ? maskTrees.slice() : new Array<TileTreeReference>();\n if (this._classifierTreeRef)\n allTrees.push(this._classifierTreeRef);\n\n const projection = PlanarTextureProjection.computePlanarTextureProjection(this._plane, context, target, allTrees, viewState, this._width, this._height, maskRange);\n if (!projection.textureFrustum || !projection.projectionMatrix || !projection.worldToViewMap)\n return;\n\n this._projectionMatrix = projection.projectionMatrix;\n this._frustum = projection.textureFrustum;\n this._debugFrustum = projection.debugFrustum;\n this._planarClipMaskOverrides = this._planarClipMask?.getPlanarClipMaskSymbologyOverrides(context, this._featureSymbologySource);\n if (!this._planarClipMask?.usingViewportOverrides && this._removeMe) {\n this._removeMe();\n this._removeMe = undefined;\n } else if (this._planarClipMask?.usingViewportOverrides && !this._removeMe) {\n this._removeMe = context.viewport.onFeatureOverridesChanged.addListener(() => {\n this._planarClipMaskOverrides = this._planarClipMask?.getPlanarClipMaskSymbologyOverrides(context, this._featureSymbologySource);\n context.viewport.requestRedraw();\n });\n }\n\n const drawTree = (treeRef: TileTreeReference, graphics: RenderGraphic[]) => {\n this._graphics = graphics;\n const frustumPlanes = this._frustum ? FrustumPlanes.fromFrustum(this._frustum) : FrustumPlanes.createEmpty();\n const drawArgs = GraphicsCollectorDrawArgs.create(context, this, treeRef, frustumPlanes, expectDefined(projection.worldToViewMap));\n if (undefined !== drawArgs)\n treeRef.draw(drawArgs);\n\n this._graphics = undefined;\n };\n if (this._classifierTreeRef)\n drawTree(this._classifierTreeRef, this._classifierGraphics);\n\n if (maskTrees)\n maskTrees.forEach((maskTree) => drawTree(maskTree, this._maskGraphics));\n\n // Shader behaves slightly differently when classifying surfaces vs point clouds.\n this._isClassifyingPointCloud = target.isPointCloud;\n\n if (this._doDebugFrustum) {\n this._debugFrustumGraphic = dispose(this._debugFrustumGraphic);\n const builder = context.createSceneGraphicBuilder();\n\n builder.setSymbology(ColorDef.green, ColorDef.green, 2);\n builder.addFrustum(context.viewingSpace.getFrustum());\n builder.setSymbology(ColorDef.red, ColorDef.red, 2);\n builder.addFrustum(expectDefined(this._debugFrustum));\n builder.setSymbology(ColorDef.blue, ColorDef.blue, 2);\n builder.addFrustum(this._frustum);\n\n builder.setSymbology(ColorDef.from(0, 200, 0, 222), ColorDef.from(0, 200, 0, 222), 2);\n builder.addFrustumSides(context.viewingSpace.getFrustum());\n builder.setSymbology(ColorDef.from(200, 0, 0, 222), ColorDef.from(200, 0, 0, 222), 2);\n builder.addFrustumSides(expectDefined(this._debugFrustum));\n builder.setSymbology(ColorDef.from(0, 0, 200, 222), ColorDef.from(0, 0, 200, 222), 2);\n builder.addFrustumSides(this._frustum);\n this._debugFrustumGraphic = builder.finish();\n context.outputGraphic(this._debugFrustumGraphic);\n }\n }\n\n public draw(target: Target) {\n if (undefined === this._frustum)\n return;\n\n this._contentMode = PlanarClassifierContent.None;\n let combinationBuffer: ClassifierCombinationBuffer | undefined;\n if (this._classifierGraphics.length === 0) {\n if (this._maskGraphics.length === 0) {\n return;\n } else {\n if (undefined === this._maskBuffer) {\n this._maskBuffer = MaskFrameBuffer.create(this._width, this._height);\n if (undefined === this._maskBuffer)\n return;\n }\n this._contentMode = PlanarClassifierContent.MaskOnly;\n }\n } else {\n if (undefined === this._classifierBuffers) {\n this._classifierBuffers = ClassifierFrameBuffers.create(this._width, this._height);\n if (undefined === this._classifierBuffers)\n return;\n }\n if (this._maskGraphics.length === 0) {\n if (undefined === this._classifierCombinedBuffer) {\n combinationBuffer = this._classifierCombinedBuffer = ClassifierCombinationBuffer.create(this._width, this._height, this._classifierBuffers.textures.color, this._classifierBuffers.textures.feature);\n if (undefined === this._classifierCombinedBuffer)\n return;\n }\n this._contentMode = PlanarClassifierContent.ClassifierOnly;\n combinationBuffer = this._classifierCombinedBuffer;\n } else {\n if (undefined === this._maskBuffer) {\n this._maskBuffer = MaskFrameBuffer.create(this._width, this._height);\n if (undefined === this._maskBuffer)\n return;\n }\n if (undefined === this._classifierAndMaskCombinedBuffer) {\n combinationBuffer = this._classifierAndMaskCombinedBuffer = ClassifierAndMaskCombinationBuffer.create(this._width, this._height, this._classifierBuffers.textures.color, this._classifierBuffers.textures.feature, this._maskBuffer.texture);\n if (undefined === this._classifierAndMaskCombinedBuffer)\n return;\n }\n combinationBuffer = this._classifierAndMaskCombinedBuffer;\n this._contentMode = PlanarClassifierContent.ClassifierAndMask;\n }\n }\n\n // Temporarily override the Target's state.\n const system = System.instance;\n const maskViewFlags = {\n renderMode: RenderMode.SmoothShade,\n wiremesh: false,\n transparency: !this.isClassifyingPointCloud, // point clouds don't support transparency.\n textures: false,\n lighting: false,\n shadows: false,\n monochrome: false,\n materials: false,\n ambientOcclusion: false,\n visibleEdges: false,\n hiddenEdges: false,\n };\n const prevState = system.currentRenderState.clone(scratchPrevRenderState);\n system.context.viewport(0, 0, this._width, this._height);\n const vf = target.currentViewFlags.copy(this._classifierTreeRef ? this._classifierTreeRef.viewFlags : maskViewFlags);\n\n system.applyRenderState(this._renderState);\n const prevPlan = target.plan;\n const prevOverrides = target.currentFeatureSymbologyOverrides;\n\n target.uniforms.style.changeBackgroundColor(this._bgColor); // Avoid white on white reversal. Will be reset in changeRenderPlan below.\n target.changeFrustum(this._frustum, this._frustum.getFraction(), true);\n this._anyTranslucent = false;\n\n const prevProjMatrix = target.uniforms.frustum.projectionMatrix;\n target.uniforms.frustum.changeProjectionMatrix(PlanarClassifier._postProjectionMatrix.multiplyMatrixMatrix(prevProjMatrix));\n target.uniforms.branch.changeRenderPlan(vf, target.plan.is3d, target.plan.hline);\n\n const addCmds = (oldCmds: DrawCommands, newCmds: DrawCommands) => {\n if (undefined === newCmds)\n return oldCmds;\n if (newCmds.length > 50000) {\n \t// This method is slower for smaller array sizes, but when the size of newCmds gets larger it's performance is ok.\n return oldCmds.concat(newCmds);\n } else {\n \t// This method runs faster, but gets a stack overflow when the size of newCmds is too large.\n oldCmds.push(...newCmds);\n return oldCmds;\n }\n }\n\n const renderCommands = this._renderCommands;\n const getDrawCommands = (graphics: RenderGraphic[]) => {\n this._batchState.reset();\n renderCommands.reset(target, this._branchStack, this._batchState);\n renderCommands.collectGraphicsForPlanarProjection(graphics);\n\n // Draw the classifiers into our attachments.\n // When using Display.ElementColor, the color and transparency come from the classifier geometry. Therefore we may need to draw the classified geometry\n // in a different pass - or both passes - depending on the transparency of the classifiers.\n // NB: \"Outside\" geometry by definition cannot take color/transparency from element...\n let cmds = renderCommands.getCommands(RenderPass.OpaquePlanar);\n\n // NB: We don't strictly require the classifier geometry to be planar, and sometimes (e.g., \"planar\" polyface/bspsurf) we do not detect planarity.\n cmds = addCmds(cmds, renderCommands.getCommands(RenderPass.OpaqueGeneral));\n cmds = addCmds(cmds, renderCommands.getCommands(RenderPass.OpaqueLinear));\n this._anyOpaque = cmds.length > 0;\n const transCmds = renderCommands.getCommands(RenderPass.Translucent);\n if (transCmds.length > 0) {\n cmds = addCmds(cmds, renderCommands.getCommands(RenderPass.Translucent));\n this._anyTranslucent = true;\n }\n return cmds;\n };\n\n if (this._classifierGraphics.length > 0 && this._classifierBuffers) {\n this._classifierBuffers.draw(getDrawCommands(this._classifierGraphics), target);\n\n // Draw any hilited classifiers.\n const hiliteCommands = renderCommands.getCommands(RenderPass.Hilite);\n this._anyHilited = 0 !== hiliteCommands.length;\n if (this._anyHilited)\n this._classifierBuffers.drawHilite(hiliteCommands, target);\n }\n if (this._maskGraphics.length > 0 && this._maskBuffer) {\n if (this._planarClipMaskOverrides)\n target.overrideFeatureSymbology(this._planarClipMaskOverrides);\n if (this._planarClipMask && this._planarClipMask.settings.transparency !== undefined && this._planarClipMask.settings.transparency > 0.0)\n this._anyTranslucent = true;\n\n this._maskBuffer.draw(getDrawCommands(this._maskGraphics), target);\n\n }\n if (combinationBuffer)\n combinationBuffer.compose(target);\n\n this._batchState.reset();\n target.changeRenderPlan(prevPlan);\n target.overrideFeatureSymbology(prevOverrides);\n\n system.applyRenderState(prevState);\n system.context.viewport(0, 0, target.viewRect.width, target.viewRect.height);\n }\n}\n\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module WebGL
|
|
7
7
|
*/
|
|
8
|
-
import { assert } from "@itwin/core-bentley";
|
|
8
|
+
import { assert, expectDefined } from "@itwin/core-bentley";
|
|
9
9
|
import { Plane3dByOriginAndUnitNormal, Point2d, Transform } from "@itwin/core-geometry";
|
|
10
10
|
import { QPoint2dList, QPoint3dList } from "@itwin/core-common";
|
|
11
11
|
import { GraphicBranch } from "../../../render/GraphicBranch";
|
|
@@ -40,7 +40,7 @@ export class PlanarGridGeometry extends IndexedGeometry {
|
|
|
40
40
|
this.props = params.props;
|
|
41
41
|
}
|
|
42
42
|
static create(frustum, grid, system) {
|
|
43
|
-
const plane = Plane3dByOriginAndUnitNormal.create(grid.origin, grid.rMatrix.rowZ());
|
|
43
|
+
const plane = expectDefined(Plane3dByOriginAndUnitNormal.create(grid.origin, grid.rMatrix.rowZ()));
|
|
44
44
|
const polygon = frustum.getIntersectionWithPlane(plane);
|
|
45
45
|
if (!polygon || polygon.length < 3)
|
|
46
46
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlanarGrid.js","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/PlanarGrid.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"PlanarGrid.js","sourceRoot":"","sources":["../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AC;YACzB,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;YACvC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACpB,OAAO,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QACnD,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","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\nimport { assert, expectDefined } from \"@itwin/core-bentley\";\nimport { Plane3dByOriginAndUnitNormal, Point2d, Transform } from \"@itwin/core-geometry\";\nimport { Frustum, QPoint2dList, QPoint3dList } from \"@itwin/core-common\";\nimport { GraphicBranch } from \"../../../render/GraphicBranch\";\nimport { RenderGraphic } from \"../../../render/RenderGraphic\";\nimport { RenderMemory } from \"../../../render/RenderMemory\";\nimport { PlanarGridProps, RenderSystem } from \"../../../render/RenderSystem\";\nimport { BufferHandle, BufferParameters, QBufferHandle2d, QBufferHandle3d } from \"./AttributeBuffers\";\nimport { AttributeMap } from \"./AttributeMap\";\nimport { IndexedGeometry, IndexedGeometryParams } from \"./CachedGeometry\";\nimport { GL } from \"./GL\";\nimport { Primitive } from \"./Primitive\";\nimport { Pass, RenderOrder } from \"./RenderFlags\";\nimport { TechniqueId } from \"./TechniqueId\";\n\nclass PlanarGridGeometryParams extends IndexedGeometryParams {\n\n public readonly uvParams: QBufferHandle2d;\n\n public constructor(positions: QBufferHandle3d, uvParams: QBufferHandle2d, indices: BufferHandle, numIndices: number, public readonly props: PlanarGridProps) {\n super(positions, indices, numIndices);\n const attrParams = AttributeMap.findAttribute(\"a_uvParam\", TechniqueId.PlanarGrid, false);\n assert(attrParams !== undefined);\n this.buffers.addBuffer(uvParams, [BufferParameters.create(attrParams.location, 2, GL.DataType.UnsignedShort, false, 0, 0, false)]);\n this.uvParams = uvParams;\n }\n}\n\nexport class PlanarGridGeometry extends IndexedGeometry {\n public get techniqueId(): TechniqueId { return TechniqueId.PlanarGrid; }\n public override getPass(): Pass { return \"translucent\"; }\n public collectStatistics(_stats: RenderMemory.Statistics): void { }\n public get renderOrder(): RenderOrder { return RenderOrder.UnlitSurface; }\n public readonly uvParams: QBufferHandle2d;\n public readonly props: PlanarGridProps;\n public override get asPlanarGrid(): PlanarGridGeometry | undefined { return this; }\n\n private constructor(params: PlanarGridGeometryParams) {\n super(params);\n this.uvParams = params.uvParams;\n this.props = params.props;\n }\n\n public static create(frustum: Frustum, grid: PlanarGridProps, system: RenderSystem): RenderGraphic | undefined {\n const plane = expectDefined(Plane3dByOriginAndUnitNormal.create(grid.origin, grid.rMatrix.rowZ()));\n const polygon = frustum.getIntersectionWithPlane(plane);\n\n if (!polygon || polygon.length < 3)\n return undefined;\n\n const xVector = grid.rMatrix.rowX();\n const yVector = grid.rMatrix.rowY();\n const gridsPerRef = Math.max(1, grid.gridsPerRef);\n const xOrigin = xVector.dotProduct(grid.origin);\n const yOrigin = yVector.dotProduct(grid.origin);\n const params = [];\n for (const polygonPoint of polygon) {\n const x = (xVector.dotProduct(polygonPoint) - xOrigin) / grid.spacing.x;\n const y = (yVector.dotProduct(polygonPoint) - yOrigin) / grid.spacing.y;\n params.push(Point2d.create(x, y));\n }\n\n const qPoints = QPoint3dList.fromPoints(polygon);\n const qParams = QPoint2dList.fromPoints(params);\n\n qParams.params.origin.x = qParams.params.origin.x % gridsPerRef;\n qParams.params.origin.y = qParams.params.origin.y % gridsPerRef;\n\n let transform;\n // If the grid is far from the origin, create a branch to avoid large coordinate accuracy issues. (Reality models).\n if (qPoints.params.origin.magnitude() > 1.0E4) {\n transform = Transform.createTranslationXYZ(qPoints.params.origin.x, qPoints.params.origin.y, qPoints.params.origin.z);\n qPoints.params.origin.setZero();\n }\n\n const nTriangles = polygon.length - 2;\n const indices = new Uint32Array(3 * nTriangles);\n for (let i = 0, j = 0; i < nTriangles; i++) {\n indices[j++] = 0;\n indices[j++] = i + 1;\n indices[j++] = i + 2;\n }\n const pointBuffer = QBufferHandle3d.create(qPoints.params, qPoints.toTypedArray());\n const paramBuffer = QBufferHandle2d.create(qParams.params, qParams.toTypedArray());\n const indBuffer = BufferHandle.createBuffer(GL.Buffer.Target.ElementArrayBuffer, indices);\n if (!pointBuffer || !paramBuffer || !indBuffer)\n return undefined;\n\n const geomParams = new PlanarGridGeometryParams(pointBuffer, paramBuffer, indBuffer, indices.length, grid);\n if (!geomParams)\n return undefined;\n\n const geom = new PlanarGridGeometry(geomParams);\n let graphic: RenderGraphic | undefined = Primitive.create(geom);\n\n if (transform && graphic) {\n const branch = new GraphicBranch(true);\n branch.add(graphic);\n graphic = system.createBranch(branch, transform);\n }\n\n return graphic;\n }\n}\n\n"]}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Rendering
|
|
3
|
-
*/
|
|
4
1
|
import { Frustum } from "@itwin/core-common";
|
|
5
2
|
import { Map4d, Matrix4d, Plane3dByOriginAndUnitNormal, Range1d, Range3d, Transform } from "@itwin/core-geometry";
|
|
6
3
|
import { Tile, TileTreeReference } from "../../../tile/internal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlanarTextureProjection.d.ts","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/PlanarTextureProjection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlanarTextureProjection.d.ts","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/PlanarTextureProjection.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,OAAO,EAAkC,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EACgD,KAAK,EAAY,QAAQ,EAAE,4BAA4B,EAAW,OAAO,EAAW,OAAO,EACzI,SAAS,EACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAKlC,qBAAa,uBAAuB;IAClC,OAAO,CAAC,MAAM,CAAC,wBAAwB,CAA4H;IAEnK,OAAO,CAAC,MAAM,CAAC,mBAAmB;WASpB,8BAA8B,CAC1C,YAAY,EAAE,4BAA4B,EAC1C,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE;QAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QAAC,QAAQ,EAAE,SAAS,CAAA;KAAE,EAC9C,SAAS,EAAE,iBAAiB,EAAE,EAC9B,SAAS,EAAE,WAAW,EACtB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,OAAO,EAClB,YAAY,CAAC,EAAE,OAAO,GAAG;QAAE,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,cAAc,CAAC,EAAE,KAAK,CAAC;QAAC,gBAAgB,CAAC,EAAE,QAAQ,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE;WA0KtH,uBAAuB,CAAC,MAAM,EAAE,MAAM;;;;CAsBrD"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Rendering
|
|
7
7
|
*/
|
|
8
|
+
import { expectDefined } from "@itwin/core-bentley";
|
|
8
9
|
import { Frustum, FrustumPlanes, Npc, RenderMode } from "@itwin/core-common";
|
|
9
10
|
import { ClipUtilities, ConvexClipPlaneSet, Map4d, Matrix3d, Matrix4d, Plane3dByOriginAndUnitNormal, Point3d, Range1d, Range2d, Range3d, Ray3d, Transform, } from "@itwin/core-geometry";
|
|
10
11
|
import { ApproximateTerrainHeights } from "../../../ApproximateTerrainHeights";
|
|
@@ -34,11 +35,11 @@ export class PlanarTextureProjection {
|
|
|
34
35
|
let textureY;
|
|
35
36
|
if (textureX.magnitude() < minCrossMagnitude) {
|
|
36
37
|
textureY = viewX.crossProduct(textureZ);
|
|
37
|
-
textureX = textureY.crossProduct(textureZ).normalize();
|
|
38
|
+
textureX = expectDefined(textureY.crossProduct(textureZ).normalize());
|
|
38
39
|
}
|
|
39
40
|
else {
|
|
40
41
|
textureX.normalizeInPlace();
|
|
41
|
-
textureY = textureZ.crossProduct(textureX).normalize();
|
|
42
|
+
textureY = expectDefined(textureZ.crossProduct(textureX).normalize());
|
|
42
43
|
}
|
|
43
44
|
const frustumX = textureZ, frustumY = textureX, frustumZ = textureY;
|
|
44
45
|
const textureMatrix = Matrix3d.createRows(frustumX, frustumY, frustumZ);
|
|
@@ -116,8 +117,8 @@ export class PlanarTextureProjection {
|
|
|
116
117
|
if (viewState.isCameraOn && viewState.getEyePoint().z > textureRange.low.x && viewZVecZ > 0.09) {
|
|
117
118
|
// NB moved the eyePlane from the center to the bottom of the textureRange to solve problems when the eye was below the eyePlane.
|
|
118
119
|
const eyePlane = Plane3dByOriginAndUnitNormal.create(Point3d.createScale(textureZ, textureRange.low.x), textureZ); // at bottom of range - parallel to texture.
|
|
119
|
-
const projectionRay = Ray3d.create(viewState.getEyePoint(), viewZ.crossProduct(textureX).normalize());
|
|
120
|
-
let projectionDistance = projectionRay.intersectionWithPlane(eyePlane);
|
|
120
|
+
const projectionRay = Ray3d.create(viewState.getEyePoint(), expectDefined(viewZ.crossProduct(textureX).normalize()));
|
|
121
|
+
let projectionDistance = projectionRay.intersectionWithPlane(expectDefined(eyePlane));
|
|
121
122
|
const minNearToFarRatio = .01; // Smaller value allows texture projection to conform tightly to view frustum.
|
|
122
123
|
if (undefined !== projectionDistance) {
|
|
123
124
|
projectionDistance = Math.max(.1, projectionDistance);
|
|
@@ -167,7 +168,7 @@ export class PlanarTextureProjection {
|
|
|
167
168
|
return {};
|
|
168
169
|
}
|
|
169
170
|
const worldToNpc = PlanarTextureProjection._postProjectionMatrixNpc.multiplyMatrixMatrix(frustumMap.transform0);
|
|
170
|
-
const npcToView = Map4d.createBoxMap(Point3d.create(0, 0, 0), Point3d.create(1, 1, 1), Point3d.create(0, 0, 0), Point3d.create(textureWidth, textureHeight, 1), scratchMap4d);
|
|
171
|
+
const npcToView = expectDefined(Map4d.createBoxMap(Point3d.create(0, 0, 0), Point3d.create(1, 1, 1), Point3d.create(0, 0, 0), Point3d.create(textureWidth, textureHeight, 1), scratchMap4d));
|
|
171
172
|
const npcToWorld = worldToNpc.createInverse(scratchMatrix4d);
|
|
172
173
|
if (undefined === npcToWorld) {
|
|
173
174
|
return {};
|