@itwin/core-frontend 5.1.0-dev.7 → 5.1.0-dev.71
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 +92 -1
- package/lib/cjs/AccuDraw.d.ts +2 -0
- package/lib/cjs/AccuDraw.d.ts.map +1 -1
- package/lib/cjs/AccuDraw.js +4 -2
- package/lib/cjs/AccuDraw.js.map +1 -1
- package/lib/cjs/AccuSnap.d.ts.map +1 -1
- package/lib/cjs/AccuSnap.js +15 -6
- package/lib/cjs/AccuSnap.js.map +1 -1
- package/lib/cjs/AuxCoordSys.js +1 -1
- package/lib/cjs/AuxCoordSys.js.map +1 -1
- package/lib/cjs/DisplayStyleState.d.ts +37 -0
- package/lib/cjs/DisplayStyleState.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleState.js +65 -0
- package/lib/cjs/DisplayStyleState.js.map +1 -1
- package/lib/cjs/DrawingViewState.d.ts.map +1 -1
- package/lib/cjs/DrawingViewState.js +1 -0
- package/lib/cjs/DrawingViewState.js.map +1 -1
- package/lib/cjs/GraphicalEditingScope.d.ts +1 -1
- package/lib/cjs/GraphicalEditingScope.d.ts.map +1 -1
- package/lib/cjs/GraphicalEditingScope.js +1 -1
- package/lib/cjs/GraphicalEditingScope.js.map +1 -1
- package/lib/cjs/HitDetail.d.ts +1 -1
- package/lib/cjs/HitDetail.d.ts.map +1 -1
- package/lib/cjs/HitDetail.js.map +1 -1
- package/lib/cjs/IModelApp.d.ts +19 -4
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +21 -2
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts +8 -9
- package/lib/cjs/IModelConnection.d.ts.map +1 -1
- package/lib/cjs/IModelConnection.js +52 -24
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/IpcApp.d.ts +2 -1
- package/lib/cjs/IpcApp.d.ts.map +1 -1
- package/lib/cjs/IpcApp.js +4 -2
- package/lib/cjs/IpcApp.js.map +1 -1
- package/lib/cjs/RealityDataSource.d.ts +65 -3
- package/lib/cjs/RealityDataSource.d.ts.map +1 -1
- package/lib/cjs/RealityDataSource.js +79 -3
- package/lib/cjs/RealityDataSource.js.map +1 -1
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.js +1 -1
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.js.map +1 -1
- package/lib/cjs/SelectionSet.d.ts +7 -7
- package/lib/cjs/SelectionSet.js +3 -3
- package/lib/cjs/SelectionSet.js.map +1 -1
- package/lib/cjs/SheetViewState.d.ts +2 -0
- package/lib/cjs/SheetViewState.d.ts.map +1 -1
- package/lib/cjs/SheetViewState.js +25 -3
- package/lib/cjs/SheetViewState.js.map +1 -1
- package/lib/cjs/ViewState.d.ts +1 -1
- package/lib/cjs/ViewState.js +1 -1
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +6 -4
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +23 -3
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/common/gltf/GltfSchema.d.ts +18 -0
- package/lib/cjs/common/gltf/GltfSchema.d.ts.map +1 -1
- package/lib/cjs/common/gltf/GltfSchema.js +1 -0
- package/lib/cjs/common/gltf/GltfSchema.js.map +1 -1
- package/lib/cjs/common/imdl/CompactEdges.d.ts +11 -0
- package/lib/cjs/common/imdl/CompactEdges.d.ts.map +1 -1
- package/lib/cjs/common/imdl/CompactEdges.js +9 -6
- package/lib/cjs/common/imdl/CompactEdges.js.map +1 -1
- package/lib/cjs/common/imdl/ImdlSchema.d.ts +5 -1
- package/lib/cjs/common/imdl/ImdlSchema.d.ts.map +1 -1
- package/lib/cjs/common/imdl/ImdlSchema.js +4 -0
- package/lib/cjs/common/imdl/ImdlSchema.js.map +1 -1
- package/lib/cjs/common/imdl/ParseImdlDocument.d.ts.map +1 -1
- package/lib/cjs/common/imdl/ParseImdlDocument.js +11 -9
- package/lib/cjs/common/imdl/ParseImdlDocument.js.map +1 -1
- package/lib/cjs/common/internal/render/EdgeParams.d.ts +7 -2
- package/lib/cjs/common/internal/render/EdgeParams.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/EdgeParams.js +30 -8
- package/lib/cjs/common/internal/render/EdgeParams.js.map +1 -1
- package/lib/cjs/common/internal/render/MeshPrimitives.d.ts +2 -1
- package/lib/cjs/common/internal/render/MeshPrimitives.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/MeshPrimitives.js +5 -7
- package/lib/cjs/common/internal/render/MeshPrimitives.js.map +1 -1
- package/lib/cjs/common/internal/render/PolylineParams.d.ts +8 -3
- package/lib/cjs/common/internal/render/PolylineParams.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/PolylineParams.js +6 -9
- package/lib/cjs/common/internal/render/PolylineParams.js.map +1 -1
- package/lib/cjs/common/internal/render/VertexTableSplitter.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/VertexTableSplitter.js +9 -7
- package/lib/cjs/common/internal/render/VertexTableSplitter.js.map +1 -1
- package/lib/cjs/core-frontend.d.ts +2 -2
- package/lib/cjs/core-frontend.d.ts.map +1 -1
- package/lib/cjs/core-frontend.js +1 -1
- package/lib/cjs/core-frontend.js.map +1 -1
- package/lib/cjs/extension/ExtensionRuntime.js +15 -2
- package/lib/cjs/extension/ExtensionRuntime.js.map +1 -1
- package/lib/cjs/extension/providers/ExtensionLoadScript.js.map +1 -1
- package/lib/cjs/internal/GoogleMapsDecorator.d.ts +53 -0
- package/lib/cjs/internal/GoogleMapsDecorator.d.ts.map +1 -0
- package/lib/cjs/internal/GoogleMapsDecorator.js +132 -0
- package/lib/cjs/internal/GoogleMapsDecorator.js.map +1 -0
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.d.ts +83 -0
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.d.ts.map +1 -0
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.js +201 -0
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.js.map +1 -0
- package/lib/cjs/internal/ScriptUtils.d.ts +5 -0
- package/lib/cjs/internal/ScriptUtils.d.ts.map +1 -0
- package/lib/cjs/internal/ScriptUtils.js +120 -0
- package/lib/cjs/internal/ScriptUtils.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +1 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +4 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.js +2 -2
- package/lib/cjs/internal/render/webgl/AttributeBuffers.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/BranchStack.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/BranchStack.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchStack.js +3 -2
- package/lib/cjs/internal/render/webgl/BranchStack.js.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchState.d.ts +4 -2
- package/lib/cjs/internal/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchState.js +4 -1
- package/lib/cjs/internal/render/webgl/BranchState.js.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchUniforms.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/BranchUniforms.d.ts.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/ClippingProgram.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.js +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ContourUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ContourUniforms.js +2 -3
- package/lib/cjs/internal/render/webgl/ContourUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Contours.js +8 -8
- package/lib/cjs/internal/render/webgl/Contours.js.map +1 -1
- package/lib/cjs/internal/render/webgl/EdgeGeometry.d.ts +8 -6
- package/lib/cjs/internal/render/webgl/EdgeGeometry.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/EdgeGeometry.js +21 -7
- package/lib/cjs/internal/render/webgl/EdgeGeometry.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Graphic.d.ts +2 -1
- package/lib/cjs/internal/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Graphic.js +2 -0
- package/lib/cjs/internal/render/webgl/Graphic.js.map +1 -1
- package/lib/cjs/internal/render/webgl/IndexedEdgeGeometry.d.ts +6 -1
- package/lib/cjs/internal/render/webgl/IndexedEdgeGeometry.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/IndexedEdgeGeometry.js +19 -4
- package/lib/cjs/internal/render/webgl/IndexedEdgeGeometry.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Mesh.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/Mesh.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Mesh.js +13 -6
- package/lib/cjs/internal/render/webgl/Mesh.js.map +1 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.js +2 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderProgram.js +2 -2
- package/lib/cjs/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts +2 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.js +3 -1
- package/lib/cjs/internal/render/webgl/Target.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Technique.d.ts +3 -3
- package/lib/cjs/internal/render/webgl/Technique.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Technique.js +3 -3
- package/lib/cjs/internal/render/webgl/Technique.js.map +1 -1
- package/lib/cjs/internal/tile/ClassifierTileTree.js +3 -1
- package/lib/cjs/internal/tile/ClassifierTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/IModelTile.d.ts +1 -0
- package/lib/cjs/internal/tile/IModelTile.d.ts.map +1 -1
- package/lib/cjs/internal/tile/IModelTile.js +4 -0
- package/lib/cjs/internal/tile/IModelTile.js.map +1 -1
- package/lib/cjs/internal/tile/IModelTileTree.d.ts +4 -2
- package/lib/cjs/internal/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/IModelTileTree.js +58 -0
- package/lib/cjs/internal/tile/IModelTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.d.ts.map +1 -1
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.js +8 -0
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.js.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.d.ts +4 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.js +4 -0
- package/lib/cjs/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/PrimaryTileTree.js +5 -4
- package/lib/cjs/internal/tile/PrimaryTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts +26 -7
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.js +48 -21
- package/lib/cjs/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/RealityTileLoader.d.ts +2 -2
- package/lib/cjs/internal/tile/RealityTileLoader.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityTileLoader.js +10 -2
- package/lib/cjs/internal/tile/RealityTileLoader.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts +4 -0
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +52 -11
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/WmtsCapabilities.d.ts +7 -0
- package/lib/cjs/internal/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/WmtsCapabilities.js +17 -0
- package/lib/cjs/internal/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/cjs/internal/webgl.d.ts +1 -1
- package/lib/cjs/internal/webgl.d.ts.map +1 -1
- package/lib/cjs/internal/webgl.js.map +1 -1
- package/lib/cjs/properties/AngleDescription.d.ts +4 -1
- package/lib/cjs/properties/AngleDescription.d.ts.map +1 -1
- package/lib/cjs/properties/AngleDescription.js +10 -2
- package/lib/cjs/properties/AngleDescription.js.map +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.d.ts +11 -1
- package/lib/cjs/properties/FormattedQuantityDescription.d.ts.map +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.js +7 -2
- package/lib/cjs/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/cjs/properties/LengthDescription.d.ts +12 -3
- package/lib/cjs/properties/LengthDescription.d.ts.map +1 -1
- package/lib/cjs/properties/LengthDescription.js +30 -6
- package/lib/cjs/properties/LengthDescription.js.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts +103 -7
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.js +210 -23
- package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/cjs/render/Decorations.d.ts +1 -1
- package/lib/cjs/render/Decorations.d.ts.map +1 -1
- package/lib/cjs/render/Decorations.js +1 -1
- package/lib/cjs/render/Decorations.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +4 -2
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js +1 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/MeshArgs.d.ts +8 -3
- package/lib/cjs/render/MeshArgs.d.ts.map +1 -1
- package/lib/cjs/render/MeshArgs.js.map +1 -1
- package/lib/cjs/render/RenderGraphic.d.ts +1 -1
- package/lib/cjs/render/RenderGraphic.d.ts.map +1 -1
- package/lib/cjs/render/RenderGraphic.js.map +1 -1
- package/lib/cjs/render/RenderSystem.d.ts +2 -2
- package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
- package/lib/cjs/render/RenderSystem.js.map +1 -1
- package/lib/cjs/render/ScreenSpaceEffectBuilder.d.ts +1 -1
- package/lib/cjs/render/ScreenSpaceEffectBuilder.js.map +1 -1
- package/lib/cjs/request/Request.d.ts +2 -2
- package/lib/cjs/request/Request.js.map +1 -1
- package/lib/cjs/tile/GltfReader.d.ts +6 -2
- package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
- package/lib/cjs/tile/GltfReader.js +154 -18
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/cjs/tile/ImdlReader.js.map +1 -1
- package/lib/cjs/tile/RealityTile.d.ts +9 -0
- package/lib/cjs/tile/RealityTile.d.ts.map +1 -1
- package/lib/cjs/tile/RealityTile.js +12 -0
- package/lib/cjs/tile/RealityTile.js.map +1 -1
- package/lib/cjs/tile/RealityTileTree.d.ts +4 -0
- package/lib/cjs/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/RealityTileTree.js +4 -0
- package/lib/cjs/tile/RealityTileTree.js.map +1 -1
- package/lib/cjs/tile/Tile.d.ts +1 -1
- package/lib/cjs/tile/Tile.d.ts.map +1 -1
- package/lib/cjs/tile/Tile.js +1 -1
- package/lib/cjs/tile/Tile.js.map +1 -1
- package/lib/cjs/tile/TileAdmin.d.ts +10 -0
- package/lib/cjs/tile/TileAdmin.d.ts.map +1 -1
- package/lib/cjs/tile/TileAdmin.js +3 -0
- package/lib/cjs/tile/TileAdmin.js.map +1 -1
- package/lib/cjs/tile/TileGeometryCollector.d.ts +5 -0
- package/lib/cjs/tile/TileGeometryCollector.d.ts.map +1 -1
- package/lib/cjs/tile/TileGeometryCollector.js.map +1 -1
- package/lib/cjs/tile/TileTree.d.ts +15 -2
- package/lib/cjs/tile/TileTree.d.ts.map +1 -1
- package/lib/cjs/tile/TileTree.js +14 -1
- package/lib/cjs/tile/TileTree.js.map +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts +17 -3
- package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/cjs/tile/TileTreeReference.js +11 -5
- package/lib/cjs/tile/TileTreeReference.js.map +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.js +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapCartoRectangle.d.ts +10 -0
- package/lib/cjs/tile/map/MapCartoRectangle.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapCartoRectangle.js +12 -0
- package/lib/cjs/tile/map/MapCartoRectangle.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +3 -3
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +9 -5
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +1 -1
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tile/map/QuadId.d.ts +15 -0
- package/lib/cjs/tile/map/QuadId.d.ts.map +1 -1
- package/lib/cjs/tile/map/QuadId.js +12 -0
- package/lib/cjs/tile/map/QuadId.js.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/cjs/tools/AccuDrawViewportUI.d.ts +7 -0
- package/lib/cjs/tools/AccuDrawViewportUI.d.ts.map +1 -1
- package/lib/cjs/tools/AccuDrawViewportUI.js +14 -0
- package/lib/cjs/tools/AccuDrawViewportUI.js.map +1 -1
- package/lib/cjs/tools/ClipViewTool.d.ts.map +1 -1
- package/lib/cjs/tools/ClipViewTool.js +18 -7
- package/lib/cjs/tools/ClipViewTool.js.map +1 -1
- package/lib/cjs/tools/ElementSetTool.d.ts +9 -1
- package/lib/cjs/tools/ElementSetTool.d.ts.map +1 -1
- package/lib/cjs/tools/ElementSetTool.js +130 -7
- package/lib/cjs/tools/ElementSetTool.js.map +1 -1
- package/lib/cjs/tools/IdleTool.d.ts.map +1 -1
- package/lib/cjs/tools/IdleTool.js +4 -1
- package/lib/cjs/tools/IdleTool.js.map +1 -1
- package/lib/cjs/tools/MeasureTool.d.ts +9 -0
- package/lib/cjs/tools/MeasureTool.d.ts.map +1 -1
- package/lib/cjs/tools/MeasureTool.js +57 -24
- package/lib/cjs/tools/MeasureTool.js.map +1 -1
- package/lib/cjs/tools/PrimitiveTool.d.ts +1 -1
- package/lib/cjs/tools/PrimitiveTool.d.ts.map +1 -1
- package/lib/cjs/tools/PrimitiveTool.js +4 -3
- package/lib/cjs/tools/PrimitiveTool.js.map +1 -1
- package/lib/cjs/tools/SelectTool.d.ts +2 -2
- package/lib/cjs/tools/SelectTool.d.ts.map +1 -1
- package/lib/cjs/tools/SelectTool.js +26 -97
- package/lib/cjs/tools/SelectTool.js.map +1 -1
- package/lib/cjs/tools/Tool.d.ts +10 -1
- package/lib/cjs/tools/Tool.d.ts.map +1 -1
- package/lib/cjs/tools/Tool.js +27 -4
- package/lib/cjs/tools/Tool.js.map +1 -1
- package/lib/cjs/tools/ToolAdmin.d.ts +1 -0
- package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/cjs/tools/ToolAdmin.js +59 -18
- package/lib/cjs/tools/ToolAdmin.js.map +1 -1
- package/lib/cjs/tools/ToolAssistance.d.ts +1 -1
- package/lib/cjs/tools/ToolAssistance.js.map +1 -1
- package/lib/cjs/tools/ToolSettings.d.ts +5 -0
- package/lib/cjs/tools/ToolSettings.d.ts.map +1 -1
- package/lib/cjs/tools/ToolSettings.js +5 -0
- package/lib/cjs/tools/ToolSettings.js.map +1 -1
- package/lib/cjs/tools/ViewTool.d.ts +1 -2
- package/lib/cjs/tools/ViewTool.d.ts.map +1 -1
- package/lib/cjs/tools/ViewTool.js +143 -84
- package/lib/cjs/tools/ViewTool.js.map +1 -1
- package/lib/esm/AccuDraw.d.ts +2 -0
- package/lib/esm/AccuDraw.d.ts.map +1 -1
- package/lib/esm/AccuDraw.js +4 -2
- package/lib/esm/AccuDraw.js.map +1 -1
- package/lib/esm/AccuSnap.d.ts.map +1 -1
- package/lib/esm/AccuSnap.js +15 -6
- package/lib/esm/AccuSnap.js.map +1 -1
- package/lib/esm/AuxCoordSys.js +1 -1
- package/lib/esm/AuxCoordSys.js.map +1 -1
- package/lib/esm/DisplayStyleState.d.ts +37 -0
- package/lib/esm/DisplayStyleState.d.ts.map +1 -1
- package/lib/esm/DisplayStyleState.js +65 -0
- package/lib/esm/DisplayStyleState.js.map +1 -1
- package/lib/esm/DrawingViewState.d.ts.map +1 -1
- package/lib/esm/DrawingViewState.js +1 -0
- package/lib/esm/DrawingViewState.js.map +1 -1
- package/lib/esm/GraphicalEditingScope.d.ts +1 -1
- package/lib/esm/GraphicalEditingScope.d.ts.map +1 -1
- package/lib/esm/GraphicalEditingScope.js +1 -1
- package/lib/esm/GraphicalEditingScope.js.map +1 -1
- package/lib/esm/HitDetail.d.ts +1 -1
- package/lib/esm/HitDetail.d.ts.map +1 -1
- package/lib/esm/HitDetail.js.map +1 -1
- package/lib/esm/IModelApp.d.ts +19 -4
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +22 -3
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts +8 -9
- package/lib/esm/IModelConnection.d.ts.map +1 -1
- package/lib/esm/IModelConnection.js +53 -25
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/IpcApp.d.ts +2 -1
- package/lib/esm/IpcApp.d.ts.map +1 -1
- package/lib/esm/IpcApp.js +4 -2
- package/lib/esm/IpcApp.js.map +1 -1
- package/lib/esm/RealityDataSource.d.ts +65 -3
- package/lib/esm/RealityDataSource.d.ts.map +1 -1
- package/lib/esm/RealityDataSource.js +77 -3
- package/lib/esm/RealityDataSource.js.map +1 -1
- package/lib/esm/RealityDataSourceTilesetUrlImpl.js +1 -1
- package/lib/esm/RealityDataSourceTilesetUrlImpl.js.map +1 -1
- package/lib/esm/SelectionSet.d.ts +7 -7
- package/lib/esm/SelectionSet.js +3 -3
- package/lib/esm/SelectionSet.js.map +1 -1
- package/lib/esm/SheetViewState.d.ts +2 -0
- package/lib/esm/SheetViewState.d.ts.map +1 -1
- package/lib/esm/SheetViewState.js +25 -3
- package/lib/esm/SheetViewState.js.map +1 -1
- package/lib/esm/ViewState.d.ts +1 -1
- package/lib/esm/ViewState.js +1 -1
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/Viewport.d.ts +6 -4
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +23 -3
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/common/gltf/GltfSchema.d.ts +18 -0
- package/lib/esm/common/gltf/GltfSchema.d.ts.map +1 -1
- package/lib/esm/common/gltf/GltfSchema.js +1 -0
- package/lib/esm/common/gltf/GltfSchema.js.map +1 -1
- package/lib/esm/common/imdl/CompactEdges.d.ts +11 -0
- package/lib/esm/common/imdl/CompactEdges.d.ts.map +1 -1
- package/lib/esm/common/imdl/CompactEdges.js +8 -6
- package/lib/esm/common/imdl/CompactEdges.js.map +1 -1
- package/lib/esm/common/imdl/ImdlSchema.d.ts +5 -1
- package/lib/esm/common/imdl/ImdlSchema.d.ts.map +1 -1
- package/lib/esm/common/imdl/ImdlSchema.js +4 -0
- package/lib/esm/common/imdl/ImdlSchema.js.map +1 -1
- package/lib/esm/common/imdl/ParseImdlDocument.d.ts.map +1 -1
- package/lib/esm/common/imdl/ParseImdlDocument.js +11 -9
- package/lib/esm/common/imdl/ParseImdlDocument.js.map +1 -1
- package/lib/esm/common/internal/render/EdgeParams.d.ts +7 -2
- package/lib/esm/common/internal/render/EdgeParams.d.ts.map +1 -1
- package/lib/esm/common/internal/render/EdgeParams.js +31 -9
- package/lib/esm/common/internal/render/EdgeParams.js.map +1 -1
- package/lib/esm/common/internal/render/MeshPrimitives.d.ts +2 -1
- package/lib/esm/common/internal/render/MeshPrimitives.d.ts.map +1 -1
- package/lib/esm/common/internal/render/MeshPrimitives.js +5 -7
- package/lib/esm/common/internal/render/MeshPrimitives.js.map +1 -1
- package/lib/esm/common/internal/render/PolylineParams.d.ts +8 -3
- package/lib/esm/common/internal/render/PolylineParams.d.ts.map +1 -1
- package/lib/esm/common/internal/render/PolylineParams.js +5 -8
- package/lib/esm/common/internal/render/PolylineParams.js.map +1 -1
- package/lib/esm/common/internal/render/VertexTableSplitter.d.ts.map +1 -1
- package/lib/esm/common/internal/render/VertexTableSplitter.js +9 -7
- package/lib/esm/common/internal/render/VertexTableSplitter.js.map +1 -1
- package/lib/esm/core-frontend.d.ts +2 -2
- package/lib/esm/core-frontend.d.ts.map +1 -1
- package/lib/esm/core-frontend.js +1 -1
- package/lib/esm/core-frontend.js.map +1 -1
- package/lib/esm/extension/ExtensionRuntime.js +15 -2
- package/lib/esm/extension/ExtensionRuntime.js.map +1 -1
- package/lib/esm/extension/providers/ExtensionLoadScript.js +1 -1
- package/lib/esm/extension/providers/ExtensionLoadScript.js.map +1 -1
- package/lib/esm/internal/GoogleMapsDecorator.d.ts +53 -0
- package/lib/esm/internal/GoogleMapsDecorator.d.ts.map +1 -0
- package/lib/esm/internal/GoogleMapsDecorator.js +126 -0
- package/lib/esm/internal/GoogleMapsDecorator.js.map +1 -0
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.d.ts +83 -0
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.d.ts.map +1 -0
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.js +197 -0
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.js.map +1 -0
- package/lib/esm/internal/ScriptUtils.d.ts +5 -0
- package/lib/esm/internal/ScriptUtils.d.ts.map +1 -0
- package/lib/esm/internal/ScriptUtils.js +117 -0
- package/lib/esm/internal/ScriptUtils.js.map +1 -0
- package/lib/esm/internal/cross-package.d.ts +1 -0
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +1 -0
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts +2 -2
- package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.js +2 -2
- package/lib/esm/internal/render/webgl/AttributeBuffers.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/BranchStack.d.ts +2 -2
- package/lib/esm/internal/render/webgl/BranchStack.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/BranchStack.js +3 -2
- package/lib/esm/internal/render/webgl/BranchStack.js.map +1 -1
- package/lib/esm/internal/render/webgl/BranchState.d.ts +4 -2
- package/lib/esm/internal/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/BranchState.js +4 -1
- package/lib/esm/internal/render/webgl/BranchState.js.map +1 -1
- package/lib/esm/internal/render/webgl/BranchUniforms.d.ts +2 -2
- package/lib/esm/internal/render/webgl/BranchUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/BranchUniforms.js +2 -2
- package/lib/esm/internal/render/webgl/BranchUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.d.ts +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.js +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.js.map +1 -1
- package/lib/esm/internal/render/webgl/ContourUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ContourUniforms.js +2 -3
- package/lib/esm/internal/render/webgl/ContourUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/Contours.js +8 -8
- package/lib/esm/internal/render/webgl/Contours.js.map +1 -1
- package/lib/esm/internal/render/webgl/EdgeGeometry.d.ts +8 -6
- package/lib/esm/internal/render/webgl/EdgeGeometry.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/EdgeGeometry.js +21 -7
- package/lib/esm/internal/render/webgl/EdgeGeometry.js.map +1 -1
- package/lib/esm/internal/render/webgl/Graphic.d.ts +2 -1
- package/lib/esm/internal/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Graphic.js +2 -0
- package/lib/esm/internal/render/webgl/Graphic.js.map +1 -1
- package/lib/esm/internal/render/webgl/IndexedEdgeGeometry.d.ts +6 -1
- package/lib/esm/internal/render/webgl/IndexedEdgeGeometry.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/IndexedEdgeGeometry.js +19 -4
- package/lib/esm/internal/render/webgl/IndexedEdgeGeometry.js.map +1 -1
- package/lib/esm/internal/render/webgl/Mesh.d.ts +1 -1
- package/lib/esm/internal/render/webgl/Mesh.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Mesh.js +14 -7
- package/lib/esm/internal/render/webgl/Mesh.js.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.js +2 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderProgram.d.ts +2 -2
- package/lib/esm/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderProgram.js +2 -2
- package/lib/esm/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/esm/internal/render/webgl/Target.d.ts +2 -1
- package/lib/esm/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Target.js +3 -1
- package/lib/esm/internal/render/webgl/Target.js.map +1 -1
- package/lib/esm/internal/render/webgl/Technique.d.ts +3 -3
- package/lib/esm/internal/render/webgl/Technique.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Technique.js +3 -3
- package/lib/esm/internal/render/webgl/Technique.js.map +1 -1
- package/lib/esm/internal/tile/ClassifierTileTree.js +3 -1
- package/lib/esm/internal/tile/ClassifierTileTree.js.map +1 -1
- package/lib/esm/internal/tile/IModelTile.d.ts +1 -0
- package/lib/esm/internal/tile/IModelTile.d.ts.map +1 -1
- package/lib/esm/internal/tile/IModelTile.js +4 -0
- package/lib/esm/internal/tile/IModelTile.js.map +1 -1
- package/lib/esm/internal/tile/IModelTileTree.d.ts +4 -2
- package/lib/esm/internal/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/IModelTileTree.js +60 -2
- package/lib/esm/internal/tile/IModelTileTree.js.map +1 -1
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.d.ts.map +1 -1
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.js +8 -0
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.js.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.d.ts +4 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.js +5 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/esm/internal/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/PrimaryTileTree.js +5 -4
- package/lib/esm/internal/tile/PrimaryTileTree.js.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts +26 -7
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.js +48 -22
- package/lib/esm/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/esm/internal/tile/RealityTileLoader.d.ts +2 -2
- package/lib/esm/internal/tile/RealityTileLoader.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityTileLoader.js +10 -2
- package/lib/esm/internal/tile/RealityTileLoader.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts +4 -0
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +52 -11
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/WmtsCapabilities.d.ts +7 -0
- package/lib/esm/internal/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/WmtsCapabilities.js +17 -0
- package/lib/esm/internal/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/esm/internal/webgl.d.ts +1 -1
- package/lib/esm/internal/webgl.d.ts.map +1 -1
- package/lib/esm/internal/webgl.js.map +1 -1
- package/lib/esm/properties/AngleDescription.d.ts +4 -1
- package/lib/esm/properties/AngleDescription.d.ts.map +1 -1
- package/lib/esm/properties/AngleDescription.js +10 -2
- package/lib/esm/properties/AngleDescription.js.map +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.d.ts +11 -1
- package/lib/esm/properties/FormattedQuantityDescription.d.ts.map +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.js +7 -2
- package/lib/esm/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/esm/properties/LengthDescription.d.ts +12 -3
- package/lib/esm/properties/LengthDescription.d.ts.map +1 -1
- package/lib/esm/properties/LengthDescription.js +30 -6
- package/lib/esm/properties/LengthDescription.js.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts +103 -7
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.js +208 -23
- package/lib/esm/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/esm/render/Decorations.d.ts +1 -1
- package/lib/esm/render/Decorations.d.ts.map +1 -1
- package/lib/esm/render/Decorations.js +1 -1
- package/lib/esm/render/Decorations.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +4 -2
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js +1 -1
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/MeshArgs.d.ts +8 -3
- package/lib/esm/render/MeshArgs.d.ts.map +1 -1
- package/lib/esm/render/MeshArgs.js.map +1 -1
- package/lib/esm/render/RenderGraphic.d.ts +1 -1
- package/lib/esm/render/RenderGraphic.d.ts.map +1 -1
- package/lib/esm/render/RenderGraphic.js.map +1 -1
- package/lib/esm/render/RenderSystem.d.ts +2 -2
- package/lib/esm/render/RenderSystem.d.ts.map +1 -1
- package/lib/esm/render/RenderSystem.js.map +1 -1
- package/lib/esm/render/ScreenSpaceEffectBuilder.d.ts +1 -1
- package/lib/esm/render/ScreenSpaceEffectBuilder.js.map +1 -1
- package/lib/esm/request/Request.d.ts +2 -2
- package/lib/esm/request/Request.js.map +1 -1
- package/lib/esm/tile/GltfReader.d.ts +6 -2
- package/lib/esm/tile/GltfReader.d.ts.map +1 -1
- package/lib/esm/tile/GltfReader.js +154 -19
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/lib/esm/tile/ImdlReader.js.map +1 -1
- package/lib/esm/tile/RealityTile.d.ts +9 -0
- package/lib/esm/tile/RealityTile.d.ts.map +1 -1
- package/lib/esm/tile/RealityTile.js +12 -0
- package/lib/esm/tile/RealityTile.js.map +1 -1
- package/lib/esm/tile/RealityTileTree.d.ts +4 -0
- package/lib/esm/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/esm/tile/RealityTileTree.js +4 -0
- package/lib/esm/tile/RealityTileTree.js.map +1 -1
- package/lib/esm/tile/Tile.d.ts +1 -1
- package/lib/esm/tile/Tile.d.ts.map +1 -1
- package/lib/esm/tile/Tile.js +1 -1
- package/lib/esm/tile/Tile.js.map +1 -1
- package/lib/esm/tile/TileAdmin.d.ts +10 -0
- package/lib/esm/tile/TileAdmin.d.ts.map +1 -1
- package/lib/esm/tile/TileAdmin.js +3 -0
- package/lib/esm/tile/TileAdmin.js.map +1 -1
- package/lib/esm/tile/TileGeometryCollector.d.ts +5 -0
- package/lib/esm/tile/TileGeometryCollector.d.ts.map +1 -1
- package/lib/esm/tile/TileGeometryCollector.js.map +1 -1
- package/lib/esm/tile/TileTree.d.ts +15 -2
- package/lib/esm/tile/TileTree.d.ts.map +1 -1
- package/lib/esm/tile/TileTree.js +14 -1
- package/lib/esm/tile/TileTree.js.map +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts +17 -3
- package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/esm/tile/TileTreeReference.js +11 -5
- package/lib/esm/tile/TileTreeReference.js.map +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.d.ts +2 -2
- package/lib/esm/tile/map/ImageryTileTree.d.ts.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/MapCartoRectangle.d.ts +10 -0
- package/lib/esm/tile/map/MapCartoRectangle.d.ts.map +1 -1
- package/lib/esm/tile/map/MapCartoRectangle.js +12 -0
- package/lib/esm/tile/map/MapCartoRectangle.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +3 -3
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +9 -5
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTileTree.js +1 -1
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tile/map/QuadId.d.ts +15 -0
- package/lib/esm/tile/map/QuadId.d.ts.map +1 -1
- package/lib/esm/tile/map/QuadId.js +12 -0
- package/lib/esm/tile/map/QuadId.js.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/esm/tools/AccuDrawViewportUI.d.ts +7 -0
- package/lib/esm/tools/AccuDrawViewportUI.d.ts.map +1 -1
- package/lib/esm/tools/AccuDrawViewportUI.js +14 -0
- package/lib/esm/tools/AccuDrawViewportUI.js.map +1 -1
- package/lib/esm/tools/ClipViewTool.d.ts.map +1 -1
- package/lib/esm/tools/ClipViewTool.js +18 -7
- package/lib/esm/tools/ClipViewTool.js.map +1 -1
- package/lib/esm/tools/ElementSetTool.d.ts +9 -1
- package/lib/esm/tools/ElementSetTool.d.ts.map +1 -1
- package/lib/esm/tools/ElementSetTool.js +132 -9
- package/lib/esm/tools/ElementSetTool.js.map +1 -1
- package/lib/esm/tools/IdleTool.d.ts.map +1 -1
- package/lib/esm/tools/IdleTool.js +4 -1
- package/lib/esm/tools/IdleTool.js.map +1 -1
- package/lib/esm/tools/MeasureTool.d.ts +9 -0
- package/lib/esm/tools/MeasureTool.d.ts.map +1 -1
- package/lib/esm/tools/MeasureTool.js +57 -24
- package/lib/esm/tools/MeasureTool.js.map +1 -1
- package/lib/esm/tools/PrimitiveTool.d.ts +1 -1
- package/lib/esm/tools/PrimitiveTool.d.ts.map +1 -1
- package/lib/esm/tools/PrimitiveTool.js +4 -3
- package/lib/esm/tools/PrimitiveTool.js.map +1 -1
- package/lib/esm/tools/SelectTool.d.ts +2 -2
- package/lib/esm/tools/SelectTool.d.ts.map +1 -1
- package/lib/esm/tools/SelectTool.js +26 -97
- package/lib/esm/tools/SelectTool.js.map +1 -1
- package/lib/esm/tools/Tool.d.ts +10 -1
- package/lib/esm/tools/Tool.d.ts.map +1 -1
- package/lib/esm/tools/Tool.js +27 -4
- package/lib/esm/tools/Tool.js.map +1 -1
- package/lib/esm/tools/ToolAdmin.d.ts +1 -0
- package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/esm/tools/ToolAdmin.js +59 -18
- package/lib/esm/tools/ToolAdmin.js.map +1 -1
- package/lib/esm/tools/ToolAssistance.d.ts +1 -1
- package/lib/esm/tools/ToolAssistance.js.map +1 -1
- package/lib/esm/tools/ToolSettings.d.ts +5 -0
- package/lib/esm/tools/ToolSettings.d.ts.map +1 -1
- package/lib/esm/tools/ToolSettings.js +5 -0
- package/lib/esm/tools/ToolSettings.js.map +1 -1
- package/lib/esm/tools/ViewTool.d.ts +1 -2
- package/lib/esm/tools/ViewTool.d.ts.map +1 -1
- package/lib/esm/tools/ViewTool.js +143 -84
- package/lib/esm/tools/ViewTool.js.map +1 -1
- package/lib/public/images/google_on_non_white.png +0 -0
- package/lib/public/images/google_on_non_white_hdpi.png +0 -0
- package/lib/public/images/google_on_white.png +0 -0
- package/lib/public/images/google_on_white_hdpi.png +0 -0
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +25 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewTool.js","sourceRoot":"","sources":["../../../src/tools/ViewTool.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8D;AAC9D,wDAG8B;AAC9B,oDAA4F;AAC5F,0DAE+B;AAC/B,0CAA4D;AAC5D,kDAAuD;AACvD,gDAA6C;AAC7C,4CAAyC;AACzC,uEAAoE;AACpE,2CAAwC;AACxC,kDAAiD;AAGjD,8DAG+B;AAC/B,0CAAyE;AAEzE,iDAA8C;AAC9C,4CAA2C;AAC3C,8CAA2C;AAC3C,uDAAoD;AACpD,mDAAgD;AAChD,iCAEgB;AAChB,qDAAoJ;AACpJ,iDAA8C;AAC9C,8DAA2D;AAc3D,gBAAgB;AAChB,IAAY,cAWX;AAXD,WAAY,cAAc;IACxB,mDAAQ,CAAA;IACR,uDAAU,CAAA;IACV,mEAAqB,CAAA;IACrB,iDAAY,CAAA;IACZ,uDAAe,CAAA;IACf,oDAAa,CAAA;IACb,oDAAa,CAAA;IACb,kDAAY,CAAA;IACZ,qDAAa,CAAA;IACb,mEAAoB,CAAA;AACtB,CAAC,EAXW,cAAc,8BAAd,cAAc,QAWzB;AAYD,wCAAwC;AAExC,sDAAsD;AACtD,MAAM,cAAc,GAAG,CAAC,EAAY,EAAE,EAAE;IACtC,EAAE,CAAC,YAAY,CAAC,wBAAQ,CAAC,KAAK,CAAC,2BAAY,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC;AAEF;;;G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wMC","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 Tools\n */\n\nimport { BeDuration, BeTimePoint } from \"@itwin/core-bentley\";\nimport {\n Angle, AngleSweep, Arc3d, AxisOrder, ClipUtilities, Constant, CurveLocationDetail, Geometry, LineString3d, Matrix3d, Plane3dByOriginAndUnitNormal,\n Point2d, Point3d, Range2d, Range3d, Ray3d, Transform, Vector2d, Vector3d, XAndY, YawPitchRollAngles,\n} from \"@itwin/core-geometry\";\nimport { Cartographic, ColorDef, Frustum, LinePixels, NpcCenter } from \"@itwin/core-common\";\nimport {\n DialogItem, DialogProperty, DialogPropertySyncItem, PropertyDescriptionHelper,\n} from \"@itwin/appui-abstract\";\nimport { AccuDraw, AccuDrawHintBuilder } from \"../AccuDraw\";\nimport { BingLocationProvider } from \"../BingLocation\";\nimport { CoordSystem } from \"../CoordSystem\";\nimport { IModelApp } from \"../IModelApp\";\nimport { LengthDescription } from \"../properties/LengthDescription\";\nimport { Pixel } from \"../render/Pixel\";\nimport { StandardViewId } from \"../StandardView\";\nimport { Animator, MarginOptions, OnViewExtentsError, ViewChangeOptions } from \"../ViewAnimation\";\nimport { DecorateContext } from \"../ViewContext\";\nimport {\n eyeToCartographicOnGlobeFromGcs, GlobalLocation, queryTerrainElevationOffset, rangeToCartographicArea, viewGlobalLocation,\n ViewGlobalLocationConstants,\n} from \"../ViewGlobalLocation\";\nimport { DepthPointSource, ScreenViewport, Viewport } from \"../Viewport\";\nimport { ViewPose } from \"../ViewPose\";\nimport { ViewRect } from \"../common/ViewRect\";\nimport { ViewState3d } from \"../ViewState\";\nimport { ViewStatus } from \"../ViewStatus\";\nimport { EditManipulator } from \"./EditManipulator\";\nimport { PrimitiveTool } from \"./PrimitiveTool\";\nimport {\n BeButton, BeButtonEvent, BeModifierKeys, BeTouchEvent, BeWheelEvent, CoordSource, CoreTools, EventHandled, InputSource, InteractiveTool,\n} from \"./Tool\";\nimport { ToolAssistance, ToolAssistanceImage, ToolAssistanceInputMethod, ToolAssistanceInstruction, ToolAssistanceSection } from \"./ToolAssistance\";\nimport { ToolSettings } from \"./ToolSettings\";\nimport { GraphicType } from \"../common/render/GraphicType\";\n\n// cspell:ignore wasd, arrowright, arrowleft, pagedown, pageup, arrowup, arrowdown\n/* eslint-disable no-restricted-syntax */\n\n/** @internal */\nconst enum ViewHandleWeight {\n Thin = 1,\n Normal = 2,\n Bold = 3,\n VeryBold = 4,\n FatDot = 8,\n}\n\n/** @internal */\nexport enum ViewHandleType {\n None = 0,\n Rotate = 1,\n TargetCenter = 1 << 1,\n Pan = 1 << 2,\n Scroll = 1 << 3,\n Zoom = 1 << 4,\n Walk = 1 << 5,\n Fly = 1 << 6,\n Look = 1 << 7,\n LookAndMove = 1 << 8,\n}\n\n/** @internal */\nconst enum ViewManipPriority {\n Low = 1,\n Normal = 10,\n Medium = 100,\n High = 1000,\n}\n\nconst enum NavigateMode { Pan = 0, Look = 1, Travel = 2 }\n\n/* eslint-enable no-restricted-syntax */\n\n// dampen an inertia vector according to tool settings\nconst inertialDampen = (pt: Vector3d) => {\n pt.scaleInPlace(Geometry.clamp(ToolSettings.viewingInertia.damping, .75, .999));\n};\n\n/** An InteractiveTool that manipulates a view.\n * @public\n * @extensions\n */\nexport abstract class ViewTool extends InteractiveTool {\n public static translate(val: string) { return CoreTools.translate(`View.${val}`); }\n\n public inDynamicUpdate = false;\n public beginDynamicUpdate() { this.inDynamicUpdate = true; }\n public endDynamicUpdate() { this.inDynamicUpdate = false; }\n public override async run(..._args: any[]): Promise<boolean> {\n const toolAdmin = IModelApp.toolAdmin;\n if (undefined !== this.viewport && this.viewport === toolAdmin.markupView) {\n IModelApp.notifications.outputPromptByKey(\"iModelJs:Viewing.NotDuringMarkup\");\n return false;\n }\n\n if (!await toolAdmin.onInstallTool(this))\n return false;\n\n await toolAdmin.startViewTool(this);\n await toolAdmin.onPostInstallTool(this);\n return true;\n }\n\n public constructor(public viewport?: ScreenViewport) {\n super();\n }\n public override async onResetButtonUp(_ev: BeButtonEvent) {\n await this.exitTool();\n return EventHandled.Yes;\n }\n\n /** Do not override. */\n public async exitTool() { return IModelApp.toolAdmin.exitViewTool(); }\n public static showPrompt(prompt: string) {\n IModelApp.notifications.outputPrompt(ViewTool.translate(prompt));\n }\n}\n\n/** @internal */\nexport abstract class ViewingToolHandle {\n protected readonly _lastPtNpc = new Point3d();\n protected _depthPoint?: Point3d;\n\n constructor(public viewTool: ViewManip) {\n this._depthPoint = undefined;\n }\n public onReinitialize(): void { }\n public onCleanup(): void { }\n public focusOut(): void { }\n public motion(_ev: BeButtonEvent): boolean { return false; }\n public checkOneShot(): boolean { return true; }\n public getHandleCursor(): string { return \"default\"; }\n public abstract doManipulation(ev: BeButtonEvent, inDynamics: boolean): boolean;\n public abstract firstPoint(ev: BeButtonEvent): boolean;\n public abstract testHandleForHit(ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean;\n public abstract get handleType(): ViewHandleType;\n public focusIn(): void { IModelApp.toolAdmin.setCursor(this.getHandleCursor()); }\n public drawHandle(_context: DecorateContext, _hasFocus: boolean): void { }\n public onWheel(_ev: BeWheelEvent): boolean { return false; }\n public onTouchStart(_ev: BeTouchEvent): boolean { return false; }\n public onTouchEnd(_ev: BeTouchEvent): boolean { return false; }\n public async onTouchComplete(_ev: BeTouchEvent): Promise<boolean> { return false; }\n public async onTouchCancel(_ev: BeTouchEvent): Promise<boolean> { return false; }\n public onTouchMove(_ev: BeTouchEvent): boolean { return false; }\n public onTouchMoveStart(_ev: BeTouchEvent, _startEv: BeTouchEvent): boolean { return false; }\n public onTouchTap(_ev: BeTouchEvent): boolean { return false; }\n public onKeyTransition(_wentDown: boolean, _keyEvent: KeyboardEvent): boolean { return false; }\n public onModifierKeyTransition(_wentDown: boolean, _modifier: BeModifierKeys, _event: KeyboardEvent): boolean { return false; }\n public needDepthPoint(_ev: BeButtonEvent, _isPreview: boolean): boolean { return false; }\n public adjustDepthPoint(isValid: boolean, _vp: Viewport, _plane: Plane3dByOriginAndUnitNormal, source: DepthPointSource): boolean {\n switch (source) {\n case DepthPointSource.Geometry:\n case DepthPointSource.Model:\n case DepthPointSource.BackgroundMap:\n case DepthPointSource.GroundPlane:\n case DepthPointSource.Grid:\n case DepthPointSource.Map:\n return isValid; // Sources with visible geometry/graphics are considered valid by default...\n default:\n return false; // Sources without visible geometry/graphics are NOT considered valid by default...\n }\n }\n protected pickDepthPoint(ev: BeButtonEvent) {\n this._depthPoint = this.viewTool.pickDepthPoint(ev);\n }\n // if we have a valid depth point, set the focus distance to\n protected changeFocusFromDepthPoint() {\n if (undefined !== this._depthPoint) {\n const view = this.viewTool.viewport!.view;\n if (view.is3d() && view.isCameraOn)\n view.changeFocusFromPoint(this._depthPoint); // set the focus distance to the depth point\n }\n }\n}\n\n/** @internal */\nexport class ViewHandleArray {\n public handles: ViewingToolHandle[] = [];\n public focus = -1;\n public focusDrag = false;\n public hitHandleIndex = 0;\n constructor(public viewTool: ViewManip) { }\n\n public empty() {\n this.focus = -1;\n this.focusDrag = false;\n this.hitHandleIndex = -1; // setting to -1 will result in onReinitialize getting called before testHit which sets the hit index\n this.handles.length = 0;\n }\n\n public get count(): number { return this.handles.length; }\n public get hitHandle(): ViewingToolHandle | undefined { return this.getByIndex(this.hitHandleIndex); }\n public get focusHandle(): ViewingToolHandle | undefined { return this.getByIndex(this.focus); }\n public add(handle: ViewingToolHandle): void { this.handles.push(handle); }\n public getByIndex(index: number): ViewingToolHandle | undefined { return (index >= 0 && index < this.count) ? this.handles[index] : undefined; }\n public focusHitHandle(): void { this.setFocus(this.hitHandleIndex); }\n\n public testHit(ptScreen: Point3d, forced = ViewHandleType.None): boolean {\n this.hitHandleIndex = -1;\n const data = { distance: 0.0, priority: ViewManipPriority.Normal };\n let minDistance = 0.0;\n let minDistValid = false;\n let highestPriority = ViewManipPriority.Low;\n let nearestHitHandle: ViewingToolHandle | undefined;\n\n for (let i = 0; i < this.count; i++) {\n data.priority = ViewManipPriority.Normal;\n const handle = this.handles[i];\n\n if (forced) {\n if (handle.handleType === forced) {\n this.hitHandleIndex = i;\n return true;\n }\n } else if (handle.testHandleForHit(ptScreen, data)) {\n if (data.priority >= highestPriority) {\n if (data.priority > highestPriority)\n minDistValid = false;\n\n highestPriority = data.priority;\n\n if (!minDistValid || (data.distance < minDistance)) {\n minDistValid = true;\n minDistance = data.distance;\n nearestHitHandle = handle;\n this.hitHandleIndex = i;\n }\n }\n }\n }\n return undefined !== nearestHitHandle;\n }\n\n public drawHandles(context: DecorateContext): void {\n if (0 === this.count)\n return;\n\n // all handle objects must draw themselves\n for (let i = 0; i < this.count; ++i) {\n if (i !== this.hitHandleIndex) {\n const handle = this.handles[i];\n handle.drawHandle(context, this.focus === i);\n }\n }\n\n // draw the hit handle last\n if (-1 !== this.hitHandleIndex) {\n const handle = this.handles[this.hitHandleIndex];\n handle.drawHandle(context, this.focus === this.hitHandleIndex);\n }\n }\n\n public setFocus(index: number): void {\n if (this.focus === index && (this.focusDrag === this.viewTool.inHandleModify))\n return;\n\n let focusHandle: ViewingToolHandle | undefined;\n if (this.focus >= 0) {\n focusHandle = this.getByIndex(this.focus);\n if (focusHandle)\n focusHandle.focusOut();\n }\n\n if (index >= 0) {\n focusHandle = this.getByIndex(index);\n if (focusHandle)\n focusHandle.focusIn();\n }\n\n this.focus = index;\n this.focusDrag = this.viewTool.inHandleModify;\n\n const vp = this.viewTool.viewport;\n if (undefined !== vp)\n vp.invalidateDecorations();\n }\n\n public onReinitialize(): void { this.handles.forEach((handle) => handle.onReinitialize()); }\n public onCleanup(): void { this.handles.forEach((handle) => handle.onCleanup()); }\n public motion(ev: BeButtonEvent): void { this.handles.forEach((handle) => handle.motion(ev)); }\n public onWheel(ev: BeWheelEvent): boolean {\n let preventDefault = false;\n this.handles.forEach((handle) => {\n if (handle.onWheel(ev))\n preventDefault = true;\n });\n return preventDefault;\n }\n\n /** determine whether a handle of a specific type exists */\n public hasHandle(handleType: ViewHandleType): boolean { return this.handles.some((handle) => handle.handleType === handleType); }\n}\n\n/** Base class for tools that manipulate the frustum of a Viewport.\n * @public\n * @extensions\n */\nexport abstract class ViewManip extends ViewTool {\n /** @internal */\n public viewHandles: ViewHandleArray;\n public frustumValid = false; // unused\n public readonly targetCenterWorld = new Point3d();\n public inHandleModify = false;\n public isDragging = false;\n public targetCenterValid = false;\n public targetCenterLocked = false;\n public nPts = 0;\n /** @internal */\n public forcedHandle = ViewHandleType.None;\n /** @internal */\n protected _depthPreview?: { testPoint: Point3d, pickRadius: number, plane: Plane3dByOriginAndUnitNormal, source: DepthPointSource, isDefaultDepth: boolean, sourceId?: string };\n /** @internal */\n protected _startPose?: ViewPose;\n\n constructor(viewport: ScreenViewport | undefined, public handleMask: number, public oneShot: boolean, public isDraggingRequired: boolean = false) {\n super(viewport);\n this.viewHandles = new ViewHandleArray(this);\n this.changeViewport(viewport);\n }\n\n public override decorate(context: DecorateContext): void {\n this.viewHandles.drawHandles(context);\n this.previewDepthPoint(context);\n }\n\n /** @internal */\n public previewDepthPoint(context: DecorateContext): void {\n if (undefined === this._depthPreview)\n return;\n\n const cursorVp = IModelApp.toolAdmin.cursorView;\n if (cursorVp !== context.viewport)\n return;\n\n let origin = this._depthPreview.plane.getOriginRef();\n let normal = this._depthPreview.plane.getNormalRef();\n\n if (this._depthPreview.isDefaultDepth) {\n origin = cursorVp.worldToView(origin);\n origin.z = 0.0;\n cursorVp.viewToWorld(origin, origin); // Avoid getting clipped out in z...\n normal = context.viewport.view.getZVector(); // Always draw circle for invalid depth point oriented to view...\n }\n\n const pixelSize = context.viewport.getPixelSizeAtPoint(origin);\n const skew = context.viewport.view.getAspectRatioSkew();\n const radius = this._depthPreview.pickRadius * pixelSize;\n const rMatrix = Matrix3d.createRigidHeadsUp(normal);\n const ellipse = Arc3d.createScaledXYColumns(origin, rMatrix, radius, radius / skew, AngleSweep.create360());\n const colorBase = (this._depthPreview.isDefaultDepth ? ColorDef.red : (DepthPointSource.Geometry === this._depthPreview.source ? ColorDef.green : context.viewport.hilite.color));\n const colorLine = EditManipulator.HandleUtils.adjustForBackgroundColor(colorBase, cursorVp).withTransparency(50);\n const colorFill = colorLine.withTransparency(200);\n\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n builder.setSymbology(colorLine, colorFill, 1, this._depthPreview.isDefaultDepth ? LinePixels.Code2 : LinePixels.Solid);\n builder.addArc(ellipse, true, true);\n builder.addArc(ellipse, false, false);\n context.addDecorationFromBuilder(builder);\n\n ViewTargetCenter.drawCross(context, origin, this._depthPreview.pickRadius * 0.5, false);\n }\n\n /** @internal */\n public getDepthPointGeometryId(): string | undefined {\n if (undefined === this._depthPreview)\n return undefined;\n return (DepthPointSource.Geometry === this._depthPreview.source ? this._depthPreview.sourceId : undefined);\n }\n\n /** @internal */\n public clearDepthPoint(): boolean {\n if (undefined === this._depthPreview)\n return false;\n this._depthPreview = undefined;\n return true;\n }\n\n /** @internal */\n public pickDepthPoint(ev: BeButtonEvent, isPreview: boolean = false): Point3d | undefined {\n if (!isPreview && ev.viewport && undefined !== this.getDepthPointGeometryId())\n ev.viewport.flashedId = undefined;\n\n this.clearDepthPoint();\n if (isPreview && this.inDynamicUpdate)\n return undefined;\n\n const vp = ev.viewport;\n if (undefined === vp || undefined === this.viewHandles.hitHandle || !this.viewHandles.hitHandle.needDepthPoint(ev, isPreview))\n return undefined;\n\n const pickRadiusPixels = vp.pixelsFromInches(ToolSettings.viewToolPickRadiusInches);\n const result = vp.pickDepthPoint(ev.rawPoint, pickRadiusPixels);\n let isValidDepth = false;\n\n switch (result.source) {\n case DepthPointSource.Geometry:\n case DepthPointSource.Model:\n case DepthPointSource.Map:\n isValidDepth = true;\n break;\n case DepthPointSource.BackgroundMap:\n case DepthPointSource.GroundPlane:\n case DepthPointSource.Grid:\n case DepthPointSource.ACS:\n case DepthPointSource.TargetPoint:\n const npcPt = vp.worldToNpc(result.plane.getOriginRef());\n isValidDepth = !(npcPt.z < 0.0 || npcPt.z > 1.0);\n break;\n }\n\n // Allow handle to reject depth depending on source and to set a default depth point when invalid...\n isValidDepth = this.viewHandles.hitHandle.adjustDepthPoint(isValidDepth, vp, result.plane, result.source);\n\n if (isPreview)\n this._depthPreview = { testPoint: ev.rawPoint, pickRadius: pickRadiusPixels, plane: result.plane, source: result.source, isDefaultDepth: !isValidDepth, sourceId: result.sourceId };\n\n return (isValidDepth || isPreview ? result.plane.getOriginRef() : undefined);\n }\n\n /** In addition to the onReinitialize calls after a tool installs or restarts, it is also\n * called from the mouseover event to cancel a drag operation if the up event occurred outside the view.\n * When operating in one shot mode and also requiring dragging, the tool should exit and not restart in ths situation.\n * A tool must opt in to allowing [[ViewTool.exitTool]] to be called from [[ViewManip.onReinitialize]] by\n * overriding this method to return true.\n */\n protected get isExitAllowedOnReinitialize(): boolean { return false; }\n\n public override async onReinitialize() {\n const shouldExit = (this.oneShot && this.isDraggingRequired && this.isDragging && 0 !== this.nPts);\n\n if (undefined !== this.viewport) {\n this.viewport.synchWithView(); // make sure we store any changes in view undo buffer.\n this.viewHandles.setFocus(-1);\n }\n\n this.nPts = 0;\n this.inHandleModify = false;\n this.inDynamicUpdate = false;\n this._startPose = undefined;\n\n this.viewHandles.onReinitialize();\n\n if (shouldExit && this.isExitAllowedOnReinitialize)\n return this.exitTool();\n\n this.provideInitialToolAssistance();\n }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n // Tool was started in \"drag required\" mode, don't advance tool state and wait to see if we get the start drag event.\n if ((0 === this.nPts && this.isDraggingRequired && !this.isDragging) || undefined === ev.viewport)\n return EventHandled.No;\n\n switch (this.nPts) {\n case 0:\n this.changeViewport(ev.viewport);\n if (this.processFirstPoint(ev))\n this.nPts = 1;\n break;\n case 1:\n this.nPts = 2;\n break;\n }\n\n if (this.nPts > 1) {\n this.inDynamicUpdate = false;\n if (this.processPoint(ev, false) && this.oneShot)\n await this.exitTool();\n else\n await this.onReinitialize();\n }\n\n return EventHandled.Yes;\n }\n\n public override async onDataButtonUp(_ev: BeButtonEvent): Promise<EventHandled> {\n if (this.nPts <= 1 && this.isDraggingRequired && !this.isDragging && this.oneShot)\n await this.exitTool();\n\n return EventHandled.No;\n }\n\n public override async onMouseWheel(inputEv: BeWheelEvent): Promise<EventHandled> {\n const ev = inputEv.clone();\n if (this.viewHandles.onWheel(ev)) // notify handles that wheel has rolled.\n return EventHandled.Yes;\n\n await IModelApp.toolAdmin.processWheelEvent(ev, false);\n return EventHandled.Yes;\n }\n\n /** @internal */\n public async startHandleDrag(ev: BeButtonEvent, forcedHandle?: ViewHandleType): Promise<EventHandled> {\n if (this.inHandleModify)\n return EventHandled.No; // If already changing the view reject the request...\n\n if (undefined !== forcedHandle) {\n if (!this.viewHandles.hasHandle(forcedHandle))\n return EventHandled.No; // If requested handle isn't present reject the request...\n this.forcedHandle = forcedHandle;\n }\n\n this.receivedDownEvent = true; // Request up events even though we may not have gotten the down event...\n this.isDragging = true;\n\n if (0 === this.nPts)\n await this.onDataButtonDown(ev);\n\n return EventHandled.Yes;\n }\n\n public override async onMouseStartDrag(ev: BeButtonEvent): Promise<EventHandled> {\n if (BeButton.Data !== ev.button)\n return EventHandled.No;\n return this.startHandleDrag(ev);\n }\n\n public override async onMouseEndDrag(ev: BeButtonEvent): Promise<EventHandled> {\n // NOTE: To support startHandleDrag being called by IdleTool for middle button drag, check inHandleModify and not the button type...\n if (!this.inHandleModify)\n return EventHandled.No;\n this.isDragging = false;\n return (0 === this.nPts) ? EventHandled.Yes : this.onDataButtonDown(ev);\n }\n\n public override async onMouseMotion(ev: BeButtonEvent) {\n if (0 === this.nPts && this.viewHandles.testHit(ev.viewPoint))\n this.viewHandles.focusHitHandle();\n\n if (0 !== this.nPts)\n this.processPoint(ev, true);\n\n this.viewHandles.motion(ev);\n\n const prevSourceId = this.getDepthPointGeometryId();\n const showDepthChanged = (undefined !== this.pickDepthPoint(ev, true) || this.clearDepthPoint());\n if (ev.viewport && (showDepthChanged || prevSourceId)) {\n const currSourceId = this.getDepthPointGeometryId();\n if (currSourceId !== prevSourceId)\n ev.viewport.flashedId = currSourceId;\n\n ev.viewport.invalidateDecorations();\n }\n }\n\n public override async onTouchStart(ev: BeTouchEvent): Promise<void> {\n if (0 === this.nPts && this.viewHandles.testHit(ev.viewPoint))\n this.viewHandles.focusHitHandle();\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle)\n focusHandle.onTouchStart(ev);\n }\n\n public override async onTouchEnd(ev: BeTouchEvent): Promise<void> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle)\n focusHandle.onTouchEnd(ev);\n }\n\n public override async onTouchComplete(ev: BeTouchEvent): Promise<void> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle && await focusHandle.onTouchComplete(ev))\n return;\n if (this.inHandleModify)\n return IModelApp.toolAdmin.convertTouchEndToButtonUp(ev);\n }\n\n public override async onTouchCancel(ev: BeTouchEvent): Promise<void> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle && await focusHandle.onTouchCancel(ev))\n return;\n if (this.inHandleModify)\n return IModelApp.toolAdmin.convertTouchEndToButtonUp(ev, BeButton.Reset);\n }\n\n public override async onTouchMove(ev: BeTouchEvent): Promise<void> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle && focusHandle.onTouchMove(ev))\n return;\n if (this.inHandleModify)\n return IModelApp.toolAdmin.convertTouchMoveToMotion(ev);\n }\n\n public override async onTouchMoveStart(ev: BeTouchEvent, startEv: BeTouchEvent): Promise<EventHandled> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle && focusHandle.onTouchMoveStart(ev, startEv))\n return EventHandled.Yes;\n if (!this.inHandleModify && startEv.isSingleTouch)\n await IModelApp.toolAdmin.convertTouchMoveStartToButtonDownAndMotion(startEv, ev);\n return this.inHandleModify ? EventHandled.Yes : EventHandled.No;\n }\n\n public override async onTouchTap(ev: BeTouchEvent): Promise<EventHandled> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle && focusHandle.onTouchTap(ev))\n return EventHandled.Yes;\n return ev.isSingleTap ? EventHandled.Yes : EventHandled.No; // Prevent IdleTool from converting single tap into data button down/up...\n }\n\n public override async onKeyTransition(wentDown: boolean, keyEvent: KeyboardEvent): Promise<EventHandled> {\n const focusHandle = this.viewHandles.focusHandle;\n return (undefined !== focusHandle && focusHandle.onKeyTransition(wentDown, keyEvent) ? EventHandled.Yes : EventHandled.No);\n }\n\n public override async onModifierKeyTransition(wentDown: boolean, modifier: BeModifierKeys, event: KeyboardEvent): Promise<EventHandled> {\n const focusHandle = this.viewHandles.focusHandle;\n return (undefined !== focusHandle && focusHandle.onModifierKeyTransition(wentDown, modifier, event) ? EventHandled.Yes : EventHandled.No);\n }\n\n public override async onPostInstall() {\n await super.onPostInstall();\n await this.onReinitialize(); // Call onReinitialize now that tool is installed.\n }\n\n public provideToolAssistance(mainInstrKey: string, additionalInstr?: ToolAssistanceInstruction[]): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(mainInstrKey));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = CoreTools.translate(\"ElementSet.Inputs.AcceptPoint\");\n const rejectMsg = CoreTools.translate(\"ElementSet.Inputs.Exit\");\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchDrag, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, rejectMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, rejectMsg, false, ToolAssistanceInputMethod.Mouse));\n\n if (undefined !== additionalInstr) {\n for (const instr of additionalInstr) {\n if (ToolAssistanceInputMethod.Touch === instr.inputMethod)\n touchInstructions.push(instr);\n else\n mouseInstructions.push(instr);\n }\n }\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n\n /** Called from [[ViewManip.onReinitialize]] to allow tools to establish the tool assistance for the first point. */\n protected provideInitialToolAssistance(): void { }\n\n public override async onCleanup() {\n let restorePrevious = false;\n\n if (this.inDynamicUpdate) {\n this.endDynamicUpdate();\n restorePrevious = true;\n }\n\n const vp = this.viewport;\n if (undefined !== vp) {\n if (restorePrevious && this._startPose) {\n vp.view.applyPose(this._startPose);\n vp.animateFrustumChange();\n } else {\n vp.synchWithView();\n }\n\n vp.invalidateDecorations();\n }\n this.viewHandles.onCleanup();\n this.viewHandles.empty();\n }\n\n /**\n * Set the center of rotation for rotate handle.\n * @param pt the new target point in world coordinates\n * @param lockTarget consider the target point locked for this tool instance\n * @param saveTarget save this target point for use between tool instances\n */\n public setTargetCenterWorld(pt: Point3d, lockTarget: boolean, saveTarget: boolean) {\n this.targetCenterWorld.setFrom(pt);\n this.targetCenterValid = true;\n this.targetCenterLocked = lockTarget;\n\n if (!this.viewport)\n return;\n\n if (!this.viewport.view.allow3dManipulations())\n this.targetCenterWorld.z = 0.0;\n\n this.viewport.viewCmdTargetCenter = (saveTarget ? pt : undefined);\n }\n\n public updateTargetCenter(): void {\n const vp = this.viewport;\n if (!vp)\n return;\n\n if (this.targetCenterValid) {\n if (this.inHandleModify)\n return;\n if (IModelApp.tentativePoint.isActive) {\n let tentPt = IModelApp.tentativePoint.getPoint();\n if (!IModelApp.tentativePoint.isSnapped) {\n if (undefined === this._depthPreview && this.targetCenterLocked) {\n const ev = new BeButtonEvent();\n IModelApp.toolAdmin.fillEventFromCursorLocation(ev);\n this.targetCenterLocked = false; // Depth preview won't be active (or requested) if target is currently locked...\n this.pickDepthPoint(ev, true);\n }\n if (undefined !== this._depthPreview && !this._depthPreview.isDefaultDepth)\n tentPt = this._depthPreview.plane.getOriginRef(); // Prefer valid depth preview point to unsnapped tentative location...\n }\n this.setTargetCenterWorld(tentPt, true, false);\n IModelApp.tentativePoint.clear(true); // Clear tentative, there won't be a datapoint to accept...\n }\n return;\n }\n\n if (IModelApp.tentativePoint.isActive)\n return this.setTargetCenterWorld(IModelApp.tentativePoint.getPoint(), true, false);\n\n if (vp.viewCmdTargetCenter && this.isPointVisible(vp.viewCmdTargetCenter))\n return this.setTargetCenterWorld(vp.viewCmdTargetCenter, true, true);\n\n return this.setTargetCenterWorld(ViewManip.getDefaultTargetPointWorld(vp), false, false);\n }\n\n public processFirstPoint(ev: BeButtonEvent) {\n const forcedHandle = this.forcedHandle;\n this.forcedHandle = ViewHandleType.None;\n\n if (this.viewHandles.testHit(ev.viewPoint, forcedHandle)) {\n this.inHandleModify = true;\n this.viewHandles.focusHitHandle();\n const handle = this.viewHandles.hitHandle;\n if (undefined !== handle && !handle.firstPoint(ev))\n return false;\n }\n this._startPose = this.viewport ? this.viewport.view.savePose() : undefined;\n return true;\n }\n\n public processPoint(ev: BeButtonEvent, inDynamics: boolean) {\n const hitHandle = this.viewHandles.hitHandle;\n if (undefined === hitHandle)\n return true;\n\n const doUpdate = hitHandle.doManipulation(ev, inDynamics);\n return inDynamics || (doUpdate && hitHandle.checkOneShot());\n }\n\n public lensAngleMatches(angle: Angle, tolerance: number): boolean {\n const cameraView = this.viewport!.view;\n return !cameraView.is3d() ? false : Math.abs(cameraView.calcLensAngle().radians - angle.radians) < tolerance;\n }\n\n public get isZUp() {\n const view = this.viewport!.view;\n const viewX = view.getXVector();\n const viewY = view.getXVector();\n const zVec = Vector3d.unitZ();\n return (Math.abs(zVec.dotProduct(viewY)) > 0.99 && Math.abs(zVec.dotProduct(viewX)) < 0.01);\n }\n\n public static getFocusPlaneNpc(vp: Viewport): number {\n const pt = vp.worldToNpc(vp.view.getTargetPoint());\n return (pt.z < 0.0 || pt.z > 1.0) ? 0.5 : pt.z;\n }\n\n public static getDefaultTargetPointWorld(vp: Viewport): Point3d {\n if (!vp.view.allow3dManipulations())\n return vp.npcToWorld(NpcCenter);\n\n const targetPoint = vp.view.getTargetPoint();\n const targetPointNpc = vp.worldToNpc(targetPoint);\n\n if (targetPointNpc.z < 0.0 || targetPointNpc.z > 1.0) {\n targetPointNpc.z = 0.5;\n vp.npcToWorld(targetPointNpc, targetPoint);\n }\n\n return targetPoint;\n }\n\n /** Determine whether the supplied point is visible in this Viewport. */\n public isPointVisible(testPt: Point3d): boolean {\n const vp = this.viewport;\n if (!vp)\n return false;\n\n return vp.isPointVisibleXY(testPt);\n }\n\n /** @internal */\n public static computeFitRange(viewport: ScreenViewport): Range3d {\n const range = viewport.computeViewRange();\n const clip = (viewport.viewFlags.clipVolume ? viewport.view.getViewClip() : undefined);\n if (undefined !== clip) {\n const clipRange = ClipUtilities.rangeOfClipperIntersectionWithRange(clip, range);\n if (!clipRange.isNull)\n range.setFrom(clipRange);\n }\n return range;\n }\n\n public static fitView(viewport: ScreenViewport, animateFrustumChange: boolean, options?: ViewChangeOptions & MarginOptions) {\n const range = this.computeFitRange(viewport);\n const aspect = viewport.viewRect.aspect;\n viewport.view.lookAtVolume(range, aspect, options);\n viewport.synchWithView({ animateFrustumChange });\n viewport.viewCmdTargetCenter = undefined;\n }\n\n /** @internal */\n public static fitViewWithGlobeAnimation(viewport: ScreenViewport, animateFrustumChange: boolean, options?: ViewChangeOptions & MarginOptions) {\n const range = this.computeFitRange(viewport);\n\n if (viewport.view.isSpatialView() && animateFrustumChange && (viewport.viewingGlobe || !viewport.view.getIsViewingProject())) {\n const cartographicCenter = viewport.view.rootToCartographic(range.center);\n if (undefined !== cartographicCenter) {\n const cartographicArea = rangeToCartographicArea(viewport.view, range);\n (async () => {\n await viewport.animateFlyoverToGlobalLocation({ center: cartographicCenter, area: cartographicArea }); // NOTE: Turns on camera...which is why we checked that it was already on...\n viewport.viewCmdTargetCenter = undefined;\n })().catch(() => { });\n return;\n }\n }\n\n const aspect = viewport.viewRect.aspect;\n viewport.view.lookAtVolume(range, aspect, options);\n viewport.synchWithView({ animateFrustumChange });\n viewport.viewCmdTargetCenter = undefined;\n }\n\n public static async zoomToAlwaysDrawnExclusive(viewport: ScreenViewport, options?: ViewChangeOptions & MarginOptions): Promise<boolean> {\n if (!viewport.isAlwaysDrawnExclusive || undefined === viewport.alwaysDrawn || 0 === viewport.alwaysDrawn.size)\n return false;\n await viewport.zoomToElements(viewport.alwaysDrawn, options);\n return true;\n }\n\n public setCameraLensAngle(lensAngle: Angle, retainEyePoint: boolean): ViewStatus {\n const vp = this.viewport;\n if (!vp)\n return ViewStatus.InvalidViewport;\n\n const view = vp.view;\n if (!view.is3d() || !view.allow3dManipulations())\n return ViewStatus.InvalidViewport;\n\n const result = (retainEyePoint && view.isCameraOn) ?\n view.lookAt({ eyePoint: view.getEyePoint(), targetPoint: view.getTargetPoint(), upVector: view.getYVector(), lensAngle }) :\n vp.turnCameraOn(lensAngle);\n\n if (result !== ViewStatus.Success)\n return result;\n\n vp.setupFromView();\n return ViewStatus.Success;\n }\n\n public enforceZUp(pivotPoint: Point3d) {\n const vp = this.viewport;\n if (!vp || this.isZUp)\n return false;\n\n const viewY = vp.view.getYVector();\n const rotMatrix = Matrix3d.createRotationVectorToVector(viewY, Vector3d.unitZ());\n if (!rotMatrix)\n return false;\n\n const transform = Transform.createFixedPointAndMatrix(pivotPoint, rotMatrix);\n const frust = vp.getWorldFrustum();\n frust.multiply(transform);\n vp.setupViewFromFrustum(frust);\n return true;\n }\n\n public changeViewport(vp?: ScreenViewport): void {\n if (vp === this.viewport && 0 !== this.viewHandles.count) // If viewport isn't really changing do nothing...\n return;\n\n if (this.viewport)\n this.viewport.invalidateDecorations(); // Remove decorations from current viewport...\n\n this.viewport = vp;\n this.targetCenterValid = false;\n if (this.handleMask & (ViewHandleType.Rotate | ViewHandleType.TargetCenter))\n this.updateTargetCenter();\n\n this.viewHandles.empty();\n if (this.handleMask & ViewHandleType.Rotate)\n this.viewHandles.add(new ViewRotate(this));\n\n if (this.handleMask & ViewHandleType.TargetCenter)\n this.viewHandles.add(new ViewTargetCenter(this));\n\n if (this.handleMask & ViewHandleType.Pan)\n this.viewHandles.add(new ViewPan(this));\n\n if (this.handleMask & ViewHandleType.Scroll)\n this.viewHandles.add(new ViewScroll(this));\n\n if (this.handleMask & ViewHandleType.Zoom)\n this.viewHandles.add(new ViewZoom(this));\n\n if (this.handleMask & ViewHandleType.Walk)\n this.viewHandles.add(new ViewWalk(this));\n\n if (this.handleMask & ViewHandleType.Fly)\n this.viewHandles.add(new ViewFly(this));\n\n if (this.handleMask & ViewHandleType.Look)\n this.viewHandles.add(new ViewLook(this));\n\n if (this.handleMask & ViewHandleType.LookAndMove)\n this.viewHandles.add(new ViewLookAndMove(this));\n }\n}\n\n/** ViewingToolHandle for modifying the view's target point for operations like rotate */\nclass ViewTargetCenter extends ViewingToolHandle {\n public get handleType() { return ViewHandleType.TargetCenter; }\n public override checkOneShot(): boolean { return false; } // Don't exit tool after moving target in single-shot mode...\n public firstPoint(ev: BeButtonEvent) {\n if (undefined === ev.viewport)\n return false;\n ev.viewport.viewCmdTargetCenter = undefined; // Clear current saved target, must accept a new location with ctrl...\n return true;\n }\n\n public testHandleForHit(ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n if (this.viewTool.isDraggingRequired)\n return false; // Target center handle is not movable in this mode, but it's still nice to display the point we're rotating about...\n\n const targetPt = this.viewTool.viewport!.worldToView(this.viewTool.targetCenterWorld);\n const distance = targetPt.distanceXY(ptScreen);\n const locateThreshold = this.viewTool.viewport!.pixelsFromInches(0.15);\n\n if (distance > locateThreshold)\n return false;\n\n out.distance = distance;\n out.priority = ViewManipPriority.High;\n return true;\n }\n\n /** @internal */\n public static drawCross(context: DecorateContext, worldPoint: Point3d, sizePixels: number, hasFocus: boolean): void {\n const crossSize = Math.floor(sizePixels) + 0.5;\n const outlineSize = crossSize + 1;\n const position = context.viewport.worldToView(worldPoint);\n position.x = Math.floor(position.x) + 0.5;\n position.y = Math.floor(position.y) + 0.5;\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\n ctx.beginPath();\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\n ctx.lineWidth = hasFocus ? 5 : 3;\n ctx.moveTo(-outlineSize, 0);\n ctx.lineTo(outlineSize, 0);\n ctx.moveTo(0, -outlineSize);\n ctx.lineTo(0, outlineSize);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.strokeStyle = \"white\";\n ctx.lineWidth = hasFocus ? 3 : 1;\n ctx.shadowColor = \"black\";\n ctx.shadowBlur = hasFocus ? 7 : 5;\n ctx.moveTo(-crossSize, 0);\n ctx.lineTo(crossSize, 0);\n ctx.moveTo(0, -crossSize);\n ctx.lineTo(0, crossSize);\n ctx.stroke();\n };\n context.addCanvasDecoration({ position, drawDecoration });\n }\n\n public override drawHandle(context: DecorateContext, hasFocus: boolean): void {\n if (context.viewport !== this.viewTool.viewport)\n return;\n\n if (!this.viewTool.targetCenterLocked && !this.viewTool.inHandleModify)\n return; // Don't display default target center, will be updated to use pick point on element...\n\n if (hasFocus && this.viewTool.inHandleModify)\n return; // Cross display handled by preview depth point...\n\n let sizeInches = 0.2;\n if (!hasFocus && this.viewTool.inHandleModify) {\n const hitHandle = this.viewTool.viewHandles.hitHandle;\n if (undefined !== hitHandle && ViewHandleType.Rotate !== hitHandle.handleType)\n return; // Only display when modifying another handle if that handle is rotate (not pan)...\n sizeInches = 0.1; // Display small target when dragging...\n }\n\n const crossSize = context.viewport.pixelsFromInches(sizeInches);\n ViewTargetCenter.drawCross(context, this.viewTool.targetCenterWorld, crossSize, hasFocus);\n }\n\n public doManipulation(ev: BeButtonEvent, inDynamics: boolean) {\n if (inDynamics || ev.viewport !== this.viewTool.viewport)\n return false;\n\n this.pickDepthPoint(ev);\n this.viewTool.setTargetCenterWorld(undefined !== this._depthPoint ? this._depthPoint : ev.point, true, ev.isControlKey); // Lock target for just this tool instance, only save if control is down...\n\n return false; // false means don't do screen update\n }\n\n /** @internal */\n public override needDepthPoint(_ev: BeButtonEvent, _isPreview: boolean): boolean {\n const focusHandle = this.viewTool.inHandleModify ? this.viewTool.viewHandles.focusHandle : undefined;\n return (undefined !== focusHandle && ViewHandleType.TargetCenter === focusHandle.handleType);\n }\n}\n\n/** A ViewingToolHandle with inertia.\n * If the handle is used with *throwing action* (mouse is moving when button goes up or via a touch with movement).\n * it continues to move briefly causing the operation to continue.\n */\nabstract class HandleWithInertia extends ViewingToolHandle implements Animator {\n protected _duration!: BeDuration;\n protected _end!: BeTimePoint;\n protected _inertiaVec?: Vector3d;\n\n public doManipulation(ev: BeButtonEvent, inDynamics: boolean): boolean {\n if (ToolSettings.viewingInertia.enabled && !inDynamics && undefined !== this._inertiaVec)\n return this.beginAnimation();\n\n const thisPtNpc = ev.viewport!.worldToNpc(ev.point);\n thisPtNpc.z = this._lastPtNpc.z;\n\n this._inertiaVec = undefined;\n if (this._lastPtNpc.isAlmostEqual(thisPtNpc, 1.0e-10))\n return true;\n\n this._inertiaVec = this._lastPtNpc.vectorTo(thisPtNpc);\n return this.perform(thisPtNpc);\n }\n\n /** Set this handle to become the Viewport's animator */\n protected beginAnimation() {\n this._duration = ToolSettings.viewingInertia.duration;\n if (this._duration.isTowardsFuture) { // ensure duration is towards future. Otherwise, don't start animation\n this._end = BeTimePoint.fromNow(this._duration);\n this.viewTool.viewport!.setAnimator(this);\n }\n return true;\n }\n\n /** Move this handle during the inertia duration */\n public animate(): boolean {\n if (undefined === this._inertiaVec)\n return true; // handle was removed\n\n // get the fraction of the inertia duration that remains. The decay is a combination of the number of iterations (see damping below)\n // and time. That way the handle slows down even if the framerate is lower.\n const remaining = ((this._end.milliseconds - BeTimePoint.now().milliseconds) / this._duration.milliseconds);\n const pt = this._lastPtNpc.plusScaled(this._inertiaVec, remaining);\n\n // if we're not moving any more, or if the duration has elapsed, we're done\n if (remaining <= 0 || (this._lastPtNpc.minus(pt).magnitudeSquared() < .000001)) {\n this.viewTool.viewport!.saveViewUndo();\n return true; // remove this as the animator\n }\n this.perform(pt); // perform the viewing operation\n inertialDampen(this._inertiaVec);\n return false;\n }\n\n public interrupt() { }\n protected abstract perform(thisPtNpc: Point3d): boolean;\n}\n\n/** ViewingToolHandle for performing the \"pan view\" operation */\nclass ViewPan extends HandleWithInertia {\n public get handleType() { return ViewHandleType.Pan; }\n public override getHandleCursor() { return this.viewTool.inHandleModify ? IModelApp.viewManager.grabbingCursor : IModelApp.viewManager.grabCursor; }\n\n public firstPoint(ev: BeButtonEvent) {\n const tool = this.viewTool;\n const vp = tool.viewport!;\n vp.worldToNpc(ev.point, this._lastPtNpc);\n\n this._inertiaVec = undefined;\n\n // if the camera is on, we need to find the element under the starting point to get the z\n if (this.needDepthPoint(ev, false)) {\n this.pickDepthPoint(ev);\n if (undefined !== this._depthPoint)\n vp.worldToNpc(this._depthPoint, this._lastPtNpc);\n else\n this._lastPtNpc.z = ViewManip.getFocusPlaneNpc(vp);\n }\n\n tool.beginDynamicUpdate();\n tool.provideToolAssistance(\"Pan.Prompts.NextPoint\");\n return true;\n }\n\n public testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Low;\n return true;\n }\n\n /** perform the view pan operation */\n protected perform(thisPtNpc: Point3d) {\n const tool = this.viewTool;\n const vp = tool.viewport!;\n const view = vp.view;\n const lastWorld = vp.npcToWorld(this._lastPtNpc);\n const thisWorld = vp.npcToWorld(thisPtNpc);\n const dist = thisWorld.vectorTo(lastWorld);\n if (view.is3d()) {\n if (ViewStatus.Success !== (vp.viewingGlobe ? view.moveCameraGlobal(lastWorld, thisWorld) : view.moveCameraWorld(dist)))\n return false;\n\n this.changeFocusFromDepthPoint(); // if we have a valid depth point, set it focus distance from it\n } else {\n view.setOrigin(view.getOrigin().plus(dist));\n }\n\n vp.setupFromView();\n this._lastPtNpc.setFrom(thisPtNpc);\n return true;\n }\n\n /** @internal */\n public override needDepthPoint(ev: BeButtonEvent, _isPreview: boolean): boolean {\n return ev.viewport!.isCameraOn && CoordSource.User === ev.coordsFrom;\n }\n}\n\n/** ViewingToolHandle for performing the \"rotate view\" operation */\nclass ViewRotate extends HandleWithInertia {\n private readonly _frustum = new Frustum();\n private readonly _activeFrustum = new Frustum();\n private readonly _anchorPtNpc = new Point3d();\n public get handleType() { return ViewHandleType.Rotate; }\n public override getHandleCursor() { return IModelApp.viewManager.rotateCursor; }\n\n public testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Medium; // Always prefer over pan handle which is only force enabled by IdleTool middle button action...\n return true;\n }\n\n public firstPoint(ev: BeButtonEvent) {\n this._inertiaVec = undefined;\n\n const tool = this.viewTool;\n const vp = ev.viewport!;\n\n this.pickDepthPoint(ev);\n if (undefined !== this._depthPoint)\n tool.setTargetCenterWorld(this._depthPoint, false, false);\n\n vp.worldToNpc(ev.rawPoint, this._anchorPtNpc);\n this._lastPtNpc.setFrom(this._anchorPtNpc);\n\n vp.getFrustum(CoordSystem.World, false, this._activeFrustum);\n this._frustum.setFrom(this._activeFrustum);\n\n tool.beginDynamicUpdate();\n this.viewTool.provideToolAssistance(\"Rotate.Prompts.NextPoint\");\n return true;\n }\n\n public perform(ptNpc: Point3d): boolean {\n const tool = this.viewTool;\n const vp = tool.viewport!;\n\n if (this._anchorPtNpc.isAlmostEqual(ptNpc, 1.0e-2)) // too close to anchor pt\n ptNpc.setFrom(this._anchorPtNpc);\n\n const currentFrustum = vp.getFrustum(CoordSystem.World, false);\n const frustumChange = !currentFrustum.equals(this._activeFrustum);\n if (frustumChange)\n this._frustum.setFrom(currentFrustum);\n else {\n if (!vp.setupViewFromFrustum(this._frustum))\n return false;\n }\n\n const currPt = vp.npcToView(ptNpc);\n if (frustumChange)\n this._anchorPtNpc.setFrom(ptNpc);\n\n const view = vp.view;\n let angle: Angle;\n let worldAxis: Vector3d;\n const worldPt = tool.targetCenterWorld;\n if (!view.allow3dManipulations()) {\n const centerPt = vp.worldToView(worldPt);\n const firstPt = vp.npcToView(this._anchorPtNpc);\n const vector0 = Vector2d.createStartEnd(centerPt, firstPt);\n const vector1 = Vector2d.createStartEnd(centerPt, currPt);\n angle = vector0.angleTo(vector1);\n worldAxis = Vector3d.unitZ();\n } else {\n const viewRect = vp.viewRect;\n\n vp.npcToView(ptNpc, currPt);\n const firstPt = vp.npcToView(this._anchorPtNpc);\n\n const xDelta = (currPt.x - firstPt.x);\n const yDelta = (currPt.y - firstPt.y);\n\n // Movement in screen x == rotation about drawing Z (preserve up) or rotation about screen Y...\n const xAxis = ToolSettings.preserveWorldUp && !vp.viewingGlobe ? (undefined !== this._depthPoint ? vp.view.getUpVector(this._depthPoint) : Vector3d.unitZ()) : vp.rotation.getRow(1);\n\n // Movement in screen y == rotation about screen X...\n const yAxis = vp.rotation.getRow(0);\n\n const xRMatrix = xDelta ? Matrix3d.createRotationAroundVector(xAxis, Angle.createRadians(Math.PI / (viewRect.width / xDelta)))! : Matrix3d.identity;\n const yRMatrix = yDelta ? Matrix3d.createRotationAroundVector(yAxis, Angle.createRadians(Math.PI / (viewRect.height / yDelta)))! : Matrix3d.identity;\n const worldRMatrix = yRMatrix.multiplyMatrixMatrix(xRMatrix);\n const result = worldRMatrix.getAxisAndAngleOfRotation();\n angle = Angle.createRadians(-result.angle.radians);\n worldAxis = result.axis;\n }\n\n const worldMatrix = Matrix3d.createRotationAroundVector(worldAxis, angle);\n if (undefined !== worldMatrix) {\n const worldTransform = Transform.createFixedPointAndMatrix(worldPt, worldMatrix);\n const frustum = this._frustum.transformBy(worldTransform);\n view.setupFromFrustum(frustum);\n if (view.is3d())\n view.alignToGlobe(view.getCenter());\n this.changeFocusFromDepthPoint(); // if we have a valid depth point, set it focus distance from it\n vp.setupFromView();\n }\n\n vp.getWorldFrustum(this._activeFrustum);\n this._lastPtNpc.setFrom(ptNpc);\n\n return true;\n }\n\n public override onWheel(ev: BeWheelEvent): boolean {\n // When rotate is active, the mouse wheel should zoom about the target center when it's displayed...\n const tool = this.viewTool;\n if (tool.targetCenterLocked || tool.inHandleModify) {\n ev.point = tool.targetCenterWorld;\n ev.coordsFrom = CoordSource.Precision; // WheelEventProcessor.doZoom checks this to decide whether to use raw or adjusted point...\n }\n return false;\n }\n\n /** @internal */\n public override needDepthPoint(ev: BeButtonEvent, _isPreview: boolean): boolean {\n return (!this.viewTool.targetCenterLocked && ev.viewport!.view.allow3dManipulations());\n }\n\n /** @internal */\n public override adjustDepthPoint(isValid: boolean, vp: Viewport, plane: Plane3dByOriginAndUnitNormal, source: DepthPointSource): boolean {\n if (vp.viewingGlobe && this.viewTool.isPointVisible(vp.iModel.ecefLocation!.earthCenter)) {\n plane.getOriginRef().setFrom(vp.iModel.ecefLocation!.earthCenter);\n plane.getNormalRef().setFrom(vp.view.getZVector());\n return true;\n }\n if (super.adjustDepthPoint(isValid, vp, plane, source))\n return true;\n\n plane.getOriginRef().setFrom(this.viewTool.targetCenterWorld);\n return false;\n }\n}\n\n/** ViewingToolHandle for performing the \"look view\" operation */\nclass ViewLook extends ViewingToolHandle {\n private _eyePoint = new Point3d();\n private _firstPtView = new Point3d();\n private _rotation = new Matrix3d();\n private _frustum = new Frustum();\n public get handleType() { return ViewHandleType.Look; }\n public override getHandleCursor(): string { return IModelApp.viewManager.lookCursor; }\n\n public testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Medium; // Always prefer over pan handle which is only force enabled by IdleTool middle button action...\n return true;\n }\n\n public firstPoint(ev: BeButtonEvent) {\n const tool = this.viewTool;\n const vp = ev.viewport!;\n const view = vp.view;\n if (!view || !view.is3d() || !view.allow3dManipulations())\n return false;\n\n this._firstPtView.setFrom(ev.viewPoint);\n this._eyePoint.setFrom(view.getEyePoint());\n this._rotation.setFrom(vp.rotation);\n\n vp.getWorldFrustum(this._frustum);\n tool.beginDynamicUpdate();\n this.viewTool.provideToolAssistance(\"Look.Prompts.NextPoint\");\n return true;\n }\n\n public override onWheel(_ev: BeWheelEvent): boolean {\n const tool = this.viewTool;\n if (!tool.inHandleModify)\n return false;\n tool.nPts = 0; // start over\n tool.inHandleModify = false;\n tool.inDynamicUpdate = false;\n tool.viewHandles.setFocus(-1);\n return false;\n }\n\n public doManipulation(ev: BeButtonEvent, _inDynamics: boolean): boolean {\n const tool = this.viewTool;\n const viewport = tool.viewport!;\n\n if (ev.viewport !== viewport)\n return false;\n\n const worldTransform = this.getLookTransform(viewport, this._firstPtView, ev.viewPoint);\n const frustum = this._frustum.transformBy(worldTransform);\n this.viewTool.viewport!.setupViewFromFrustum(frustum);\n\n return true;\n }\n\n private getLookTransform(vp: Viewport, firstPt: Point3d, currPt: Point3d): Transform {\n const viewRect = vp.viewRect;\n const xExtent = viewRect.width;\n const yExtent = viewRect.height;\n const xDelta = (currPt.x - firstPt.x);\n const yDelta = (currPt.y - firstPt.y);\n const xAngle = -(xDelta / xExtent) * Math.PI;\n const yAngle = -(yDelta / yExtent) * Math.PI;\n\n const inverseRotation = this._rotation.inverse();\n const horizontalRotation = Matrix3d.createRotationAroundVector(Vector3d.unitZ(), Angle.createRadians(xAngle));\n const verticalRotation = Matrix3d.createRotationAroundVector(Vector3d.unitX(), Angle.createRadians(yAngle));\n\n if (undefined === inverseRotation || undefined === horizontalRotation || undefined === verticalRotation)\n return Transform.createIdentity();\n\n verticalRotation.multiplyMatrixMatrix(this._rotation, verticalRotation);\n inverseRotation.multiplyMatrixMatrix(verticalRotation, verticalRotation);\n\n const newRotation = horizontalRotation.multiplyMatrixMatrix(verticalRotation);\n const transform = Transform.createFixedPointAndMatrix(this._eyePoint, newRotation);\n return transform;\n }\n}\n\n/** handle for tools that animate a frustum change based on the position of the cursor relative to an anchor point. */\nabstract class AnimatedHandle extends ViewingToolHandle {\n protected readonly _anchorPtView = new Point3d();\n protected readonly _lastPtView = new Point3d();\n protected _lastMotionTime = 0;\n protected _deadZone = 36;\n\n public testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Medium;\n return true;\n }\n\n protected getElapsedTime(): number {\n const prev = this._lastMotionTime;\n this._lastMotionTime = Date.now();\n return Geometry.clamp(this._lastMotionTime - prev, 0, 1000) / 1000;\n }\n // called on mouse motion\n public doManipulation(ev: BeButtonEvent): boolean {\n this._lastPtView.setFrom(ev.viewPoint);\n return true;\n }\n\n // called when animation is interrupted\n public interrupt(): void { }\n public animate(): boolean {\n // Don't continue animation when mouse is outside view, and don't jump if it returns...\n if (undefined !== IModelApp.toolAdmin.cursorView)\n return true;\n this.getElapsedTime();\n return false;\n }\n\n public firstPoint(ev: BeButtonEvent): boolean {\n const vp = ev.viewport;\n const tool = this.viewTool;\n tool.inDynamicUpdate = true;\n if (vp && this.needDepthPoint(ev, false)) {\n this.pickDepthPoint(ev);\n if (undefined !== this._depthPoint) {\n vp.worldToView(this._depthPoint, this._anchorPtView);\n } else {\n vp.worldToNpc(ev.point, this._anchorPtView);\n this._anchorPtView.z = ViewManip.getFocusPlaneNpc(vp);\n vp.npcToView(this._anchorPtView, this._anchorPtView);\n }\n } else {\n this._anchorPtView.setFrom(ev.viewPoint);\n }\n this._lastPtView.setFrom(this._anchorPtView);\n this._lastMotionTime = Date.now();\n tool.viewport!.setAnimator(this);\n return true;\n }\n\n protected getDirection(): Vector3d | undefined {\n const dir = this._anchorPtView.vectorTo(this._lastPtView);\n dir.z = 0;\n return dir.magnitudeSquared() < this._deadZone ? undefined : dir; // dead zone around starting point\n }\n\n protected getInputVector(): Vector3d | undefined {\n const dir = this.getDirection();\n if (undefined === dir)\n return undefined;\n const viewRect = this.viewTool.viewport!.viewRect;\n return new Vector3d(dir.x * (2.0 / viewRect.width), dir.y * (2.0 / viewRect.height));\n }\n\n public override onReinitialize(): void {\n const tool = this.viewTool;\n tool.inDynamicUpdate = false;\n const vp = tool.viewport;\n if (undefined !== vp)\n vp.setAnimator();\n }\n\n // called when wheel rolls, reset tool\n public override onWheel(_ev: BeWheelEvent): boolean {\n const tool = this.viewTool;\n tool.nPts = 0; // start over\n tool.inDynamicUpdate = false; // not active\n return false;\n }\n}\n\n/** ViewingToolHandle for performing the \"scroll view\" operation */\nclass ViewScroll extends AnimatedHandle {\n public get handleType() { return ViewHandleType.Scroll; }\n public override getHandleCursor(): string { return \"move\"; }\n\n public override drawHandle(context: DecorateContext, _hasFocus: boolean): void {\n if (context.viewport !== this.viewTool.viewport || !this.viewTool.inDynamicUpdate)\n return;\n\n const radius = Math.floor(context.viewport.pixelsFromInches(0.1)) + 0.5;\n const position = this._anchorPtView.clone();\n const position2 = this._lastPtView.clone();\n const offset = position2.minus(position);\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\n ctx.beginPath();\n ctx.strokeStyle = \"rgba(0,255,0,.3)\";\n ctx.setLineDash([10, 4]);\n ctx.lineWidth = 3;\n ctx.moveTo(0, 0);\n ctx.lineTo(offset.x, offset.y);\n ctx.stroke();\n ctx.beginPath();\n ctx.setLineDash([]);\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\n ctx.lineWidth = 1;\n ctx.fillStyle = \"rgba(255,255,255,.5)\";\n ctx.arc(0, 0, radius, 0, 2 * Math.PI);\n ctx.fill();\n ctx.stroke();\n\n let vec = Vector2d.createStartEnd(position, position2);\n if (undefined === vec)\n vec = Vector2d.unitX();\n else\n vec.normalize(vec);\n\n const slashPts = [new Point2d(), new Point2d()];\n slashPts[0].plusScaled(vec, radius, slashPts[0]);\n slashPts[1].plusScaled(vec, -radius, slashPts[1]);\n\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 2;\n ctx.moveTo(slashPts[0].x, slashPts[0].y);\n ctx.lineTo(slashPts[1].x, slashPts[1].y);\n ctx.stroke();\n };\n context.addCanvasDecoration({ position, drawDecoration }, true);\n }\n\n public override firstPoint(ev: BeButtonEvent) {\n super.firstPoint(ev);\n this.viewTool.provideToolAssistance(\"Scroll.Prompts.NextPoint\");\n return true;\n }\n\n public override animate(): boolean {\n if (!super.animate())\n return false;\n\n const dist = this.getDirection();\n if (undefined === dist)\n return false;\n\n dist.scaleInPlace(ToolSettings.scrollSpeed * this.getElapsedTime());\n const tool = this.viewTool;\n const viewport = tool.viewport!;\n\n if (viewport.isCameraOn) {\n const points: Point3d[] = new Array<Point3d>(2);\n points[0] = this._anchorPtView.clone();\n points[1] = points[0].plus(dist);\n\n viewport.viewToNpcArray(points);\n points[1].z = points[0].z;\n viewport.npcToWorldArray(points);\n\n const offset = points[1].minus(points[0]);\n const offsetTransform = Transform.createTranslation(offset);\n const frustum = viewport.getWorldFrustum();\n frustum.transformBy(offsetTransform, frustum);\n viewport.setupViewFromFrustum(frustum);\n } else {\n viewport.scroll(dist, { noSaveInUndo: true });\n }\n\n return false;\n }\n\n /** @internal */\n public override needDepthPoint(ev: BeButtonEvent, _isPreview: boolean): boolean {\n return ev.viewport!.isCameraOn && CoordSource.User === ev.coordsFrom;\n }\n}\n\n/** ViewingToolHandle for performing the \"zoom view\" operation */\nclass ViewZoom extends ViewingToolHandle {\n protected readonly _anchorPtNpc = new Point3d();\n protected readonly _anchorPtView = new Point3d();\n protected readonly _anchorPtWorld = new Point3d();\n protected readonly _lastPtView = new Point3d();\n protected readonly _startEyePoint = new Point3d();\n protected _startFrust?: Frustum;\n protected _lastZoomRatio = 1.0;\n public get handleType() { return ViewHandleType.Zoom; }\n public override getHandleCursor() { return IModelApp.viewManager.zoomCursor; }\n\n public testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Medium; // Always prefer over pan handle which is only force enabled by IdleTool middle button action...\n return true;\n }\n\n public override drawHandle(context: DecorateContext, hasFocus: boolean): void {\n if (!hasFocus || context.viewport !== this.viewTool.viewport || !this.viewTool.inDynamicUpdate)\n return;\n\n const radius = Math.floor(context.viewport.pixelsFromInches(0.15)) + 0.5;\n const crossRadius = radius * 0.6;\n const position = this._anchorPtView.clone();\n position.x = Math.floor(position.x) + 0.5;\n position.y = Math.floor(position.y) + 0.5;\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\n ctx.beginPath();\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\n ctx.lineWidth = 1;\n ctx.fillStyle = \"rgba(255,255,255,.5)\";\n ctx.arc(0, 0, radius, 0, 2 * Math.PI);\n ctx.fill();\n ctx.stroke();\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 2;\n ctx.moveTo(-crossRadius, 0);\n ctx.lineTo(crossRadius, 0);\n if (this._lastZoomRatio < 1.0) {\n ctx.moveTo(0, -crossRadius);\n ctx.lineTo(0, crossRadius);\n }\n ctx.stroke();\n };\n context.addCanvasDecoration({ position, drawDecoration }, true);\n }\n\n public firstPoint(ev: BeButtonEvent) {\n const vp = ev.viewport!;\n this.viewTool.inDynamicUpdate = true;\n if (this.needDepthPoint(ev, false)) {\n this.pickDepthPoint(ev);\n if (undefined !== this._depthPoint) {\n vp.worldToView(this._depthPoint, this._anchorPtView);\n } else {\n vp.worldToNpc(ev.point, this._anchorPtView);\n this._anchorPtView.z = ViewManip.getFocusPlaneNpc(vp);\n vp.npcToView(this._anchorPtView, this._anchorPtView);\n }\n } else {\n this._anchorPtView.setFrom(ev.viewPoint);\n }\n this._lastPtView.setFrom(this._anchorPtView);\n\n vp.viewToNpc(this._anchorPtView, this._anchorPtNpc);\n vp.viewToWorld(this._anchorPtView, this._anchorPtWorld);\n this._startFrust = vp.getWorldFrustum();\n\n if (vp.view.is3d() && vp.view.isCameraOn)\n this._startEyePoint.setFrom(vp.view.getEyePoint());\n\n this.viewTool.provideToolAssistance(\"Zoom.Prompts.NextPoint\");\n return true;\n }\n\n public override onWheel(_ev: BeWheelEvent): boolean {\n const tool = this.viewTool;\n if (!tool.inHandleModify)\n return false;\n tool.nPts = 0; // start over\n tool.inHandleModify = false;\n tool.inDynamicUpdate = false;\n tool.viewHandles.setFocus(-1);\n return false;\n }\n\n protected getDirection(): Vector3d | undefined {\n const dir = this._anchorPtView.vectorTo(this._lastPtView);\n dir.z = 0;\n return dir.magnitudeSquared() < 36 ? undefined : dir; // dead zone around starting point\n }\n\n public doManipulation(ev: BeButtonEvent): boolean {\n this._lastPtView.setFrom(ev.viewPoint);\n\n if (undefined === this._startFrust || undefined === this.getDirection()) // on anchor point?\n return false;\n\n const viewport = this.viewTool.viewport!;\n const view = viewport.view;\n const thisPtNpc = viewport.viewToNpc(this._lastPtView);\n const dist = this._anchorPtNpc.minus(thisPtNpc);\n dist.z = 0.0;\n dist.x = 0.0;\n let zoomRatio = 1.0 + (dist.magnitude() * ToolSettings.zoomSpeed);\n if (dist.y > 0)\n zoomRatio = 1.0 / zoomRatio;\n this._lastZoomRatio = zoomRatio;\n\n const frustum = this._startFrust.clone();\n const transform = Transform.createFixedPointAndMatrix(this._anchorPtWorld, Matrix3d.createScale(zoomRatio, zoomRatio, view.is3d() ? zoomRatio : 1.0));\n\n if (view.is3d() && view.isCameraOn) {\n const oldEyePoint = this._startEyePoint;\n const newEyePoint = transform.multiplyPoint3d(oldEyePoint);\n const cameraOffset = Vector3d.createStartEnd(oldEyePoint, newEyePoint);\n Transform.createTranslation(cameraOffset, transform);\n }\n\n frustum.transformBy(transform, frustum);\n if (ViewStatus.Success !== view.setupFromFrustum(frustum))\n return false;\n\n if (view.is3d() && view.isCameraOn)\n this.changeFocusFromDepthPoint(); // if we have a valid depth point, set it focus distance from it\n\n return ViewStatus.Success === viewport.setupFromView();\n }\n\n /** @internal */\n public override needDepthPoint(ev: BeButtonEvent, _isPreview: boolean): boolean {\n return ev.viewport!.isCameraOn && CoordSource.User === ev.coordsFrom;\n }\n}\n\n/** @internal */\nclass NavigateMotion {\n private _seconds = 0;\n public readonly transform = Transform.createIdentity();\n constructor(public viewport: Viewport) { }\n\n public init(seconds: number) {\n this._seconds = seconds;\n this.transform.setIdentity();\n }\n\n public getViewUp(result?: Vector3d) { return this.viewport.rotation.getRow(1, result); }\n\n public getViewDirection(result?: Vector3d): Vector3d {\n const forward = this.viewport.rotation.getRow(2, result);\n forward.scale(-1, forward); // positive z is out of the screen, but we want direction into the screen\n return forward;\n }\n\n public takeElevator(height: number): void {\n const up = Point3d.create(0, 0, height * this._seconds);\n Transform.createTranslation(up, this.transform);\n }\n\n public modifyPitchAngleToPreventInversion(pitchAngle: number): number {\n const angleLimit = Angle.degreesToRadians(85);\n const angleTolerance = Angle.degreesToRadians(0.01);\n\n if (0.0 === pitchAngle)\n return 0.0;\n\n const viewUp = this.getViewUp();\n const viewDir = this.getViewDirection();\n const worldUp = Vector3d.unitZ();\n\n let viewAngle = worldUp.angleTo(viewUp).radians;\n if (viewDir.z < 0)\n viewAngle *= -1;\n\n let newAngle = pitchAngle + viewAngle;\n if (Math.abs(newAngle) < angleLimit)\n return pitchAngle; // not close to the limit\n if ((pitchAngle > 0) !== (viewAngle > 0) && (Math.abs(pitchAngle) < Math.PI / 2))\n return pitchAngle; // tilting away from the limit\n if (Math.abs(viewAngle) >= (angleLimit - angleTolerance))\n return 0.0; // at the limit already\n\n const difference = Math.abs(newAngle) - angleLimit;\n newAngle = (pitchAngle > 0) ? pitchAngle - difference : pitchAngle + difference;\n return newAngle; // almost at the limit, but still can go a little bit closer\n }\n\n public generateMouseLookTransform(accumulator: Vector3d, movement: XAndY, result?: Transform): Transform {\n const vp = this.viewport;\n const view = vp.view;\n if (!view.is3d() || !vp.isCameraOn)\n return Transform.createIdentity();\n const viewRect = this.viewport.viewRect;\n const xExtent = viewRect.width;\n const yExtent = viewRect.height;\n accumulator.z += this._seconds; // accumulate time delta since start...\n const snappiness = 10.0; // larger values are more responsive...\n const fraction = Geometry.clamp(snappiness * accumulator.z, 0.0, 1.0);\n accumulator.x = Geometry.interpolate(accumulator.x, fraction, movement.x);\n accumulator.y = Geometry.interpolate(accumulator.y, fraction, movement.y);\n const xAngle = -(accumulator.x / xExtent) * Math.PI * 2.0;\n const yAngle = -(accumulator.y / yExtent) * Math.PI;\n const viewRot = vp.rotation;\n const invViewRot = viewRot.inverse()!;\n const pitchAngle = Angle.createRadians(this.modifyPitchAngleToPreventInversion(yAngle));\n const pitchMatrix = Matrix3d.createRotationAroundVector(Vector3d.unitX(), pitchAngle)!;\n const pitchTimesView = pitchMatrix.multiplyMatrixMatrix(viewRot);\n const inverseViewTimesPitchTimesView = invViewRot.multiplyMatrixMatrix(pitchTimesView);\n const yawMatrix = Matrix3d.createRotationAroundVector(Vector3d.unitZ(), Angle.createRadians(xAngle))!;\n const yawTimesInverseViewTimesPitchTimesView = yawMatrix.multiplyMatrixMatrix(inverseViewTimesPitchTimesView);\n return Transform.createFixedPointAndMatrix(view.getEyePoint(), yawTimesInverseViewTimesPitchTimesView, result);\n }\n\n public generateRotationTransform(yawRate: number, pitchRate: number, result?: Transform): Transform {\n const vp = this.viewport;\n const view = vp.view;\n if (!view.is3d() || !vp.isCameraOn)\n return Transform.createIdentity();\n const viewRot = vp.rotation;\n const invViewRot = viewRot.inverse()!;\n const pitchAngle = Angle.createRadians(this.modifyPitchAngleToPreventInversion(pitchRate * this._seconds));\n const pitchMatrix = Matrix3d.createRotationAroundVector(Vector3d.unitX(), pitchAngle)!;\n const pitchTimesView = pitchMatrix.multiplyMatrixMatrix(viewRot);\n const inverseViewTimesPitchTimesView = invViewRot.multiplyMatrixMatrix(pitchTimesView);\n const yawMatrix = Matrix3d.createRotationAroundVector(Vector3d.unitZ(), Angle.createRadians(yawRate * this._seconds))!;\n const yawTimesInverseViewTimesPitchTimesView = yawMatrix.multiplyMatrixMatrix(inverseViewTimesPitchTimesView);\n return Transform.createFixedPointAndMatrix(view.getEyePoint(), yawTimesInverseViewTimesPitchTimesView, result);\n }\n\n public generateTranslationTransform(velocity: Vector3d, isConstrainedToXY: boolean, result?: Transform) {\n const points: Point3d[] = new Array<Point3d>(3);\n points[0] = new Point3d(0, 0, 0);\n points[1] = new Point3d(1, 0, 0);\n points[2] = new Point3d(0, 1, 0);\n if (this.viewport.isCameraOn) {\n this.viewport.viewToNpcArray(points);\n points[0].z = points[1].z = points[2].z = ViewManip.getFocusPlaneNpc(this.viewport); // use the focal plane for z coordinates\n this.viewport.npcToViewArray(points);\n }\n this.viewport.viewToWorldArray(points);\n const xDir = Vector3d.createStartEnd(points[0], points[1]);\n xDir.normalizeInPlace();\n const yDir = Vector3d.createStartEnd(points[0], points[2]);\n yDir.normalizeInPlace();\n\n const zDir = this.getViewDirection();\n\n if (isConstrainedToXY) {\n const up = Vector3d.unitZ();\n const cross = up.crossProduct(zDir);\n cross.crossProduct(up, zDir);\n zDir.normalizeInPlace();\n }\n\n xDir.scale(velocity.x * this._seconds, xDir);\n yDir.scale(velocity.y * this._seconds, yDir);\n zDir.scale(velocity.z * this._seconds, zDir);\n\n xDir.plus(yDir, xDir).plus(zDir, xDir);\n return Transform.createTranslation(xDir, result);\n }\n\n public moveAndMouseLook(accumulator: Vector3d, linearVelocity: Vector3d, movement: XAndY, isConstrainedToXY: boolean): boolean {\n const rotateTrans = this.generateMouseLookTransform(accumulator, movement);\n const dollyTrans = this.generateTranslationTransform(linearVelocity, isConstrainedToXY);\n this.transform.setMultiplyTransformTransform(rotateTrans, dollyTrans);\n return (accumulator.x >= movement.x && accumulator.y >= movement.y);\n }\n\n public moveAndLook(linearVelocity: Vector3d, angularVelocityX: number, angularVelocityY: number, isConstrainedToXY: boolean): void {\n const rotateTrans = this.generateRotationTransform(angularVelocityX, angularVelocityY);\n const dollyTrans = this.generateTranslationTransform(linearVelocity, isConstrainedToXY);\n this.transform.setMultiplyTransformTransform(rotateTrans, dollyTrans);\n }\n\n public pan(horizontalVelocity: number, verticalVelocity: number): void {\n const travel = new Vector3d(horizontalVelocity, verticalVelocity, 0);\n this.moveAndLook(travel, 0, 0, false);\n }\n\n public travel(yawRate: number, pitchRate: number, forwardVelocity: number, isConstrainedToXY: boolean): void {\n const travel = new Vector3d(0, 0, forwardVelocity);\n this.moveAndLook(travel, yawRate, pitchRate, isConstrainedToXY);\n }\n\n public look(yawRate: number, pitchRate: number): void { this.generateRotationTransform(yawRate, pitchRate, this.transform); }\n\n /** reset pitch of view to zero */\n public resetToLevel(): void {\n const view = this.viewport.view;\n if (!view.is3d() || !view.isCameraOn)\n return;\n const angles = YawPitchRollAngles.createFromMatrix3d(this.viewport.rotation)!;\n angles.pitch.setRadians(0); // reset pitch to zero\n Transform.createFixedPointAndMatrix(view.getEyePoint(), angles.toMatrix3d(), this.transform);\n }\n}\n\n/** ViewingToolHandle for performing the Walk and Fly operations */\nabstract class ViewNavigate extends AnimatedHandle {\n private _initialized = false;\n protected abstract getNavigateMotion(seconds: number): NavigateMotion | undefined;\n\n public override getHandleCursor() { return IModelApp.viewManager.walkCursor; }\n public getMaxLinearVelocity() { return ToolSettings.walkVelocity; }\n public getMaxAngularVelocity() { return Math.PI / 4; }\n\n public getNavigateMode(): NavigateMode {\n const state = IModelApp.toolAdmin.currentInputState;\n return (state.isShiftDown || !this.viewTool.viewport!.isCameraOn) ? NavigateMode.Pan :\n state.isControlDown ? NavigateMode.Look : NavigateMode.Travel;\n }\n\n // called in animation loop\n public override animate(): boolean {\n if (!super.animate())\n return false;\n\n const motion = this.getNavigateMotion(this.getElapsedTime());\n\n if (undefined !== motion) {\n const vp = this.viewTool.viewport!;\n const frust = vp.getWorldFrustum();\n frust.multiply(motion.transform);\n vp.setupViewFromFrustum(frust);\n }\n return false;\n }\n\n public override onReinitialize(): void {\n super.onReinitialize();\n if (this._initialized)\n return;\n this._initialized = true;\n\n const tool = this.viewTool;\n const vp = tool.viewport;\n if (undefined === vp)\n return;\n\n const view = vp.view;\n if (!view.allow3dManipulations())\n return;\n\n const walkAngle = ToolSettings.walkCameraAngle;\n if (!tool.lensAngleMatches(walkAngle, Angle.degreesToRadians(15.)) || !tool.isZUp) {\n // This turns on the camera if its not already on. It also assures the camera is centered. Obviously this is required if\n // the camera is not on or the lens angle is not what we want. We also want to do it if Z will be\n // adjusted because EnforceZUp swivels the camera around what GetTargetPoint returns. If the FocusDistance is not set to something\n // reasonable the target point may be far beyond anything relevant.\n tool.setCameraLensAngle(walkAngle, tool.lensAngleMatches(walkAngle, Angle.degreesToRadians(45.)));\n }\n\n if (ToolSettings.walkEnforceZUp)\n tool.enforceZUp(view.getTargetPoint());\n\n vp.animateFrustumChange();\n }\n\n public override drawHandle(context: DecorateContext, hasFocus: boolean): void {\n if (!hasFocus || context.viewport !== this.viewTool.viewport || !this.viewTool.inDynamicUpdate)\n return;\n const position = this._anchorPtView.clone();\n position.x = Math.floor(position.x) + 0.5;\n position.y = Math.floor(position.y) + 0.5;\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.fillStyle = \"rgba(255,255,255,.3)\";\n ctx.lineWidth = 1;\n ctx.arc(0, 0, 5, 0, 2 * Math.PI);\n ctx.stroke();\n ctx.fill();\n };\n context.addCanvasDecoration({ position, drawDecoration });\n }\n}\n\n/** ViewingToolHandle for looking around and moving through a model using mouse+wasd or on-screen control sticks for touch */\nclass ViewLookAndMove extends ViewNavigate {\n private _navigateMotion: NavigateMotion;\n private _lastCollision = 0;\n private _lastReadPt = new Point3d();\n private _lastReference?: Plane3dByOriginAndUnitNormal;\n private _lastContour?: LineString3d;\n private _currentContour?: LineString3d;\n protected readonly _positionInput = new Vector3d();\n protected readonly _accumulator = new Vector3d();\n protected _lastMovement?: XAndY;\n protected _touchStartL?: BeTouchEvent;\n protected _touchStartR?: BeTouchEvent;\n protected _touchLast?: BeTouchEvent;\n protected _touchElevate = false;\n protected _touchLook = false;\n protected _touchSpeedUp = false;\n protected _havePointerLock = false;\n protected _pointerLockChangeListener?: EventListener;\n protected _pointerLockClickEngagementListener?: EventListener;\n protected _pointerLockKeyEngagementListener?: EventListener;\n\n constructor(viewManip: ViewManip) {\n super(viewManip);\n this._navigateMotion = new NavigateMotion(this.viewTool.viewport!);\n }\n\n public get handleType(): ViewHandleType { return ViewHandleType.LookAndMove; }\n public override getHandleCursor(): string { return IModelApp.viewManager.lookCursor; }\n\n public override testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Medium; // Always prefer over pan handle which is only force enabled by IdleTool middle button action...\n return true;\n }\n\n public override onReinitialize(): void {\n super.onReinitialize();\n this._touchStartL = this._touchStartR = this._touchLast = undefined;\n this._touchElevate = this._touchSpeedUp = this._touchLook = false;\n if (this.viewTool.viewHandles.testHit(Point3d.createZero(), ViewHandleType.LookAndMove))\n this.viewTool.viewHandles.focusHitHandle(); // Ensure key events go to this handle by default w/o requiring motion...\n this.onCleanup();\n this.requestPointerLock(true);\n }\n\n public override onCleanup(): void {\n super.onCleanup();\n this.releasePointerLock();\n }\n\n private async pointerLockChangeEvent(): Promise<void> {\n const vp = this.viewTool.viewport;\n if (undefined !== vp && document.pointerLockElement === vp.canvas) {\n vp.npcToView(NpcCenter, this._anchorPtView); // Display indicator in the middle of the view for pointer lock...\n this._lastPtView.setFrom(this._anchorPtView);\n this._havePointerLock = true;\n vp.invalidateDecorations();\n } else {\n // If ESC is used to disable pointer lock, exit the tool instead of continuing in drag mode...\n if (this._havePointerLock && this.viewTool.inDynamicUpdate)\n await this.viewTool.exitTool();\n else\n this._havePointerLock = false;\n }\n }\n\n private requestPointerLock(enable: boolean): void {\n if (!enable) {\n if (undefined !== this._pointerLockClickEngagementListener) {\n document.removeEventListener(\"click\", this._pointerLockClickEngagementListener, false);\n this._pointerLockClickEngagementListener = undefined;\n }\n if (undefined !== this._pointerLockKeyEngagementListener) {\n document.removeEventListener(\"keydown\", this._pointerLockKeyEngagementListener, false);\n this._pointerLockKeyEngagementListener = undefined;\n }\n return;\n }\n\n if (!ToolSettings.walkRequestPointerLock)\n return;\n\n const vp = this.viewTool.viewport;\n if (undefined === vp)\n return;\n\n // NOTE: Chrome appears to be the only browser that doesn't require pointer lock to be requested from an engagement event like click.\n // Currently pointer lock is requested for \"click\" and not \"mousedown\" since we don't want pointer lock for drag operation.\n if (undefined === this._pointerLockChangeListener) {\n this._pointerLockChangeListener = async () => this.pointerLockChangeEvent();\n document.addEventListener(\"pointerlockchange\", this._pointerLockChangeListener, false);\n }\n\n if (undefined === this._pointerLockClickEngagementListener) {\n this._pointerLockClickEngagementListener = () => {\n if (1 === this.viewTool.nPts && undefined !== IModelApp.toolAdmin.cursorView)\n void vp.canvas.requestPointerLock();\n };\n document.addEventListener(\"click\", this._pointerLockClickEngagementListener, false);\n }\n\n if (undefined === this._pointerLockKeyEngagementListener) {\n this._pointerLockKeyEngagementListener = (ev: Event) => {\n if (0 === this.viewTool.nPts && undefined !== IModelApp.toolAdmin.cursorView && this.isNavigationKey(ev as KeyboardEvent))\n void vp.canvas.requestPointerLock();\n };\n document.addEventListener(\"keydown\", this._pointerLockKeyEngagementListener, false);\n }\n }\n\n private releasePointerLock(): void {\n this._havePointerLock = false;\n this.requestPointerLock(false);\n if (undefined !== this._pointerLockChangeListener) {\n document.removeEventListener(\"pointerlockchange\", this._pointerLockChangeListener, false);\n this._pointerLockChangeListener = undefined;\n }\n if (null !== document.pointerLockElement && undefined !== document.exitPointerLock)\n document.exitPointerLock();\n }\n\n public override firstPoint(ev: BeButtonEvent): boolean {\n this.viewTool.provideToolAssistance(\"LookAndMove.Prompts.NextPoint\");\n if (!super.firstPoint(ev))\n return false;\n\n const vp = this.viewTool.viewport;\n if (undefined === vp || !vp.isCameraOn)\n return true;\n\n if (InputSource.Mouse === ev.inputSource) {\n this._deadZone = Math.pow(vp.pixelsFromInches(0.5), 2); // Only used if pointer lock isn't supported...\n } else {\n this._touchLook = true;\n vp.npcToView(NpcCenter, this._anchorPtView); // Display indicator in the middle of the view for touch look...\n }\n return true;\n }\n\n public override doManipulation(ev: BeButtonEvent): boolean {\n if (InputSource.Mouse === ev.inputSource)\n this._lastMovement = this._havePointerLock ? ev.movement : undefined;\n else\n this._lastMovement = this._lastPtView.vectorTo(ev.viewPoint).scale(2.0); // ev.movement isn't available for button event created from touch event...\n this._accumulator.setZero();\n\n return super.doManipulation(ev);\n }\n\n public override getMaxLinearVelocity() {\n const maxLinearVelocity = super.getMaxLinearVelocity();\n if (0 === ToolSettings.walkVelocityChange)\n return (this._touchSpeedUp ? maxLinearVelocity * 2.0 : maxLinearVelocity);\n\n const speedFactor = Geometry.clamp(ToolSettings.walkVelocityChange + (ToolSettings.walkVelocityChange > 0 ? 1 : -1), -10, 10);\n const speedMultiplier = (speedFactor >= 0 ? speedFactor : 1 / Math.abs(speedFactor));\n\n return maxLinearVelocity * speedMultiplier;\n }\n\n protected getMaxAngularVelocityX() { return 2 * this.getMaxAngularVelocity(); } // Allow turning to be faster than looking up/down...\n protected getMaxAngularVelocityY() { return this.getMaxAngularVelocity(); }\n\n protected getLinearVelocity(): Vector3d {\n const positionInput = Vector3d.create();\n const vp = this.viewTool.viewport!;\n\n const position = this.getTouchStartPosition(this._touchStartL);\n if (undefined !== position) {\n const outerRadius = this.getTouchControlRadius(vp);\n const offset = this.getTouchOffset(this._touchStartL, outerRadius);\n const inputL = new Vector3d(offset.x * (1.0 / outerRadius), offset.y * (1.0 / outerRadius));\n positionInput.x = inputL.x * this.getMaxLinearVelocity();\n if (this._touchElevate)\n positionInput.y = inputL.y * this.getMaxLinearVelocity();\n else\n positionInput.z = inputL.y * -this.getMaxLinearVelocity();\n return positionInput;\n }\n\n this._positionInput.scale(this.getMaxLinearVelocity(), positionInput);\n return positionInput;\n }\n\n protected getAngularVelocity(): Vector3d {\n const angularInput = Vector3d.create();\n const vp = this.viewTool.viewport!;\n\n const position = this.getTouchStartPosition(this._touchStartR);\n if (undefined !== position) {\n const outerRadius = this.getTouchControlRadius(vp);\n const offset = this.getTouchOffset(this._touchStartR, outerRadius);\n const inputA = new Vector3d(offset.x * (1.0 / outerRadius), offset.y * (1.0 / outerRadius));\n angularInput.x = inputA.x * -this.getMaxAngularVelocityX();\n angularInput.y = inputA.y * -this.getMaxAngularVelocityY();\n return angularInput;\n }\n\n if (this._havePointerLock || this._touchLook)\n return angularInput;\n\n const input = this.getInputVector();\n if (undefined !== input) {\n angularInput.x = input.x * -this.getMaxAngularVelocityX();\n angularInput.y = input.y * -this.getMaxAngularVelocityY();\n }\n return angularInput;\n }\n\n protected getHorizAndVertVelocity(): Vector3d | undefined {\n const input = this.getInputVector();\n if (undefined === input)\n return undefined;\n input.scale(this.getMaxLinearVelocity(), input);\n return input;\n }\n\n private computeCollisionData(vp: Viewport, eyePt: Point3d): void {\n const contourLine = LineString3d.create();\n const viewPt = vp.npcToView(NpcCenter);\n const pts: Point2d[] = [];\n pts[0] = new Point2d(Math.floor(viewPt.x + 0.5), vp.viewRect.top);\n pts[1] = new Point2d(pts[0].x + 1, vp.viewRect.bottom);\n const range = Range2d.createArray(pts);\n\n let detectStepUp = false;\n const rect = new ViewRect();\n rect.initFromRange(range);\n vp.readPixels(rect, Pixel.Selector.GeometryAndDistance, (pixels) => {\n if (undefined === pixels)\n return;\n\n const sRange = Range2d.createNull();\n sRange.extendPoint(Point2d.create(vp.cssPixelsToDevicePixels(range.low.x), vp.cssPixelsToDevicePixels(range.low.y)));\n sRange.extendPoint(Point2d.create(vp.cssPixelsToDevicePixels(range.high.x), vp.cssPixelsToDevicePixels(range.high.y)));\n\n const testPoint = Point2d.create(sRange.low.x);\n for (testPoint.y = sRange.high.y; testPoint.y >= sRange.low.y; --testPoint.y) {\n const pixel = pixels.getPixel(testPoint.x, testPoint.y);\n if (pixel.distanceFraction < 0)\n continue; // No geometry at location...\n\n const hitPointWorld = vp.getPixelDataWorldPoint({ pixels, x: testPoint.x, y: testPoint.y, preserveModelDisplayTransforms: true });\n if (undefined === hitPointWorld)\n continue;\n\n if (0 === contourLine.numPoints()) {\n if (undefined === this._lastReference) {\n const refPt = (ToolSettings.walkDetectFloor ? eyePt.plusScaled(Vector3d.unitZ(), -ToolSettings.walkEyeHeight) : hitPointWorld);\n this._lastReference = Plane3dByOriginAndUnitNormal.create(refPt, Vector3d.unitZ());\n detectStepUp = ToolSettings.walkDetectFloor;\n } else if (undefined !== this._lastContour && this._lastContour.numPoints() > 1) {\n let fractLo, fractHi;\n const forwardDir = Vector3d.unitZ().crossProduct(vp.view.getXVector());\n const yPlaneHi = Plane3dByOriginAndUnitNormal.create(hitPointWorld, forwardDir);\n\n if (undefined !== yPlaneHi) {\n yPlaneHi.getNormalRef().scaleInPlace(-1);\n yPlaneHi.getOriginRef().addScaledInPlace(yPlaneHi.getNormalRef(), Constant.oneCentimeter * 5);\n\n const resultHi: CurveLocationDetail[] = [];\n this._lastContour.appendPlaneIntersectionPoints(yPlaneHi, resultHi);\n\n for (const intersectionHi of resultHi) {\n if ((undefined === fractHi || intersectionHi.fraction < fractHi) && intersectionHi.point.distance(hitPointWorld) < ToolSettings.walkEyeHeight)\n fractHi = intersectionHi.fraction;\n }\n\n if (undefined !== fractHi) {\n const yPlaneLo = yPlaneHi.clone();\n yPlaneLo.getOriginRef().addScaledInPlace(yPlaneLo.getNormalRef(), ToolSettings.walkEyeHeight * 2);\n\n const resultLo: CurveLocationDetail[] = [];\n this._lastContour.appendPlaneIntersectionPoints(yPlaneLo, resultLo);\n\n for (const intersectionLo of resultLo) {\n if (undefined === fractLo || intersectionLo.fraction < fractLo)\n fractLo = intersectionLo.fraction;\n }\n\n if (undefined === fractLo && yPlaneHi.altitude(this._lastContour.startPoint()) > 0)\n fractLo = 0; // Include from start if last path was shorter than requested section...\n }\n }\n\n if (undefined !== fractLo && undefined !== fractHi && fractHi > fractLo) {\n // Keep section of last contour to account for loosing sight of what is underfoot while moving forward...\n const partialCurve = this._lastContour.clonePartialCurve(fractLo, fractHi);\n if (undefined !== partialCurve && partialCurve instanceof LineString3d)\n contourLine.addPoints(partialCurve.packedPoints);\n } else {\n // Moved too far from last contour...\n detectStepUp = true;\n }\n }\n } else if (contourLine.numPoints() > 1) {\n const startPt = contourLine.packedPoints.getPoint3dAtUncheckedPointIndex(contourLine.numPoints() - 2);\n const testPt = contourLine.packedPoints.getPoint3dAtUncheckedPointIndex(contourLine.numPoints() - 1);\n\n const fraction = testPt.fractionOfProjectionToLine(startPt, hitPointWorld, 0.0);\n const closePoint = startPt.interpolate(fraction, hitPointWorld);\n\n if (closePoint.isAlmostEqual(testPt, 1.0e-5)) {\n // Colinear point, extent segment...\n contourLine.packedPoints.setAtCheckedPointIndex(contourLine.numPoints() - 1, hitPointWorld);\n continue;\n }\n }\n\n contourLine.addPoint(hitPointWorld);\n }\n }, true);\n\n // Use single point to denote \"no geometry found\" until movement is detected...\n if (0 === contourLine.numPoints()) {\n contourLine.addPoint(this._lastReadPt);\n } else if (detectStepUp && undefined !== this._lastReference) {\n const start = contourLine.startPoint();\n const forwardDir = Vector3d.unitZ().crossProduct(vp.view.getXVector());\n const stepPlane = Plane3dByOriginAndUnitNormal.create(start.plusScaled(forwardDir, ToolSettings.walkStepHeight), forwardDir);\n\n const resultStep: CurveLocationDetail[] = [];\n if (undefined !== stepPlane)\n contourLine.appendPlaneIntersectionPoints(stepPlane, resultStep);\n\n let stepPt;\n for (const step of resultStep) {\n if (undefined === stepPt || step.point.z > stepPt.z)\n stepPt = step.point;\n }\n\n if (undefined !== stepPt) {\n const xyDist = start.distanceXY(stepPt);\n const zDist = stepPt.z - start.z;\n const slope = (0.0 === xyDist ? Math.PI : Math.atan(zDist / xyDist));\n\n if (slope > Angle.createDegrees(10.0).radians && slope < Angle.createDegrees(50.0).radians) {\n const slopeRay = Ray3d.create(start, Vector3d.createStartEnd(stepPt, start));\n const slopePt = Point3d.create();\n\n if (undefined !== slopeRay.intersectionWithPlane(this._lastReference, slopePt)) {\n contourLine.reverseInPlace();\n contourLine.addPoint(slopePt);\n contourLine.reverseInPlace();\n }\n }\n }\n }\n\n this._currentContour = contourLine;\n if (ToolSettings.walkDetectFloor)\n this._lastContour = this._currentContour;\n }\n\n private checkForCollision(vp: Viewport, motion: NavigateMotion, positionInput: Vector3d): number {\n if (!ToolSettings.walkCollisions)\n return 0;\n\n const view = vp.view;\n if (!view.is3d() || !view.isCameraOn)\n return 0;\n\n if (undefined !== this._currentContour) {\n const pixelSize = vp.pixelsFromInches(0.75);\n const viewPt = vp.npcToView(NpcCenter);\n const readPt = vp.worldToView(this._lastReadPt);\n if (viewPt.distanceXY(readPt) > pixelSize)\n this._currentContour = undefined;\n if (0.0 !== positionInput.y)\n this._lastReference = undefined; // Choose a new reference plane after elevation change...\n }\n\n const eyePt = view.getEyePoint();\n\n if (undefined === this._currentContour && positionInput.z > 0.0) {\n vp.viewToNpc(vp.npcToView(NpcCenter), this._lastReadPt);\n this._lastReadPt.z = ViewManip.getFocusPlaneNpc(vp);\n vp.npcToWorld(this._lastReadPt, this._lastReadPt);\n\n this.computeCollisionData(vp, eyePt);\n }\n\n if (undefined === this._currentContour || this._currentContour.numPoints() < 2 || positionInput.z <= 0.0)\n return 0;\n\n const newEyePt = motion.transform.multiplyPoint3d(eyePt);\n const planeY = Plane3dByOriginAndUnitNormal.create(eyePt, vp.view.getYVector());\n const resultY: CurveLocationDetail[] = [];\n const nIntersectY = planeY ? this._currentContour.appendPlaneIntersectionPoints(planeY, resultY) : 0;\n const padDist = Constant.oneMeter * 0.5; // stop well before point directly underfoot to avoid clipping through walls...\n\n if (0 !== nIntersectY) {\n let resultVec;\n for (const intersection of resultY) {\n const resultNpc = vp.worldToNpc(intersection.point);\n if (resultNpc.z >= 1 || resultNpc.z <= 0)\n continue;\n\n const hitVec = Vector3d.createStartEnd(newEyePt, intersection.point);\n if (undefined === resultVec)\n resultVec = hitVec;\n else if (hitVec.magnitude() < resultVec.magnitude())\n resultVec.setFrom(hitVec);\n }\n\n if (undefined !== resultVec) {\n const eyeVec = Vector3d.createStartEnd(eyePt, newEyePt);\n if (eyeVec.dotProduct(resultVec) <= 0.0 || resultVec.magnitude() < padDist)\n return 1; // Stay put, high barrier...\n }\n }\n\n if (!ToolSettings.walkDetectFloor || undefined === this._lastReference)\n return 0;\n\n const forwardDir = Vector3d.unitZ().crossProduct(vp.view.getXVector());\n const planeZ = Plane3dByOriginAndUnitNormal.create(newEyePt, forwardDir);\n const resultZ: CurveLocationDetail[] = [];\n const nIntersectZ = planeZ ? this._currentContour.appendPlaneIntersectionPoints(planeZ, resultZ) : 0;\n\n if (0 !== nIntersectZ) {\n const heightPt = Point3d.create();\n const maintainHeight = Vector3d.create();\n\n for (const intersection of resultZ) {\n if (intersection.point.z > newEyePt.z)\n continue; // Ignore overhead point...\n\n const refPt = this._lastReference.projectPointToPlane(intersection.point);\n const offset = Vector3d.createStartEnd(refPt, intersection.point);\n\n if (offset.magnitude() > maintainHeight.magnitude()) {\n heightPt.setFrom(intersection.point);\n maintainHeight.setFrom(offset);\n }\n }\n\n if (maintainHeight.magnitude() >= ToolSettings.walkStepHeight && maintainHeight.dotProduct(this._lastReference.getNormalRef()) > 0)\n return 2; // Stay put, low barrier...\n\n const moveTransform = Transform.createTranslation(maintainHeight);\n motion.transform.multiplyTransformTransform(moveTransform, motion.transform);\n this._lastReference.getOriginRef().setFrom(heightPt);\n }\n return 0;\n }\n\n protected getNavigateMotion(elapsedTime: number): NavigateMotion | undefined {\n const vp = this.viewTool.viewport;\n if (undefined === vp)\n return;\n\n const motion = this._navigateMotion;\n motion.init(elapsedTime);\n\n if (!vp.isCameraOn) {\n const input = this.getHorizAndVertVelocity();\n if (undefined === input)\n return;\n motion.pan(input.x, input.y);\n return motion;\n }\n\n const positionInput = this.getLinearVelocity();\n const angularInput = this.getAngularVelocity();\n\n if (0.0 === angularInput.magnitude() && 0.0 === positionInput.magnitude() && undefined === this._lastMovement)\n return;\n\n this.requestPointerLock(false); // Ignore engagement events after modification starts (either from mouse or keys)...\n const current = IModelApp.toolAdmin.currentInputState;\n if (!this._havePointerLock && InputSource.Mouse === current.inputSource && !current.isDragging(BeButton.Data))\n current.onStartDrag(BeButton.Data); // Treat data down -> navigate key -> data up the same as a drag...\n\n if (undefined !== this._lastMovement) {\n if (motion.moveAndMouseLook(this._accumulator, positionInput, this._lastMovement, true))\n this._lastMovement = undefined;\n } else {\n motion.moveAndLook(positionInput, angularInput.x, angularInput.y, true);\n }\n\n const prevCollision = this._lastCollision;\n this._lastCollision = this.checkForCollision(vp, motion, positionInput);\n if (this._lastCollision !== prevCollision)\n vp.invalidateDecorations();\n\n return this._lastCollision ? undefined : motion;\n }\n\n protected enableDynamicUpdate(vp: ScreenViewport): void {\n const tool = this.viewTool;\n if (tool.inDynamicUpdate)\n return;\n\n tool.changeViewport(vp);\n tool.viewport!.setAnimator(this);\n tool.inDynamicUpdate = true;\n tool.inHandleModify = true;\n\n vp.npcToView(NpcCenter, this._anchorPtView);\n this._lastPtView.setFrom(this._anchorPtView); // Display indicator in the middle of the view...\n }\n\n private toggleCollisions(): void {\n ToolSettings.walkCollisions = !ToolSettings.walkCollisions;\n this._lastCollision = 0;\n this._lastReference = this._lastContour = this._currentContour = undefined;\n if (this.viewTool.viewport)\n this.viewTool.viewport.invalidateDecorations();\n }\n\n private toggleDetectFloor(): void {\n ToolSettings.walkDetectFloor = !ToolSettings.walkDetectFloor;\n if (ToolSettings.walkDetectFloor && !ToolSettings.walkCollisions)\n return this.toggleCollisions();\n this._lastReference = this._lastContour = this._currentContour = undefined;\n if (this.viewTool.viewport)\n this.viewTool.viewport.invalidateDecorations();\n }\n\n private changeWalkVelocity(increase?: boolean): void {\n if (undefined === increase)\n ToolSettings.walkVelocityChange = 0;\n else\n ToolSettings.walkVelocityChange = Geometry.clamp(ToolSettings.walkVelocityChange + (increase ? 1 : -1), -9, 9);\n if (this.viewTool.viewport)\n this.viewTool.viewport.invalidateDecorations();\n }\n\n public override onWheel(ev: BeWheelEvent): boolean {\n const tool = this.viewTool;\n if (!tool.inHandleModify || undefined === tool.viewport)\n return super.onWheel(ev);\n const focusHandle = tool.viewHandles.focusHandle;\n if (undefined === focusHandle || ViewHandleType.LookAndMove !== focusHandle.handleType)\n return super.onWheel(ev);\n this.changeWalkVelocity(ev.wheelDelta > 0);\n tool.viewport.setAnimator(this); // animator was cleared by wheel event...\n return true;\n }\n\n private isNavigationKey(keyEvent: KeyboardEvent): boolean {\n if (keyEvent.repeat || keyEvent.ctrlKey || keyEvent.altKey)\n return false;\n\n switch (keyEvent.key.toLowerCase()) {\n case \"arrowright\":\n case \"d\":\n case \"arrowleft\":\n case \"a\":\n case \"arrowup\":\n case \"w\":\n case \"arrowdown\":\n case \"s\":\n case \"pagedown\":\n case \"q\":\n case \"pageup\":\n case \"e\":\n return true;\n default:\n return false;\n }\n }\n\n private enableKeyStart(): boolean {\n const vp = this.viewTool.viewport;\n if (0 !== this.viewTool.nPts || undefined === vp)\n return false;\n\n const pt = vp.view.getTargetPoint();\n const ev = new BeButtonEvent({ point: pt, rawPoint: pt, viewPoint: vp.worldToView(pt), viewport: vp, inputSource: InputSource.Mouse, isDown: true });\n this.viewTool.changeViewport(ev.viewport);\n if (!this.viewTool.processFirstPoint(ev))\n return false;\n\n this.viewTool.nPts = 1;\n return true;\n }\n\n public override onKeyTransition(wentDown: boolean, keyEvent: KeyboardEvent): boolean {\n if (!this.viewTool.inDynamicUpdate) {\n this._positionInput.setZero(); // clear input from a previous dynamic update...\n if (!wentDown || !this.isNavigationKey(keyEvent) || !this.enableKeyStart())\n return false;\n }\n\n if (keyEvent.ctrlKey || keyEvent.altKey)\n return false;\n\n switch (keyEvent.key.toLowerCase()) {\n case \"arrowright\":\n case \"d\":\n this._positionInput.x = Geometry.clamp(this._positionInput.x + (wentDown ? 1.0 : -1.0), -1.0, 1.0);\n return true;\n case \"arrowleft\":\n case \"a\":\n this._positionInput.x = Geometry.clamp(this._positionInput.x + (wentDown ? -1.0 : 1.0), -1.0, 1.0);\n return true;\n case \"arrowup\":\n case \"w\":\n this._positionInput.z = Geometry.clamp(this._positionInput.z + (wentDown ? 1.0 : -1.0), -1.0, 1.0);\n return true;\n case \"arrowdown\":\n case \"s\":\n this._positionInput.z = Geometry.clamp(this._positionInput.z + (wentDown ? -1.0 : 1.0), -1.0, 1.0);\n return true;\n case \"pagedown\":\n case \"q\":\n this._positionInput.y = Geometry.clamp(this._positionInput.y + (wentDown ? 1.0 : -1.0), -1.0, 1.0);\n return true;\n case \"pageup\":\n case \"e\":\n this._positionInput.y = Geometry.clamp(this._positionInput.y + (wentDown ? -1.0 : 1.0), -1.0, 1.0);\n return true;\n case \"c\":\n if (wentDown)\n this.toggleCollisions();\n return true;\n case \"z\":\n if (wentDown)\n this.toggleDetectFloor();\n return true;\n case \"+\":\n if (wentDown)\n this.changeWalkVelocity(true);\n return true;\n case \"-\":\n if (wentDown)\n this.changeWalkVelocity(false);\n return true;\n case \"=\":\n if (wentDown)\n this.changeWalkVelocity();\n return true;\n default:\n return false;\n }\n }\n\n protected getTouchControlRadius(vp: Viewport): number {\n const viewRect = vp.viewRect;\n const radius = Math.floor(Math.min(viewRect.width, viewRect.height) / 15.0) + 0.5;\n const minRadius = vp.pixelsFromInches(0.1);\n const maxRadius = vp.pixelsFromInches(1.0);\n return Geometry.clamp(radius, minRadius, maxRadius);\n }\n\n protected getTouchZoneLowerLeft(vp: Viewport): ViewRect {\n const viewRect = vp.viewRect;\n const rectLL = viewRect.clone();\n rectLL.top += viewRect.height * 0.6;\n rectLL.right -= viewRect.width * 0.6;\n rectLL.insetByPercent(0.05);\n return rectLL;\n }\n\n protected getTouchZoneLowerRight(vp: Viewport): ViewRect {\n const viewRect = vp.viewRect;\n const rectLR = viewRect.clone();\n rectLR.top += viewRect.height * 0.6;\n rectLR.left += viewRect.width * 0.6;\n rectLR.insetByPercent(0.05);\n return rectLR;\n }\n\n protected getTouchStartPosition(touchStart: BeTouchEvent | undefined): Point2d | undefined {\n if (undefined === touchStart || undefined === touchStart.viewport)\n return undefined;\n return BeTouchEvent.getTouchPosition(touchStart.touchEvent.changedTouches[0], touchStart.viewport);\n }\n\n protected getTouchOffset(touchStart: BeTouchEvent | undefined, radius: number): Vector2d {\n const offset = Vector2d.create();\n if (undefined === this._touchLast)\n return offset;\n\n const position = this.getTouchStartPosition(touchStart);\n if (undefined === position)\n return offset;\n\n const lastTouch = BeTouchEvent.findTouchById(this._touchLast.touchEvent.targetTouches, touchStart!.touchEvent.changedTouches[0].identifier);\n if (undefined === lastTouch)\n return offset;\n\n const minOffsetRadius = Math.floor(radius * 0.1) + 0.5;\n const maxOffsetRadius = Math.floor(radius * 1.2) + 0.5;\n const lastPos = BeTouchEvent.getTouchPosition(lastTouch, touchStart!.viewport!);\n const lastVec = Vector2d.createStartEnd(position, lastPos);\n\n if (lastVec.magnitude() > maxOffsetRadius)\n lastVec.scaleToLength(maxOffsetRadius, lastVec);\n if (lastVec.magnitude() > minOffsetRadius)\n offset.plus(lastVec, offset);\n\n return offset;\n }\n\n public override onTouchStart(ev: BeTouchEvent): boolean {\n if (undefined === ev.viewport || !ev.viewport.isCameraOn || 1 !== ev.touchEvent.changedTouches.length)\n return (undefined === this._touchStartL && undefined !== this._touchStartR ? false : true);\n\n const startPos = this.getTouchStartPosition(ev);\n if (undefined === startPos)\n return false;\n\n const rectLL = this.getTouchZoneLowerLeft(ev.viewport);\n const rectLR = this.getTouchZoneLowerRight(ev.viewport);\n\n if (undefined === this._touchStartL && rectLL.containsPoint(startPos)) {\n this._touchStartL = this._touchLast = ev;\n ev.viewport.invalidateDecorations();\n return true;\n }\n\n if (undefined === this._touchStartR && rectLR.containsPoint(startPos)) {\n this._touchStartR = this._touchLast = ev;\n ev.viewport.invalidateDecorations();\n return true;\n }\n\n return false;\n }\n\n public override onTouchEnd(ev: BeTouchEvent): boolean {\n let changed = false;\n\n if (undefined !== this._touchStartL && undefined !== BeTouchEvent.findTouchById(ev.touchEvent.changedTouches, this._touchStartL.touchEvent.changedTouches[0].identifier)) {\n this._touchStartL = undefined;\n changed = true;\n }\n\n if (undefined !== this._touchStartR && undefined !== BeTouchEvent.findTouchById(ev.touchEvent.changedTouches, this._touchStartR.touchEvent.changedTouches[0].identifier)) {\n this._touchStartR = undefined;\n changed = true;\n }\n\n if (changed && undefined !== ev.viewport)\n ev.viewport.invalidateDecorations();\n\n return changed;\n }\n\n public override async onTouchComplete(_ev: BeTouchEvent): Promise<boolean> {\n if (!this.viewTool.inDynamicUpdate || undefined === this._touchLast)\n return false;\n await this.viewTool.onReinitialize();\n return true;\n }\n\n public override async onTouchCancel(ev: BeTouchEvent): Promise<boolean> {\n return this.onTouchComplete(ev);\n }\n\n public override onTouchMove(ev: BeTouchEvent): boolean {\n if (undefined === ev.viewport || !this.viewTool.inDynamicUpdate || (undefined === this._touchStartL && undefined === this._touchStartR))\n return false;\n\n let changed = false;\n\n if (undefined !== this._touchStartL && undefined !== BeTouchEvent.findTouchById(ev.touchEvent.changedTouches, this._touchStartL.touchEvent.changedTouches[0].identifier))\n changed = true;\n\n if (undefined !== this._touchStartR && undefined !== BeTouchEvent.findTouchById(ev.touchEvent.changedTouches, this._touchStartR.touchEvent.changedTouches[0].identifier))\n changed = true;\n\n if (changed) {\n this._touchLast = ev;\n ev.viewport.invalidateDecorations();\n }\n\n return true;\n }\n\n public override onTouchMoveStart(ev: BeTouchEvent, _startEv: BeTouchEvent): boolean {\n if (undefined === ev.viewport)\n return false;\n\n if (undefined === this._touchStartL && undefined === this._touchStartR)\n return false;\n\n this.enableDynamicUpdate(ev.viewport);\n return true;\n }\n\n public override onTouchTap(ev: BeTouchEvent): boolean {\n if (undefined === ev.viewport || this.viewTool.inDynamicUpdate || !ev.isSingleTap)\n return false;\n\n const rectLL = this.getTouchZoneLowerLeft(ev.viewport);\n if (rectLL.containsPoint(ev.viewPoint))\n this._touchElevate = !this._touchElevate; // Toggle elevate mode for left control until next touch complete...\n\n const rectLR = this.getTouchZoneLowerRight(ev.viewport);\n if (rectLR.containsPoint(ev.viewPoint))\n this._touchSpeedUp = !this._touchSpeedUp; // Toggle speed increase for left control until next touch complete...\n\n return false;\n }\n\n public override drawHandle(context: DecorateContext, hasFocus: boolean): void {\n super.drawHandle(context, hasFocus);\n if (!hasFocus || context.viewport !== this.viewTool.viewport)\n return;\n\n if (ToolSettings.walkCollisions && this.viewTool.inDynamicUpdate) {\n const position = this._anchorPtView.clone();\n position.x = Math.floor(position.x) + 0.5;\n position.y = Math.floor(position.y) + 0.5;\n\n const drawCollisionArrows = (ctx: CanvasRenderingContext2D) => {\n const arrowSize = 20;\n const addArrow = (angle: number) => {\n const end = arrowSize;\n const start = end / 2;\n const mid = start / 2;\n ctx.rotate(angle);\n ctx.beginPath();\n ctx.moveTo(start, 0);\n ctx.lineTo(end, 0);\n ctx.moveTo(start, 0);\n ctx.lineTo(start + mid, mid);\n ctx.moveTo(start, 0);\n ctx.lineTo(start + mid, -mid);\n ctx.stroke();\n ctx.rotate(-angle);\n };\n\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 5;\n ctx.lineCap = \"round\";\n addArrow(0);\n addArrow(Math.PI);\n\n ctx.strokeStyle = (1 === this._lastCollision ? \"red\" : \"white\");\n ctx.lineWidth = 1;\n addArrow(0);\n addArrow(Math.PI);\n\n if (ToolSettings.walkDetectFloor) {\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 5;\n addArrow(-Math.PI / 2);\n ctx.strokeStyle = (2 === this._lastCollision ? \"red\" : \"white\");\n ctx.lineWidth = 1;\n addArrow(-Math.PI / 2);\n }\n };\n context.addCanvasDecoration({ position, drawDecoration: drawCollisionArrows });\n }\n\n if ((0 !== ToolSettings.walkVelocityChange || this._touchSpeedUp) && this.viewTool.inDynamicUpdate) {\n const arrowSize = 12;\n const speedUp = (ToolSettings.walkVelocityChange > 0 || this._touchSpeedUp ? true : false);\n const position = this._anchorPtView.clone();\n position.x = Math.floor(position.x) + 0.5;\n position.y = Math.floor(position.y + (arrowSize / 3)) + 0.5;\n\n const drawSpeedChange = (ctx: CanvasRenderingContext2D) => {\n const addArrows = () => {\n const end = arrowSize;\n const start = end / 2;\n const midY = (end + start) / 2;\n const midX = (arrowSize / 4) * (speedUp ? 1 : -1);\n ctx.beginPath();\n ctx.moveTo(0, start);\n ctx.lineTo(midX, midY);\n ctx.lineTo(0, end);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(-midX, start);\n ctx.lineTo(0, midY);\n ctx.lineTo(-midX, end);\n ctx.stroke();\n };\n\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 3;\n ctx.lineCap = \"round\";\n addArrows();\n\n ctx.strokeStyle = \"white\";\n ctx.lineWidth = 1;\n addArrows();\n };\n context.addCanvasDecoration({ position, drawDecoration: drawSpeedChange });\n }\n\n const positionL = this.getTouchStartPosition(this._touchStartL);\n const positionR = this.getTouchStartPosition(this._touchStartR);\n\n if (undefined === positionL && undefined === positionR)\n return;\n\n const outerRadius = this.getTouchControlRadius(context.viewport);\n const innerRadius = Math.floor(outerRadius * 0.65) + 0.5;\n const offsetL = this.getTouchOffset(this._touchStartL, outerRadius);\n const offsetR = this.getTouchOffset(this._touchStartR, outerRadius);\n\n const drawDecoration = (ctx: CanvasRenderingContext2D, isLeft: boolean) => {\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.fillStyle = \"rgba(150,150,150,0.4)\";\n ctx.lineWidth = 2;\n ctx.arc(0, 0, outerRadius, 0, 2 * Math.PI);\n ctx.stroke();\n ctx.fill();\n\n ctx.shadowColor = \"black\";\n ctx.shadowBlur = 10;\n ctx.shadowOffsetX = 5;\n ctx.shadowOffsetY = 5;\n\n ctx.beginPath();\n ctx.strokeStyle = \"rgba(0,0,0,0.4)\";\n ctx.lineWidth = innerRadius;\n ctx.lineCap = \"round\";\n ctx.moveTo(0, 0);\n ctx.lineTo(isLeft ? offsetL.x : offsetR.x, isLeft ? offsetL.y : offsetR.y);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.fillStyle = \"rgba(200,200,200,0.8\";\n ctx.lineWidth = 1;\n ctx.arc(isLeft ? offsetL.x : offsetR.x, isLeft ? offsetL.y : offsetR.y, innerRadius, 0, 2 * Math.PI);\n ctx.stroke();\n ctx.fill();\n };\n\n const drawDecorationL = (ctx: CanvasRenderingContext2D) => drawDecoration(ctx, true);\n const drawDecorationR = (ctx: CanvasRenderingContext2D) => drawDecoration(ctx, false);\n\n if (undefined !== positionL)\n context.addCanvasDecoration({ position: positionL, drawDecoration: drawDecorationL });\n\n if (undefined !== positionR)\n context.addCanvasDecoration({ position: positionR, drawDecoration: drawDecorationR });\n }\n}\n\n/** ViewingToolHandle for performing the \"walk view\" operation */\nclass ViewWalk extends ViewNavigate {\n private _navigateMotion: NavigateMotion;\n\n constructor(viewManip: ViewManip) {\n super(viewManip);\n this._navigateMotion = new NavigateMotion(this.viewTool.viewport!);\n }\n public get handleType(): ViewHandleType { return ViewHandleType.Walk; }\n public override firstPoint(ev: BeButtonEvent): boolean {\n this.viewTool.provideToolAssistance(\"Walk.Prompts.NextPoint\");\n return super.firstPoint(ev);\n }\n\n protected getNavigateMotion(elapsedTime: number): NavigateMotion | undefined {\n const input = this.getInputVector();\n if (undefined === input)\n return undefined;\n\n const motion = this._navigateMotion;\n motion.init(elapsedTime);\n\n switch (this.getNavigateMode()) {\n case NavigateMode.Pan:\n input.scale(this.getMaxLinearVelocity(), input);\n motion.pan(input.x, input.y);\n break;\n case NavigateMode.Look:\n input.scale(-this.getMaxAngularVelocity(), input);\n motion.look(input.x, input.y);\n break;\n case NavigateMode.Travel:\n motion.travel(-input.x * this.getMaxAngularVelocity(), 0, -input.y * this.getMaxLinearVelocity(), true);\n break;\n }\n\n return motion;\n }\n}\n\n/** ViewingToolHandle for performing the \"fly view\" operation */\nclass ViewFly extends ViewNavigate {\n private _navigateMotion: NavigateMotion;\n\n constructor(viewManip: ViewManip) {\n super(viewManip);\n this._navigateMotion = new NavigateMotion(this.viewTool.viewport!);\n }\n public get handleType(): ViewHandleType { return ViewHandleType.Fly; }\n public override firstPoint(ev: BeButtonEvent): boolean {\n this.viewTool.provideToolAssistance(\"Fly.Prompts.NextPoint\");\n return super.firstPoint(ev);\n }\n\n protected getNavigateMotion(elapsedTime: number): NavigateMotion | undefined {\n const input = this.getInputVector();\n if (undefined === input)\n return undefined;\n\n const motion = this._navigateMotion;\n motion.init(elapsedTime);\n\n switch (this.getNavigateMode()) {\n case NavigateMode.Pan:\n input.scale(this.getMaxLinearVelocity(), input);\n motion.pan(input.x, input.y);\n break;\n case NavigateMode.Look:\n input.scale(-this.getMaxAngularVelocity(), input);\n motion.look(input.x, input.y);\n break;\n case NavigateMode.Travel:\n input.scale(-this.getMaxAngularVelocity() * 2.0, input);\n motion.travel(input.x, input.y, this.getMaxLinearVelocity(), false);\n break;\n }\n\n return motion;\n }\n}\n\n/** The tool that performs a Pan view operation\n * @public\n */\nexport class PanViewTool extends ViewManip {\n public static override toolId = \"View.Pan\";\n public static override iconSpec = \"icon-hand-2\";\n constructor(vp: ScreenViewport | undefined, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Pan.Prompts.FirstPoint\"); }\n}\n\n/** A tool that performs a Rotate view operation\n * @public\n */\nexport class RotateViewTool extends ViewManip {\n public static override toolId = \"View.Rotate\";\n public static override iconSpec = \"icon-gyroscope\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Rotate | ViewHandleType.Pan | ViewHandleType.TargetCenter, oneShot, isDraggingRequired);\n }\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Rotate.Prompts.FirstPoint\"); }\n}\n\n/** A tool that performs the look operation\n * @public\n */\nexport class LookViewTool extends ViewManip {\n public static override toolId = \"View.Look\";\n public static override iconSpec = \"icon-view-navigation\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Look | ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Look.Prompts.FirstPoint\"); }\n}\n\n/** A tool that performs the scroll operation\n * @public\n */\nexport class ScrollViewTool extends ViewManip {\n public static override toolId = \"View.Scroll\";\n public static override iconSpec = \"icon-move\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Scroll, oneShot, isDraggingRequired);\n }\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Scroll.Prompts.FirstPoint\"); }\n}\n\n/** A tool that performs the zoom operation\n * @public\n */\nexport class ZoomViewTool extends ViewManip {\n public static override toolId = \"View.Zoom\";\n public static override iconSpec = \"icon-zoom\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Zoom | ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Zoom.Prompts.FirstPoint\"); }\n}\n\n/** A tool that performs the walk operation using mouse+keyboard or touch controls.\n * Keyboard and mouse controls are similar to those used by many video games:\n * - Mouse motion: look around.\n * - W, A, S, D (or arrow keys): move forward, left, right, or backward respectively.\n * - E, Q (or PgUp, PgDn): move up and down respectively.\n * - +, - (or scroll wheel): increase or decrease velocity.\n * @public\n */\nexport class LookAndMoveTool extends ViewManip {\n public static override toolId = \"View.LookAndMove\";\n public static override iconSpec = \"icon-walk\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n const viewport = (undefined === vp ? IModelApp.viewManager.selectedView : vp); // Need vp to enable camera/check lens in onReinitialize...\n super(viewport, ViewHandleType.LookAndMove | ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"LookAndMove.Prompts.FirstPoint\"); }\n\n public override provideToolAssistance(mainInstrKey: string): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(mainInstrKey));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = this.inDynamicUpdate ? CoreTools.translate(\"ElementSet.Inputs.AcceptPoint\") : ViewTool.translate(\"LookAndMove.Inputs.AcceptLookPoint\");\n const rejectMsg = CoreTools.translate(\"ElementSet.Inputs.Exit\");\n\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, rejectMsg, false, ToolAssistanceInputMethod.Mouse));\n\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.createKeyboardInfo([\"W\"], [\"A\", \"S\", \"D\"]), ViewTool.translate(\"LookAndMove.Inputs.WalkKeys\"), false));\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.arrowKeyboardInfo, ViewTool.translate(\"LookAndMove.Inputs.WalkKeys\"), false));\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.createKeyboardInfo([\"Q\", \"E\"]), ViewTool.translate(\"LookAndMove.Inputs.ElevateKeys\"), false));\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.createKeyboardInfo([\"\\u21de\", \"\\u21df\"]), ViewTool.translate(\"LookAndMove.Inputs.ElevateKeys\"), false));\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.createKeyboardInfo([\"C\", \"Z\"]), ViewTool.translate(\"LookAndMove.Inputs.CollideKeys\"), false));\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.createKeyboardInfo([\"+\", \"-\"]), ViewTool.translate(\"LookAndMove.Inputs.VelocityChange\"), false));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.MouseWheel, ViewTool.translate(\"LookAndMove.Inputs.VelocityChange\"), false, ToolAssistanceInputMethod.Mouse));\n\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TouchCursorDrag, ViewTool.translate(\"LookAndMove.Inputs.TouchZoneLL\"), false, ToolAssistanceInputMethod.Touch));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TouchCursorDrag, ViewTool.translate(\"LookAndMove.Inputs.TouchZoneLR\"), false, ToolAssistanceInputMethod.Touch));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, ViewTool.translate(\"LookAndMove.Inputs.TouchTapLL\"), false, ToolAssistanceInputMethod.Touch));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, ViewTool.translate(\"LookAndMove.Inputs.TouchTapLR\"), false, ToolAssistanceInputMethod.Touch));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchDrag, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, rejectMsg, false, ToolAssistanceInputMethod.Touch));\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n}\n\n/** A tool that performs the walk operation\n * @public\n */\nexport class WalkViewTool extends ViewManip {\n public static override toolId = \"View.Walk\";\n public static override iconSpec = \"icon-walk\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n const viewport = (undefined === vp ? IModelApp.viewManager.selectedView : vp); // Need vp to enable camera/check lens in onReinitialize...\n super(viewport, ViewHandleType.Walk | ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Walk.Prompts.FirstPoint\"); }\n\n public override provideToolAssistance(mainInstrKey: string): void {\n const walkInstructions: ToolAssistanceInstruction[] = [];\n walkInstructions.push(ToolAssistance.createModifierKeyInstruction(ToolAssistance.shiftKey, ToolAssistanceImage.LeftClickDrag, ViewTool.translate(\"Pan.flyover\"), false, ToolAssistanceInputMethod.Mouse));\n walkInstructions.push(ToolAssistance.createModifierKeyInstruction(ToolAssistance.ctrlKey, ToolAssistanceImage.LeftClickDrag, ViewTool.translate(\"Look.flyover\"), false, ToolAssistanceInputMethod.Mouse));\n super.provideToolAssistance(mainInstrKey, walkInstructions);\n }\n}\n\n/** A tool that performs the fly operation\n * @public\n */\nexport class FlyViewTool extends ViewManip {\n public static override toolId = \"View.Fly\";\n public static override iconSpec = \"icon-airplane\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Fly | ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Fly.Prompts.FirstPoint\"); }\n\n public override provideToolAssistance(mainInstrKey: string): void {\n const flyInstructions: ToolAssistanceInstruction[] = [];\n flyInstructions.push(ToolAssistance.createModifierKeyInstruction(ToolAssistance.shiftKey, ToolAssistanceImage.LeftClickDrag, ViewTool.translate(\"Pan.flyover\"), false, ToolAssistanceInputMethod.Mouse));\n flyInstructions.push(ToolAssistance.createModifierKeyInstruction(ToolAssistance.ctrlKey, ToolAssistanceImage.LeftClickDrag, ViewTool.translate(\"Look.flyover\"), false, ToolAssistanceInputMethod.Mouse));\n super.provideToolAssistance(mainInstrKey, flyInstructions);\n }\n}\n\n/** A tool that performs a fit view\n * @public\n */\nexport class FitViewTool extends ViewTool {\n public static override toolId = \"View.Fit\";\n public static override iconSpec = \"icon-fit-to-view\";\n public oneShot: boolean;\n public doAnimate: boolean;\n public isolatedOnly: boolean;\n constructor(viewport: ScreenViewport, oneShot: boolean, doAnimate = true, isolatedOnly = true) {\n super(viewport);\n this.viewport = viewport;\n this.oneShot = oneShot;\n this.doAnimate = doAnimate;\n this.isolatedOnly = isolatedOnly;\n }\n\n public provideToolAssistance(): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(\"Fit.Prompts.FirstPoint\"));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = CoreTools.translate(\"ElementSet.Inputs.Accept\");\n const rejectMsg = CoreTools.translate(\"ElementSet.Inputs.Exit\");\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, rejectMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, rejectMsg, false, ToolAssistanceInputMethod.Mouse));\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (ev.viewport)\n return await this.doFit(ev.viewport, this.oneShot, this.doAnimate, this.isolatedOnly) ? EventHandled.Yes : EventHandled.No;\n\n return EventHandled.No;\n }\n\n public override async onPostInstall() {\n await super.onPostInstall();\n if (undefined === this.viewport || !this.oneShot)\n this.provideToolAssistance();\n\n if (this.viewport)\n await this.doFit(this.viewport, this.oneShot, this.doAnimate, this.isolatedOnly);\n }\n\n public async doFit(viewport: ScreenViewport, oneShot: boolean, doAnimate = true, isolatedOnly = true): Promise<boolean> {\n if (!isolatedOnly || !await ViewManip.zoomToAlwaysDrawnExclusive(viewport, { animateFrustumChange: doAnimate }))\n ViewManip.fitViewWithGlobeAnimation(viewport, doAnimate);\n if (oneShot)\n await this.exitTool();\n return oneShot;\n }\n}\n\n/** A tool that views a location on the background map from a satellite's perspective; the viewed location is derived from the position of the current camera's eye above the background map. Operates on the selected view.\n * @public\n */\nexport class ViewGlobeSatelliteTool extends ViewTool {\n public static override toolId = \"View.GlobeSatellite\";\n // public static iconSpec = \"icon-view-globe-satellite\"; // ###TODO: need icon for this\n public oneShot: boolean;\n public doAnimate: boolean;\n constructor(viewport: ScreenViewport, oneShot = true, doAnimate = true) {\n super(viewport);\n this.viewport = viewport;\n this.oneShot = oneShot;\n this.doAnimate = doAnimate;\n }\n\n /** @internal */\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (ev.viewport)\n return (await this._beginSatelliteView(ev.viewport, this.oneShot, this.doAnimate)) ? EventHandled.Yes : EventHandled.No;\n\n return EventHandled.No;\n }\n\n /** @internal */\n public override async onPostInstall() {\n await super.onPostInstall();\n const viewport = undefined === this.viewport ? IModelApp.viewManager.selectedView : this.viewport;\n if (viewport) {\n (async () => {\n await this._beginSatelliteView(viewport, this.oneShot, this.doAnimate);\n })().catch(() => { });\n }\n }\n\n private async _beginSatelliteView(viewport: ScreenViewport, oneShot: boolean, doAnimate = true): Promise<boolean> {\n const carto = await eyeToCartographicOnGlobeFromGcs(viewport);\n if (carto !== undefined) {\n try {\n let elevationOffset = 0;\n const elevation = await queryTerrainElevationOffset(viewport, carto);\n if (elevation !== undefined)\n elevationOffset = elevation;\n return await this._doSatelliteView(viewport, oneShot, doAnimate, elevationOffset);\n } catch {\n }\n }\n return true;\n }\n\n private async _doSatelliteView(viewport: ScreenViewport, oneShot: boolean, doAnimate = true, elevationOffset = 0): Promise<boolean> {\n viewGlobalLocation(viewport, doAnimate, ViewGlobalLocationConstants.satelliteHeightAboveEarthInMeters + elevationOffset);\n if (oneShot)\n await this.exitTool();\n return oneShot;\n }\n}\n\n/** A tool that views a location on the background map from a bird's eye perspective; the viewed location is derived from the position of the current camera's eye above the background map. Operates on the selected view.\n * @public\n */\nexport class ViewGlobeBirdTool extends ViewTool {\n public static override toolId = \"View.GlobeBird\";\n // public static iconSpec = \"icon-view-globe-bird\"; // ###TODO: need icon for this\n public oneShot: boolean;\n public doAnimate: boolean;\n constructor(viewport: ScreenViewport, oneShot = true, doAnimate = true) {\n super(viewport);\n this.viewport = viewport;\n this.oneShot = oneShot;\n this.doAnimate = doAnimate;\n }\n\n /** @internal */\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (ev.viewport)\n return (await this._beginDoBirdView(ev.viewport, this.oneShot, this.doAnimate)) ? EventHandled.Yes : EventHandled.No;\n\n return EventHandled.No;\n }\n\n /** @internal */\n public override async onPostInstall() {\n await super.onPostInstall();\n const viewport = undefined === this.viewport ? IModelApp.viewManager.selectedView : this.viewport;\n if (viewport)\n await this._beginDoBirdView(viewport, this.oneShot, this.doAnimate);\n }\n\n private async _beginDoBirdView(viewport: ScreenViewport, oneShot: boolean, doAnimate = true): Promise<boolean> {\n const carto = await eyeToCartographicOnGlobeFromGcs(viewport);\n if (carto !== undefined) {\n try {\n let elevationOffset = 0;\n const elevation = await queryTerrainElevationOffset(viewport, carto);\n if (elevation !== undefined)\n elevationOffset = elevation;\n return await this._doBirdView(viewport, oneShot, doAnimate, elevationOffset);\n } catch {\n }\n }\n return true;\n }\n\n private async _doBirdView(viewport: ScreenViewport, oneShot: boolean, doAnimate = true, elevationOffset = 0): Promise<boolean> {\n viewGlobalLocation(viewport, doAnimate, ViewGlobalLocationConstants.birdHeightAboveEarthInMeters + elevationOffset, ViewGlobalLocationConstants.birdPitchAngleRadians);\n if (oneShot)\n await this.exitTool();\n return oneShot;\n }\n}\n\n/** A tool that views a location on the background map corresponding to a specified string.\n * This will either look down at the location using a bird's eye height, or, if a range is available, the entire range corresponding to the location will be viewed.\n * Operates on the selected view.\n * @public\n */\nexport class ViewGlobeLocationTool extends ViewTool {\n private _globalLocation?: GlobalLocation;\n\n public static override toolId = \"View.GlobeLocation\";\n // public static iconSpec = \"icon-view-globe-location\"; // ###TODO: need icon for this\n public oneShot: boolean;\n public doAnimate: boolean;\n constructor(viewport: ScreenViewport, oneShot = true, doAnimate = true) {\n super(viewport);\n this.viewport = viewport;\n this.oneShot = oneShot;\n this.doAnimate = doAnimate;\n }\n\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return undefined; }\n\n /** This runs the tool based on the provided location arguments.\n * arguments: latitude longitude | string\n * If specified, the latitude and longitude arguments are numbers specified in degrees.\n * If specified, the string argument contains a location name. Examples of location name include named geographic areas like \"Seattle, WA\" or \"Alaska\", a specific address like \"1600 Pennsylvania Avenue NW, Washington, DC 20500\", or a place name like \"Philadelphia Museum of Art\".\n **/\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n if (2 === args.length) { // try to parse latitude and longitude\n const latitude = parseFloat(args[0]);\n const longitude = parseFloat(args[1]);\n if (!Number.isNaN(latitude) || !Number.isNaN(longitude)) {\n const center = Cartographic.fromDegrees({ longitude, latitude });\n this._globalLocation = { center };\n }\n }\n\n if (this._globalLocation === undefined) {\n const locationString = args.join(\" \");\n const bingLocationProvider = new BingLocationProvider();\n try {\n this._globalLocation = await bingLocationProvider.getLocation(locationString);\n if (this._globalLocation !== undefined) {\n const viewport = undefined === this.viewport ? IModelApp.viewManager.selectedView : this.viewport;\n if (viewport !== undefined) {\n const elevationOffset = await queryTerrainElevationOffset(viewport, this._globalLocation.center);\n if (elevationOffset !== undefined)\n this._globalLocation.center.height = elevationOffset;\n }\n }\n } catch {\n }\n }\n\n if (this._globalLocation !== undefined)\n return this.run();\n return true;\n }\n\n /** @internal */\n public override async onPostInstall() {\n await super.onPostInstall();\n await this._doLocationView();\n }\n\n private async _doLocationView(): Promise<boolean> {\n const viewport = undefined === this.viewport ? IModelApp.viewManager.selectedView : this.viewport;\n if (viewport) {\n if (undefined !== this._globalLocation)\n await viewport.animateFlyoverToGlobalLocation(this._globalLocation);\n }\n if (this.oneShot)\n await this.exitTool();\n return this.oneShot;\n }\n}\n\n/** A tool that views the current iModel on the background map so that the extent of the project is visible. Operates on the selected view.\n * @public\n */\nexport class ViewGlobeIModelTool extends ViewTool {\n public static override toolId = \"View.GlobeIModel\";\n // public static iconSpec = \"icon-view-globe-imodel\"; // ###TODO: need icon for this\n public oneShot: boolean;\n public doAnimate: boolean;\n constructor(viewport: ScreenViewport, oneShot = true, doAnimate = true) {\n super(viewport);\n this.viewport = viewport;\n this.oneShot = oneShot;\n this.doAnimate = doAnimate;\n }\n\n /** @internal */\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (ev.viewport)\n return await this._doIModelView() ? EventHandled.Yes : EventHandled.No;\n\n return EventHandled.No;\n }\n\n /** @internal */\n public override async onPostInstall() {\n await super.onPostInstall();\n await this._doIModelView();\n }\n\n private async _doIModelView(): Promise<boolean> {\n const viewport = undefined === this.viewport ? IModelApp.viewManager.selectedView : this.viewport;\n if (viewport && (viewport.view instanceof ViewState3d)) {\n const extents = viewport.view.iModel.projectExtents;\n const center = viewport.view.iModel.projectExtents.center;\n const view3d = viewport.view;\n const cartographicCenter = view3d.rootToCartographic(center);\n if (cartographicCenter !== undefined) {\n const cartographicArea = rangeToCartographicArea(view3d, extents);\n (async () => {\n await viewport.animateFlyoverToGlobalLocation({ center: cartographicCenter, area: cartographicArea });\n })().catch(() => { });\n }\n }\n if (this.oneShot)\n await this.exitTool();\n return this.oneShot;\n }\n}\n\n/** A tool that rotates the view to one of the standard views.\n * @public\n */\nexport class StandardViewTool extends ViewTool {\n public static override toolId = \"View.Standard\";\n public static override iconSpec = \"icon-cube-faces-top\";\n constructor(viewport: ScreenViewport, private _standardViewId: StandardViewId) { super(viewport); }\n\n public override async onPostInstall() {\n await super.onPostInstall();\n if (this.viewport) {\n const vp = this.viewport;\n const id = vp.view.allow3dManipulations() ? this._standardViewId : StandardViewId.Top;\n const rMatrix = AccuDraw.getStandardRotation(id, vp, vp.isContextRotationRequired);\n const inverse = rMatrix.inverse();\n if (undefined !== inverse) {\n const targetMatrix = inverse.multiplyMatrixMatrix(vp.rotation);\n const rotateTransform = Transform.createFixedPointAndMatrix(ViewManip.getDefaultTargetPointWorld(vp), targetMatrix);\n const newFrustum = vp.getFrustum();\n newFrustum.multiply(rotateTransform);\n vp.view.setupFromFrustum(newFrustum);\n vp.synchWithView({ animateFrustumChange: true });\n }\n }\n return this.exitTool();\n }\n}\n\n/** A tool that performs a Window-area view operation\n * @public\n */\nexport class WindowAreaTool extends ViewTool {\n public static override toolId = \"View.WindowArea\";\n public static override iconSpec = \"icon-window-area\";\n private _haveFirstPoint: boolean = false;\n private _firstPtWorld: Point3d = Point3d.create();\n private _secondPtWorld: Point3d = Point3d.create();\n private _lastPtView?: Point3d;\n private _corners = [new Point3d(), new Point3d()];\n private _shapePts = [new Point3d(), new Point3d(), new Point3d(), new Point3d(), new Point3d()];\n private _fillColor = ColorDef.from(0, 0, 255, 200);\n\n public override async onPostInstall() {\n await super.onPostInstall();\n this.provideToolAssistance();\n }\n\n public override async onReinitialize() {\n this._haveFirstPoint = false;\n this._firstPtWorld.setZero();\n this._secondPtWorld.setZero();\n this.provideToolAssistance();\n }\n\n public override async onResetButtonUp(ev: BeButtonEvent): Promise<EventHandled> {\n if (this._haveFirstPoint) {\n await this.onReinitialize();\n return EventHandled.Yes;\n }\n\n return super.onResetButtonUp(ev);\n }\n\n public provideToolAssistance(): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(this._haveFirstPoint ? \"WindowArea.Prompts.NextPoint\" : \"WindowArea.Prompts.FirstPoint\"));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = CoreTools.translate(\"ElementSet.Inputs.AcceptPoint\");\n const restartMsg = CoreTools.translate(\"ElementSet.Inputs.Restart\");\n const exitMsg = CoreTools.translate(\"ElementSet.Inputs.Exit\");\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchDrag, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, exitMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, this._haveFirstPoint ? restartMsg : exitMsg, false, ToolAssistanceInputMethod.Mouse));\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (undefined === ev.viewport)\n return EventHandled.Yes;\n\n if (undefined === this.viewport) {\n this.viewport = ev.viewport;\n } else if (!ev.viewport.view.hasSameCoordinates(this.viewport.view)) {\n if (this._haveFirstPoint)\n return EventHandled.Yes;\n this.viewport = ev.viewport;\n this._lastPtView = ev.viewPoint;\n IModelApp.viewManager.invalidateDecorationsAllViews();\n return EventHandled.Yes;\n }\n\n if (this._haveFirstPoint) {\n this._secondPtWorld.setFrom(ev.point);\n this.doManipulation(ev, false);\n await this.onReinitialize();\n this.viewport.invalidateDecorations();\n } else {\n this._firstPtWorld.setFrom(ev.point);\n this._secondPtWorld.setFrom(this._firstPtWorld);\n this._haveFirstPoint = true;\n this._lastPtView = ev.viewPoint;\n this.provideToolAssistance();\n }\n\n return EventHandled.Yes;\n }\n\n public override async onMouseMotion(ev: BeButtonEvent) { this.doManipulation(ev, true); }\n public override async onTouchTap(ev: BeTouchEvent): Promise<EventHandled> { return ev.isSingleTap ? EventHandled.Yes : EventHandled.No; } // Prevent IdleTool from converting single tap into data button down/up...\n public override async onTouchMoveStart(ev: BeTouchEvent, startEv: BeTouchEvent): Promise<EventHandled> {\n if (!this._haveFirstPoint && startEv.isSingleTouch)\n await IModelApp.toolAdmin.convertTouchMoveStartToButtonDownAndMotion(startEv, ev);\n\n return this._haveFirstPoint ? EventHandled.Yes : EventHandled.No;\n }\n\n public override async onTouchMove(ev: BeTouchEvent): Promise<void> {\n if (this._haveFirstPoint)\n return IModelApp.toolAdmin.convertTouchMoveToMotion(ev);\n }\n\n public override async onTouchComplete(ev: BeTouchEvent): Promise<void> {\n if (this._haveFirstPoint)\n return IModelApp.toolAdmin.convertTouchEndToButtonUp(ev);\n }\n\n public override async onTouchCancel(ev: BeTouchEvent): Promise<void> {\n if (this._haveFirstPoint)\n return IModelApp.toolAdmin.convertTouchEndToButtonUp(ev, BeButton.Reset);\n }\n\n private computeWindowCorners(): Point3d[] | undefined {\n const vp = this.viewport!;\n const corners = this._corners;\n\n corners[0].setFrom(this._firstPtWorld);\n corners[1].setFrom(this._secondPtWorld);\n vp.worldToViewArray(corners);\n\n const delta = corners[1].minus(corners[0]);\n if (delta.magnitudeXY() < vp.pixelsFromInches(ToolSettings.startDragDistanceInches))\n return undefined;\n\n const currentDelta = vp.viewDelta;\n if (currentDelta.x === 0 || delta.x === 0)\n return undefined;\n\n const skew = vp.view.getAspectRatioSkew();\n const viewAspect = skew * currentDelta.y / currentDelta.x;\n const aspectRatio = Math.abs(delta.y / delta.x);\n\n let halfDeltaX;\n let halfDeltaY;\n if (aspectRatio < viewAspect) {\n halfDeltaX = Math.abs(delta.x) / 2.0;\n halfDeltaY = halfDeltaX * viewAspect;\n } else {\n halfDeltaY = Math.abs(delta.y) / 2.0;\n halfDeltaX = halfDeltaY / viewAspect;\n }\n\n const center = corners[0].plusScaled(delta, 0.5);\n corners[0].x = center.x - halfDeltaX;\n corners[0].y = center.y - halfDeltaY;\n corners[1].x = center.x + halfDeltaX;\n corners[1].y = center.y + halfDeltaY;\n return corners;\n }\n\n public override decorate(context: DecorateContext): void {\n if (undefined === this.viewport || !context.viewport.view.hasSameCoordinates(this.viewport.view))\n return;\n const vp = this.viewport;\n const color = vp.getContrastToBackgroundColor();\n if (this._haveFirstPoint) {\n const corners = this.computeWindowCorners();\n if (undefined === corners)\n return;\n\n this._shapePts[0].x = this._shapePts[3].x = corners[0].x;\n this._shapePts[1].x = this._shapePts[2].x = corners[1].x;\n this._shapePts[0].y = this._shapePts[1].y = corners[0].y;\n this._shapePts[2].y = this._shapePts[3].y = corners[1].y;\n this._shapePts[0].z = this._shapePts[1].z = this._shapePts[2].z = this._shapePts[3].z = corners[0].z;\n this._shapePts[4].setFrom(this._shapePts[0]);\n vp.viewToWorldArray(this._shapePts);\n\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n\n builder.setBlankingFill(this._fillColor);\n builder.addShape(this._shapePts);\n\n builder.setSymbology(color, color, ViewHandleWeight.Thin);\n builder.addLineString(this._shapePts);\n\n builder.setSymbology(color, color, ViewHandleWeight.FatDot);\n builder.addPointString([this._firstPtWorld]);\n\n context.addDecorationFromBuilder(builder);\n return;\n }\n\n if (undefined === this._lastPtView || context.viewport !== IModelApp.toolAdmin.cursorView)\n return; // Full screen cross-hair only displays in cursor view...\n\n const cursorPt = this._lastPtView.clone();\n cursorPt.x = Math.floor(cursorPt.x) + 0.5;\n cursorPt.y = Math.floor(cursorPt.y) + 0.5;\n const viewRect = vp.viewRect;\n\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\n ctx.beginPath();\n ctx.strokeStyle = (ColorDef.black === color ? \"black\" : \"white\");\n ctx.lineWidth = 1;\n ctx.moveTo(viewRect.left, cursorPt.y);\n ctx.lineTo(viewRect.right, cursorPt.y);\n ctx.moveTo(cursorPt.x, viewRect.top);\n ctx.lineTo(cursorPt.x, viewRect.bottom);\n ctx.stroke();\n };\n context.addCanvasDecoration({ drawDecoration });\n }\n\n private doManipulation(ev: BeButtonEvent, inDynamics: boolean): void {\n this._secondPtWorld.setFrom(ev.point);\n if (inDynamics) {\n if (undefined !== this.viewport && undefined !== ev.viewport && !ev.viewport.view.hasSameCoordinates(this.viewport.view)) {\n this._lastPtView = undefined;\n return;\n }\n this._lastPtView = ev.viewPoint;\n IModelApp.viewManager.invalidateDecorationsAllViews();\n return;\n }\n\n const corners = this.computeWindowCorners();\n if (undefined === corners)\n return;\n\n let delta: Vector3d;\n const vp = this.viewport!;\n const view = vp.view;\n vp.viewToWorldArray(corners);\n\n const opts: OnViewExtentsError = {\n onExtentsError: (stat) => view.outputStatusMessage(stat),\n };\n\n let globalAlignment;\n if (view.is3d() && view.isCameraOn) {\n const windowArray: Point3d[] = [corners[0].clone(), corners[1].clone()];\n vp.worldToViewArray(windowArray);\n\n const windowRange = new ViewRect(windowArray[0].x, windowArray[0].y, windowArray[1].x, windowArray[1].y);\n\n let npcZValues = vp.determineVisibleDepthRange(windowRange);\n if (undefined === npcZValues)\n npcZValues = { minimum: 0, maximum: ViewManip.getFocusPlaneNpc(vp) };\n\n const lensAngle = view.getLensAngle();\n\n vp.worldToNpcArray(corners);\n corners[0].z = corners[1].z = npcZValues.maximum;\n\n vp.npcToWorldArray(corners); // Put corners back in world at correct depth\n const viewPts: Point3d[] = [corners[0].clone(), corners[1].clone()];\n vp.rotation.multiplyVectorArrayInPlace(viewPts); // rotate to view orientation to get extents\n\n const range = Range3d.createArray(viewPts);\n delta = Vector3d.createStartEnd(range.low, range.high);\n\n const focusDist = delta.x / (2.0 * Math.tan(lensAngle.radians / 2));\n\n const newTarget = corners[0].interpolate(.5, corners[1]);\n const newEye = newTarget.plusScaled(view.getZVector(), focusDist);\n\n if (ViewStatus.Success !== view.lookAt({ eyePoint: newEye, targetPoint: newTarget, upVector: view.getYVector(), lensAngle, opts }))\n return;\n globalAlignment = { target: newTarget };\n } else {\n const rot = vp.rotation;\n rot.multiplyVectorArrayInPlace(corners);\n\n const range = Range3d.createArray(corners);\n delta = Vector3d.createStartEnd(range.low, range.high);\n // get the view extents\n delta.z = view.getExtents().z;\n\n const originVec = rot.multiplyTransposeXYZ(range.low.x, range.low.y, range.low.z);\n\n // make sure its not too big or too small\n const stat = view.adjustViewDelta(delta, originVec, rot, vp.viewRect.aspect, opts);\n if (stat !== ViewStatus.Success)\n return;\n\n view.setExtents(delta);\n view.setOrigin(originVec);\n if (view.is3d())\n globalAlignment = { target: range.center };\n }\n\n vp.synchWithView({ animateFrustumChange: true, globalAlignment });\n }\n}\n\n/** @internal */\nexport class DefaultViewTouchTool extends ViewManip implements Animator {\n public static override toolId = \"\"; // touch tools installed by IdleTool are never registered\n private readonly _lastPtView = new Point3d();\n private readonly _startPtWorld = new Point3d();\n private readonly _startPtView = new Point3d();\n private readonly _frustum = new Frustum();\n private _startDirection!: Vector2d;\n private _startDistance = 0.0;\n private _startTouchCount = 0;\n private _inertiaVec?: Vector3d;\n private _singleTouch = false;\n private _duration!: BeDuration;\n private _end!: BeTimePoint;\n private _rotate2dDisabled = false;\n private _rotate2dThreshold?: Angle;\n private _only2dManipulations = false;\n\n /** Move this handle during the inertia duration */\n public animate(): boolean {\n if (undefined === this._inertiaVec)\n return true; // handle was removed\n\n // get the fraction of the inertia duration that remains. The decay is a combination of the number of iterations (see damping below)\n // and time. That way the handle slows down even if the framerate is lower.\n const remaining = ((this._end.milliseconds - BeTimePoint.now().milliseconds) / this._duration.milliseconds);\n const pt = this._lastPtView.plusScaled(this._inertiaVec, remaining);\n const vec = this._lastPtView.minus(pt);\n\n // if we're not moving any more, or if the duration has elapsed, we're done\n if (remaining <= 0 || (vec.magnitudeSquared() < .000001)) {\n this.viewport!.saveViewUndo();\n return true; // remove this as the animator\n }\n\n this._lastPtView.setFrom(pt);\n this.perform();\n inertialDampen(this._inertiaVec);\n return false;\n }\n\n public interrupt() { }\n\n constructor(startEv: BeTouchEvent, ev: BeTouchEvent, only2dManipulations = false) {\n super(startEv.viewport, 0, true, false);\n this._only2dManipulations = only2dManipulations;\n this.onStart(ev);\n }\n\n public onStart(ev: BeTouchEvent): void {\n const vp = this.viewport!;\n vp.getWorldFrustum(this._frustum);\n\n const visiblePoint = vp.pickNearestVisibleGeometry(ev.rawPoint);\n if (undefined !== visiblePoint) {\n this._startPtWorld.setFrom(visiblePoint);\n vp.worldToView(this._startPtWorld, this._startPtView);\n } else {\n this._startPtView.setFrom(ev.viewPoint);\n this._startPtView.z = vp.worldToView(ViewManip.getDefaultTargetPointWorld(vp)).z;\n vp.viewToWorld(this._startPtView, this._startPtWorld);\n }\n this._rotate2dDisabled = false;\n this._rotate2dThreshold = undefined;\n this._lastPtView.setFrom(this._startPtView);\n this._startTouchCount = ev.touchCount;\n this._startDirection = (2 <= ev.touchCount ? Vector2d.createStartEnd(BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[0], vp), BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[1], vp)) : Vector2d.createZero());\n this._startDistance = (2 === ev.touchCount ? this._startDirection.magnitude() : 0.0);\n }\n\n private computeZoomRatio(ev?: BeTouchEvent): number {\n if (undefined === ev || 0.0 === this._startDistance)\n return 1.0;\n\n const vp = this.viewport!;\n const distance = (2 === ev.touchCount ? BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[0], vp).distance(BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[1], vp)) : 0.0);\n const threshold = this.viewport!.pixelsFromInches(ToolSettings.touchZoomChangeThresholdInches);\n\n if (0.0 === distance || Math.abs(this._startDistance - distance) < threshold)\n return 1.0;\n\n // Remove inertia if the viewing operation includes zoom, only use it for pan and rotate.\n this._inertiaVec = undefined;\n const adjustedDist = (distance > this._startDistance ? (distance - threshold) : (distance + threshold)); // Avoid sudden jump in zoom scale by subtracting zoom threshold distance...\n return Geometry.clamp(this._startDistance / adjustedDist, .1, 10);\n }\n\n private computeRotation(ev?: BeTouchEvent): Angle {\n if (undefined === ev || ev.touchCount < 2 || this._rotate2dDisabled)\n return Angle.createDegrees(0.0);\n\n const vp = this.viewport!;\n const direction = Vector2d.createStartEnd(BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[0], vp), BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[1], vp));\n const rotation = this._startDirection.angleTo(direction);\n\n if (undefined === this._rotate2dThreshold) {\n if (Math.abs(rotation.radians) < Angle.createDegrees(5.0).radians)\n return Angle.createDegrees(0.0); // Check against threshold until sufficient rotation is detected...\n\n const angularDistance = Math.abs(direction.magnitude() / 2.0 * Math.sin(Math.abs(rotation.radians)));\n const zoomDistance = Math.abs(direction.magnitude() - this._startDirection.magnitude());\n const panDistance = this._startPtView.distanceXY(this._lastPtView);\n\n // NOTE: The * 0.75 below is because it's easy to confuse an attempted rotate for an attempted pan or zoom, and this tries to balance that without having a false positive in the opposite direction.\n if (angularDistance < (zoomDistance * 0.75) || angularDistance < (panDistance * 0.75)) {\n this._rotate2dDisabled = true; // Restrict subsequent view changes to pan and zoom only...\n return Angle.createDegrees(0.0);\n }\n\n this._rotate2dThreshold = Angle.createRadians(-rotation.radians);\n }\n\n return Angle.createRadians(rotation.radians + this._rotate2dThreshold.radians); // Avoid jump when starting rotation...\n }\n\n private handle2dPan() {\n const screenDist = Point2d.create(this._startPtView.x - this._lastPtView.x, this._startPtView.y - this._lastPtView.y);\n this.viewport!.scroll(screenDist, { noSaveInUndo: true });\n }\n\n private handle2dRotateZoom(ev?: BeTouchEvent): void {\n const vp = this.viewport!;\n const rotation = this.computeRotation(ev);\n const zoomRatio = this.computeZoomRatio(ev);\n const targetWorld = vp.viewToWorld(this._lastPtView);\n const translateTransform = Transform.createTranslation(this._startPtWorld.minus(targetWorld));\n const rotationTransform = Transform.createFixedPointAndMatrix(targetWorld, Matrix3d.createRotationAroundVector(vp.view.getZVector(), rotation)!);\n const scaleTransform = Transform.createScaleAboutPoint(this._startPtWorld, zoomRatio);\n const transform = translateTransform.multiplyTransformTransform(rotationTransform);\n\n scaleTransform.multiplyTransformTransform(transform, transform);\n const frustum = this._frustum.transformBy(transform);\n vp.setupViewFromFrustum(frustum);\n }\n\n private handle3dRotate(): void {\n const vp = this.viewport!;\n const viewRect = vp.viewRect;\n const xExtent = viewRect.width;\n const yExtent = viewRect.height;\n const xDelta = this._lastPtView.x - this._startPtView.x;\n const yDelta = this._lastPtView.y - this._startPtView.y;\n\n const xAxis = ToolSettings.preserveWorldUp ? Vector3d.unitZ() : vp.rotation.getRow(1);\n const yAxis = vp.rotation.getRow(0);\n const xRMatrix = (0.0 !== xDelta) ? Matrix3d.createRotationAroundVector(xAxis, Angle.createRadians(Math.PI / (xExtent / xDelta)))! : Matrix3d.identity;\n const yRMatrix = (0.0 !== yDelta) ? Matrix3d.createRotationAroundVector(yAxis, Angle.createRadians(Math.PI / (yExtent / yDelta)))! : Matrix3d.identity;\n const worldRMatrix = yRMatrix.multiplyMatrixMatrix(xRMatrix);\n\n const result = worldRMatrix.getAxisAndAngleOfRotation();\n const radians = Angle.createRadians(-result.angle.radians);\n const worldAxis = result.axis;\n\n const rotationMatrix = Matrix3d.createRotationAroundVector(worldAxis, radians);\n if (undefined === rotationMatrix)\n return;\n\n const worldTransform = Transform.createFixedPointAndMatrix(this._startPtWorld, rotationMatrix);\n const frustum = this._frustum.transformBy(worldTransform);\n vp.setupViewFromFrustum(frustum);\n }\n\n private handle3dPanZoom(ev?: BeTouchEvent): void {\n const vp = this.viewport!;\n const zoomRatio = this.computeZoomRatio(ev);\n\n if (vp.isCameraOn) {\n const targetWorld = vp.viewToWorld(this._lastPtView);\n const preTrans = Transform.createTranslationXYZ(-targetWorld.x, -targetWorld.y, -targetWorld.z);\n const postTrans = Transform.createTranslation(this._startPtWorld);\n\n preTrans.origin.scaleInPlace(zoomRatio);\n preTrans.matrix.scale(zoomRatio, preTrans.matrix);\n const cameraTransform = postTrans.multiplyTransformTransform(preTrans);\n\n const view = vp.view as ViewState3d;\n const oldEyePoint = view.getEyePoint();\n const newEyePoint = cameraTransform.multiplyPoint3d(oldEyePoint);\n const cameraOffset = newEyePoint.minus(oldEyePoint);\n const cameraOffsetTransform = Transform.createTranslation(cameraOffset);\n\n const frustum = this._frustum.transformBy(cameraOffsetTransform);\n vp.setupViewFromFrustum(frustum);\n return;\n }\n\n const targetNpc = vp.viewToNpc(this._lastPtView);\n const transform = Transform.createFixedPointAndMatrix(targetNpc, Matrix3d.createScale(zoomRatio, zoomRatio, 1.0));\n const viewCenter = Point3d.create(.5, .5, .5);\n const startPtNpc = vp.viewToNpc(this._startPtView);\n const shift = startPtNpc.minus(targetNpc);\n shift.z = 0.0;\n const offset = Transform.createTranslation(shift);\n\n offset.multiplyTransformTransform(transform, transform);\n transform.multiplyPoint3d(viewCenter, viewCenter);\n vp.npcToWorld(viewCenter, viewCenter);\n vp.zoom(viewCenter, zoomRatio, { noSaveInUndo: true });\n }\n\n private handleEvent(ev: BeTouchEvent): void {\n if (undefined === this.viewport)\n return;\n\n if (this._startTouchCount !== ev.touchCount) {\n this.onStart(ev);\n return;\n }\n\n this._inertiaVec = undefined;\n const thisPt = ev.viewPoint;\n const smallDistance = 2.0;\n const samePoint = this._lastPtView.isAlmostEqualXY(thisPt, smallDistance);\n if (1 === ev.touchCount && samePoint)\n return; // Don't early return if multi-touch, center doesn't have to move for zoom...\n\n if (this._startPtView.isAlmostEqualXY(thisPt, smallDistance)) {\n this._lastPtView.setFrom(this._startPtView);\n } else {\n if (!samePoint) {\n this._inertiaVec = this._lastPtView.vectorTo(thisPt);\n this._inertiaVec.z = 0;\n }\n this._singleTouch = ev.isSingleTouch;\n this._lastPtView.setFrom(thisPt);\n this._lastPtView.z = this._startPtView.z;\n }\n this.perform(ev);\n }\n\n private perform(ev?: BeTouchEvent) {\n const vp = this.viewport!;\n vp.setupViewFromFrustum(this._frustum);\n\n const singleTouch = this._singleTouch;\n return (!this._only2dManipulations && vp.view.allow3dManipulations()) ?\n singleTouch ? this.handle3dRotate() : this.handle3dPanZoom(ev) :\n singleTouch ? this.handle2dPan() : this.handle2dRotateZoom(ev);\n }\n\n public override async onDataButtonDown(_ev: BeButtonEvent) { return EventHandled.Yes; }\n public override async onDataButtonUp(_ev: BeButtonEvent) { return EventHandled.Yes; }\n public override async onTouchStart(ev: BeTouchEvent): Promise<void> {\n if (undefined !== this.viewport)\n this.onStart(ev);\n }\n public override async onTouchMove(ev: BeTouchEvent): Promise<void> {\n this.handleEvent(ev);\n }\n public override async onTouchCancel(_ev: BeTouchEvent): Promise<void> { return this.exitTool(); }\n public override async onTouchComplete(_ev: BeTouchEvent): Promise<void> {\n // if we were moving when the touch ended, add inertia to the viewing operation\n if (this._inertiaVec) {\n this._duration = ToolSettings.viewingInertia.duration;\n if (this._duration.isTowardsFuture) { // ensure duration is towards future. Otherwise, don't start animation\n this._end = BeTimePoint.fromNow(this._duration);\n this.viewport!.setAnimator(this);\n }\n }\n\n return this.exitTool();\n }\n}\n\n/** A tool that performs view undo operation. An application could also just call Viewport.doUndo directly, creating a ViewTool isn't required.\n * @public\n */\nexport class ViewUndoTool extends ViewTool {\n public static override toolId = \"View.Undo\";\n public static override iconSpec = \"icon-window-backward\";\n\n public override async onPostInstall() {\n if (this.viewport)\n this.viewport.doUndo(ScreenViewport.animation.time.normal);\n return this.exitTool();\n }\n}\n\n/** A tool that performs view redo operation. An application could also just call Viewport.doRedo directly, creating a ViewTool isn't required.\n * @public\n */\nexport class ViewRedoTool extends ViewTool {\n public static override toolId = \"View.Redo\";\n public static override iconSpec = \"icon-window-forward\";\n\n public override async onPostInstall() {\n if (this.viewport)\n this.viewport.doRedo(ScreenViewport.animation.time.normal);\n return this.exitTool();\n }\n}\n\n/** A tool that toggles the camera on/off in a spatial view\n * @public\n */\nexport class ViewToggleCameraTool extends ViewTool {\n public static override toolId = \"View.ToggleCamera\";\n public static override iconSpec = \"icon-camera\";\n\n public override async onInstall(): Promise<boolean> { return (undefined !== this.viewport && this.viewport.view.allow3dManipulations()); }\n\n public override async onPostInstall() {\n if (this.viewport) {\n const vp = this.viewport;\n if (vp.isCameraOn)\n (vp.view as ViewState3d).turnCameraOff();\n else\n vp.turnCameraOn();\n\n vp.synchWithView();\n }\n return this.exitTool();\n }\n}\n\n/** A tool that sets the view camera by two points. This is a PrimitiveTool and not a ViewTool to allow the view to be panned, zoomed, and rotated while defining the points.\n * To show tool settings for specifying camera and target heights above the snap point, make sure formatting and parsing data are cached before the tool starts\n * by calling QuantityFormatter.onInitialized at app startup.\n * @public\n */\nexport class SetupCameraTool extends PrimitiveTool {\n public static override toolId = \"View.SetupCamera\";\n public static override iconSpec = \"icon-camera-location\";\n public viewport?: ScreenViewport;\n protected _haveEyePt: boolean = false;\n protected _eyePtWorld: Point3d = Point3d.create();\n protected _targetPtWorld: Point3d = Point3d.create();\n\n public override isCompatibleViewport(vp: Viewport | undefined, isSelectedViewChange: boolean): boolean { return (super.isCompatibleViewport(vp, isSelectedViewChange) && undefined !== vp && vp.view.allow3dManipulations()); }\n public override isValidLocation(_ev: BeButtonEvent, _isButtonEvent: boolean): boolean { return true; }\n public override requireWriteableTarget(): boolean { return false; }\n public override async onPostInstall() {\n await super.onPostInstall();\n this.setupAndPromptForNextAction();\n }\n\n public override async onUnsuspend() { this.provideToolAssistance(); }\n protected setupAndPromptForNextAction(): void {\n IModelApp.accuSnap.enableSnap(true);\n this.provideToolAssistance();\n }\n\n public override async onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled> {\n if (this._haveEyePt)\n await this.onReinitialize();\n else\n await this.exitTool();\n\n return EventHandled.Yes;\n }\n\n protected provideToolAssistance(): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(this._haveEyePt ? \"SetupCamera.Prompts.NextPoint\" : \"SetupCamera.Prompts.FirstPoint\"));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = CoreTools.translate(\"ElementSet.Inputs.AcceptPoint\");\n const rejectMsg = CoreTools.translate(this._haveEyePt ? \"ElementSet.Inputs.Restart\" : \"ElementSet.Inputs.Exit\");\n if (!ToolAssistance.createTouchCursorInstructions(touchInstructions))\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, rejectMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, rejectMsg, false, ToolAssistanceInputMethod.Mouse));\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n\n public async onRestartTool(): Promise<void> {\n const tool = new SetupCameraTool();\n if (!await tool.run())\n return this.exitTool();\n }\n\n protected getAdjustedEyePoint() { return this.useCameraHeight ? this._eyePtWorld.plusScaled(Vector3d.unitZ(), this.cameraHeight) : this._eyePtWorld; }\n protected getAdjustedTargetPoint() { return this.useTargetHeight ? this._targetPtWorld.plusScaled(Vector3d.unitZ(), this.targetHeight) : this._targetPtWorld; }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (undefined === ev.viewport) {\n return EventHandled.Yes;\n } else if (undefined === this.viewport) {\n if (!ev.viewport.view.allow3dManipulations())\n return EventHandled.Yes;\n this.viewport = ev.viewport;\n } else if (this.viewport.view.iModel !== ev.viewport.view.iModel) {\n if (this._haveEyePt)\n return EventHandled.Yes;\n this.viewport = ev.viewport;\n return EventHandled.Yes;\n }\n\n if (this._haveEyePt) {\n this._targetPtWorld.setFrom(ev.point);\n this.doManipulation();\n await this.onReinitialize();\n } else {\n this._eyePtWorld.setFrom(ev.point);\n this._targetPtWorld.setFrom(this._eyePtWorld);\n this._haveEyePt = true;\n this.setupAndPromptForNextAction();\n }\n\n return EventHandled.Yes;\n }\n\n public override async onMouseMotion(ev: BeButtonEvent) {\n if (!this._haveEyePt)\n return;\n this._targetPtWorld.setFrom(ev.point);\n IModelApp.viewManager.invalidateDecorationsAllViews();\n }\n\n public static drawCameraFrustum(context: DecorateContext, vp: ScreenViewport, eyePtWorld: Point3d, targetPtWorld: Point3d, eyeSnapPtWorld?: Point3d, targetSnapPtWorld?: Point3d) {\n if (!vp.view.is3d() || vp.view.iModel !== context.viewport.view.iModel)\n return;\n\n const zVec = Vector3d.createStartEnd(eyePtWorld, targetPtWorld);\n const focusDist = zVec.normalizeWithLength(zVec).mag;\n if (focusDist <= Constant.oneMillimeter) // eye and target are too close together\n return;\n\n const xVec = new Vector3d();\n const yVec = Vector3d.unitZ();\n if (yVec.crossProduct(zVec).normalizeWithLength(xVec).mag < Geometry.smallMetricDistance)\n return;\n if (zVec.crossProduct(xVec).normalizeWithLength(yVec).mag < Geometry.smallMetricDistance)\n return;\n\n const lensAngle = ToolSettings.walkCameraAngle;\n const extentX = Math.tan(lensAngle.radians / 2.0) * focusDist;\n const extentY = extentX * (vp.view.extents.y / vp.view.extents.x);\n\n const pt1 = targetPtWorld.plusScaled(xVec, -extentX);\n pt1.plusScaled(yVec, extentY, pt1);\n const pt2 = targetPtWorld.plusScaled(xVec, extentX);\n pt2.plusScaled(yVec, extentY, pt2);\n const pt3 = targetPtWorld.plusScaled(xVec, extentX);\n pt3.plusScaled(yVec, -extentY, pt3);\n const pt4 = targetPtWorld.plusScaled(xVec, -extentX);\n pt4.plusScaled(yVec, -extentY, pt4);\n\n const color = EditManipulator.HandleUtils.adjustForBackgroundColor(ColorDef.black, vp);\n const builderHid = context.createGraphicBuilder(GraphicType.WorldOverlay);\n\n builderHid.setSymbology(color, color, ViewHandleWeight.Bold);\n builderHid.addLineString([eyePtWorld, targetPtWorld]);\n\n builderHid.setSymbology(color, color, ViewHandleWeight.Thin, LinePixels.Code2);\n builderHid.addLineString([eyePtWorld, pt1]);\n builderHid.addLineString([eyePtWorld, pt2]);\n builderHid.addLineString([eyePtWorld, pt3]);\n builderHid.addLineString([eyePtWorld, pt4]);\n builderHid.addLineString([pt1, pt2, pt3, pt4, pt1]);\n\n if (eyeSnapPtWorld)\n builderHid.addLineString([eyeSnapPtWorld, eyePtWorld]);\n if (targetSnapPtWorld)\n builderHid.addLineString([targetSnapPtWorld, targetPtWorld]);\n\n builderHid.setSymbology(color, color, ViewHandleWeight.FatDot);\n builderHid.addPointString([eyePtWorld, targetPtWorld]);\n\n if (eyeSnapPtWorld)\n builderHid.addPointString([eyeSnapPtWorld]);\n if (targetSnapPtWorld)\n builderHid.addPointString([targetSnapPtWorld]);\n\n context.addDecorationFromBuilder(builderHid);\n\n const backColor = ColorDef.from(0, 0, 255, 200);\n const sideColor = context.viewport.hilite.color.withAlpha(25);\n const builderVis = context.createGraphicBuilder(GraphicType.WorldDecoration);\n\n builderVis.setSymbology(color, color, ViewHandleWeight.Normal);\n builderVis.addLineString([eyePtWorld, pt1]);\n builderVis.addLineString([eyePtWorld, pt2]);\n builderVis.addLineString([eyePtWorld, pt3]);\n builderVis.addLineString([eyePtWorld, pt4]);\n builderVis.addLineString([pt1, pt2, pt3, pt4, pt1]);\n\n builderVis.setSymbology(color, backColor, ViewHandleWeight.Thin);\n builderVis.addShape([pt1, pt2, pt3, pt4]);\n\n builderVis.setSymbology(color, sideColor, ViewHandleWeight.Thin);\n builderVis.addShape([eyePtWorld, pt1, pt2]);\n builderVis.addShape([eyePtWorld, pt2, pt3]);\n builderVis.addShape([eyePtWorld, pt3, pt4]);\n builderVis.addShape([eyePtWorld, pt4, pt1]);\n\n context.addDecorationFromBuilder(builderVis);\n }\n\n public override decorate(context: DecorateContext): void {\n if (!this._haveEyePt || undefined === this.viewport)\n return;\n SetupCameraTool.drawCameraFrustum(context, this.viewport, this.getAdjustedEyePoint(), this.getAdjustedTargetPoint(), this.useCameraHeight ? this._eyePtWorld : undefined, this.useTargetHeight ? this._targetPtWorld : undefined);\n }\n\n public override decorateSuspended(context: DecorateContext): void { this.decorate(context); }\n\n private doManipulation(): void {\n const vp = this.viewport;\n if (undefined === vp)\n return;\n\n const view = vp.view;\n if (!view.is3d() || !view.allow3dManipulations())\n return;\n\n const eyePoint = this.getAdjustedEyePoint();\n const targetPoint = this.getAdjustedTargetPoint();\n const lensAngle = ToolSettings.walkCameraAngle;\n if (ViewStatus.Success !== view.lookAt({ eyePoint, targetPoint, upVector: Vector3d.unitZ(), lensAngle }))\n return;\n\n vp.synchWithView({ animateFrustumChange: true });\n }\n\n private _useCameraHeightProperty: DialogProperty<boolean> | undefined;\n public get useCameraHeightProperty() {\n if (!this._useCameraHeightProperty)\n this._useCameraHeightProperty = new DialogProperty<boolean>(\n PropertyDescriptionHelper.buildLockPropertyDescription(\"useCameraHeight\"), false, undefined, false);\n return this._useCameraHeightProperty;\n }\n public get useCameraHeight(): boolean { return this.useCameraHeightProperty.value; }\n public set useCameraHeight(option: boolean) { this.useCameraHeightProperty.value = option; }\n\n private _cameraHeightProperty: DialogProperty<number> | undefined;\n public get cameraHeightProperty() {\n if (!this._cameraHeightProperty)\n this._cameraHeightProperty = new DialogProperty<number>(new LengthDescription(\"cameraHeight\", ViewTool.translate(\"SetupCamera.Labels.CameraHeight\")),\n 0.0, undefined, !this.useCameraHeight);\n return this._cameraHeightProperty;\n }\n public get cameraHeight(): number { return this.cameraHeightProperty.value; }\n public set cameraHeight(value: number) { this.cameraHeightProperty.value = value; }\n\n private _useTargetHeightProperty: DialogProperty<boolean> | undefined;\n public get useTargetHeightProperty() {\n if (!this._useTargetHeightProperty)\n this._useTargetHeightProperty = new DialogProperty<boolean>(\n PropertyDescriptionHelper.buildLockPropertyDescription(\"useTargetHeight\"), false, undefined, false);\n return this._useTargetHeightProperty;\n }\n public get useTargetHeight(): boolean { return this.useTargetHeightProperty.value; }\n public set useTargetHeight(value: boolean) { this.useTargetHeightProperty.value = value; }\n\n private _targetHeightProperty: DialogProperty<number> | undefined;\n public get targetHeightProperty() {\n if (!this._targetHeightProperty)\n this._targetHeightProperty = new DialogProperty<number>(new LengthDescription(\"targetHeight\", ViewTool.translate(\"SetupCamera.Labels.TargetHeight\")),\n 0.0, undefined, !this.useTargetHeight);\n return this._targetHeightProperty;\n }\n public get targetHeight(): number { return this.targetHeightProperty.value; }\n public set targetHeight(value: number) { this.targetHeightProperty.value = value; }\n\n private syncCameraHeightState(): void {\n this.cameraHeightProperty.displayValue = (this.cameraHeightProperty.description as LengthDescription).format(this.cameraHeight);\n this.cameraHeightProperty.isDisabled = !this.useCameraHeight;\n this.syncToolSettingsProperties([this.cameraHeightProperty.syncItem]);\n }\n\n private syncTargetHeightState(): void {\n this.targetHeightProperty.displayValue = (this.targetHeightProperty.description as LengthDescription).format(this.targetHeight);\n this.targetHeightProperty.isDisabled = !this.useTargetHeight;\n this.syncToolSettingsProperties([this.targetHeightProperty.syncItem]);\n }\n\n public override async applyToolSettingPropertyChange(updatedValue: DialogPropertySyncItem): Promise<boolean> {\n if (updatedValue.propertyName === this.useCameraHeightProperty.name) {\n this.useCameraHeight = updatedValue.value.value as boolean;\n IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, this.useCameraHeightProperty.item);\n this.syncCameraHeightState();\n } else if (updatedValue.propertyName === this.useTargetHeightProperty.name) {\n this.useTargetHeight = updatedValue.value.value as boolean;\n IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, this.useTargetHeightProperty.item);\n this.syncTargetHeightState();\n } else if (updatedValue.propertyName === this.cameraHeightProperty.name) {\n this.cameraHeight = updatedValue.value.value as number;\n IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, this.cameraHeightProperty.item);\n } else if (updatedValue.propertyName === this.targetHeightProperty.name) {\n this.targetHeight = updatedValue.value.value as number;\n IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, this.targetHeightProperty.item);\n }\n return true;\n }\n\n public override supplyToolSettingsProperties(): DialogItem[] | undefined {\n // load latest values from session\n IModelApp.toolAdmin.toolSettingsState.getInitialToolSettingValues(this.toolId,\n [\n this.useCameraHeightProperty.name, this.useTargetHeightProperty.name, this.cameraHeightProperty.name, this.targetHeightProperty.name,\n ])\n ?.forEach((value) => {\n if (value.propertyName === this.useCameraHeightProperty.name)\n this.useCameraHeightProperty.dialogItemValue = value.value;\n else if (value.propertyName === this.cameraHeightProperty.name)\n this.cameraHeightProperty.dialogItemValue = value.value;\n else if (value.propertyName === this.useTargetHeightProperty.name)\n this.useTargetHeightProperty.dialogItemValue = value.value;\n else if (value.propertyName === this.targetHeightProperty.name)\n this.targetHeightProperty.dialogItemValue = value.value;\n });\n\n // ensure controls are enabled/disabled base on current lock property state\n this.targetHeightProperty.isDisabled = !this.useTargetHeight;\n this.cameraHeightProperty.isDisabled = !this.useCameraHeight;\n\n const cameraHeightLock = this.useCameraHeightProperty.toDialogItem({ rowPriority: 1, columnIndex: 0 });\n const targetHeightLock = this.useTargetHeightProperty.toDialogItem({ rowPriority: 2, columnIndex: 0 });\n\n const toolSettings = new Array<DialogItem>();\n toolSettings.push(this.cameraHeightProperty.toDialogItem({ rowPriority: 1, columnIndex: 1 }, cameraHeightLock));\n toolSettings.push(this.targetHeightProperty.toDialogItem({ rowPriority: 2, columnIndex: 1 }, targetHeightLock));\n return toolSettings;\n }\n}\n\n/** A tool that sets a walk tool starting position by a floor point and look direction. This is a PrimitiveTool and not a ViewTool to allow the view to be panned, zoomed, and rotated while defining the points.\n * @public\n */\nexport class SetupWalkCameraTool extends PrimitiveTool {\n public static override toolId = \"View.SetupWalkCamera\";\n public static override iconSpec = \"icon-camera-location\";\n public viewport?: ScreenViewport;\n protected _haveEyePt: boolean = false;\n protected _eyePtWorld: Point3d = Point3d.create();\n protected _targetPtWorld: Point3d = Point3d.create();\n\n public override isCompatibleViewport(vp: Viewport | undefined, isSelectedViewChange: boolean): boolean { return (super.isCompatibleViewport(vp, isSelectedViewChange) && undefined !== vp && vp.view.allow3dManipulations()); }\n public override isValidLocation(_ev: BeButtonEvent, _isButtonEvent: boolean): boolean { return true; }\n public override requireWriteableTarget(): boolean { return false; }\n public override async onPostInstall() {\n await super.onPostInstall();\n this.setupAndPromptForNextAction();\n }\n\n public override async onUnsuspend() { this.provideToolAssistance(); }\n protected setupAndPromptForNextAction(): void {\n IModelApp.accuSnap.enableSnap(true);\n this.provideToolAssistance();\n }\n\n public override async onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled> {\n if (this._haveEyePt)\n await this.onReinitialize();\n else\n await this.exitTool();\n\n return EventHandled.Yes;\n }\n\n protected provideToolAssistance(): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(this._haveEyePt ? \"SetupWalkCamera.Prompts.NextPoint\" : \"SetupWalkCamera.Prompts.FirstPoint\"));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = CoreTools.translate(\"ElementSet.Inputs.AcceptPoint\");\n const rejectMsg = CoreTools.translate(this._haveEyePt ? \"ElementSet.Inputs.Restart\" : \"ElementSet.Inputs.Exit\");\n if (!ToolAssistance.createTouchCursorInstructions(touchInstructions))\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, rejectMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, rejectMsg, false, ToolAssistanceInputMethod.Mouse));\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n\n public async onRestartTool(): Promise<void> {\n const tool = new SetupWalkCameraTool();\n if (!await tool.run())\n return this.exitTool();\n }\n\n protected getAdjustedEyePoint() { return this._eyePtWorld.plusScaled(Vector3d.unitZ(), ToolSettings.walkEyeHeight); }\n protected getAdjustedTargetPoint() { return Point3d.create(this._targetPtWorld.x, this._targetPtWorld.y, this.getAdjustedEyePoint().z); }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (undefined === ev.viewport) {\n return EventHandled.Yes;\n } else if (undefined === this.viewport) {\n if (!ev.viewport.view.allow3dManipulations())\n return EventHandled.Yes;\n this.viewport = ev.viewport;\n } else if (this.viewport.view.iModel !== ev.viewport.view.iModel) {\n if (this._haveEyePt)\n return EventHandled.Yes;\n this.viewport = ev.viewport;\n return EventHandled.Yes;\n }\n\n if (this._haveEyePt) {\n this._targetPtWorld.setFrom(ev.point);\n this.doManipulation();\n await this.onReinitialize();\n } else {\n this._eyePtWorld.setFrom(ev.point);\n this._targetPtWorld.setFrom(this._eyePtWorld);\n this._haveEyePt = true;\n this.setupAndPromptForNextAction();\n }\n\n return EventHandled.Yes;\n }\n\n public override async onMouseMotion(ev: BeButtonEvent) {\n if (!this._haveEyePt)\n return;\n this._targetPtWorld.setFrom(ev.point);\n IModelApp.viewManager.invalidateDecorationsAllViews();\n }\n\n private static getFigurePoints(): Point3d[] {\n const figurePts: Point3d[] = [];\n figurePts.push(Point3d.create(1.064, -0.014));\n figurePts.push(Point3d.create(1.051, 0.039));\n figurePts.push(Point3d.create(1.008, 0.058));\n figurePts.push(Point3d.create(0.962, 0.048));\n figurePts.push(Point3d.create(0.920, 0.026));\n figurePts.push(Point3d.create(0.898, 0.026));\n figurePts.push(Point3d.create(0.853, 0.094));\n figurePts.push(Point3d.create(0.741, 0.120));\n figurePts.push(Point3d.create(0.652, 0.091));\n figurePts.push(Point3d.create(0.514, 0.107));\n figurePts.push(Point3d.create(0.304, 0.108));\n figurePts.push(Point3d.create(0.040, 0.135));\n figurePts.push(Point3d.create(-0.023, 0.133));\n figurePts.push(Point3d.create(-0.031, 0.088));\n figurePts.push(Point3d.create(0.041, 0.068));\n figurePts.push(Point3d.create(0.299, 0.035));\n figurePts.push(Point3d.create(0.447, -0.015));\n figurePts.push(Point3d.create(0.267, -0.042));\n figurePts.push(Point3d.create(0.019, -0.036));\n figurePts.push(Point3d.create(-0.027, -0.146));\n figurePts.push(Point3d.create(-0.005, -0.179));\n figurePts.push(Point3d.create(0.056, -0.108));\n figurePts.push(Point3d.create(0.270, -0.122));\n figurePts.push(Point3d.create(0.483, -0.120));\n figurePts.push(Point3d.create(0.649, -0.145));\n figurePts.push(Point3d.create(0.715, -0.186));\n figurePts.push(Point3d.create(0.865, -0.135));\n figurePts.push(Point3d.create(0.905, -0.039));\n figurePts.push(Point3d.create(0.948, -0.035));\n figurePts.push(Point3d.create(0.979, -0.051));\n figurePts.push(Point3d.create(1.037, -0.046));\n figurePts.push(figurePts[0].clone());\n return figurePts;\n }\n\n private static getFigureTransform(vp: Viewport, base: Point3d, direction: Vector3d, scale: number): Transform | undefined {\n const boresite = AccuDrawHintBuilder.getBoresite(base, vp);\n if (Math.abs(direction.dotProduct(boresite.direction)) >= 0.9999)\n return undefined;\n\n const matrix = Matrix3d.createRigidFromColumns(direction, boresite.direction, AxisOrder.XZY);\n if (undefined === matrix)\n return undefined;\n\n matrix.scaleColumnsInPlace(scale, scale, scale);\n return Transform.createRefs(base.clone(), matrix);\n }\n\n public static drawFigure(context: DecorateContext, vp: Viewport, groundPt: Point3d, eyeHeight: number): void {\n if (!vp.view.is3d() || vp.view.iModel !== context.viewport.view.iModel)\n return;\n\n const transform = this.getFigureTransform(context.viewport, groundPt, Vector3d.unitZ(), eyeHeight);\n if (undefined === transform)\n return;\n\n const figurePts = this.getFigurePoints();\n const color = EditManipulator.HandleUtils.adjustForBackgroundColor(ColorDef.black, vp);\n const fill = ColorDef.from(255, 245, 225, 100);\n\n const builderShadow = context.createGraphicBuilder(GraphicType.WorldOverlay);\n builderShadow.setSymbology(color, ColorDef.black.withAlpha(30), ViewHandleWeight.Thin);\n builderShadow.addArc(Arc3d.createXY(groundPt, eyeHeight * 0.22), true, true);\n context.addDecorationFromBuilder(builderShadow);\n\n const builderHid = context.createGraphicBuilder(GraphicType.WorldDecoration, transform);\n builderHid.setSymbology(color, fill, ViewHandleWeight.Thin);\n builderHid.addShape(figurePts); // Copies points...\n context.addDecorationFromBuilder(builderHid);\n\n const builderVis = context.createGraphicBuilder(GraphicType.WorldOverlay, transform);\n builderVis.setSymbology(color, color, ViewHandleWeight.Normal);\n builderVis.addLineString(figurePts); // Owns points...\n context.addDecorationFromBuilder(builderVis);\n }\n\n public override decorate(context: DecorateContext): void {\n if (!this._haveEyePt || undefined === this.viewport)\n return;\n SetupWalkCameraTool.drawFigure(context, this.viewport, this._eyePtWorld, ToolSettings.walkEyeHeight);\n SetupCameraTool.drawCameraFrustum(context, this.viewport, this.getAdjustedEyePoint(), this.getAdjustedTargetPoint(), this._eyePtWorld, this._targetPtWorld);\n }\n\n public override decorateSuspended(context: DecorateContext): void { this.decorate(context); }\n\n private doManipulation(): void {\n const vp = this.viewport;\n if (undefined === vp)\n return;\n\n const view = vp.view;\n if (!view.is3d() || !view.allow3dManipulations())\n return;\n\n const eyePoint = this.getAdjustedEyePoint();\n const targetPoint = this.getAdjustedTargetPoint();\n const lensAngle = ToolSettings.walkCameraAngle;\n if (ViewStatus.Success !== view.lookAt({ eyePoint, targetPoint, upVector: Vector3d.unitZ(), lensAngle }))\n return;\n\n vp.synchWithView({ animateFrustumChange: true });\n }\n}\n"]}
|
|
1
|
+
{"version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;QAET,EAAE,CAAC,aAAa,CAAC,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;;AAvMH,kDAwMC","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 Tools\n */\n\nimport { BeDuration, BeTimePoint } from \"@itwin/core-bentley\";\nimport {\n Angle, AngleSweep, Arc3d, AxisOrder, ClipUtilities, Constant, CurveLocationDetail, Geometry, LineString3d, Matrix3d, Plane3dByOriginAndUnitNormal,\n Point2d, Point3d, Range2d, Range3d, Ray3d, Transform, Vector2d, Vector3d, XAndY, YawPitchRollAngles,\n} from \"@itwin/core-geometry\";\nimport { Cartographic, ColorDef, Frustum, LinePixels, NpcCenter } from \"@itwin/core-common\";\nimport {\n DialogItem, DialogProperty, DialogPropertySyncItem, PropertyDescriptionHelper,\n} from \"@itwin/appui-abstract\";\nimport { AccuDraw, AccuDrawHintBuilder } from \"../AccuDraw\";\nimport { BingLocationProvider } from \"../BingLocation\";\nimport { CoordSystem } from \"../CoordSystem\";\nimport { IModelApp } from \"../IModelApp\";\nimport { LengthDescription } from \"../properties/LengthDescription\";\nimport { Pixel } from \"../render/Pixel\";\nimport { StandardViewId } from \"../StandardView\";\nimport { Animator, MarginOptions, OnViewExtentsError, ViewChangeOptions } from \"../ViewAnimation\";\nimport { DecorateContext } from \"../ViewContext\";\nimport {\n eyeToCartographicOnGlobeFromGcs, GlobalLocation, queryTerrainElevationOffset, rangeToCartographicArea, viewGlobalLocation,\n ViewGlobalLocationConstants,\n} from \"../ViewGlobalLocation\";\nimport { DepthPointSource, ScreenViewport, Viewport } from \"../Viewport\";\nimport { ViewPose } from \"../ViewPose\";\nimport { ViewRect } from \"../common/ViewRect\";\nimport { ViewState3d } from \"../ViewState\";\nimport { ViewStatus } from \"../ViewStatus\";\nimport { EditManipulator } from \"./EditManipulator\";\nimport { PrimitiveTool } from \"./PrimitiveTool\";\nimport {\n BeButton, BeButtonEvent, BeModifierKeys, BeTouchEvent, BeWheelEvent, CoordSource, CoreTools, EventHandled, InputSource, InteractiveTool,\n} from \"./Tool\";\nimport { ToolAssistance, ToolAssistanceImage, ToolAssistanceInputMethod, ToolAssistanceInstruction, ToolAssistanceSection } from \"./ToolAssistance\";\nimport { ToolSettings } from \"./ToolSettings\";\nimport { GraphicType } from \"../common/render/GraphicType\";\n\n// cspell:ignore wasd, arrowright, arrowleft, pagedown, pageup, arrowup, arrowdown\n/* eslint-disable no-restricted-syntax */\n\n/** @internal */\nconst enum ViewHandleWeight {\n Thin = 1,\n Normal = 2,\n Bold = 3,\n VeryBold = 4,\n FatDot = 8,\n}\n\n/** @internal */\nexport enum ViewHandleType {\n None = 0,\n Rotate = 1,\n TargetCenter = 1 << 1,\n Pan = 1 << 2,\n Scroll = 1 << 3,\n Zoom = 1 << 4,\n Walk = 1 << 5,\n Fly = 1 << 6,\n Look = 1 << 7,\n LookAndMove = 1 << 8,\n}\n\n/** @internal */\nconst enum ViewManipPriority {\n Low = 1,\n Normal = 10,\n Medium = 100,\n High = 1000,\n}\n\nconst enum NavigateMode { Pan = 0, Look = 1, Travel = 2 }\n\n/* eslint-enable no-restricted-syntax */\n\n// dampen an inertia vector according to tool settings\nconst inertialDampen = (pt: Vector3d) => {\n pt.scaleInPlace(Geometry.clamp(ToolSettings.viewingInertia.damping, .75, .999));\n};\n\n/** An InteractiveTool that manipulates a view.\n * @public\n * @extensions\n */\nexport abstract class ViewTool extends InteractiveTool {\n public static translate(val: string) { return CoreTools.translate(`View.${val}`); }\n\n public inDynamicUpdate = false;\n public beginDynamicUpdate() { this.inDynamicUpdate = true; }\n public endDynamicUpdate() { this.inDynamicUpdate = false; }\n public override async run(..._args: any[]): Promise<boolean> {\n const toolAdmin = IModelApp.toolAdmin;\n if (undefined !== this.viewport && this.viewport === toolAdmin.markupView) {\n IModelApp.notifications.outputPromptByKey(\"iModelJs:Viewing.NotDuringMarkup\");\n return false;\n }\n\n if (!await toolAdmin.onInstallTool(this))\n return false;\n\n await toolAdmin.startViewTool(this);\n await toolAdmin.onPostInstallTool(this);\n return true;\n }\n\n public constructor(public viewport?: ScreenViewport) {\n super();\n }\n public override async onResetButtonUp(_ev: BeButtonEvent) {\n await this.exitTool();\n return EventHandled.Yes;\n }\n\n /** Do not override. */\n public async exitTool() { return IModelApp.toolAdmin.exitViewTool(); }\n public static showPrompt(prompt: string) {\n IModelApp.notifications.outputPrompt(ViewTool.translate(prompt));\n }\n}\n\n/** @internal */\nexport abstract class ViewingToolHandle {\n protected readonly _lastPtNpc = new Point3d();\n protected _depthPoint?: Point3d;\n\n constructor(public viewTool: ViewManip) {\n this._depthPoint = undefined;\n }\n public onReinitialize(): void { }\n public onCleanup(): void { }\n public focusOut(): void { }\n public motion(_ev: BeButtonEvent): boolean { return false; }\n public checkOneShot(): boolean { return true; }\n public getHandleCursor(): string { return \"default\"; }\n public abstract doManipulation(ev: BeButtonEvent, inDynamics: boolean): boolean;\n public abstract firstPoint(ev: BeButtonEvent): boolean;\n public abstract testHandleForHit(ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean;\n public abstract get handleType(): ViewHandleType;\n public focusIn(): void { IModelApp.toolAdmin.setCursor(this.getHandleCursor()); }\n public drawHandle(_context: DecorateContext, _hasFocus: boolean): void { }\n public onWheel(_ev: BeWheelEvent): boolean { return false; }\n public onTouchStart(_ev: BeTouchEvent): boolean { return false; }\n public onTouchEnd(_ev: BeTouchEvent): boolean { return false; }\n public async onTouchComplete(_ev: BeTouchEvent): Promise<boolean> { return false; }\n public async onTouchCancel(_ev: BeTouchEvent): Promise<boolean> { return false; }\n public onTouchMove(_ev: BeTouchEvent): boolean { return false; }\n public onTouchMoveStart(_ev: BeTouchEvent, _startEv: BeTouchEvent): boolean { return false; }\n public onTouchTap(_ev: BeTouchEvent): boolean { return false; }\n public onKeyTransition(_wentDown: boolean, _keyEvent: KeyboardEvent): boolean { return false; }\n public onModifierKeyTransition(_wentDown: boolean, _modifier: BeModifierKeys, _event: KeyboardEvent): boolean { return false; }\n public needDepthPoint(_ev: BeButtonEvent, _isPreview: boolean): boolean { return false; }\n public adjustDepthPoint(isValid: boolean, _vp: Viewport, _plane: Plane3dByOriginAndUnitNormal, source: DepthPointSource): boolean {\n switch (source) {\n case DepthPointSource.Geometry:\n case DepthPointSource.Model:\n case DepthPointSource.BackgroundMap:\n case DepthPointSource.GroundPlane:\n case DepthPointSource.Grid:\n case DepthPointSource.Map:\n return isValid; // Sources with visible geometry/graphics are considered valid by default...\n default:\n return false; // Sources without visible geometry/graphics are NOT considered valid by default...\n }\n }\n protected pickDepthPoint(ev: BeButtonEvent) {\n this._depthPoint = this.viewTool.pickDepthPoint(ev);\n }\n // if we have a valid depth point, set the focus distance to\n protected changeFocusFromDepthPoint() {\n if (undefined === this._depthPoint)\n return;\n\n const view = this.viewTool.viewport?.view;\n if (undefined === view)\n return;\n\n if (view.is3d() && view.isCameraOn)\n view.changeFocusFromPoint(this._depthPoint); // set the focus distance to the depth point\n }\n}\n\n/** @internal */\nexport class ViewHandleArray {\n public handles: ViewingToolHandle[] = [];\n public focus = -1;\n public focusDrag = false;\n public hitHandleIndex = 0;\n constructor(public viewTool: ViewManip) { }\n\n public empty() {\n this.focus = -1;\n this.focusDrag = false;\n this.hitHandleIndex = -1; // setting to -1 will result in onReinitialize getting called before testHit which sets the hit index\n this.handles.length = 0;\n }\n\n public get count(): number { return this.handles.length; }\n public get hitHandle(): ViewingToolHandle | undefined { return this.getByIndex(this.hitHandleIndex); }\n public get focusHandle(): ViewingToolHandle | undefined { return this.getByIndex(this.focus); }\n public add(handle: ViewingToolHandle): void { this.handles.push(handle); }\n public getByIndex(index: number): ViewingToolHandle | undefined { return (index >= 0 && index < this.count) ? this.handles[index] : undefined; }\n public focusHitHandle(): void { this.setFocus(this.hitHandleIndex); }\n\n public testHit(ptScreen: Point3d, forced = ViewHandleType.None): boolean {\n this.hitHandleIndex = -1;\n const data = { distance: 0.0, priority: ViewManipPriority.Normal };\n let minDistance = 0.0;\n let minDistValid = false;\n let highestPriority = ViewManipPriority.Low;\n let nearestHitHandle: ViewingToolHandle | undefined;\n\n for (let i = 0; i < this.count; i++) {\n data.priority = ViewManipPriority.Normal;\n const handle = this.handles[i];\n\n if (forced) {\n if (handle.handleType === forced) {\n this.hitHandleIndex = i;\n return true;\n }\n } else if (handle.testHandleForHit(ptScreen, data)) {\n if (data.priority >= highestPriority) {\n if (data.priority > highestPriority)\n minDistValid = false;\n\n highestPriority = data.priority;\n\n if (!minDistValid || (data.distance < minDistance)) {\n minDistValid = true;\n minDistance = data.distance;\n nearestHitHandle = handle;\n this.hitHandleIndex = i;\n }\n }\n }\n }\n return undefined !== nearestHitHandle;\n }\n\n public drawHandles(context: DecorateContext): void {\n if (0 === this.count)\n return;\n\n // all handle objects must draw themselves\n for (let i = 0; i < this.count; ++i) {\n if (i !== this.hitHandleIndex) {\n const handle = this.handles[i];\n handle.drawHandle(context, this.focus === i);\n }\n }\n\n // draw the hit handle last\n if (-1 !== this.hitHandleIndex) {\n const handle = this.handles[this.hitHandleIndex];\n handle.drawHandle(context, this.focus === this.hitHandleIndex);\n }\n }\n\n public setFocus(index: number): void {\n if (this.focus === index && (this.focusDrag === this.viewTool.inHandleModify))\n return;\n\n let focusHandle: ViewingToolHandle | undefined;\n if (this.focus >= 0) {\n focusHandle = this.getByIndex(this.focus);\n if (focusHandle)\n focusHandle.focusOut();\n }\n\n if (index >= 0) {\n focusHandle = this.getByIndex(index);\n if (focusHandle)\n focusHandle.focusIn();\n }\n\n this.focus = index;\n this.focusDrag = this.viewTool.inHandleModify;\n\n const vp = this.viewTool.viewport;\n if (undefined !== vp)\n vp.invalidateDecorations();\n }\n\n public onReinitialize(): void { this.handles.forEach((handle) => handle.onReinitialize()); }\n public onCleanup(): void { this.handles.forEach((handle) => handle.onCleanup()); }\n public motion(ev: BeButtonEvent): void { this.handles.forEach((handle) => handle.motion(ev)); }\n public onWheel(ev: BeWheelEvent): boolean {\n let preventDefault = false;\n this.handles.forEach((handle) => {\n if (handle.onWheel(ev))\n preventDefault = true;\n });\n return preventDefault;\n }\n\n /** determine whether a handle of a specific type exists */\n public hasHandle(handleType: ViewHandleType): boolean { return this.handles.some((handle) => handle.handleType === handleType); }\n}\n\n/** Base class for tools that manipulate the frustum of a Viewport.\n * @public\n * @extensions\n */\nexport abstract class ViewManip extends ViewTool {\n /** @internal */\n public viewHandles: ViewHandleArray;\n public frustumValid = false; // unused\n public readonly targetCenterWorld = new Point3d();\n public inHandleModify = false;\n public isDragging = false;\n public targetCenterValid = false;\n public targetCenterLocked = false;\n public nPts = 0;\n /** @internal */\n public forcedHandle = ViewHandleType.None;\n /** @internal */\n protected _depthPreview?: { testPoint: Point3d, pickRadius: number, plane: Plane3dByOriginAndUnitNormal, source: DepthPointSource, isDefaultDepth: boolean, sourceId?: string };\n /** @internal */\n protected _startPose?: ViewPose;\n\n constructor(viewport: ScreenViewport | undefined, public handleMask: number, public oneShot: boolean, public isDraggingRequired: boolean = false) {\n super(viewport);\n this.viewHandles = new ViewHandleArray(this);\n this.changeViewport(viewport);\n }\n\n public override decorate(context: DecorateContext): void {\n this.viewHandles.drawHandles(context);\n this.previewDepthPoint(context);\n }\n\n /** @internal */\n public previewDepthPoint(context: DecorateContext): void {\n if (undefined === this._depthPreview)\n return;\n\n const cursorVp = IModelApp.toolAdmin.cursorView;\n if (cursorVp !== context.viewport)\n return;\n\n let origin = this._depthPreview.plane.getOriginRef();\n let normal = this._depthPreview.plane.getNormalRef();\n\n if (this._depthPreview.isDefaultDepth) {\n origin = cursorVp.worldToView(origin);\n origin.z = 0.0;\n cursorVp.viewToWorld(origin, origin); // Avoid getting clipped out in z...\n normal = context.viewport.view.getZVector(); // Always draw circle for invalid depth point oriented to view...\n }\n\n const pixelSize = context.viewport.getPixelSizeAtPoint(origin);\n const skew = context.viewport.view.getAspectRatioSkew();\n const radius = this._depthPreview.pickRadius * pixelSize;\n const rMatrix = Matrix3d.createRigidHeadsUp(normal);\n const ellipse = Arc3d.createScaledXYColumns(origin, rMatrix, radius, radius / skew, AngleSweep.create360());\n const colorBase = (this._depthPreview.isDefaultDepth ? ColorDef.red : (DepthPointSource.Geometry === this._depthPreview.source ? ColorDef.green : context.viewport.hilite.color));\n const colorLine = EditManipulator.HandleUtils.adjustForBackgroundColor(colorBase, cursorVp).withTransparency(50);\n const colorFill = colorLine.withTransparency(200);\n\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n builder.setSymbology(colorLine, colorFill, 1, this._depthPreview.isDefaultDepth ? LinePixels.Code2 : LinePixels.Solid);\n builder.addArc(ellipse, true, true);\n builder.addArc(ellipse, false, false);\n context.addDecorationFromBuilder(builder);\n\n ViewTargetCenter.drawCross(context, origin, this._depthPreview.pickRadius * 0.5, false);\n }\n\n /** @internal */\n public getDepthPointGeometryId(): string | undefined {\n if (undefined === this._depthPreview)\n return undefined;\n return (DepthPointSource.Geometry === this._depthPreview.source ? this._depthPreview.sourceId : undefined);\n }\n\n /** @internal */\n public clearDepthPoint(): boolean {\n if (undefined === this._depthPreview)\n return false;\n this._depthPreview = undefined;\n return true;\n }\n\n /** @internal */\n public pickDepthPoint(ev: BeButtonEvent, isPreview: boolean = false): Point3d | undefined {\n if (!isPreview && ev.viewport && undefined !== this.getDepthPointGeometryId())\n ev.viewport.flashedId = undefined;\n\n this.clearDepthPoint();\n if (isPreview && this.inDynamicUpdate)\n return undefined;\n\n const vp = ev.viewport;\n if (undefined === vp || undefined === this.viewHandles.hitHandle || !this.viewHandles.hitHandle.needDepthPoint(ev, isPreview))\n return undefined;\n\n const pickRadiusPixels = vp.pixelsFromInches(ToolSettings.viewToolPickRadiusInches);\n const result = vp.pickDepthPoint(ev.rawPoint, pickRadiusPixels);\n let isValidDepth = false;\n\n switch (result.source) {\n case DepthPointSource.Geometry:\n case DepthPointSource.Model:\n case DepthPointSource.Map:\n isValidDepth = true;\n break;\n case DepthPointSource.BackgroundMap:\n case DepthPointSource.GroundPlane:\n case DepthPointSource.Grid:\n case DepthPointSource.ACS:\n case DepthPointSource.TargetPoint:\n const npcPt = vp.worldToNpc(result.plane.getOriginRef());\n isValidDepth = !(npcPt.z < 0.0 || npcPt.z > 1.0);\n break;\n }\n\n // Allow handle to reject depth depending on source and to set a default depth point when invalid...\n isValidDepth = this.viewHandles.hitHandle.adjustDepthPoint(isValidDepth, vp, result.plane, result.source);\n\n if (isPreview)\n this._depthPreview = { testPoint: ev.rawPoint, pickRadius: pickRadiusPixels, plane: result.plane, source: result.source, isDefaultDepth: !isValidDepth, sourceId: result.sourceId };\n\n return (isValidDepth || isPreview ? result.plane.getOriginRef() : undefined);\n }\n\n /** In addition to the onReinitialize calls after a tool installs or restarts, it is also\n * called from the mouseover event to cancel a drag operation if the up event occurred outside the view.\n * When operating in one shot mode and also requiring dragging, the tool should exit and not restart in ths situation.\n * A tool must opt in to allowing [[ViewTool.exitTool]] to be called from [[ViewManip.onReinitialize]] by\n * overriding this method to return true.\n */\n protected get isExitAllowedOnReinitialize(): boolean { return false; }\n\n public override async onReinitialize() {\n const shouldExit = (this.oneShot && this.isDraggingRequired && this.isDragging && 0 !== this.nPts);\n\n if (undefined !== this.viewport) {\n this.viewport.synchWithView(); // make sure we store any changes in view undo buffer.\n this.viewHandles.setFocus(-1);\n }\n\n this.nPts = 0;\n this.inHandleModify = false;\n this.inDynamicUpdate = false;\n this._startPose = undefined;\n\n this.viewHandles.onReinitialize();\n\n if (shouldExit && this.isExitAllowedOnReinitialize)\n return this.exitTool();\n\n this.provideInitialToolAssistance();\n }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n // Tool was started in \"drag required\" mode, don't advance tool state and wait to see if we get the start drag event.\n if ((0 === this.nPts && this.isDraggingRequired && !this.isDragging) || undefined === ev.viewport)\n return EventHandled.No;\n\n switch (this.nPts) {\n case 0:\n this.changeViewport(ev.viewport);\n if (this.processFirstPoint(ev))\n this.nPts = 1;\n break;\n case 1:\n this.nPts = 2;\n break;\n }\n\n if (this.nPts > 1) {\n this.inDynamicUpdate = false;\n if (this.processPoint(ev, false) && this.oneShot)\n await this.exitTool();\n else\n await this.onReinitialize();\n }\n\n return EventHandled.Yes;\n }\n\n public override async onDataButtonUp(_ev: BeButtonEvent): Promise<EventHandled> {\n if (this.nPts <= 1 && this.isDraggingRequired && !this.isDragging && this.oneShot)\n await this.exitTool();\n\n return EventHandled.No;\n }\n\n public override async onMouseWheel(inputEv: BeWheelEvent): Promise<EventHandled> {\n const ev = inputEv.clone();\n if (this.viewHandles.onWheel(ev)) // notify handles that wheel has rolled.\n return EventHandled.Yes;\n\n await IModelApp.toolAdmin.processWheelEvent(ev, false);\n return EventHandled.Yes;\n }\n\n /** @internal */\n public async startHandleDrag(ev: BeButtonEvent, forcedHandle?: ViewHandleType): Promise<EventHandled> {\n if (this.inHandleModify)\n return EventHandled.No; // If already changing the view reject the request...\n\n if (undefined !== forcedHandle) {\n if (!this.viewHandles.hasHandle(forcedHandle))\n return EventHandled.No; // If requested handle isn't present reject the request...\n this.forcedHandle = forcedHandle;\n }\n\n this.receivedDownEvent = true; // Request up events even though we may not have gotten the down event...\n this.isDragging = true;\n\n if (0 === this.nPts)\n await this.onDataButtonDown(ev);\n\n return EventHandled.Yes;\n }\n\n public override async onMouseStartDrag(ev: BeButtonEvent): Promise<EventHandled> {\n if (BeButton.Data !== ev.button)\n return EventHandled.No;\n return this.startHandleDrag(ev);\n }\n\n public override async onMouseEndDrag(ev: BeButtonEvent): Promise<EventHandled> {\n // NOTE: To support startHandleDrag being called by IdleTool for middle button drag, check inHandleModify and not the button type...\n if (!this.inHandleModify)\n return EventHandled.No;\n this.isDragging = false;\n return (0 === this.nPts) ? EventHandled.Yes : this.onDataButtonDown(ev);\n }\n\n public override async onMouseMotion(ev: BeButtonEvent) {\n if (0 === this.nPts && this.viewHandles.testHit(ev.viewPoint))\n this.viewHandles.focusHitHandle();\n\n if (0 !== this.nPts)\n this.processPoint(ev, true);\n\n this.viewHandles.motion(ev);\n\n const prevSourceId = this.getDepthPointGeometryId();\n const showDepthChanged = (undefined !== this.pickDepthPoint(ev, true) || this.clearDepthPoint());\n if (ev.viewport && (showDepthChanged || prevSourceId)) {\n const currSourceId = this.getDepthPointGeometryId();\n if (currSourceId !== prevSourceId)\n ev.viewport.flashedId = currSourceId;\n\n ev.viewport.invalidateDecorations();\n }\n }\n\n public override async onTouchStart(ev: BeTouchEvent): Promise<void> {\n if (0 === this.nPts && this.viewHandles.testHit(ev.viewPoint))\n this.viewHandles.focusHitHandle();\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle)\n focusHandle.onTouchStart(ev);\n }\n\n public override async onTouchEnd(ev: BeTouchEvent): Promise<void> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle)\n focusHandle.onTouchEnd(ev);\n }\n\n public override async onTouchComplete(ev: BeTouchEvent): Promise<void> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle && await focusHandle.onTouchComplete(ev))\n return;\n if (this.inHandleModify)\n return IModelApp.toolAdmin.convertTouchEndToButtonUp(ev);\n }\n\n public override async onTouchCancel(ev: BeTouchEvent): Promise<void> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle && await focusHandle.onTouchCancel(ev))\n return;\n if (this.inHandleModify)\n return IModelApp.toolAdmin.convertTouchEndToButtonUp(ev, BeButton.Reset);\n }\n\n public override async onTouchMove(ev: BeTouchEvent): Promise<void> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle && focusHandle.onTouchMove(ev))\n return;\n if (this.inHandleModify)\n return IModelApp.toolAdmin.convertTouchMoveToMotion(ev);\n }\n\n public override async onTouchMoveStart(ev: BeTouchEvent, startEv: BeTouchEvent): Promise<EventHandled> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle && focusHandle.onTouchMoveStart(ev, startEv))\n return EventHandled.Yes;\n if (!this.inHandleModify && startEv.isSingleTouch)\n await IModelApp.toolAdmin.convertTouchMoveStartToButtonDownAndMotion(startEv, ev);\n return this.inHandleModify ? EventHandled.Yes : EventHandled.No;\n }\n\n public override async onTouchTap(ev: BeTouchEvent): Promise<EventHandled> {\n const focusHandle = this.viewHandles.focusHandle;\n if (undefined !== focusHandle && focusHandle.onTouchTap(ev))\n return EventHandled.Yes;\n return ev.isSingleTap ? EventHandled.Yes : EventHandled.No; // Prevent IdleTool from converting single tap into data button down/up...\n }\n\n public override async onKeyTransition(wentDown: boolean, keyEvent: KeyboardEvent): Promise<EventHandled> {\n const focusHandle = this.viewHandles.focusHandle;\n return (undefined !== focusHandle && focusHandle.onKeyTransition(wentDown, keyEvent) ? EventHandled.Yes : EventHandled.No);\n }\n\n public override async onModifierKeyTransition(wentDown: boolean, modifier: BeModifierKeys, event: KeyboardEvent): Promise<EventHandled> {\n const focusHandle = this.viewHandles.focusHandle;\n return (undefined !== focusHandle && focusHandle.onModifierKeyTransition(wentDown, modifier, event) ? EventHandled.Yes : EventHandled.No);\n }\n\n public override async onPostInstall() {\n await super.onPostInstall();\n await this.onReinitialize(); // Call onReinitialize now that tool is installed.\n }\n\n public provideToolAssistance(mainInstrKey: string, additionalInstr?: ToolAssistanceInstruction[]): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(mainInstrKey));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = CoreTools.translate(\"ElementSet.Inputs.AcceptPoint\");\n const rejectMsg = CoreTools.translate(\"ElementSet.Inputs.Exit\");\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchDrag, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, rejectMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, rejectMsg, false, ToolAssistanceInputMethod.Mouse));\n\n if (undefined !== additionalInstr) {\n for (const instr of additionalInstr) {\n if (ToolAssistanceInputMethod.Touch === instr.inputMethod)\n touchInstructions.push(instr);\n else\n mouseInstructions.push(instr);\n }\n }\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n\n /** Called from [[ViewManip.onReinitialize]] to allow tools to establish the tool assistance for the first point. */\n protected provideInitialToolAssistance(): void { }\n\n public override async onCleanup() {\n let restorePrevious = false;\n\n if (this.inDynamicUpdate) {\n this.endDynamicUpdate();\n restorePrevious = true;\n }\n\n const vp = this.viewport;\n if (undefined !== vp) {\n if (restorePrevious && this._startPose) {\n vp.view.applyPose(this._startPose);\n vp.animateFrustumChange();\n } else {\n vp.synchWithView();\n }\n\n vp.invalidateDecorations();\n }\n this.viewHandles.onCleanup();\n this.viewHandles.empty();\n }\n\n /**\n * Set the center of rotation for rotate handle.\n * @param pt the new target point in world coordinates\n * @param lockTarget consider the target point locked for this tool instance\n * @param saveTarget save this target point for use between tool instances\n */\n public setTargetCenterWorld(pt: Point3d, lockTarget: boolean, saveTarget: boolean) {\n this.targetCenterWorld.setFrom(pt);\n this.targetCenterValid = true;\n this.targetCenterLocked = lockTarget;\n\n if (!this.viewport)\n return;\n\n if (!this.viewport.view.allow3dManipulations())\n this.targetCenterWorld.z = 0.0;\n\n this.viewport.viewCmdTargetCenter = (saveTarget ? pt : undefined);\n }\n\n public updateTargetCenter(): void {\n const vp = this.viewport;\n if (!vp)\n return;\n\n if (this.targetCenterValid) {\n if (this.inHandleModify)\n return;\n if (IModelApp.tentativePoint.isActive) {\n let tentPt = IModelApp.tentativePoint.getPoint();\n if (!IModelApp.tentativePoint.isSnapped) {\n if (undefined === this._depthPreview && this.targetCenterLocked) {\n const ev = new BeButtonEvent();\n IModelApp.toolAdmin.fillEventFromCursorLocation(ev);\n this.targetCenterLocked = false; // Depth preview won't be active (or requested) if target is currently locked...\n this.pickDepthPoint(ev, true);\n }\n if (undefined !== this._depthPreview && !this._depthPreview.isDefaultDepth)\n tentPt = this._depthPreview.plane.getOriginRef(); // Prefer valid depth preview point to unsnapped tentative location...\n }\n this.setTargetCenterWorld(tentPt, true, false);\n IModelApp.tentativePoint.clear(true); // Clear tentative, there won't be a datapoint to accept...\n }\n return;\n }\n\n if (IModelApp.tentativePoint.isActive)\n return this.setTargetCenterWorld(IModelApp.tentativePoint.getPoint(), true, false);\n\n if (vp.viewCmdTargetCenter && this.isPointVisible(vp.viewCmdTargetCenter))\n return this.setTargetCenterWorld(vp.viewCmdTargetCenter, true, true);\n\n return this.setTargetCenterWorld(ViewManip.getDefaultTargetPointWorld(vp), false, false);\n }\n\n public processFirstPoint(ev: BeButtonEvent) {\n const forcedHandle = this.forcedHandle;\n this.forcedHandle = ViewHandleType.None;\n\n if (this.viewHandles.testHit(ev.viewPoint, forcedHandle)) {\n this.inHandleModify = true;\n this.viewHandles.focusHitHandle();\n const handle = this.viewHandles.hitHandle;\n if (undefined !== handle && !handle.firstPoint(ev))\n return false;\n }\n this._startPose = this.viewport ? this.viewport.view.savePose() : undefined;\n return true;\n }\n\n public processPoint(ev: BeButtonEvent, inDynamics: boolean) {\n const hitHandle = this.viewHandles.hitHandle;\n if (undefined === hitHandle)\n return true;\n\n const doUpdate = hitHandle.doManipulation(ev, inDynamics);\n return inDynamics || (doUpdate && hitHandle.checkOneShot());\n }\n\n public lensAngleMatches(angle: Angle, tolerance: number): boolean {\n const cameraView = this.viewport?.view;\n if (undefined === cameraView)\n return false;\n return !cameraView.is3d() ? false : Math.abs(cameraView.calcLensAngle().radians - angle.radians) < tolerance;\n }\n\n public get isZUp() {\n const view = this.viewport?.view;\n if (undefined === view)\n return true;\n\n const viewX = view.getXVector();\n const viewY = view.getXVector();\n const zVec = Vector3d.unitZ();\n return (Math.abs(zVec.dotProduct(viewY)) > 0.99 && Math.abs(zVec.dotProduct(viewX)) < 0.01);\n }\n\n public static getFocusPlaneNpc(vp: Viewport): number {\n const pt = vp.worldToNpc(vp.view.getTargetPoint());\n return (pt.z < 0.0 || pt.z > 1.0) ? 0.5 : pt.z;\n }\n\n public static getDefaultTargetPointWorld(vp: Viewport): Point3d {\n if (!vp.view.allow3dManipulations())\n return vp.npcToWorld(NpcCenter);\n\n const targetPoint = vp.view.getTargetPoint();\n const targetPointNpc = vp.worldToNpc(targetPoint);\n\n if (targetPointNpc.z < 0.0 || targetPointNpc.z > 1.0) {\n targetPointNpc.z = 0.5;\n vp.npcToWorld(targetPointNpc, targetPoint);\n }\n\n return targetPoint;\n }\n\n /** Determine whether the supplied point is visible in this Viewport. */\n public isPointVisible(testPt: Point3d): boolean {\n const vp = this.viewport;\n if (!vp)\n return false;\n\n return vp.isPointVisibleXY(testPt);\n }\n\n /** @internal */\n public static computeFitRange(viewport: ScreenViewport): Range3d {\n const range = viewport.computeViewRange();\n const clip = (viewport.viewFlags.clipVolume ? viewport.view.getViewClip() : undefined);\n if (undefined !== clip) {\n const clipRange = ClipUtilities.rangeOfClipperIntersectionWithRange(clip, range);\n if (!clipRange.isNull)\n range.setFrom(clipRange);\n }\n return range;\n }\n\n public static fitView(viewport: ScreenViewport, animateFrustumChange: boolean, options?: ViewChangeOptions & MarginOptions) {\n const range = this.computeFitRange(viewport);\n const aspect = viewport.viewRect.aspect;\n viewport.view.lookAtVolume(range, aspect, options);\n viewport.synchWithView({ animateFrustumChange });\n viewport.viewCmdTargetCenter = undefined;\n }\n\n /** @internal */\n public static fitViewWithGlobeAnimation(viewport: ScreenViewport, animateFrustumChange: boolean, options?: ViewChangeOptions & MarginOptions) {\n const range = this.computeFitRange(viewport);\n\n if (viewport.view.isSpatialView() && animateFrustumChange && (viewport.viewingGlobe || !viewport.view.getIsViewingProject())) {\n const cartographicCenter = viewport.view.rootToCartographic(range.center);\n if (undefined !== cartographicCenter) {\n const cartographicArea = rangeToCartographicArea(viewport.view, range);\n (async () => {\n await viewport.animateFlyoverToGlobalLocation({ center: cartographicCenter, area: cartographicArea }); // NOTE: Turns on camera...which is why we checked that it was already on...\n viewport.viewCmdTargetCenter = undefined;\n })().catch(() => { });\n return;\n }\n }\n\n const aspect = viewport.viewRect.aspect;\n viewport.view.lookAtVolume(range, aspect, options);\n viewport.synchWithView({ animateFrustumChange });\n viewport.viewCmdTargetCenter = undefined;\n }\n\n public static async zoomToAlwaysDrawnExclusive(viewport: ScreenViewport, options?: ViewChangeOptions & MarginOptions): Promise<boolean> {\n if (!viewport.isAlwaysDrawnExclusive || undefined === viewport.alwaysDrawn || 0 === viewport.alwaysDrawn.size)\n return false;\n await viewport.zoomToElements(viewport.alwaysDrawn, options);\n return true;\n }\n\n public setCameraLensAngle(lensAngle: Angle, retainEyePoint: boolean): ViewStatus {\n const vp = this.viewport;\n if (!vp)\n return ViewStatus.InvalidViewport;\n\n const view = vp.view;\n if (!view.is3d() || !view.allow3dManipulations())\n return ViewStatus.InvalidViewport;\n\n const result = (retainEyePoint && view.isCameraOn) ?\n view.lookAt({ eyePoint: view.getEyePoint(), targetPoint: view.getTargetPoint(), upVector: view.getYVector(), lensAngle }) :\n vp.turnCameraOn(lensAngle);\n\n if (result !== ViewStatus.Success)\n return result;\n\n vp.setupFromView();\n return ViewStatus.Success;\n }\n\n public enforceZUp(pivotPoint: Point3d) {\n const vp = this.viewport;\n if (!vp || this.isZUp)\n return false;\n\n const viewY = vp.view.getYVector();\n const rotMatrix = Matrix3d.createRotationVectorToVector(viewY, Vector3d.unitZ());\n if (!rotMatrix)\n return false;\n\n const transform = Transform.createFixedPointAndMatrix(pivotPoint, rotMatrix);\n const frust = vp.getWorldFrustum();\n frust.multiply(transform);\n vp.setupViewFromFrustum(frust);\n return true;\n }\n\n public changeViewport(vp?: ScreenViewport): void {\n if (vp === this.viewport && 0 !== this.viewHandles.count) // If viewport isn't really changing do nothing...\n return;\n\n if (this.viewport)\n this.viewport.invalidateDecorations(); // Remove decorations from current viewport...\n\n this.viewport = vp;\n this.targetCenterValid = false;\n if (this.handleMask & (ViewHandleType.Rotate | ViewHandleType.TargetCenter))\n this.updateTargetCenter();\n\n this.viewHandles.empty();\n if (this.handleMask & ViewHandleType.Rotate)\n this.viewHandles.add(new ViewRotate(this));\n\n if (this.handleMask & ViewHandleType.TargetCenter)\n this.viewHandles.add(new ViewTargetCenter(this));\n\n if (this.handleMask & ViewHandleType.Pan)\n this.viewHandles.add(new ViewPan(this));\n\n if (this.handleMask & ViewHandleType.Scroll)\n this.viewHandles.add(new ViewScroll(this));\n\n if (this.handleMask & ViewHandleType.Zoom)\n this.viewHandles.add(new ViewZoom(this));\n\n if (this.handleMask & ViewHandleType.Walk)\n this.viewHandles.add(new ViewWalk(this));\n\n if (this.handleMask & ViewHandleType.Fly)\n this.viewHandles.add(new ViewFly(this));\n\n if (this.handleMask & ViewHandleType.Look)\n this.viewHandles.add(new ViewLook(this));\n\n if (this.handleMask & ViewHandleType.LookAndMove)\n this.viewHandles.add(new ViewLookAndMove(this));\n }\n}\n\n/** ViewingToolHandle for modifying the view's target point for operations like rotate */\nclass ViewTargetCenter extends ViewingToolHandle {\n public get handleType() { return ViewHandleType.TargetCenter; }\n public override checkOneShot(): boolean { return false; } // Don't exit tool after moving target in single-shot mode...\n public firstPoint(ev: BeButtonEvent) {\n if (undefined === ev.viewport)\n return false;\n ev.viewport.viewCmdTargetCenter = undefined; // Clear current saved target, must accept a new location with ctrl...\n return true;\n }\n\n public testHandleForHit(ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n if (this.viewTool.isDraggingRequired)\n return false; // Target center handle is not movable in this mode, but it's still nice to display the point we're rotating about...\n\n const vp = this.viewTool.viewport;\n if (undefined === vp)\n return false;\n\n const targetPt = vp.worldToView(this.viewTool.targetCenterWorld);\n const distance = targetPt.distanceXY(ptScreen);\n const locateThreshold = vp.pixelsFromInches(0.15);\n\n if (distance > locateThreshold)\n return false;\n\n out.distance = distance;\n out.priority = ViewManipPriority.High;\n return true;\n }\n\n /** @internal */\n public static drawCross(context: DecorateContext, worldPoint: Point3d, sizePixels: number, hasFocus: boolean): void {\n const crossSize = Math.floor(sizePixels) + 0.5;\n const outlineSize = crossSize + 1;\n const position = context.viewport.worldToView(worldPoint);\n position.x = Math.floor(position.x) + 0.5;\n position.y = Math.floor(position.y) + 0.5;\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\n ctx.beginPath();\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\n ctx.lineWidth = hasFocus ? 5 : 3;\n ctx.moveTo(-outlineSize, 0);\n ctx.lineTo(outlineSize, 0);\n ctx.moveTo(0, -outlineSize);\n ctx.lineTo(0, outlineSize);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.strokeStyle = \"white\";\n ctx.lineWidth = hasFocus ? 3 : 1;\n ctx.shadowColor = \"black\";\n ctx.shadowBlur = hasFocus ? 7 : 5;\n ctx.moveTo(-crossSize, 0);\n ctx.lineTo(crossSize, 0);\n ctx.moveTo(0, -crossSize);\n ctx.lineTo(0, crossSize);\n ctx.stroke();\n };\n context.addCanvasDecoration({ position, drawDecoration });\n }\n\n public override drawHandle(context: DecorateContext, hasFocus: boolean): void {\n if (context.viewport !== this.viewTool.viewport)\n return;\n\n if (!this.viewTool.targetCenterLocked && !this.viewTool.inHandleModify)\n return; // Don't display default target center, will be updated to use pick point on element...\n\n if (hasFocus && this.viewTool.inHandleModify)\n return; // Cross display handled by preview depth point...\n\n let sizeInches = 0.2;\n if (!hasFocus && this.viewTool.inHandleModify) {\n const hitHandle = this.viewTool.viewHandles.hitHandle;\n if (undefined !== hitHandle && ViewHandleType.Rotate !== hitHandle.handleType)\n return; // Only display when modifying another handle if that handle is rotate (not pan)...\n sizeInches = 0.1; // Display small target when dragging...\n }\n\n const crossSize = context.viewport.pixelsFromInches(sizeInches);\n ViewTargetCenter.drawCross(context, this.viewTool.targetCenterWorld, crossSize, hasFocus);\n }\n\n public doManipulation(ev: BeButtonEvent, inDynamics: boolean) {\n if (inDynamics || ev.viewport !== this.viewTool.viewport)\n return false;\n\n this.pickDepthPoint(ev);\n this.viewTool.setTargetCenterWorld(undefined !== this._depthPoint ? this._depthPoint : ev.point, true, ev.isControlKey); // Lock target for just this tool instance, only save if control is down...\n\n return false; // false means don't do screen update\n }\n\n /** @internal */\n public override needDepthPoint(_ev: BeButtonEvent, _isPreview: boolean): boolean {\n const focusHandle = this.viewTool.inHandleModify ? this.viewTool.viewHandles.focusHandle : undefined;\n return (undefined !== focusHandle && ViewHandleType.TargetCenter === focusHandle.handleType);\n }\n}\n\n/** A ViewingToolHandle with inertia.\n * If the handle is used with *throwing action* (mouse is moving when button goes up or via a touch with movement).\n * it continues to move briefly causing the operation to continue.\n */\nabstract class HandleWithInertia extends ViewingToolHandle implements Animator {\n protected _duration!: BeDuration;\n protected _end!: BeTimePoint;\n protected _inertiaVec?: Vector3d;\n\n public doManipulation(ev: BeButtonEvent, inDynamics: boolean): boolean {\n if (ToolSettings.viewingInertia.enabled && !inDynamics && undefined !== this._inertiaVec)\n return this.beginAnimation();\n\n const vp = ev.viewport;\n if (undefined === vp)\n return false;\n\n const thisPtNpc = vp.worldToNpc(ev.point);\n thisPtNpc.z = this._lastPtNpc.z;\n\n this._inertiaVec = undefined;\n if (this._lastPtNpc.isAlmostEqual(thisPtNpc, 1.0e-10))\n return true;\n\n this._inertiaVec = this._lastPtNpc.vectorTo(thisPtNpc);\n return this.perform(thisPtNpc);\n }\n\n /** Set this handle to become the Viewport's animator */\n protected beginAnimation() {\n this._duration = ToolSettings.viewingInertia.duration;\n if (this._duration.isTowardsFuture) { // ensure duration is towards future. Otherwise, don't start animation\n this._end = BeTimePoint.fromNow(this._duration);\n const vp = this.viewTool.viewport;\n if (undefined !== vp)\n vp.setAnimator(this);\n }\n return true;\n }\n\n /** Move this handle during the inertia duration */\n public animate(): boolean {\n if (undefined === this._inertiaVec)\n return true; // handle was removed\n\n // get the fraction of the inertia duration that remains. The decay is a combination of the number of iterations (see damping below)\n // and time. That way the handle slows down even if the framerate is lower.\n const remaining = ((this._end.milliseconds - BeTimePoint.now().milliseconds) / this._duration.milliseconds);\n const pt = this._lastPtNpc.plusScaled(this._inertiaVec, remaining);\n\n // if we're not moving any more, or if the duration has elapsed, we're done\n if (remaining <= 0 || (this._lastPtNpc.minus(pt).magnitudeSquared() < .000001)) {\n const vp = this.viewTool.viewport;\n if (undefined === vp)\n return false;\n\n vp.saveViewUndo();\n return true; // remove this as the animator\n }\n this.perform(pt); // perform the viewing operation\n inertialDampen(this._inertiaVec);\n return false;\n }\n\n public interrupt() { }\n protected abstract perform(thisPtNpc: Point3d): boolean;\n}\n\n/** ViewingToolHandle for performing the \"pan view\" operation */\nclass ViewPan extends HandleWithInertia {\n public get handleType() { return ViewHandleType.Pan; }\n public override getHandleCursor() { return this.viewTool.inHandleModify ? IModelApp.viewManager.grabbingCursor : IModelApp.viewManager.grabCursor; }\n\n public firstPoint(ev: BeButtonEvent) {\n this._inertiaVec = undefined;\n\n const tool = this.viewTool;\n const vp = tool.viewport;\n\n if (undefined === vp)\n return false;\n\n vp.worldToNpc(ev.point, this._lastPtNpc);\n\n // if the camera is on, we need to find the element under the starting point to get the z\n if (this.needDepthPoint(ev, false)) {\n this.pickDepthPoint(ev);\n if (undefined !== this._depthPoint)\n vp.worldToNpc(this._depthPoint, this._lastPtNpc);\n else\n this._lastPtNpc.z = ViewManip.getFocusPlaneNpc(vp);\n }\n\n tool.beginDynamicUpdate();\n tool.provideToolAssistance(\"Pan.Prompts.NextPoint\");\n return true;\n }\n\n public testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Low;\n return true;\n }\n\n /** perform the view pan operation */\n protected perform(thisPtNpc: Point3d) {\n const tool = this.viewTool;\n const vp = tool.viewport;\n\n if (undefined === vp)\n return false;\n\n const view = vp.view;\n const lastWorld = vp.npcToWorld(this._lastPtNpc);\n const thisWorld = vp.npcToWorld(thisPtNpc);\n const dist = thisWorld.vectorTo(lastWorld);\n if (view.is3d()) {\n if (ViewStatus.Success !== (vp.viewingGlobe ? view.moveCameraGlobal(lastWorld, thisWorld) : view.moveCameraWorld(dist)))\n return false;\n\n this.changeFocusFromDepthPoint(); // if we have a valid depth point, set it focus distance from it\n } else {\n view.setOrigin(view.getOrigin().plus(dist));\n }\n\n vp.setupFromView();\n this._lastPtNpc.setFrom(thisPtNpc);\n return true;\n }\n\n /** @internal */\n public override needDepthPoint(ev: BeButtonEvent, _isPreview: boolean): boolean {\n const vp = ev.viewport;\n if (undefined === vp)\n return false;\n return vp.isCameraOn && CoordSource.User === ev.coordsFrom;\n }\n}\n\n/** ViewingToolHandle for performing the \"rotate view\" operation */\nclass ViewRotate extends HandleWithInertia {\n private readonly _frustum = new Frustum();\n private readonly _activeFrustum = new Frustum();\n private readonly _anchorPtNpc = new Point3d();\n public get handleType() { return ViewHandleType.Rotate; }\n public override getHandleCursor() { return IModelApp.viewManager.rotateCursor; }\n\n public testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Medium; // Always prefer over pan handle which is only force enabled by IdleTool middle button action...\n return true;\n }\n\n public firstPoint(ev: BeButtonEvent) {\n this._inertiaVec = undefined;\n\n const tool = this.viewTool;\n const vp = ev.viewport;\n if (undefined === vp)\n return false;\n\n this.pickDepthPoint(ev);\n if (undefined !== this._depthPoint)\n tool.setTargetCenterWorld(this._depthPoint, false, false);\n\n vp.worldToNpc(ev.rawPoint, this._anchorPtNpc);\n this._lastPtNpc.setFrom(this._anchorPtNpc);\n\n vp.getFrustum(CoordSystem.World, false, this._activeFrustum);\n this._frustum.setFrom(this._activeFrustum);\n\n tool.beginDynamicUpdate();\n this.viewTool.provideToolAssistance(\"Rotate.Prompts.NextPoint\");\n return true;\n }\n\n public perform(ptNpc: Point3d): boolean {\n const tool = this.viewTool;\n const vp = tool.viewport;\n\n if (undefined === vp)\n return false;\n\n if (this._anchorPtNpc.isAlmostEqual(ptNpc, 1.0e-2)) // too close to anchor pt\n ptNpc.setFrom(this._anchorPtNpc);\n\n const currentFrustum = vp.getFrustum(CoordSystem.World, false);\n const frustumChange = !currentFrustum.equals(this._activeFrustum);\n if (frustumChange)\n this._frustum.setFrom(currentFrustum);\n else {\n if (!vp.setupViewFromFrustum(this._frustum))\n return false;\n }\n\n const currPt = vp.npcToView(ptNpc);\n if (frustumChange)\n this._anchorPtNpc.setFrom(ptNpc);\n\n const view = vp.view;\n let angle: Angle;\n let worldAxis: Vector3d;\n const worldPt = tool.targetCenterWorld;\n if (!view.allow3dManipulations()) {\n const centerPt = vp.worldToView(worldPt);\n const firstPt = vp.npcToView(this._anchorPtNpc);\n const vector0 = Vector2d.createStartEnd(centerPt, firstPt);\n const vector1 = Vector2d.createStartEnd(centerPt, currPt);\n angle = vector0.angleTo(vector1);\n worldAxis = Vector3d.unitZ();\n } else {\n const viewRect = vp.viewRect;\n\n vp.npcToView(ptNpc, currPt);\n const firstPt = vp.npcToView(this._anchorPtNpc);\n\n const xDelta = (currPt.x - firstPt.x);\n const yDelta = (currPt.y - firstPt.y);\n\n // Movement in screen x == rotation about drawing Z (preserve up) or rotation about screen Y...\n const xAxis = ToolSettings.preserveWorldUp && !vp.viewingGlobe ? (undefined !== this._depthPoint ? vp.view.getUpVector(this._depthPoint) : Vector3d.unitZ()) : vp.rotation.getRow(1);\n\n // Movement in screen y == rotation about screen X...\n const yAxis = vp.rotation.getRow(0);\n\n const xRMatrix = (xDelta ? Matrix3d.createRotationAroundVector(xAxis, Angle.createRadians(Math.PI / (viewRect.width / xDelta))) : undefined) ?? Matrix3d.identity;\n const yRMatrix = (yDelta ? Matrix3d.createRotationAroundVector(yAxis, Angle.createRadians(Math.PI / (viewRect.height / yDelta))) : undefined) ?? Matrix3d.identity;\n const worldRMatrix = yRMatrix.multiplyMatrixMatrix(xRMatrix);\n const result = worldRMatrix.getAxisAndAngleOfRotation();\n angle = Angle.createRadians(-result.angle.radians);\n worldAxis = result.axis;\n }\n\n const worldMatrix = Matrix3d.createRotationAroundVector(worldAxis, angle);\n if (undefined !== worldMatrix) {\n const worldTransform = Transform.createFixedPointAndMatrix(worldPt, worldMatrix);\n const frustum = this._frustum.transformBy(worldTransform);\n view.setupFromFrustum(frustum);\n if (view.is3d())\n view.alignToGlobe(view.getCenter());\n this.changeFocusFromDepthPoint(); // if we have a valid depth point, set it focus distance from it\n vp.setupFromView();\n }\n\n vp.getWorldFrustum(this._activeFrustum);\n this._lastPtNpc.setFrom(ptNpc);\n\n return true;\n }\n\n public override onWheel(ev: BeWheelEvent): boolean {\n // When rotate is active, the mouse wheel should zoom about the target center when it's displayed...\n const tool = this.viewTool;\n if (tool.targetCenterLocked || tool.inHandleModify) {\n ev.point = tool.targetCenterWorld;\n ev.coordsFrom = CoordSource.Precision; // WheelEventProcessor.doZoom checks this to decide whether to use raw or adjusted point...\n }\n return false;\n }\n\n /** @internal */\n public override needDepthPoint(ev: BeButtonEvent, _isPreview: boolean): boolean {\n const vp = ev.viewport;\n if (undefined === vp)\n return false;\n return (!this.viewTool.targetCenterLocked && vp.view.allow3dManipulations());\n }\n\n /** @internal */\n public override adjustDepthPoint(isValid: boolean, vp: Viewport, plane: Plane3dByOriginAndUnitNormal, source: DepthPointSource): boolean {\n if (vp.viewingGlobe && vp.iModel.ecefLocation && this.viewTool.isPointVisible(vp.iModel.ecefLocation.earthCenter)) {\n plane.getOriginRef().setFrom(vp.iModel.ecefLocation.earthCenter);\n plane.getNormalRef().setFrom(vp.view.getZVector());\n return true;\n }\n if (super.adjustDepthPoint(isValid, vp, plane, source))\n return true;\n\n plane.getOriginRef().setFrom(this.viewTool.targetCenterWorld);\n return false;\n }\n}\n\n/** ViewingToolHandle for performing the \"look view\" operation */\nclass ViewLook extends ViewingToolHandle {\n private _eyePoint = new Point3d();\n private _firstPtView = new Point3d();\n private _rotation = new Matrix3d();\n private _frustum = new Frustum();\n public get handleType() { return ViewHandleType.Look; }\n public override getHandleCursor(): string { return IModelApp.viewManager.lookCursor; }\n\n public testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Medium; // Always prefer over pan handle which is only force enabled by IdleTool middle button action...\n return true;\n }\n\n public firstPoint(ev: BeButtonEvent) {\n const tool = this.viewTool;\n const vp = ev.viewport;\n if (undefined === vp)\n return true;\n\n const view = vp.view;\n if (!view || !view.is3d() || !view.allow3dManipulations())\n return false;\n\n this._firstPtView.setFrom(ev.viewPoint);\n this._eyePoint.setFrom(view.getEyePoint());\n this._rotation.setFrom(vp.rotation);\n\n vp.getWorldFrustum(this._frustum);\n tool.beginDynamicUpdate();\n this.viewTool.provideToolAssistance(\"Look.Prompts.NextPoint\");\n return true;\n }\n\n public override onWheel(_ev: BeWheelEvent): boolean {\n const tool = this.viewTool;\n if (!tool.inHandleModify)\n return false;\n tool.nPts = 0; // start over\n tool.inHandleModify = false;\n tool.inDynamicUpdate = false;\n tool.viewHandles.setFocus(-1);\n return false;\n }\n\n public doManipulation(ev: BeButtonEvent, _inDynamics: boolean): boolean {\n const tool = this.viewTool;\n const viewport = tool.viewport;\n if (undefined === viewport)\n return false;\n\n if (ev.viewport !== viewport)\n return false;\n\n const worldTransform = this.getLookTransform(viewport, this._firstPtView, ev.viewPoint);\n const frustum = this._frustum.transformBy(worldTransform);\n viewport.setupViewFromFrustum(frustum);\n\n return true;\n }\n\n private getLookTransform(vp: Viewport, firstPt: Point3d, currPt: Point3d): Transform {\n const viewRect = vp.viewRect;\n const xExtent = viewRect.width;\n const yExtent = viewRect.height;\n const xDelta = (currPt.x - firstPt.x);\n const yDelta = (currPt.y - firstPt.y);\n const xAngle = -(xDelta / xExtent) * Math.PI;\n const yAngle = -(yDelta / yExtent) * Math.PI;\n\n const inverseRotation = this._rotation.inverse();\n const horizontalRotation = Matrix3d.createRotationAroundVector(Vector3d.unitZ(), Angle.createRadians(xAngle));\n const verticalRotation = Matrix3d.createRotationAroundVector(Vector3d.unitX(), Angle.createRadians(yAngle));\n\n if (undefined === inverseRotation || undefined === horizontalRotation || undefined === verticalRotation)\n return Transform.createIdentity();\n\n verticalRotation.multiplyMatrixMatrix(this._rotation, verticalRotation);\n inverseRotation.multiplyMatrixMatrix(verticalRotation, verticalRotation);\n\n const newRotation = horizontalRotation.multiplyMatrixMatrix(verticalRotation);\n const transform = Transform.createFixedPointAndMatrix(this._eyePoint, newRotation);\n return transform;\n }\n}\n\n/** handle for tools that animate a frustum change based on the position of the cursor relative to an anchor point. */\nabstract class AnimatedHandle extends ViewingToolHandle {\n protected readonly _anchorPtView = new Point3d();\n protected readonly _lastPtView = new Point3d();\n protected _lastMotionTime = 0;\n protected _deadZone = 36;\n\n public testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Medium;\n return true;\n }\n\n protected getElapsedTime(): number {\n const prev = this._lastMotionTime;\n this._lastMotionTime = Date.now();\n return Geometry.clamp(this._lastMotionTime - prev, 0, 1000) / 1000;\n }\n // called on mouse motion\n public doManipulation(ev: BeButtonEvent): boolean {\n this._lastPtView.setFrom(ev.viewPoint);\n return true;\n }\n\n // called when animation is interrupted\n public interrupt(): void { }\n public animate(): boolean {\n // Don't continue animation when mouse is outside view, and don't jump if it returns...\n if (undefined !== IModelApp.toolAdmin.cursorView)\n return true;\n this.getElapsedTime();\n return false;\n }\n\n public firstPoint(ev: BeButtonEvent): boolean {\n const vp = ev.viewport;\n const tool = this.viewTool;\n tool.inDynamicUpdate = true;\n if (vp && this.needDepthPoint(ev, false)) {\n this.pickDepthPoint(ev);\n if (undefined !== this._depthPoint) {\n vp.worldToView(this._depthPoint, this._anchorPtView);\n } else {\n vp.worldToNpc(ev.point, this._anchorPtView);\n this._anchorPtView.z = ViewManip.getFocusPlaneNpc(vp);\n vp.npcToView(this._anchorPtView, this._anchorPtView);\n }\n } else {\n this._anchorPtView.setFrom(ev.viewPoint);\n }\n this._lastPtView.setFrom(this._anchorPtView);\n this._lastMotionTime = Date.now();\n if (undefined !== tool.viewport)\n tool.viewport.setAnimator(this);\n return true;\n }\n\n protected getDirection(): Vector3d | undefined {\n const dir = this._anchorPtView.vectorTo(this._lastPtView);\n dir.z = 0;\n return dir.magnitudeSquared() < this._deadZone ? undefined : dir; // dead zone around starting point\n }\n\n protected getInputVector(): Vector3d | undefined {\n const vp = this.viewTool.viewport;\n if (undefined === vp)\n return undefined;\n const dir = this.getDirection();\n if (undefined === dir)\n return undefined;\n const viewRect = vp.viewRect;\n return new Vector3d(dir.x * (2.0 / viewRect.width), dir.y * (2.0 / viewRect.height));\n }\n\n public override onReinitialize(): void {\n const tool = this.viewTool;\n tool.inDynamicUpdate = false;\n const vp = tool.viewport;\n if (undefined !== vp)\n vp.setAnimator();\n }\n\n // called when wheel rolls, reset tool\n public override onWheel(_ev: BeWheelEvent): boolean {\n const tool = this.viewTool;\n tool.nPts = 0; // start over\n tool.inDynamicUpdate = false; // not active\n return false;\n }\n}\n\n/** ViewingToolHandle for performing the \"scroll view\" operation */\nclass ViewScroll extends AnimatedHandle {\n public get handleType() { return ViewHandleType.Scroll; }\n public override getHandleCursor(): string { return \"move\"; }\n\n public override drawHandle(context: DecorateContext, _hasFocus: boolean): void {\n if (context.viewport !== this.viewTool.viewport || !this.viewTool.inDynamicUpdate)\n return;\n\n const radius = Math.floor(context.viewport.pixelsFromInches(0.1)) + 0.5;\n const position = this._anchorPtView.clone();\n const position2 = this._lastPtView.clone();\n const offset = position2.minus(position);\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\n ctx.beginPath();\n ctx.strokeStyle = \"rgba(0,255,0,.3)\";\n ctx.setLineDash([10, 4]);\n ctx.lineWidth = 3;\n ctx.moveTo(0, 0);\n ctx.lineTo(offset.x, offset.y);\n ctx.stroke();\n ctx.beginPath();\n ctx.setLineDash([]);\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\n ctx.lineWidth = 1;\n ctx.fillStyle = \"rgba(255,255,255,.5)\";\n ctx.arc(0, 0, radius, 0, 2 * Math.PI);\n ctx.fill();\n ctx.stroke();\n\n let vec = Vector2d.createStartEnd(position, position2);\n if (undefined === vec)\n vec = Vector2d.unitX();\n else\n vec.normalize(vec);\n\n const slashPts = [new Point2d(), new Point2d()];\n slashPts[0].plusScaled(vec, radius, slashPts[0]);\n slashPts[1].plusScaled(vec, -radius, slashPts[1]);\n\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 2;\n ctx.moveTo(slashPts[0].x, slashPts[0].y);\n ctx.lineTo(slashPts[1].x, slashPts[1].y);\n ctx.stroke();\n };\n context.addCanvasDecoration({ position, drawDecoration }, true);\n }\n\n public override firstPoint(ev: BeButtonEvent) {\n super.firstPoint(ev);\n this.viewTool.provideToolAssistance(\"Scroll.Prompts.NextPoint\");\n return true;\n }\n\n public override animate(): boolean {\n if (!super.animate())\n return false;\n\n const dist = this.getDirection();\n if (undefined === dist)\n return false;\n\n dist.scaleInPlace(ToolSettings.scrollSpeed * this.getElapsedTime());\n const tool = this.viewTool;\n const viewport = tool.viewport;\n if (undefined === viewport)\n return false;\n\n if (viewport.isCameraOn) {\n const points: Point3d[] = new Array<Point3d>(2);\n points[0] = this._anchorPtView.clone();\n points[1] = points[0].plus(dist);\n\n viewport.viewToNpcArray(points);\n points[1].z = points[0].z;\n viewport.npcToWorldArray(points);\n\n const offset = points[1].minus(points[0]);\n const offsetTransform = Transform.createTranslation(offset);\n const frustum = viewport.getWorldFrustum();\n frustum.transformBy(offsetTransform, frustum);\n viewport.setupViewFromFrustum(frustum);\n } else {\n viewport.scroll(dist, { noSaveInUndo: true });\n }\n\n return false;\n }\n\n /** @internal */\n public override needDepthPoint(ev: BeButtonEvent, _isPreview: boolean): boolean {\n const vp = ev.viewport;\n if (undefined === vp)\n return false;\n return vp.isCameraOn && CoordSource.User === ev.coordsFrom;\n }\n}\n\n/** ViewingToolHandle for performing the \"zoom view\" operation */\nclass ViewZoom extends ViewingToolHandle {\n protected readonly _anchorPtNpc = new Point3d();\n protected readonly _anchorPtView = new Point3d();\n protected readonly _anchorPtWorld = new Point3d();\n protected readonly _lastPtView = new Point3d();\n protected readonly _startEyePoint = new Point3d();\n protected _startFrust?: Frustum;\n protected _lastZoomRatio = 1.0;\n public get handleType() { return ViewHandleType.Zoom; }\n public override getHandleCursor() { return IModelApp.viewManager.zoomCursor; }\n\n public testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Medium; // Always prefer over pan handle which is only force enabled by IdleTool middle button action...\n return true;\n }\n\n public override drawHandle(context: DecorateContext, hasFocus: boolean): void {\n if (!hasFocus || context.viewport !== this.viewTool.viewport || !this.viewTool.inDynamicUpdate)\n return;\n\n const radius = Math.floor(context.viewport.pixelsFromInches(0.15)) + 0.5;\n const crossRadius = radius * 0.6;\n const position = this._anchorPtView.clone();\n position.x = Math.floor(position.x) + 0.5;\n position.y = Math.floor(position.y) + 0.5;\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\n ctx.beginPath();\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\n ctx.lineWidth = 1;\n ctx.fillStyle = \"rgba(255,255,255,.5)\";\n ctx.arc(0, 0, radius, 0, 2 * Math.PI);\n ctx.fill();\n ctx.stroke();\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 2;\n ctx.moveTo(-crossRadius, 0);\n ctx.lineTo(crossRadius, 0);\n if (this._lastZoomRatio < 1.0) {\n ctx.moveTo(0, -crossRadius);\n ctx.lineTo(0, crossRadius);\n }\n ctx.stroke();\n };\n context.addCanvasDecoration({ position, drawDecoration }, true);\n }\n\n public firstPoint(ev: BeButtonEvent) {\n const vp = ev.viewport;\n if (undefined === vp)\n return false;\n this.viewTool.inDynamicUpdate = true;\n if (this.needDepthPoint(ev, false)) {\n this.pickDepthPoint(ev);\n if (undefined !== this._depthPoint) {\n vp.worldToView(this._depthPoint, this._anchorPtView);\n } else {\n vp.worldToNpc(ev.point, this._anchorPtView);\n this._anchorPtView.z = ViewManip.getFocusPlaneNpc(vp);\n vp.npcToView(this._anchorPtView, this._anchorPtView);\n }\n } else {\n this._anchorPtView.setFrom(ev.viewPoint);\n }\n this._lastPtView.setFrom(this._anchorPtView);\n\n vp.viewToNpc(this._anchorPtView, this._anchorPtNpc);\n vp.viewToWorld(this._anchorPtView, this._anchorPtWorld);\n this._startFrust = vp.getWorldFrustum();\n\n if (vp.view.is3d() && vp.view.isCameraOn)\n this._startEyePoint.setFrom(vp.view.getEyePoint());\n\n this.viewTool.provideToolAssistance(\"Zoom.Prompts.NextPoint\");\n return true;\n }\n\n public override onWheel(_ev: BeWheelEvent): boolean {\n const tool = this.viewTool;\n if (!tool.inHandleModify)\n return false;\n tool.nPts = 0; // start over\n tool.inHandleModify = false;\n tool.inDynamicUpdate = false;\n tool.viewHandles.setFocus(-1);\n return false;\n }\n\n protected getDirection(): Vector3d | undefined {\n const dir = this._anchorPtView.vectorTo(this._lastPtView);\n dir.z = 0;\n return dir.magnitudeSquared() < 36 ? undefined : dir; // dead zone around starting point\n }\n\n public doManipulation(ev: BeButtonEvent): boolean {\n this._lastPtView.setFrom(ev.viewPoint);\n\n if (undefined === this._startFrust || undefined === this.getDirection()) // on anchor point?\n return false;\n\n const viewport = this.viewTool.viewport;\n if (undefined === viewport)\n return false;\n\n const view = viewport.view;\n const thisPtNpc = viewport.viewToNpc(this._lastPtView);\n const dist = this._anchorPtNpc.minus(thisPtNpc);\n dist.z = 0.0;\n dist.x = 0.0;\n let zoomRatio = 1.0 + (dist.magnitude() * ToolSettings.zoomSpeed);\n if (dist.y > 0)\n zoomRatio = 1.0 / zoomRatio;\n this._lastZoomRatio = zoomRatio;\n\n const frustum = this._startFrust.clone();\n const transform = Transform.createFixedPointAndMatrix(this._anchorPtWorld, Matrix3d.createScale(zoomRatio, zoomRatio, view.is3d() ? zoomRatio : 1.0));\n\n if (view.is3d() && view.isCameraOn) {\n const oldEyePoint = this._startEyePoint;\n const newEyePoint = transform.multiplyPoint3d(oldEyePoint);\n const cameraOffset = Vector3d.createStartEnd(oldEyePoint, newEyePoint);\n Transform.createTranslation(cameraOffset, transform);\n }\n\n frustum.transformBy(transform, frustum);\n if (ViewStatus.Success !== view.setupFromFrustum(frustum))\n return false;\n\n if (view.is3d() && view.isCameraOn)\n this.changeFocusFromDepthPoint(); // if we have a valid depth point, set it focus distance from it\n\n return ViewStatus.Success === viewport.setupFromView();\n }\n\n /** @internal */\n public override needDepthPoint(ev: BeButtonEvent, _isPreview: boolean): boolean {\n const vp = ev.viewport;\n if (undefined === vp)\n return false;\n return vp.isCameraOn && CoordSource.User === ev.coordsFrom;\n }\n}\n\n/** @internal */\nclass NavigateMotion {\n private _seconds = 0;\n public readonly transform = Transform.createIdentity();\n constructor(public viewport: Viewport) { }\n\n public init(seconds: number) {\n this._seconds = seconds;\n this.transform.setIdentity();\n }\n\n public getViewUp(result?: Vector3d) { return this.viewport.rotation.getRow(1, result); }\n\n public getViewDirection(result?: Vector3d): Vector3d {\n const forward = this.viewport.rotation.getRow(2, result);\n forward.scale(-1, forward); // positive z is out of the screen, but we want direction into the screen\n return forward;\n }\n\n public takeElevator(height: number): void {\n const up = Point3d.create(0, 0, height * this._seconds);\n Transform.createTranslation(up, this.transform);\n }\n\n public modifyPitchAngleToPreventInversion(pitchAngle: number): number {\n const angleLimit = Angle.degreesToRadians(85);\n const angleTolerance = Angle.degreesToRadians(0.01);\n\n if (0.0 === pitchAngle)\n return 0.0;\n\n const viewUp = this.getViewUp();\n const viewDir = this.getViewDirection();\n const worldUp = Vector3d.unitZ();\n\n let viewAngle = worldUp.angleTo(viewUp).radians;\n if (viewDir.z < 0)\n viewAngle *= -1;\n\n let newAngle = pitchAngle + viewAngle;\n if (Math.abs(newAngle) < angleLimit)\n return pitchAngle; // not close to the limit\n if ((pitchAngle > 0) !== (viewAngle > 0) && (Math.abs(pitchAngle) < Math.PI / 2))\n return pitchAngle; // tilting away from the limit\n if (Math.abs(viewAngle) >= (angleLimit - angleTolerance))\n return 0.0; // at the limit already\n\n const difference = Math.abs(newAngle) - angleLimit;\n newAngle = (pitchAngle > 0) ? pitchAngle - difference : pitchAngle + difference;\n return newAngle; // almost at the limit, but still can go a little bit closer\n }\n\n public generateMouseLookTransform(accumulator: Vector3d, movement: XAndY, result?: Transform): Transform {\n const vp = this.viewport;\n const view = vp.view;\n if (!view.is3d() || !vp.isCameraOn)\n return Transform.createIdentity();\n const viewRect = this.viewport.viewRect;\n const xExtent = viewRect.width;\n const yExtent = viewRect.height;\n accumulator.z += this._seconds; // accumulate time delta since start...\n const snappiness = 10.0; // larger values are more responsive...\n const fraction = Geometry.clamp(snappiness * accumulator.z, 0.0, 1.0);\n accumulator.x = Geometry.interpolate(accumulator.x, fraction, movement.x);\n accumulator.y = Geometry.interpolate(accumulator.y, fraction, movement.y);\n const xAngle = -(accumulator.x / xExtent) * Math.PI * 2.0;\n const yAngle = -(accumulator.y / yExtent) * Math.PI;\n const viewRot = vp.rotation;\n const invViewRot = viewRot.inverse();\n if (undefined === invViewRot)\n return Transform.createIdentity();\n const pitchAngle = Angle.createRadians(this.modifyPitchAngleToPreventInversion(yAngle));\n const pitchMatrix = Matrix3d.createRotationAroundVector(Vector3d.unitX(), pitchAngle);\n if (undefined === pitchMatrix)\n return Transform.createIdentity();\n const pitchTimesView = pitchMatrix.multiplyMatrixMatrix(viewRot);\n const inverseViewTimesPitchTimesView = invViewRot.multiplyMatrixMatrix(pitchTimesView);\n const yawMatrix = Matrix3d.createRotationAroundVector(Vector3d.unitZ(), Angle.createRadians(xAngle));\n if (undefined === yawMatrix)\n return Transform.createIdentity();\n const yawTimesInverseViewTimesPitchTimesView = yawMatrix.multiplyMatrixMatrix(inverseViewTimesPitchTimesView);\n return Transform.createFixedPointAndMatrix(view.getEyePoint(), yawTimesInverseViewTimesPitchTimesView, result);\n }\n\n public generateRotationTransform(yawRate: number, pitchRate: number, result?: Transform): Transform {\n const vp = this.viewport;\n const view = vp.view;\n if (!view.is3d() || !vp.isCameraOn)\n return Transform.createIdentity();\n const viewRot = vp.rotation;\n const invViewRot = viewRot.inverse();\n if (undefined === invViewRot)\n return Transform.createIdentity();\n const pitchAngle = Angle.createRadians(this.modifyPitchAngleToPreventInversion(pitchRate * this._seconds));\n const pitchMatrix = Matrix3d.createRotationAroundVector(Vector3d.unitX(), pitchAngle);\n if (undefined === pitchMatrix)\n return Transform.createIdentity();\n const pitchTimesView = pitchMatrix.multiplyMatrixMatrix(viewRot);\n const inverseViewTimesPitchTimesView = invViewRot.multiplyMatrixMatrix(pitchTimesView);\n const yawMatrix = Matrix3d.createRotationAroundVector(Vector3d.unitZ(), Angle.createRadians(yawRate * this._seconds));\n if (undefined === yawMatrix)\n return Transform.createIdentity();\n const yawTimesInverseViewTimesPitchTimesView = yawMatrix.multiplyMatrixMatrix(inverseViewTimesPitchTimesView);\n return Transform.createFixedPointAndMatrix(view.getEyePoint(), yawTimesInverseViewTimesPitchTimesView, result);\n }\n\n public generateTranslationTransform(velocity: Vector3d, isConstrainedToXY: boolean, result?: Transform) {\n const points: Point3d[] = new Array<Point3d>(3);\n points[0] = new Point3d(0, 0, 0);\n points[1] = new Point3d(1, 0, 0);\n points[2] = new Point3d(0, 1, 0);\n if (this.viewport.isCameraOn) {\n this.viewport.viewToNpcArray(points);\n points[0].z = points[1].z = points[2].z = ViewManip.getFocusPlaneNpc(this.viewport); // use the focal plane for z coordinates\n this.viewport.npcToViewArray(points);\n }\n this.viewport.viewToWorldArray(points);\n const xDir = Vector3d.createStartEnd(points[0], points[1]);\n xDir.normalizeInPlace();\n const yDir = Vector3d.createStartEnd(points[0], points[2]);\n yDir.normalizeInPlace();\n\n const zDir = this.getViewDirection();\n\n if (isConstrainedToXY) {\n const up = Vector3d.unitZ();\n const cross = up.crossProduct(zDir);\n cross.crossProduct(up, zDir);\n zDir.normalizeInPlace();\n }\n\n xDir.scale(velocity.x * this._seconds, xDir);\n yDir.scale(velocity.y * this._seconds, yDir);\n zDir.scale(velocity.z * this._seconds, zDir);\n\n xDir.plus(yDir, xDir).plus(zDir, xDir);\n return Transform.createTranslation(xDir, result);\n }\n\n public moveAndMouseLook(accumulator: Vector3d, linearVelocity: Vector3d, movement: XAndY, isConstrainedToXY: boolean): boolean {\n const rotateTrans = this.generateMouseLookTransform(accumulator, movement);\n const dollyTrans = this.generateTranslationTransform(linearVelocity, isConstrainedToXY);\n this.transform.setMultiplyTransformTransform(rotateTrans, dollyTrans);\n return (accumulator.x >= movement.x && accumulator.y >= movement.y);\n }\n\n public moveAndLook(linearVelocity: Vector3d, angularVelocityX: number, angularVelocityY: number, isConstrainedToXY: boolean): void {\n const rotateTrans = this.generateRotationTransform(angularVelocityX, angularVelocityY);\n const dollyTrans = this.generateTranslationTransform(linearVelocity, isConstrainedToXY);\n this.transform.setMultiplyTransformTransform(rotateTrans, dollyTrans);\n }\n\n public pan(horizontalVelocity: number, verticalVelocity: number): void {\n const travel = new Vector3d(horizontalVelocity, verticalVelocity, 0);\n this.moveAndLook(travel, 0, 0, false);\n }\n\n public travel(yawRate: number, pitchRate: number, forwardVelocity: number, isConstrainedToXY: boolean): void {\n const travel = new Vector3d(0, 0, forwardVelocity);\n this.moveAndLook(travel, yawRate, pitchRate, isConstrainedToXY);\n }\n\n public look(yawRate: number, pitchRate: number): void { this.generateRotationTransform(yawRate, pitchRate, this.transform); }\n\n /** reset pitch of view to zero */\n public resetToLevel(): void {\n const view = this.viewport.view;\n if (!view.is3d() || !view.isCameraOn)\n return;\n const angles = YawPitchRollAngles.createFromMatrix3d(this.viewport.rotation);\n if (undefined === angles)\n return;\n angles.pitch.setRadians(0); // reset pitch to zero\n Transform.createFixedPointAndMatrix(view.getEyePoint(), angles.toMatrix3d(), this.transform);\n }\n}\n\n/** ViewingToolHandle for performing the Walk and Fly operations */\nabstract class ViewNavigate extends AnimatedHandle {\n private _initialized = false;\n protected abstract getNavigateMotion(seconds: number): NavigateMotion | undefined;\n\n public override getHandleCursor() { return IModelApp.viewManager.walkCursor; }\n public getMaxLinearVelocity() { return ToolSettings.walkVelocity; }\n public getMaxAngularVelocity() { return Math.PI / 4; }\n\n public getNavigateMode(): NavigateMode {\n const state = IModelApp.toolAdmin.currentInputState;\n return (state.isShiftDown || (false === this.viewTool.viewport?.isCameraOn)) ? NavigateMode.Pan :\n state.isControlDown ? NavigateMode.Look : NavigateMode.Travel;\n }\n\n // called in animation loop\n public override animate(): boolean {\n if (!super.animate())\n return false;\n\n const motion = this.getNavigateMotion(this.getElapsedTime());\n\n if (undefined !== motion) {\n const vp = this.viewTool.viewport;\n if (undefined === vp)\n return false;\n const frust = vp.getWorldFrustum();\n frust.multiply(motion.transform);\n vp.setupViewFromFrustum(frust);\n }\n return false;\n }\n\n public override onReinitialize(): void {\n super.onReinitialize();\n if (this._initialized)\n return;\n this._initialized = true;\n\n const tool = this.viewTool;\n const vp = tool.viewport;\n if (undefined === vp)\n return;\n\n const view = vp.view;\n if (!view.allow3dManipulations())\n return;\n\n const walkAngle = ToolSettings.walkCameraAngle;\n if (!tool.lensAngleMatches(walkAngle, Angle.degreesToRadians(15.)) || !tool.isZUp) {\n // This turns on the camera if its not already on. It also assures the camera is centered. Obviously this is required if\n // the camera is not on or the lens angle is not what we want. We also want to do it if Z will be\n // adjusted because EnforceZUp swivels the camera around what GetTargetPoint returns. If the FocusDistance is not set to something\n // reasonable the target point may be far beyond anything relevant.\n tool.setCameraLensAngle(walkAngle, tool.lensAngleMatches(walkAngle, Angle.degreesToRadians(45.)));\n }\n\n if (ToolSettings.walkEnforceZUp)\n tool.enforceZUp(view.getTargetPoint());\n\n vp.animateFrustumChange();\n }\n\n public override drawHandle(context: DecorateContext, hasFocus: boolean): void {\n if (!hasFocus || context.viewport !== this.viewTool.viewport || !this.viewTool.inDynamicUpdate)\n return;\n const position = this._anchorPtView.clone();\n position.x = Math.floor(position.x) + 0.5;\n position.y = Math.floor(position.y) + 0.5;\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.fillStyle = \"rgba(255,255,255,.3)\";\n ctx.lineWidth = 1;\n ctx.arc(0, 0, 5, 0, 2 * Math.PI);\n ctx.stroke();\n ctx.fill();\n };\n context.addCanvasDecoration({ position, drawDecoration });\n }\n}\n\n/** ViewingToolHandle for looking around and moving through a model using mouse+wasd or on-screen control sticks for touch */\nclass ViewLookAndMove extends ViewNavigate {\n private _navigateMotion: NavigateMotion;\n private _lastCollision = 0;\n private _lastReadPt = new Point3d();\n private _lastReference?: Plane3dByOriginAndUnitNormal;\n private _lastContour?: LineString3d;\n private _currentContour?: LineString3d;\n protected readonly _positionInput = new Vector3d();\n protected readonly _accumulator = new Vector3d();\n protected _lastMovement?: XAndY;\n protected _touchStartL?: BeTouchEvent;\n protected _touchStartR?: BeTouchEvent;\n protected _touchLast?: BeTouchEvent;\n protected _touchElevate = false;\n protected _touchLook = false;\n protected _touchSpeedUp = false;\n protected _havePointerLock = false;\n protected _pointerLockChangeListener?: EventListener;\n protected _pointerLockClickEngagementListener?: EventListener;\n protected _pointerLockKeyEngagementListener?: EventListener;\n\n constructor(viewManip: ViewManip) {\n super(viewManip);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._navigateMotion = new NavigateMotion(this.viewTool.viewport!);\n }\n\n public get handleType(): ViewHandleType { return ViewHandleType.LookAndMove; }\n public override getHandleCursor(): string { return IModelApp.viewManager.lookCursor; }\n\n public override testHandleForHit(_ptScreen: Point3d, out: { distance: number, priority: ViewManipPriority }): boolean {\n out.distance = 0.0;\n out.priority = ViewManipPriority.Medium; // Always prefer over pan handle which is only force enabled by IdleTool middle button action...\n return true;\n }\n\n public override onReinitialize(): void {\n super.onReinitialize();\n this._touchStartL = this._touchStartR = this._touchLast = undefined;\n this._touchElevate = this._touchSpeedUp = this._touchLook = false;\n if (this.viewTool.viewHandles.testHit(Point3d.createZero(), ViewHandleType.LookAndMove))\n this.viewTool.viewHandles.focusHitHandle(); // Ensure key events go to this handle by default w/o requiring motion...\n this.onCleanup();\n this.requestPointerLock(true);\n }\n\n public override onCleanup(): void {\n super.onCleanup();\n this.releasePointerLock();\n }\n\n private async pointerLockChangeEvent(): Promise<void> {\n const vp = this.viewTool.viewport;\n if (undefined !== vp && document.pointerLockElement === vp.canvas) {\n vp.npcToView(NpcCenter, this._anchorPtView); // Display indicator in the middle of the view for pointer lock...\n this._lastPtView.setFrom(this._anchorPtView);\n this._havePointerLock = true;\n vp.invalidateDecorations();\n } else {\n // If ESC is used to disable pointer lock, exit the tool instead of continuing in drag mode...\n if (this._havePointerLock && this.viewTool.inDynamicUpdate)\n await this.viewTool.exitTool();\n else\n this._havePointerLock = false;\n }\n }\n\n private requestPointerLock(enable: boolean): void {\n if (!enable) {\n if (undefined !== this._pointerLockClickEngagementListener) {\n document.removeEventListener(\"click\", this._pointerLockClickEngagementListener, false);\n this._pointerLockClickEngagementListener = undefined;\n }\n if (undefined !== this._pointerLockKeyEngagementListener) {\n document.removeEventListener(\"keydown\", this._pointerLockKeyEngagementListener, false);\n this._pointerLockKeyEngagementListener = undefined;\n }\n return;\n }\n\n if (!ToolSettings.walkRequestPointerLock)\n return;\n\n const vp = this.viewTool.viewport;\n if (undefined === vp)\n return;\n\n // NOTE: Chrome appears to be the only browser that doesn't require pointer lock to be requested from an engagement event like click.\n // Currently pointer lock is requested for \"click\" and not \"mousedown\" since we don't want pointer lock for drag operation.\n if (undefined === this._pointerLockChangeListener) {\n this._pointerLockChangeListener = async () => this.pointerLockChangeEvent();\n document.addEventListener(\"pointerlockchange\", this._pointerLockChangeListener, false);\n }\n\n if (undefined === this._pointerLockClickEngagementListener) {\n this._pointerLockClickEngagementListener = () => {\n if (1 === this.viewTool.nPts && undefined !== IModelApp.toolAdmin.cursorView)\n void vp.canvas.requestPointerLock();\n };\n document.addEventListener(\"click\", this._pointerLockClickEngagementListener, false);\n }\n\n if (undefined === this._pointerLockKeyEngagementListener) {\n this._pointerLockKeyEngagementListener = (ev: Event) => {\n if (0 === this.viewTool.nPts && undefined !== IModelApp.toolAdmin.cursorView && this.isNavigationKey(ev as KeyboardEvent))\n void vp.canvas.requestPointerLock();\n };\n document.addEventListener(\"keydown\", this._pointerLockKeyEngagementListener, false);\n }\n }\n\n private releasePointerLock(): void {\n this._havePointerLock = false;\n this.requestPointerLock(false);\n if (undefined !== this._pointerLockChangeListener) {\n document.removeEventListener(\"pointerlockchange\", this._pointerLockChangeListener, false);\n this._pointerLockChangeListener = undefined;\n }\n if (null !== document.pointerLockElement && undefined !== document.exitPointerLock)\n document.exitPointerLock();\n }\n\n public override firstPoint(ev: BeButtonEvent): boolean {\n this.viewTool.provideToolAssistance(\"LookAndMove.Prompts.NextPoint\");\n if (!super.firstPoint(ev))\n return false;\n\n const vp = this.viewTool.viewport;\n if (undefined === vp || !vp.isCameraOn)\n return true;\n\n if (InputSource.Mouse === ev.inputSource) {\n this._deadZone = Math.pow(vp.pixelsFromInches(0.5), 2); // Only used if pointer lock isn't supported...\n } else {\n this._touchLook = true;\n vp.npcToView(NpcCenter, this._anchorPtView); // Display indicator in the middle of the view for touch look...\n }\n return true;\n }\n\n public override doManipulation(ev: BeButtonEvent): boolean {\n if (InputSource.Mouse === ev.inputSource)\n this._lastMovement = this._havePointerLock ? ev.movement : undefined;\n else\n this._lastMovement = this._lastPtView.vectorTo(ev.viewPoint).scale(2.0); // ev.movement isn't available for button event created from touch event...\n this._accumulator.setZero();\n\n return super.doManipulation(ev);\n }\n\n public override getMaxLinearVelocity() {\n const maxLinearVelocity = super.getMaxLinearVelocity();\n if (0 === ToolSettings.walkVelocityChange)\n return (this._touchSpeedUp ? maxLinearVelocity * 2.0 : maxLinearVelocity);\n\n const speedFactor = Geometry.clamp(ToolSettings.walkVelocityChange + (ToolSettings.walkVelocityChange > 0 ? 1 : -1), -10, 10);\n const speedMultiplier = (speedFactor >= 0 ? speedFactor : 1 / Math.abs(speedFactor));\n\n return maxLinearVelocity * speedMultiplier;\n }\n\n protected getMaxAngularVelocityX() { return 2 * this.getMaxAngularVelocity(); } // Allow turning to be faster than looking up/down...\n protected getMaxAngularVelocityY() { return this.getMaxAngularVelocity(); }\n\n protected getLinearVelocity(): Vector3d {\n const positionInput = Vector3d.create();\n const position = this.getTouchStartPosition(this._touchStartL);\n\n if (undefined !== position) {\n const vp = this.viewTool.viewport;\n const outerRadius = vp ? this.getTouchControlRadius(vp) : 1;\n const offset = this.getTouchOffset(this._touchStartL, outerRadius);\n const inputL = new Vector3d(offset.x * (1.0 / outerRadius), offset.y * (1.0 / outerRadius));\n positionInput.x = inputL.x * this.getMaxLinearVelocity();\n if (this._touchElevate)\n positionInput.y = inputL.y * this.getMaxLinearVelocity();\n else\n positionInput.z = inputL.y * -this.getMaxLinearVelocity();\n return positionInput;\n }\n\n this._positionInput.scale(this.getMaxLinearVelocity(), positionInput);\n return positionInput;\n }\n\n protected getAngularVelocity(): Vector3d {\n const angularInput = Vector3d.create();\n const position = this.getTouchStartPosition(this._touchStartR);\n\n if (undefined !== position) {\n const vp = this.viewTool.viewport;\n const outerRadius = vp ? this.getTouchControlRadius(vp) : 1;\n const offset = this.getTouchOffset(this._touchStartR, outerRadius);\n const inputA = new Vector3d(offset.x * (1.0 / outerRadius), offset.y * (1.0 / outerRadius));\n angularInput.x = inputA.x * -this.getMaxAngularVelocityX();\n angularInput.y = inputA.y * -this.getMaxAngularVelocityY();\n return angularInput;\n }\n\n if (this._havePointerLock || this._touchLook)\n return angularInput;\n\n const input = this.getInputVector();\n if (undefined !== input) {\n angularInput.x = input.x * -this.getMaxAngularVelocityX();\n angularInput.y = input.y * -this.getMaxAngularVelocityY();\n }\n return angularInput;\n }\n\n protected getHorizAndVertVelocity(): Vector3d | undefined {\n const input = this.getInputVector();\n if (undefined === input)\n return undefined;\n input.scale(this.getMaxLinearVelocity(), input);\n return input;\n }\n\n private computeCollisionData(vp: Viewport, eyePt: Point3d): void {\n const contourLine = LineString3d.create();\n const viewPt = vp.npcToView(NpcCenter);\n const pts: Point2d[] = [];\n pts[0] = new Point2d(Math.floor(viewPt.x + 0.5), vp.viewRect.top);\n pts[1] = new Point2d(pts[0].x + 1, vp.viewRect.bottom);\n const range = Range2d.createArray(pts);\n\n let detectStepUp = false;\n const rect = new ViewRect();\n rect.initFromRange(range);\n vp.readPixels(rect, Pixel.Selector.GeometryAndDistance, (pixels) => {\n if (undefined === pixels)\n return;\n\n const sRange = Range2d.createNull();\n sRange.extendPoint(Point2d.create(vp.cssPixelsToDevicePixels(range.low.x), vp.cssPixelsToDevicePixels(range.low.y)));\n sRange.extendPoint(Point2d.create(vp.cssPixelsToDevicePixels(range.high.x), vp.cssPixelsToDevicePixels(range.high.y)));\n\n const testPoint = Point2d.create(sRange.low.x);\n for (testPoint.y = sRange.high.y; testPoint.y >= sRange.low.y; --testPoint.y) {\n const pixel = pixels.getPixel(testPoint.x, testPoint.y);\n if (pixel.distanceFraction < 0)\n continue; // No geometry at location...\n\n const hitPointWorld = vp.getPixelDataWorldPoint({ pixels, x: testPoint.x, y: testPoint.y, preserveModelDisplayTransforms: true });\n if (undefined === hitPointWorld)\n continue;\n\n if (0 === contourLine.numPoints()) {\n if (undefined === this._lastReference) {\n const refPt = (ToolSettings.walkDetectFloor ? eyePt.plusScaled(Vector3d.unitZ(), -ToolSettings.walkEyeHeight) : hitPointWorld);\n this._lastReference = Plane3dByOriginAndUnitNormal.create(refPt, Vector3d.unitZ());\n detectStepUp = ToolSettings.walkDetectFloor;\n } else if (undefined !== this._lastContour && this._lastContour.numPoints() > 1) {\n let fractLo, fractHi;\n const forwardDir = Vector3d.unitZ().crossProduct(vp.view.getXVector());\n const yPlaneHi = Plane3dByOriginAndUnitNormal.create(hitPointWorld, forwardDir);\n\n if (undefined !== yPlaneHi) {\n yPlaneHi.getNormalRef().scaleInPlace(-1);\n yPlaneHi.getOriginRef().addScaledInPlace(yPlaneHi.getNormalRef(), Constant.oneCentimeter * 5);\n\n const resultHi: CurveLocationDetail[] = [];\n this._lastContour.appendPlaneIntersectionPoints(yPlaneHi, resultHi);\n\n for (const intersectionHi of resultHi) {\n if ((undefined === fractHi || intersectionHi.fraction < fractHi) && intersectionHi.point.distance(hitPointWorld) < ToolSettings.walkEyeHeight)\n fractHi = intersectionHi.fraction;\n }\n\n if (undefined !== fractHi) {\n const yPlaneLo = yPlaneHi.clone();\n yPlaneLo.getOriginRef().addScaledInPlace(yPlaneLo.getNormalRef(), ToolSettings.walkEyeHeight * 2);\n\n const resultLo: CurveLocationDetail[] = [];\n this._lastContour.appendPlaneIntersectionPoints(yPlaneLo, resultLo);\n\n for (const intersectionLo of resultLo) {\n if (undefined === fractLo || intersectionLo.fraction < fractLo)\n fractLo = intersectionLo.fraction;\n }\n\n if (undefined === fractLo && yPlaneHi.altitude(this._lastContour.startPoint()) > 0)\n fractLo = 0; // Include from start if last path was shorter than requested section...\n }\n }\n\n if (undefined !== fractLo && undefined !== fractHi && fractHi > fractLo) {\n // Keep section of last contour to account for loosing sight of what is underfoot while moving forward...\n const partialCurve = this._lastContour.clonePartialCurve(fractLo, fractHi);\n if (undefined !== partialCurve && partialCurve instanceof LineString3d)\n contourLine.addPoints(partialCurve.packedPoints);\n } else {\n // Moved too far from last contour...\n detectStepUp = true;\n }\n }\n } else if (contourLine.numPoints() > 1) {\n const startPt = contourLine.packedPoints.getPoint3dAtUncheckedPointIndex(contourLine.numPoints() - 2);\n const testPt = contourLine.packedPoints.getPoint3dAtUncheckedPointIndex(contourLine.numPoints() - 1);\n\n const fraction = testPt.fractionOfProjectionToLine(startPt, hitPointWorld, 0.0);\n const closePoint = startPt.interpolate(fraction, hitPointWorld);\n\n if (closePoint.isAlmostEqual(testPt, 1.0e-5)) {\n // Colinear point, extent segment...\n contourLine.packedPoints.setAtCheckedPointIndex(contourLine.numPoints() - 1, hitPointWorld);\n continue;\n }\n }\n\n contourLine.addPoint(hitPointWorld);\n }\n }, true);\n\n // Use single point to denote \"no geometry found\" until movement is detected...\n if (0 === contourLine.numPoints()) {\n contourLine.addPoint(this._lastReadPt);\n } else if (detectStepUp && undefined !== this._lastReference) {\n const start = contourLine.startPoint();\n const forwardDir = Vector3d.unitZ().crossProduct(vp.view.getXVector());\n const stepPlane = Plane3dByOriginAndUnitNormal.create(start.plusScaled(forwardDir, ToolSettings.walkStepHeight), forwardDir);\n\n const resultStep: CurveLocationDetail[] = [];\n if (undefined !== stepPlane)\n contourLine.appendPlaneIntersectionPoints(stepPlane, resultStep);\n\n let stepPt;\n for (const step of resultStep) {\n if (undefined === stepPt || step.point.z > stepPt.z)\n stepPt = step.point;\n }\n\n if (undefined !== stepPt) {\n const xyDist = start.distanceXY(stepPt);\n const zDist = stepPt.z - start.z;\n const slope = (0.0 === xyDist ? Math.PI : Math.atan(zDist / xyDist));\n\n if (slope > Angle.createDegrees(10.0).radians && slope < Angle.createDegrees(50.0).radians) {\n const slopeRay = Ray3d.create(start, Vector3d.createStartEnd(stepPt, start));\n const slopePt = Point3d.create();\n\n if (undefined !== slopeRay.intersectionWithPlane(this._lastReference, slopePt)) {\n contourLine.reverseInPlace();\n contourLine.addPoint(slopePt);\n contourLine.reverseInPlace();\n }\n }\n }\n }\n\n this._currentContour = contourLine;\n if (ToolSettings.walkDetectFloor)\n this._lastContour = this._currentContour;\n }\n\n private checkForCollision(vp: Viewport, motion: NavigateMotion, positionInput: Vector3d): number {\n if (!ToolSettings.walkCollisions)\n return 0;\n\n const view = vp.view;\n if (!view.is3d() || !view.isCameraOn)\n return 0;\n\n if (undefined !== this._currentContour) {\n const pixelSize = vp.pixelsFromInches(0.75);\n const viewPt = vp.npcToView(NpcCenter);\n const readPt = vp.worldToView(this._lastReadPt);\n if (viewPt.distanceXY(readPt) > pixelSize)\n this._currentContour = undefined;\n if (0.0 !== positionInput.y)\n this._lastReference = undefined; // Choose a new reference plane after elevation change...\n }\n\n const eyePt = view.getEyePoint();\n\n if (undefined === this._currentContour && positionInput.z > 0.0) {\n vp.viewToNpc(vp.npcToView(NpcCenter), this._lastReadPt);\n this._lastReadPt.z = ViewManip.getFocusPlaneNpc(vp);\n vp.npcToWorld(this._lastReadPt, this._lastReadPt);\n\n this.computeCollisionData(vp, eyePt);\n }\n\n if (undefined === this._currentContour || this._currentContour.numPoints() < 2 || positionInput.z <= 0.0)\n return 0;\n\n const newEyePt = motion.transform.multiplyPoint3d(eyePt);\n const planeY = Plane3dByOriginAndUnitNormal.create(eyePt, vp.view.getYVector());\n const resultY: CurveLocationDetail[] = [];\n const nIntersectY = planeY ? this._currentContour.appendPlaneIntersectionPoints(planeY, resultY) : 0;\n const padDist = Constant.oneMeter * 0.5; // stop well before point directly underfoot to avoid clipping through walls...\n\n if (0 !== nIntersectY) {\n let resultVec;\n for (const intersection of resultY) {\n const resultNpc = vp.worldToNpc(intersection.point);\n if (resultNpc.z >= 1 || resultNpc.z <= 0)\n continue;\n\n const hitVec = Vector3d.createStartEnd(newEyePt, intersection.point);\n if (undefined === resultVec)\n resultVec = hitVec;\n else if (hitVec.magnitude() < resultVec.magnitude())\n resultVec.setFrom(hitVec);\n }\n\n if (undefined !== resultVec) {\n const eyeVec = Vector3d.createStartEnd(eyePt, newEyePt);\n if (eyeVec.dotProduct(resultVec) <= 0.0 || resultVec.magnitude() < padDist)\n return 1; // Stay put, high barrier...\n }\n }\n\n if (!ToolSettings.walkDetectFloor || undefined === this._lastReference)\n return 0;\n\n const forwardDir = Vector3d.unitZ().crossProduct(vp.view.getXVector());\n const planeZ = Plane3dByOriginAndUnitNormal.create(newEyePt, forwardDir);\n const resultZ: CurveLocationDetail[] = [];\n const nIntersectZ = planeZ ? this._currentContour.appendPlaneIntersectionPoints(planeZ, resultZ) : 0;\n\n if (0 !== nIntersectZ) {\n const heightPt = Point3d.create();\n const maintainHeight = Vector3d.create();\n\n for (const intersection of resultZ) {\n if (intersection.point.z > newEyePt.z)\n continue; // Ignore overhead point...\n\n const refPt = this._lastReference.projectPointToPlane(intersection.point);\n const offset = Vector3d.createStartEnd(refPt, intersection.point);\n\n if (offset.magnitude() > maintainHeight.magnitude()) {\n heightPt.setFrom(intersection.point);\n maintainHeight.setFrom(offset);\n }\n }\n\n if (maintainHeight.magnitude() >= ToolSettings.walkStepHeight && maintainHeight.dotProduct(this._lastReference.getNormalRef()) > 0)\n return 2; // Stay put, low barrier...\n\n const moveTransform = Transform.createTranslation(maintainHeight);\n motion.transform.multiplyTransformTransform(moveTransform, motion.transform);\n this._lastReference.getOriginRef().setFrom(heightPt);\n }\n return 0;\n }\n\n protected getNavigateMotion(elapsedTime: number): NavigateMotion | undefined {\n const vp = this.viewTool.viewport;\n if (undefined === vp)\n return;\n\n const motion = this._navigateMotion;\n motion.init(elapsedTime);\n\n if (!vp.isCameraOn) {\n const input = this.getHorizAndVertVelocity();\n if (undefined === input)\n return;\n motion.pan(input.x, input.y);\n return motion;\n }\n\n const positionInput = this.getLinearVelocity();\n const angularInput = this.getAngularVelocity();\n\n if (0.0 === angularInput.magnitude() && 0.0 === positionInput.magnitude() && undefined === this._lastMovement)\n return;\n\n this.requestPointerLock(false); // Ignore engagement events after modification starts (either from mouse or keys)...\n const current = IModelApp.toolAdmin.currentInputState;\n if (!this._havePointerLock && InputSource.Mouse === current.inputSource && !current.isDragging(BeButton.Data))\n current.onStartDrag(BeButton.Data); // Treat data down -> navigate key -> data up the same as a drag...\n\n if (undefined !== this._lastMovement) {\n if (motion.moveAndMouseLook(this._accumulator, positionInput, this._lastMovement, true))\n this._lastMovement = undefined;\n } else {\n motion.moveAndLook(positionInput, angularInput.x, angularInput.y, true);\n }\n\n const prevCollision = this._lastCollision;\n this._lastCollision = this.checkForCollision(vp, motion, positionInput);\n if (this._lastCollision !== prevCollision)\n vp.invalidateDecorations();\n\n return this._lastCollision ? undefined : motion;\n }\n\n protected enableDynamicUpdate(vp: ScreenViewport): void {\n const tool = this.viewTool;\n if (tool.inDynamicUpdate)\n return;\n\n tool.changeViewport(vp);\n if (undefined !== tool.viewport)\n tool.viewport.setAnimator(this);\n tool.inDynamicUpdate = true;\n tool.inHandleModify = true;\n\n vp.npcToView(NpcCenter, this._anchorPtView);\n this._lastPtView.setFrom(this._anchorPtView); // Display indicator in the middle of the view...\n }\n\n private toggleCollisions(): void {\n ToolSettings.walkCollisions = !ToolSettings.walkCollisions;\n this._lastCollision = 0;\n this._lastReference = this._lastContour = this._currentContour = undefined;\n if (this.viewTool.viewport)\n this.viewTool.viewport.invalidateDecorations();\n }\n\n private toggleDetectFloor(): void {\n ToolSettings.walkDetectFloor = !ToolSettings.walkDetectFloor;\n if (ToolSettings.walkDetectFloor && !ToolSettings.walkCollisions)\n return this.toggleCollisions();\n this._lastReference = this._lastContour = this._currentContour = undefined;\n if (this.viewTool.viewport)\n this.viewTool.viewport.invalidateDecorations();\n }\n\n private changeWalkVelocity(increase?: boolean): void {\n if (undefined === increase)\n ToolSettings.walkVelocityChange = 0;\n else\n ToolSettings.walkVelocityChange = Geometry.clamp(ToolSettings.walkVelocityChange + (increase ? 1 : -1), -9, 9);\n if (this.viewTool.viewport)\n this.viewTool.viewport.invalidateDecorations();\n }\n\n public override onWheel(ev: BeWheelEvent): boolean {\n const tool = this.viewTool;\n if (!tool.inHandleModify || undefined === tool.viewport)\n return super.onWheel(ev);\n const focusHandle = tool.viewHandles.focusHandle;\n if (undefined === focusHandle || ViewHandleType.LookAndMove !== focusHandle.handleType)\n return super.onWheel(ev);\n this.changeWalkVelocity(ev.wheelDelta > 0);\n tool.viewport.setAnimator(this); // animator was cleared by wheel event...\n return true;\n }\n\n private isNavigationKey(keyEvent: KeyboardEvent): boolean {\n if (keyEvent.repeat || keyEvent.ctrlKey || keyEvent.altKey)\n return false;\n\n switch (keyEvent.key.toLowerCase()) {\n case \"arrowright\":\n case \"d\":\n case \"arrowleft\":\n case \"a\":\n case \"arrowup\":\n case \"w\":\n case \"arrowdown\":\n case \"s\":\n case \"pagedown\":\n case \"q\":\n case \"pageup\":\n case \"e\":\n return true;\n default:\n return false;\n }\n }\n\n private enableKeyStart(): boolean {\n const vp = this.viewTool.viewport;\n if (0 !== this.viewTool.nPts || undefined === vp)\n return false;\n\n const pt = vp.view.getTargetPoint();\n const ev = new BeButtonEvent({ point: pt, rawPoint: pt, viewPoint: vp.worldToView(pt), viewport: vp, inputSource: InputSource.Mouse, isDown: true });\n this.viewTool.changeViewport(ev.viewport);\n if (!this.viewTool.processFirstPoint(ev))\n return false;\n\n this.viewTool.nPts = 1;\n return true;\n }\n\n public override onKeyTransition(wentDown: boolean, keyEvent: KeyboardEvent): boolean {\n if (!this.viewTool.inDynamicUpdate) {\n this._positionInput.setZero(); // clear input from a previous dynamic update...\n if (!wentDown || !this.isNavigationKey(keyEvent) || !this.enableKeyStart())\n return false;\n }\n\n if (keyEvent.ctrlKey || keyEvent.altKey)\n return false;\n\n switch (keyEvent.key.toLowerCase()) {\n case \"arrowright\":\n case \"d\":\n this._positionInput.x = Geometry.clamp(this._positionInput.x + (wentDown ? 1.0 : -1.0), -1.0, 1.0);\n return true;\n case \"arrowleft\":\n case \"a\":\n this._positionInput.x = Geometry.clamp(this._positionInput.x + (wentDown ? -1.0 : 1.0), -1.0, 1.0);\n return true;\n case \"arrowup\":\n case \"w\":\n this._positionInput.z = Geometry.clamp(this._positionInput.z + (wentDown ? 1.0 : -1.0), -1.0, 1.0);\n return true;\n case \"arrowdown\":\n case \"s\":\n this._positionInput.z = Geometry.clamp(this._positionInput.z + (wentDown ? -1.0 : 1.0), -1.0, 1.0);\n return true;\n case \"pagedown\":\n case \"q\":\n this._positionInput.y = Geometry.clamp(this._positionInput.y + (wentDown ? 1.0 : -1.0), -1.0, 1.0);\n return true;\n case \"pageup\":\n case \"e\":\n this._positionInput.y = Geometry.clamp(this._positionInput.y + (wentDown ? -1.0 : 1.0), -1.0, 1.0);\n return true;\n case \"c\":\n if (wentDown)\n this.toggleCollisions();\n return true;\n case \"z\":\n if (wentDown)\n this.toggleDetectFloor();\n return true;\n case \"+\":\n if (wentDown)\n this.changeWalkVelocity(true);\n return true;\n case \"-\":\n if (wentDown)\n this.changeWalkVelocity(false);\n return true;\n case \"=\":\n if (wentDown)\n this.changeWalkVelocity();\n return true;\n default:\n return false;\n }\n }\n\n protected getTouchControlRadius(vp: Viewport): number {\n const viewRect = vp.viewRect;\n const radius = Math.floor(Math.min(viewRect.width, viewRect.height) / 15.0) + 0.5;\n const minRadius = vp.pixelsFromInches(0.1);\n const maxRadius = vp.pixelsFromInches(1.0);\n return Geometry.clamp(radius, minRadius, maxRadius);\n }\n\n protected getTouchZoneLowerLeft(vp: Viewport): ViewRect {\n const viewRect = vp.viewRect;\n const rectLL = viewRect.clone();\n rectLL.top += viewRect.height * 0.6;\n rectLL.right -= viewRect.width * 0.6;\n rectLL.insetByPercent(0.05);\n return rectLL;\n }\n\n protected getTouchZoneLowerRight(vp: Viewport): ViewRect {\n const viewRect = vp.viewRect;\n const rectLR = viewRect.clone();\n rectLR.top += viewRect.height * 0.6;\n rectLR.left += viewRect.width * 0.6;\n rectLR.insetByPercent(0.05);\n return rectLR;\n }\n\n protected getTouchStartPosition(touchStart: BeTouchEvent | undefined): Point2d | undefined {\n if (undefined === touchStart || undefined === touchStart.viewport)\n return undefined;\n return BeTouchEvent.getTouchPosition(touchStart.touchEvent.changedTouches[0], touchStart.viewport);\n }\n\n protected getTouchOffset(touchStart: BeTouchEvent | undefined, radius: number): Vector2d {\n const offset = Vector2d.create();\n if (undefined === this._touchLast)\n return offset;\n\n const position = this.getTouchStartPosition(touchStart);\n if (undefined === position)\n return offset;\n\n if (undefined === touchStart?.viewport)\n return offset;\n\n const lastTouch = BeTouchEvent.findTouchById(this._touchLast.touchEvent.targetTouches, touchStart.touchEvent.changedTouches[0].identifier);\n if (undefined === lastTouch)\n return offset;\n\n const minOffsetRadius = Math.floor(radius * 0.1) + 0.5;\n const maxOffsetRadius = Math.floor(radius * 1.2) + 0.5;\n const lastPos = BeTouchEvent.getTouchPosition(lastTouch, touchStart.viewport);\n const lastVec = Vector2d.createStartEnd(position, lastPos);\n\n if (lastVec.magnitude() > maxOffsetRadius)\n lastVec.scaleToLength(maxOffsetRadius, lastVec);\n if (lastVec.magnitude() > minOffsetRadius)\n offset.plus(lastVec, offset);\n\n return offset;\n }\n\n public override onTouchStart(ev: BeTouchEvent): boolean {\n if (undefined === ev.viewport || !ev.viewport.isCameraOn || 1 !== ev.touchEvent.changedTouches.length)\n return (undefined === this._touchStartL && undefined !== this._touchStartR ? false : true);\n\n const startPos = this.getTouchStartPosition(ev);\n if (undefined === startPos)\n return false;\n\n const rectLL = this.getTouchZoneLowerLeft(ev.viewport);\n const rectLR = this.getTouchZoneLowerRight(ev.viewport);\n\n if (undefined === this._touchStartL && rectLL.containsPoint(startPos)) {\n this._touchStartL = this._touchLast = ev;\n ev.viewport.invalidateDecorations();\n return true;\n }\n\n if (undefined === this._touchStartR && rectLR.containsPoint(startPos)) {\n this._touchStartR = this._touchLast = ev;\n ev.viewport.invalidateDecorations();\n return true;\n }\n\n return false;\n }\n\n public override onTouchEnd(ev: BeTouchEvent): boolean {\n let changed = false;\n\n if (undefined !== this._touchStartL && undefined !== BeTouchEvent.findTouchById(ev.touchEvent.changedTouches, this._touchStartL.touchEvent.changedTouches[0].identifier)) {\n this._touchStartL = undefined;\n changed = true;\n }\n\n if (undefined !== this._touchStartR && undefined !== BeTouchEvent.findTouchById(ev.touchEvent.changedTouches, this._touchStartR.touchEvent.changedTouches[0].identifier)) {\n this._touchStartR = undefined;\n changed = true;\n }\n\n if (changed && undefined !== ev.viewport)\n ev.viewport.invalidateDecorations();\n\n return changed;\n }\n\n public override async onTouchComplete(_ev: BeTouchEvent): Promise<boolean> {\n if (!this.viewTool.inDynamicUpdate || undefined === this._touchLast)\n return false;\n await this.viewTool.onReinitialize();\n return true;\n }\n\n public override async onTouchCancel(ev: BeTouchEvent): Promise<boolean> {\n return this.onTouchComplete(ev);\n }\n\n public override onTouchMove(ev: BeTouchEvent): boolean {\n if (undefined === ev.viewport || !this.viewTool.inDynamicUpdate || (undefined === this._touchStartL && undefined === this._touchStartR))\n return false;\n\n let changed = false;\n\n if (undefined !== this._touchStartL && undefined !== BeTouchEvent.findTouchById(ev.touchEvent.changedTouches, this._touchStartL.touchEvent.changedTouches[0].identifier))\n changed = true;\n\n if (undefined !== this._touchStartR && undefined !== BeTouchEvent.findTouchById(ev.touchEvent.changedTouches, this._touchStartR.touchEvent.changedTouches[0].identifier))\n changed = true;\n\n if (changed) {\n this._touchLast = ev;\n ev.viewport.invalidateDecorations();\n }\n\n return true;\n }\n\n public override onTouchMoveStart(ev: BeTouchEvent, _startEv: BeTouchEvent): boolean {\n if (undefined === ev.viewport)\n return false;\n\n if (undefined === this._touchStartL && undefined === this._touchStartR)\n return false;\n\n this.enableDynamicUpdate(ev.viewport);\n return true;\n }\n\n public override onTouchTap(ev: BeTouchEvent): boolean {\n if (undefined === ev.viewport || this.viewTool.inDynamicUpdate || !ev.isSingleTap)\n return false;\n\n const rectLL = this.getTouchZoneLowerLeft(ev.viewport);\n if (rectLL.containsPoint(ev.viewPoint))\n this._touchElevate = !this._touchElevate; // Toggle elevate mode for left control until next touch complete...\n\n const rectLR = this.getTouchZoneLowerRight(ev.viewport);\n if (rectLR.containsPoint(ev.viewPoint))\n this._touchSpeedUp = !this._touchSpeedUp; // Toggle speed increase for left control until next touch complete...\n\n return false;\n }\n\n public override drawHandle(context: DecorateContext, hasFocus: boolean): void {\n super.drawHandle(context, hasFocus);\n if (!hasFocus || context.viewport !== this.viewTool.viewport)\n return;\n\n if (ToolSettings.walkCollisions && this.viewTool.inDynamicUpdate) {\n const position = this._anchorPtView.clone();\n position.x = Math.floor(position.x) + 0.5;\n position.y = Math.floor(position.y) + 0.5;\n\n const drawCollisionArrows = (ctx: CanvasRenderingContext2D) => {\n const arrowSize = 20;\n const addArrow = (angle: number) => {\n const end = arrowSize;\n const start = end / 2;\n const mid = start / 2;\n ctx.rotate(angle);\n ctx.beginPath();\n ctx.moveTo(start, 0);\n ctx.lineTo(end, 0);\n ctx.moveTo(start, 0);\n ctx.lineTo(start + mid, mid);\n ctx.moveTo(start, 0);\n ctx.lineTo(start + mid, -mid);\n ctx.stroke();\n ctx.rotate(-angle);\n };\n\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 5;\n ctx.lineCap = \"round\";\n addArrow(0);\n addArrow(Math.PI);\n\n ctx.strokeStyle = (1 === this._lastCollision ? \"red\" : \"white\");\n ctx.lineWidth = 1;\n addArrow(0);\n addArrow(Math.PI);\n\n if (ToolSettings.walkDetectFloor) {\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 5;\n addArrow(-Math.PI / 2);\n ctx.strokeStyle = (2 === this._lastCollision ? \"red\" : \"white\");\n ctx.lineWidth = 1;\n addArrow(-Math.PI / 2);\n }\n };\n context.addCanvasDecoration({ position, drawDecoration: drawCollisionArrows });\n }\n\n if ((0 !== ToolSettings.walkVelocityChange || this._touchSpeedUp) && this.viewTool.inDynamicUpdate) {\n const arrowSize = 12;\n const speedUp = (ToolSettings.walkVelocityChange > 0 || this._touchSpeedUp ? true : false);\n const position = this._anchorPtView.clone();\n position.x = Math.floor(position.x) + 0.5;\n position.y = Math.floor(position.y + (arrowSize / 3)) + 0.5;\n\n const drawSpeedChange = (ctx: CanvasRenderingContext2D) => {\n const addArrows = () => {\n const end = arrowSize;\n const start = end / 2;\n const midY = (end + start) / 2;\n const midX = (arrowSize / 4) * (speedUp ? 1 : -1);\n ctx.beginPath();\n ctx.moveTo(0, start);\n ctx.lineTo(midX, midY);\n ctx.lineTo(0, end);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(-midX, start);\n ctx.lineTo(0, midY);\n ctx.lineTo(-midX, end);\n ctx.stroke();\n };\n\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 3;\n ctx.lineCap = \"round\";\n addArrows();\n\n ctx.strokeStyle = \"white\";\n ctx.lineWidth = 1;\n addArrows();\n };\n context.addCanvasDecoration({ position, drawDecoration: drawSpeedChange });\n }\n\n const positionL = this.getTouchStartPosition(this._touchStartL);\n const positionR = this.getTouchStartPosition(this._touchStartR);\n\n if (undefined === positionL && undefined === positionR)\n return;\n\n const outerRadius = this.getTouchControlRadius(context.viewport);\n const innerRadius = Math.floor(outerRadius * 0.65) + 0.5;\n const offsetL = this.getTouchOffset(this._touchStartL, outerRadius);\n const offsetR = this.getTouchOffset(this._touchStartR, outerRadius);\n\n const drawDecoration = (ctx: CanvasRenderingContext2D, isLeft: boolean) => {\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.fillStyle = \"rgba(150,150,150,0.4)\";\n ctx.lineWidth = 2;\n ctx.arc(0, 0, outerRadius, 0, 2 * Math.PI);\n ctx.stroke();\n ctx.fill();\n\n ctx.shadowColor = \"black\";\n ctx.shadowBlur = 10;\n ctx.shadowOffsetX = 5;\n ctx.shadowOffsetY = 5;\n\n ctx.beginPath();\n ctx.strokeStyle = \"rgba(0,0,0,0.4)\";\n ctx.lineWidth = innerRadius;\n ctx.lineCap = \"round\";\n ctx.moveTo(0, 0);\n ctx.lineTo(isLeft ? offsetL.x : offsetR.x, isLeft ? offsetL.y : offsetR.y);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.fillStyle = \"rgba(200,200,200,0.8\";\n ctx.lineWidth = 1;\n ctx.arc(isLeft ? offsetL.x : offsetR.x, isLeft ? offsetL.y : offsetR.y, innerRadius, 0, 2 * Math.PI);\n ctx.stroke();\n ctx.fill();\n };\n\n const drawDecorationL = (ctx: CanvasRenderingContext2D) => drawDecoration(ctx, true);\n const drawDecorationR = (ctx: CanvasRenderingContext2D) => drawDecoration(ctx, false);\n\n if (undefined !== positionL)\n context.addCanvasDecoration({ position: positionL, drawDecoration: drawDecorationL });\n\n if (undefined !== positionR)\n context.addCanvasDecoration({ position: positionR, drawDecoration: drawDecorationR });\n }\n}\n\n/** ViewingToolHandle for performing the \"walk view\" operation */\nclass ViewWalk extends ViewNavigate {\n private _navigateMotion: NavigateMotion;\n\n constructor(viewManip: ViewManip) {\n super(viewManip);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._navigateMotion = new NavigateMotion(this.viewTool.viewport!);\n }\n public get handleType(): ViewHandleType { return ViewHandleType.Walk; }\n public override firstPoint(ev: BeButtonEvent): boolean {\n this.viewTool.provideToolAssistance(\"Walk.Prompts.NextPoint\");\n return super.firstPoint(ev);\n }\n\n protected getNavigateMotion(elapsedTime: number): NavigateMotion | undefined {\n const input = this.getInputVector();\n if (undefined === input)\n return undefined;\n\n const motion = this._navigateMotion;\n motion.init(elapsedTime);\n\n switch (this.getNavigateMode()) {\n case NavigateMode.Pan:\n input.scale(this.getMaxLinearVelocity(), input);\n motion.pan(input.x, input.y);\n break;\n case NavigateMode.Look:\n input.scale(-this.getMaxAngularVelocity(), input);\n motion.look(input.x, input.y);\n break;\n case NavigateMode.Travel:\n motion.travel(-input.x * this.getMaxAngularVelocity(), 0, -input.y * this.getMaxLinearVelocity(), true);\n break;\n }\n\n return motion;\n }\n}\n\n/** ViewingToolHandle for performing the \"fly view\" operation */\nclass ViewFly extends ViewNavigate {\n private _navigateMotion: NavigateMotion;\n\n constructor(viewManip: ViewManip) {\n super(viewManip);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._navigateMotion = new NavigateMotion(this.viewTool.viewport!);\n }\n public get handleType(): ViewHandleType { return ViewHandleType.Fly; }\n public override firstPoint(ev: BeButtonEvent): boolean {\n this.viewTool.provideToolAssistance(\"Fly.Prompts.NextPoint\");\n return super.firstPoint(ev);\n }\n\n protected getNavigateMotion(elapsedTime: number): NavigateMotion | undefined {\n const input = this.getInputVector();\n if (undefined === input)\n return undefined;\n\n const motion = this._navigateMotion;\n motion.init(elapsedTime);\n\n switch (this.getNavigateMode()) {\n case NavigateMode.Pan:\n input.scale(this.getMaxLinearVelocity(), input);\n motion.pan(input.x, input.y);\n break;\n case NavigateMode.Look:\n input.scale(-this.getMaxAngularVelocity(), input);\n motion.look(input.x, input.y);\n break;\n case NavigateMode.Travel:\n input.scale(-this.getMaxAngularVelocity() * 2.0, input);\n motion.travel(input.x, input.y, this.getMaxLinearVelocity(), false);\n break;\n }\n\n return motion;\n }\n}\n\n/** The tool that performs a Pan view operation\n * @public\n */\nexport class PanViewTool extends ViewManip {\n public static override toolId = \"View.Pan\";\n public static override iconSpec = \"icon-hand-2\";\n constructor(vp: ScreenViewport | undefined, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Pan.Prompts.FirstPoint\"); }\n}\n\n/** A tool that performs a Rotate view operation\n * @public\n */\nexport class RotateViewTool extends ViewManip {\n public static override toolId = \"View.Rotate\";\n public static override iconSpec = \"icon-gyroscope\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Rotate | ViewHandleType.Pan | ViewHandleType.TargetCenter, oneShot, isDraggingRequired);\n }\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Rotate.Prompts.FirstPoint\"); }\n}\n\n/** A tool that performs the look operation\n * @public\n */\nexport class LookViewTool extends ViewManip {\n public static override toolId = \"View.Look\";\n public static override iconSpec = \"icon-view-navigation\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Look | ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Look.Prompts.FirstPoint\"); }\n}\n\n/** A tool that performs the scroll operation\n * @public\n */\nexport class ScrollViewTool extends ViewManip {\n public static override toolId = \"View.Scroll\";\n public static override iconSpec = \"icon-move\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Scroll, oneShot, isDraggingRequired);\n }\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Scroll.Prompts.FirstPoint\"); }\n}\n\n/** A tool that performs the zoom operation\n * @public\n */\nexport class ZoomViewTool extends ViewManip {\n public static override toolId = \"View.Zoom\";\n public static override iconSpec = \"icon-zoom\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Zoom | ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Zoom.Prompts.FirstPoint\"); }\n}\n\n/** A tool that performs the walk operation using mouse+keyboard or touch controls.\n * Keyboard and mouse controls are similar to those used by many video games:\n * - Mouse motion: look around.\n * - W, A, S, D (or arrow keys): move forward, left, right, or backward respectively.\n * - E, Q (or PgUp, PgDn): move up and down respectively.\n * - +, - (or scroll wheel): increase or decrease velocity.\n * @public\n */\nexport class LookAndMoveTool extends ViewManip {\n public static override toolId = \"View.LookAndMove\";\n public static override iconSpec = \"icon-walk\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n const viewport = (undefined === vp ? IModelApp.viewManager.selectedView : vp); // Need vp to enable camera/check lens in onReinitialize...\n super(viewport, ViewHandleType.LookAndMove | ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"LookAndMove.Prompts.FirstPoint\"); }\n\n public override provideToolAssistance(mainInstrKey: string): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(mainInstrKey));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = this.inDynamicUpdate ? CoreTools.translate(\"ElementSet.Inputs.AcceptPoint\") : ViewTool.translate(\"LookAndMove.Inputs.AcceptLookPoint\");\n const rejectMsg = CoreTools.translate(\"ElementSet.Inputs.Exit\");\n\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, rejectMsg, false, ToolAssistanceInputMethod.Mouse));\n\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.createKeyboardInfo([\"W\"], [\"A\", \"S\", \"D\"]), ViewTool.translate(\"LookAndMove.Inputs.WalkKeys\"), false));\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.arrowKeyboardInfo, ViewTool.translate(\"LookAndMove.Inputs.WalkKeys\"), false));\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.createKeyboardInfo([\"Q\", \"E\"]), ViewTool.translate(\"LookAndMove.Inputs.ElevateKeys\"), false));\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.createKeyboardInfo([\"\\u21de\", \"\\u21df\"]), ViewTool.translate(\"LookAndMove.Inputs.ElevateKeys\"), false));\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.createKeyboardInfo([\"C\", \"Z\"]), ViewTool.translate(\"LookAndMove.Inputs.CollideKeys\"), false));\n mouseInstructions.push(ToolAssistance.createKeyboardInstruction(ToolAssistance.createKeyboardInfo([\"+\", \"-\"]), ViewTool.translate(\"LookAndMove.Inputs.VelocityChange\"), false));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.MouseWheel, ViewTool.translate(\"LookAndMove.Inputs.VelocityChange\"), false, ToolAssistanceInputMethod.Mouse));\n\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TouchCursorDrag, ViewTool.translate(\"LookAndMove.Inputs.TouchZoneLL\"), false, ToolAssistanceInputMethod.Touch));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TouchCursorDrag, ViewTool.translate(\"LookAndMove.Inputs.TouchZoneLR\"), false, ToolAssistanceInputMethod.Touch));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, ViewTool.translate(\"LookAndMove.Inputs.TouchTapLL\"), false, ToolAssistanceInputMethod.Touch));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, ViewTool.translate(\"LookAndMove.Inputs.TouchTapLR\"), false, ToolAssistanceInputMethod.Touch));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchDrag, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, rejectMsg, false, ToolAssistanceInputMethod.Touch));\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n}\n\n/** A tool that performs the walk operation\n * @public\n */\nexport class WalkViewTool extends ViewManip {\n public static override toolId = \"View.Walk\";\n public static override iconSpec = \"icon-walk\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n const viewport = (undefined === vp ? IModelApp.viewManager.selectedView : vp); // Need vp to enable camera/check lens in onReinitialize...\n super(viewport, ViewHandleType.Walk | ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Walk.Prompts.FirstPoint\"); }\n\n public override provideToolAssistance(mainInstrKey: string): void {\n const walkInstructions: ToolAssistanceInstruction[] = [];\n walkInstructions.push(ToolAssistance.createModifierKeyInstruction(ToolAssistance.shiftKey, ToolAssistanceImage.LeftClickDrag, ViewTool.translate(\"Pan.flyover\"), false, ToolAssistanceInputMethod.Mouse));\n walkInstructions.push(ToolAssistance.createModifierKeyInstruction(ToolAssistance.ctrlKey, ToolAssistanceImage.LeftClickDrag, ViewTool.translate(\"Look.flyover\"), false, ToolAssistanceInputMethod.Mouse));\n super.provideToolAssistance(mainInstrKey, walkInstructions);\n }\n}\n\n/** A tool that performs the fly operation\n * @public\n */\nexport class FlyViewTool extends ViewManip {\n public static override toolId = \"View.Fly\";\n public static override iconSpec = \"icon-airplane\";\n constructor(vp: ScreenViewport, oneShot = false, isDraggingRequired = false) {\n super(vp, ViewHandleType.Fly | ViewHandleType.Pan, oneShot, isDraggingRequired);\n }\n\n protected override get isExitAllowedOnReinitialize(): boolean { return true; }\n protected override provideInitialToolAssistance(): void { this.provideToolAssistance(\"Fly.Prompts.FirstPoint\"); }\n\n public override provideToolAssistance(mainInstrKey: string): void {\n const flyInstructions: ToolAssistanceInstruction[] = [];\n flyInstructions.push(ToolAssistance.createModifierKeyInstruction(ToolAssistance.shiftKey, ToolAssistanceImage.LeftClickDrag, ViewTool.translate(\"Pan.flyover\"), false, ToolAssistanceInputMethod.Mouse));\n flyInstructions.push(ToolAssistance.createModifierKeyInstruction(ToolAssistance.ctrlKey, ToolAssistanceImage.LeftClickDrag, ViewTool.translate(\"Look.flyover\"), false, ToolAssistanceInputMethod.Mouse));\n super.provideToolAssistance(mainInstrKey, flyInstructions);\n }\n}\n\n/** A tool that performs a fit view\n * @public\n */\nexport class FitViewTool extends ViewTool {\n public static override toolId = \"View.Fit\";\n public static override iconSpec = \"icon-fit-to-view\";\n public oneShot: boolean;\n public doAnimate: boolean;\n public isolatedOnly: boolean;\n constructor(viewport: ScreenViewport, oneShot: boolean, doAnimate = true, isolatedOnly = true) {\n super(viewport);\n this.viewport = viewport;\n this.oneShot = oneShot;\n this.doAnimate = doAnimate;\n this.isolatedOnly = isolatedOnly;\n }\n\n public provideToolAssistance(): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(\"Fit.Prompts.FirstPoint\"));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = CoreTools.translate(\"ElementSet.Inputs.Accept\");\n const rejectMsg = CoreTools.translate(\"ElementSet.Inputs.Exit\");\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, rejectMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, rejectMsg, false, ToolAssistanceInputMethod.Mouse));\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (ev.viewport)\n return await this.doFit(ev.viewport, this.oneShot, this.doAnimate, this.isolatedOnly) ? EventHandled.Yes : EventHandled.No;\n\n return EventHandled.No;\n }\n\n public override async onPostInstall() {\n await super.onPostInstall();\n if (undefined === this.viewport || !this.oneShot)\n this.provideToolAssistance();\n\n if (this.viewport)\n await this.doFit(this.viewport, this.oneShot, this.doAnimate, this.isolatedOnly);\n }\n\n public async doFit(viewport: ScreenViewport, oneShot: boolean, doAnimate = true, isolatedOnly = true): Promise<boolean> {\n if (!isolatedOnly || !await ViewManip.zoomToAlwaysDrawnExclusive(viewport, { animateFrustumChange: doAnimate }))\n ViewManip.fitViewWithGlobeAnimation(viewport, doAnimate);\n if (oneShot)\n await this.exitTool();\n return oneShot;\n }\n}\n\n/** A tool that views a location on the background map from a satellite's perspective; the viewed location is derived from the position of the current camera's eye above the background map. Operates on the selected view.\n * @public\n */\nexport class ViewGlobeSatelliteTool extends ViewTool {\n public static override toolId = \"View.GlobeSatellite\";\n // public static iconSpec = \"icon-view-globe-satellite\"; // ###TODO: need icon for this\n public oneShot: boolean;\n public doAnimate: boolean;\n constructor(viewport: ScreenViewport, oneShot = true, doAnimate = true) {\n super(viewport);\n this.viewport = viewport;\n this.oneShot = oneShot;\n this.doAnimate = doAnimate;\n }\n\n /** @internal */\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (ev.viewport)\n return (await this._beginSatelliteView(ev.viewport, this.oneShot, this.doAnimate)) ? EventHandled.Yes : EventHandled.No;\n\n return EventHandled.No;\n }\n\n /** @internal */\n public override async onPostInstall() {\n await super.onPostInstall();\n const viewport = undefined === this.viewport ? IModelApp.viewManager.selectedView : this.viewport;\n if (viewport) {\n (async () => {\n await this._beginSatelliteView(viewport, this.oneShot, this.doAnimate);\n })().catch(() => { });\n }\n }\n\n private async _beginSatelliteView(viewport: ScreenViewport, oneShot: boolean, doAnimate = true): Promise<boolean> {\n const carto = await eyeToCartographicOnGlobeFromGcs(viewport);\n if (carto !== undefined) {\n try {\n let elevationOffset = 0;\n const elevation = await queryTerrainElevationOffset(viewport, carto);\n if (elevation !== undefined)\n elevationOffset = elevation;\n return await this._doSatelliteView(viewport, oneShot, doAnimate, elevationOffset);\n } catch {\n }\n }\n return true;\n }\n\n private async _doSatelliteView(viewport: ScreenViewport, oneShot: boolean, doAnimate = true, elevationOffset = 0): Promise<boolean> {\n viewGlobalLocation(viewport, doAnimate, ViewGlobalLocationConstants.satelliteHeightAboveEarthInMeters + elevationOffset);\n if (oneShot)\n await this.exitTool();\n return oneShot;\n }\n}\n\n/** A tool that views a location on the background map from a bird's eye perspective; the viewed location is derived from the position of the current camera's eye above the background map. Operates on the selected view.\n * @public\n */\nexport class ViewGlobeBirdTool extends ViewTool {\n public static override toolId = \"View.GlobeBird\";\n // public static iconSpec = \"icon-view-globe-bird\"; // ###TODO: need icon for this\n public oneShot: boolean;\n public doAnimate: boolean;\n constructor(viewport: ScreenViewport, oneShot = true, doAnimate = true) {\n super(viewport);\n this.viewport = viewport;\n this.oneShot = oneShot;\n this.doAnimate = doAnimate;\n }\n\n /** @internal */\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (ev.viewport)\n return (await this._beginDoBirdView(ev.viewport, this.oneShot, this.doAnimate)) ? EventHandled.Yes : EventHandled.No;\n\n return EventHandled.No;\n }\n\n /** @internal */\n public override async onPostInstall() {\n await super.onPostInstall();\n const viewport = undefined === this.viewport ? IModelApp.viewManager.selectedView : this.viewport;\n if (viewport)\n await this._beginDoBirdView(viewport, this.oneShot, this.doAnimate);\n }\n\n private async _beginDoBirdView(viewport: ScreenViewport, oneShot: boolean, doAnimate = true): Promise<boolean> {\n const carto = await eyeToCartographicOnGlobeFromGcs(viewport);\n if (carto !== undefined) {\n try {\n let elevationOffset = 0;\n const elevation = await queryTerrainElevationOffset(viewport, carto);\n if (elevation !== undefined)\n elevationOffset = elevation;\n return await this._doBirdView(viewport, oneShot, doAnimate, elevationOffset);\n } catch {\n }\n }\n return true;\n }\n\n private async _doBirdView(viewport: ScreenViewport, oneShot: boolean, doAnimate = true, elevationOffset = 0): Promise<boolean> {\n viewGlobalLocation(viewport, doAnimate, ViewGlobalLocationConstants.birdHeightAboveEarthInMeters + elevationOffset, ViewGlobalLocationConstants.birdPitchAngleRadians);\n if (oneShot)\n await this.exitTool();\n return oneShot;\n }\n}\n\n/** A tool that views a location on the background map corresponding to a specified string.\n * This will either look down at the location using a bird's eye height, or, if a range is available, the entire range corresponding to the location will be viewed.\n * Operates on the selected view.\n * @public\n */\nexport class ViewGlobeLocationTool extends ViewTool {\n private _globalLocation?: GlobalLocation;\n\n public static override toolId = \"View.GlobeLocation\";\n // public static iconSpec = \"icon-view-globe-location\"; // ###TODO: need icon for this\n public oneShot: boolean;\n public doAnimate: boolean;\n constructor(viewport: ScreenViewport, oneShot = true, doAnimate = true) {\n super(viewport);\n this.viewport = viewport;\n this.oneShot = oneShot;\n this.doAnimate = doAnimate;\n }\n\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return undefined; }\n\n /** This runs the tool based on the provided location arguments.\n * arguments: latitude longitude | string\n * If specified, the latitude and longitude arguments are numbers specified in degrees.\n * If specified, the string argument contains a location name. Examples of location name include named geographic areas like \"Seattle, WA\" or \"Alaska\", a specific address like \"1600 Pennsylvania Avenue NW, Washington, DC 20500\", or a place name like \"Philadelphia Museum of Art\".\n **/\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n if (2 === args.length) { // try to parse latitude and longitude\n const latitude = parseFloat(args[0]);\n const longitude = parseFloat(args[1]);\n if (!Number.isNaN(latitude) || !Number.isNaN(longitude)) {\n const center = Cartographic.fromDegrees({ longitude, latitude });\n this._globalLocation = { center };\n }\n }\n\n if (this._globalLocation === undefined) {\n const locationString = args.join(\" \");\n const bingLocationProvider = new BingLocationProvider();\n try {\n this._globalLocation = await bingLocationProvider.getLocation(locationString);\n if (this._globalLocation !== undefined) {\n const viewport = undefined === this.viewport ? IModelApp.viewManager.selectedView : this.viewport;\n if (viewport !== undefined) {\n const elevationOffset = await queryTerrainElevationOffset(viewport, this._globalLocation.center);\n if (elevationOffset !== undefined)\n this._globalLocation.center.height = elevationOffset;\n }\n }\n } catch {\n }\n }\n\n if (this._globalLocation !== undefined)\n return this.run();\n return true;\n }\n\n /** @internal */\n public override async onPostInstall() {\n await super.onPostInstall();\n await this._doLocationView();\n }\n\n private async _doLocationView(): Promise<boolean> {\n const viewport = undefined === this.viewport ? IModelApp.viewManager.selectedView : this.viewport;\n if (viewport) {\n if (undefined !== this._globalLocation)\n await viewport.animateFlyoverToGlobalLocation(this._globalLocation);\n }\n if (this.oneShot)\n await this.exitTool();\n return this.oneShot;\n }\n}\n\n/** A tool that views the current iModel on the background map so that the extent of the project is visible. Operates on the selected view.\n * @public\n */\nexport class ViewGlobeIModelTool extends ViewTool {\n public static override toolId = \"View.GlobeIModel\";\n // public static iconSpec = \"icon-view-globe-imodel\"; // ###TODO: need icon for this\n public oneShot: boolean;\n public doAnimate: boolean;\n constructor(viewport: ScreenViewport, oneShot = true, doAnimate = true) {\n super(viewport);\n this.viewport = viewport;\n this.oneShot = oneShot;\n this.doAnimate = doAnimate;\n }\n\n /** @internal */\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (ev.viewport)\n return await this._doIModelView() ? EventHandled.Yes : EventHandled.No;\n\n return EventHandled.No;\n }\n\n /** @internal */\n public override async onPostInstall() {\n await super.onPostInstall();\n await this._doIModelView();\n }\n\n private async _doIModelView(): Promise<boolean> {\n const viewport = undefined === this.viewport ? IModelApp.viewManager.selectedView : this.viewport;\n if (viewport && (viewport.view instanceof ViewState3d)) {\n const extents = viewport.view.iModel.projectExtents;\n const center = viewport.view.iModel.projectExtents.center;\n const view3d = viewport.view;\n const cartographicCenter = view3d.rootToCartographic(center);\n if (cartographicCenter !== undefined) {\n const cartographicArea = rangeToCartographicArea(view3d, extents);\n (async () => {\n await viewport.animateFlyoverToGlobalLocation({ center: cartographicCenter, area: cartographicArea });\n })().catch(() => { });\n }\n }\n if (this.oneShot)\n await this.exitTool();\n return this.oneShot;\n }\n}\n\n/** A tool that rotates the view to one of the standard views.\n * @public\n */\nexport class StandardViewTool extends ViewTool {\n public static override toolId = \"View.Standard\";\n public static override iconSpec = \"icon-cube-faces-top\";\n constructor(viewport: ScreenViewport, private _standardViewId: StandardViewId) { super(viewport); }\n\n public override async onPostInstall() {\n await super.onPostInstall();\n if (this.viewport) {\n const vp = this.viewport;\n const id = vp.view.allow3dManipulations() ? this._standardViewId : StandardViewId.Top;\n const rMatrix = AccuDraw.getStandardRotation(id, vp, vp.isContextRotationRequired);\n const inverse = rMatrix.inverse();\n if (undefined !== inverse) {\n const targetMatrix = inverse.multiplyMatrixMatrix(vp.rotation);\n const rotateTransform = Transform.createFixedPointAndMatrix(ViewManip.getDefaultTargetPointWorld(vp), targetMatrix);\n const newFrustum = vp.getFrustum();\n newFrustum.multiply(rotateTransform);\n vp.view.setupFromFrustum(newFrustum);\n vp.synchWithView({ animateFrustumChange: true });\n }\n }\n return this.exitTool();\n }\n}\n\n/** A tool that performs a Window-area view operation\n * @public\n */\nexport class WindowAreaTool extends ViewTool {\n public static override toolId = \"View.WindowArea\";\n public static override iconSpec = \"icon-window-area\";\n private _haveFirstPoint: boolean = false;\n private _firstPtWorld: Point3d = Point3d.create();\n private _secondPtWorld: Point3d = Point3d.create();\n private _lastPtView?: Point3d;\n private _corners = [new Point3d(), new Point3d()];\n private _shapePts = [new Point3d(), new Point3d(), new Point3d(), new Point3d(), new Point3d()];\n private _fillColor = ColorDef.from(0, 0, 255, 200);\n\n public override async onPostInstall() {\n await super.onPostInstall();\n this.provideToolAssistance();\n }\n\n public override async onReinitialize() {\n this._haveFirstPoint = false;\n this._firstPtWorld.setZero();\n this._secondPtWorld.setZero();\n this.provideToolAssistance();\n }\n\n public override async onResetButtonUp(ev: BeButtonEvent): Promise<EventHandled> {\n if (this._haveFirstPoint) {\n await this.onReinitialize();\n return EventHandled.Yes;\n }\n\n return super.onResetButtonUp(ev);\n }\n\n public provideToolAssistance(): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(this._haveFirstPoint ? \"WindowArea.Prompts.NextPoint\" : \"WindowArea.Prompts.FirstPoint\"));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = CoreTools.translate(\"ElementSet.Inputs.AcceptPoint\");\n const restartMsg = CoreTools.translate(\"ElementSet.Inputs.Restart\");\n const exitMsg = CoreTools.translate(\"ElementSet.Inputs.Exit\");\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchDrag, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, exitMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, this._haveFirstPoint ? restartMsg : exitMsg, false, ToolAssistanceInputMethod.Mouse));\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (undefined === ev.viewport)\n return EventHandled.Yes;\n\n if (undefined === this.viewport) {\n this.viewport = ev.viewport;\n } else if (!ev.viewport.view.hasSameCoordinates(this.viewport.view)) {\n if (this._haveFirstPoint)\n return EventHandled.Yes;\n this.viewport = ev.viewport;\n this._lastPtView = ev.viewPoint;\n IModelApp.viewManager.invalidateDecorationsAllViews();\n return EventHandled.Yes;\n }\n\n if (this._haveFirstPoint) {\n this._secondPtWorld.setFrom(ev.point);\n this.doManipulation(ev, false);\n await this.onReinitialize();\n this.viewport.invalidateDecorations();\n } else {\n this._firstPtWorld.setFrom(ev.point);\n this._secondPtWorld.setFrom(this._firstPtWorld);\n this._haveFirstPoint = true;\n this._lastPtView = ev.viewPoint;\n this.provideToolAssistance();\n }\n\n return EventHandled.Yes;\n }\n\n public override async onMouseMotion(ev: BeButtonEvent) { this.doManipulation(ev, true); }\n public override async onTouchTap(ev: BeTouchEvent): Promise<EventHandled> { return ev.isSingleTap ? EventHandled.Yes : EventHandled.No; } // Prevent IdleTool from converting single tap into data button down/up...\n public override async onTouchMoveStart(ev: BeTouchEvent, startEv: BeTouchEvent): Promise<EventHandled> {\n if (!this._haveFirstPoint && startEv.isSingleTouch)\n await IModelApp.toolAdmin.convertTouchMoveStartToButtonDownAndMotion(startEv, ev);\n\n return this._haveFirstPoint ? EventHandled.Yes : EventHandled.No;\n }\n\n public override async onTouchMove(ev: BeTouchEvent): Promise<void> {\n if (this._haveFirstPoint)\n return IModelApp.toolAdmin.convertTouchMoveToMotion(ev);\n }\n\n public override async onTouchComplete(ev: BeTouchEvent): Promise<void> {\n if (this._haveFirstPoint)\n return IModelApp.toolAdmin.convertTouchEndToButtonUp(ev);\n }\n\n public override async onTouchCancel(ev: BeTouchEvent): Promise<void> {\n if (this._haveFirstPoint)\n return IModelApp.toolAdmin.convertTouchEndToButtonUp(ev, BeButton.Reset);\n }\n\n private computeWindowCorners(): Point3d[] | undefined {\n const vp = this.viewport;\n if (undefined === vp)\n return undefined;\n\n const corners = this._corners;\n corners[0].setFrom(this._firstPtWorld);\n corners[1].setFrom(this._secondPtWorld);\n vp.worldToViewArray(corners);\n\n const delta = corners[1].minus(corners[0]);\n if (delta.magnitudeXY() < vp.pixelsFromInches(ToolSettings.startDragDistanceInches))\n return undefined;\n\n const currentDelta = vp.viewDelta;\n if (currentDelta.x === 0 || delta.x === 0)\n return undefined;\n\n const skew = vp.view.getAspectRatioSkew();\n const viewAspect = skew * currentDelta.y / currentDelta.x;\n const aspectRatio = Math.abs(delta.y / delta.x);\n\n let halfDeltaX;\n let halfDeltaY;\n if (aspectRatio < viewAspect) {\n halfDeltaX = Math.abs(delta.x) / 2.0;\n halfDeltaY = halfDeltaX * viewAspect;\n } else {\n halfDeltaY = Math.abs(delta.y) / 2.0;\n halfDeltaX = halfDeltaY / viewAspect;\n }\n\n const center = corners[0].plusScaled(delta, 0.5);\n corners[0].x = center.x - halfDeltaX;\n corners[0].y = center.y - halfDeltaY;\n corners[1].x = center.x + halfDeltaX;\n corners[1].y = center.y + halfDeltaY;\n return corners;\n }\n\n public override decorate(context: DecorateContext): void {\n if (undefined === this.viewport || !context.viewport.view.hasSameCoordinates(this.viewport.view))\n return;\n const vp = this.viewport;\n const color = vp.getContrastToBackgroundColor();\n if (this._haveFirstPoint) {\n const corners = this.computeWindowCorners();\n if (undefined === corners)\n return;\n\n this._shapePts[0].x = this._shapePts[3].x = corners[0].x;\n this._shapePts[1].x = this._shapePts[2].x = corners[1].x;\n this._shapePts[0].y = this._shapePts[1].y = corners[0].y;\n this._shapePts[2].y = this._shapePts[3].y = corners[1].y;\n this._shapePts[0].z = this._shapePts[1].z = this._shapePts[2].z = this._shapePts[3].z = corners[0].z;\n this._shapePts[4].setFrom(this._shapePts[0]);\n vp.viewToWorldArray(this._shapePts);\n\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n\n builder.setBlankingFill(this._fillColor);\n builder.addShape(this._shapePts);\n\n builder.setSymbology(color, color, ViewHandleWeight.Thin);\n builder.addLineString(this._shapePts);\n\n builder.setSymbology(color, color, ViewHandleWeight.FatDot);\n builder.addPointString([this._firstPtWorld]);\n\n context.addDecorationFromBuilder(builder);\n return;\n }\n\n if (undefined === this._lastPtView || context.viewport !== IModelApp.toolAdmin.cursorView)\n return; // Full screen cross-hair only displays in cursor view...\n\n const cursorPt = this._lastPtView.clone();\n cursorPt.x = Math.floor(cursorPt.x) + 0.5;\n cursorPt.y = Math.floor(cursorPt.y) + 0.5;\n const viewRect = vp.viewRect;\n\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\n ctx.beginPath();\n ctx.strokeStyle = (ColorDef.black === color ? \"black\" : \"white\");\n ctx.lineWidth = 1;\n ctx.moveTo(viewRect.left, cursorPt.y);\n ctx.lineTo(viewRect.right, cursorPt.y);\n ctx.moveTo(cursorPt.x, viewRect.top);\n ctx.lineTo(cursorPt.x, viewRect.bottom);\n ctx.stroke();\n };\n context.addCanvasDecoration({ drawDecoration });\n }\n\n private doManipulation(ev: BeButtonEvent, inDynamics: boolean): void {\n this._secondPtWorld.setFrom(ev.point);\n if (inDynamics) {\n if (undefined !== this.viewport && undefined !== ev.viewport && !ev.viewport.view.hasSameCoordinates(this.viewport.view)) {\n this._lastPtView = undefined;\n return;\n }\n this._lastPtView = ev.viewPoint;\n IModelApp.viewManager.invalidateDecorationsAllViews();\n return;\n }\n\n const corners = this.computeWindowCorners();\n if (undefined === corners)\n return;\n\n const vp = this.viewport;\n if (undefined === vp)\n return;\n\n const view = vp.view;\n vp.viewToWorldArray(corners);\n\n const opts: OnViewExtentsError = {\n onExtentsError: (stat) => view.outputStatusMessage(stat),\n };\n\n let delta: Vector3d;\n let globalAlignment;\n if (view.is3d() && view.isCameraOn) {\n const windowArray: Point3d[] = [corners[0].clone(), corners[1].clone()];\n vp.worldToViewArray(windowArray);\n\n const windowRange = new ViewRect(windowArray[0].x, windowArray[0].y, windowArray[1].x, windowArray[1].y);\n\n let npcZValues = vp.determineVisibleDepthRange(windowRange);\n if (undefined === npcZValues)\n npcZValues = { minimum: 0, maximum: ViewManip.getFocusPlaneNpc(vp) };\n\n const lensAngle = view.getLensAngle();\n\n vp.worldToNpcArray(corners);\n corners[0].z = corners[1].z = npcZValues.maximum;\n\n vp.npcToWorldArray(corners); // Put corners back in world at correct depth\n const viewPts: Point3d[] = [corners[0].clone(), corners[1].clone()];\n vp.rotation.multiplyVectorArrayInPlace(viewPts); // rotate to view orientation to get extents\n\n const range = Range3d.createArray(viewPts);\n delta = Vector3d.createStartEnd(range.low, range.high);\n\n const focusDist = delta.x / (2.0 * Math.tan(lensAngle.radians / 2));\n\n const newTarget = corners[0].interpolate(.5, corners[1]);\n const newEye = newTarget.plusScaled(view.getZVector(), focusDist);\n\n if (ViewStatus.Success !== view.lookAt({ eyePoint: newEye, targetPoint: newTarget, upVector: view.getYVector(), lensAngle, opts }))\n return;\n globalAlignment = { target: newTarget };\n } else {\n const rot = vp.rotation;\n rot.multiplyVectorArrayInPlace(corners);\n\n const range = Range3d.createArray(corners);\n delta = Vector3d.createStartEnd(range.low, range.high);\n // get the view extents\n delta.z = view.getExtents().z;\n\n const originVec = rot.multiplyTransposeXYZ(range.low.x, range.low.y, range.low.z);\n\n // make sure its not too big or too small\n const stat = view.adjustViewDelta(delta, originVec, rot, vp.viewRect.aspect, opts);\n if (stat !== ViewStatus.Success)\n return;\n\n view.setExtents(delta);\n view.setOrigin(originVec);\n if (view.is3d())\n globalAlignment = { target: range.center };\n }\n\n vp.synchWithView({ animateFrustumChange: true, globalAlignment });\n }\n}\n\n/** @internal */\nexport class DefaultViewTouchTool extends ViewManip implements Animator {\n public static override toolId = \"\"; // touch tools installed by IdleTool are never registered\n private readonly _lastPtView = new Point3d();\n private readonly _startPtWorld = new Point3d();\n private readonly _startPtView = new Point3d();\n private readonly _frustum = new Frustum();\n private _startDirection!: Vector2d;\n private _startDistance = 0.0;\n private _startTouchCount = 0;\n private _inertiaVec?: Vector3d;\n private _singleTouch = false;\n private _duration!: BeDuration;\n private _end!: BeTimePoint;\n private _rotate2dDisabled = false;\n private _rotate2dThreshold?: Angle;\n private _only2dManipulations = false;\n\n /** Move this handle during the inertia duration */\n public animate(): boolean {\n if (undefined === this._inertiaVec)\n return true; // handle was removed\n\n // get the fraction of the inertia duration that remains. The decay is a combination of the number of iterations (see damping below)\n // and time. That way the handle slows down even if the framerate is lower.\n const remaining = ((this._end.milliseconds - BeTimePoint.now().milliseconds) / this._duration.milliseconds);\n const pt = this._lastPtView.plusScaled(this._inertiaVec, remaining);\n const vec = this._lastPtView.minus(pt);\n\n // if we're not moving any more, or if the duration has elapsed, we're done\n if (remaining <= 0 || (vec.magnitudeSquared() < .000001)) {\n const vp = this.viewport;\n if (undefined === vp)\n return false;\n vp.saveViewUndo();\n return true; // remove this as the animator\n }\n\n this._lastPtView.setFrom(pt);\n this.perform();\n inertialDampen(this._inertiaVec);\n return false;\n }\n\n public interrupt() { }\n\n constructor(startEv: BeTouchEvent, ev: BeTouchEvent, only2dManipulations = false) {\n super(startEv.viewport, 0, true, false);\n this._only2dManipulations = only2dManipulations;\n this.onStart(ev);\n }\n\n public onStart(ev: BeTouchEvent): void {\n const vp = this.viewport;\n if (undefined === vp)\n return;\n\n vp.getWorldFrustum(this._frustum);\n\n const visiblePoint = vp.pickNearestVisibleGeometry(ev.rawPoint);\n if (undefined !== visiblePoint) {\n this._startPtWorld.setFrom(visiblePoint);\n vp.worldToView(this._startPtWorld, this._startPtView);\n } else {\n this._startPtView.setFrom(ev.viewPoint);\n this._startPtView.z = vp.worldToView(ViewManip.getDefaultTargetPointWorld(vp)).z;\n vp.viewToWorld(this._startPtView, this._startPtWorld);\n }\n this._rotate2dDisabled = false;\n this._rotate2dThreshold = undefined;\n this._lastPtView.setFrom(this._startPtView);\n this._startTouchCount = ev.touchCount;\n this._startDirection = (2 <= ev.touchCount ? Vector2d.createStartEnd(BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[0], vp), BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[1], vp)) : Vector2d.createZero());\n this._startDistance = (2 === ev.touchCount ? this._startDirection.magnitude() : 0.0);\n }\n\n private computeZoomRatio(ev?: BeTouchEvent): number {\n if (undefined === ev || 0.0 === this._startDistance)\n return 1.0;\n\n const vp = this.viewport;\n if (undefined === vp)\n return 1.0;\n\n const distance = (2 === ev.touchCount ? BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[0], vp).distance(BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[1], vp)) : 0.0);\n const threshold = vp.pixelsFromInches(ToolSettings.touchZoomChangeThresholdInches);\n\n if (0.0 === distance || Math.abs(this._startDistance - distance) < threshold)\n return 1.0;\n\n // Remove inertia if the viewing operation includes zoom, only use it for pan and rotate.\n this._inertiaVec = undefined;\n const adjustedDist = (distance > this._startDistance ? (distance - threshold) : (distance + threshold)); // Avoid sudden jump in zoom scale by subtracting zoom threshold distance...\n return Geometry.clamp(this._startDistance / adjustedDist, .1, 10);\n }\n\n private computeRotation(ev?: BeTouchEvent): Angle {\n if (undefined === ev || ev.touchCount < 2 || this._rotate2dDisabled)\n return Angle.createDegrees(0.0);\n\n const vp = this.viewport;\n if (undefined === vp)\n return Angle.createDegrees(0.0);\n\n const direction = Vector2d.createStartEnd(BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[0], vp), BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[1], vp));\n const rotation = this._startDirection.angleTo(direction);\n\n if (undefined === this._rotate2dThreshold) {\n if (Math.abs(rotation.radians) < Angle.createDegrees(5.0).radians)\n return Angle.createDegrees(0.0); // Check against threshold until sufficient rotation is detected...\n\n const angularDistance = Math.abs(direction.magnitude() / 2.0 * Math.sin(Math.abs(rotation.radians)));\n const zoomDistance = Math.abs(direction.magnitude() - this._startDirection.magnitude());\n const panDistance = this._startPtView.distanceXY(this._lastPtView);\n\n // NOTE: The * 0.75 below is because it's easy to confuse an attempted rotate for an attempted pan or zoom, and this tries to balance that without having a false positive in the opposite direction.\n if (angularDistance < (zoomDistance * 0.75) || angularDistance < (panDistance * 0.75)) {\n this._rotate2dDisabled = true; // Restrict subsequent view changes to pan and zoom only...\n return Angle.createDegrees(0.0);\n }\n\n this._rotate2dThreshold = Angle.createRadians(-rotation.radians);\n }\n\n return Angle.createRadians(rotation.radians + this._rotate2dThreshold.radians); // Avoid jump when starting rotation...\n }\n\n private handle2dPan() {\n const screenDist = Point2d.create(this._startPtView.x - this._lastPtView.x, this._startPtView.y - this._lastPtView.y);\n if (undefined !== this.viewport)\n this.viewport.scroll(screenDist, { noSaveInUndo: true });\n }\n\n private handle2dRotateZoom(ev?: BeTouchEvent): void {\n const vp = this.viewport;\n if (undefined === vp)\n return;\n\n const rotation = this.computeRotation(ev);\n const zoomRatio = this.computeZoomRatio(ev);\n const targetWorld = vp.viewToWorld(this._lastPtView);\n const translateTransform = Transform.createTranslation(this._startPtWorld.minus(targetWorld));\n const rotationTransform = Transform.createFixedPointAndMatrix(targetWorld, Matrix3d.createRotationAroundVector(vp.view.getZVector(), rotation) ?? Matrix3d.identity);\n const scaleTransform = Transform.createScaleAboutPoint(this._startPtWorld, zoomRatio);\n const transform = translateTransform.multiplyTransformTransform(rotationTransform);\n\n scaleTransform.multiplyTransformTransform(transform, transform);\n const frustum = this._frustum.transformBy(transform);\n vp.setupViewFromFrustum(frustum);\n }\n\n private handle3dRotate(): void {\n const vp = this.viewport;\n if (undefined === vp)\n return;\n\n const viewRect = vp.viewRect;\n const xExtent = viewRect.width;\n const yExtent = viewRect.height;\n const xDelta = this._lastPtView.x - this._startPtView.x;\n const yDelta = this._lastPtView.y - this._startPtView.y;\n\n const xAxis = ToolSettings.preserveWorldUp ? Vector3d.unitZ() : vp.rotation.getRow(1);\n const yAxis = vp.rotation.getRow(0);\n const xRMatrix = (xDelta ? Matrix3d.createRotationAroundVector(xAxis, Angle.createRadians(Math.PI / (xExtent / xDelta))) : undefined) ?? Matrix3d.identity;\n const yRMatrix = (yDelta ? Matrix3d.createRotationAroundVector(yAxis, Angle.createRadians(Math.PI / (yExtent / yDelta))) : undefined) ?? Matrix3d.identity;\n const worldRMatrix = yRMatrix.multiplyMatrixMatrix(xRMatrix);\n\n const result = worldRMatrix.getAxisAndAngleOfRotation();\n const radians = Angle.createRadians(-result.angle.radians);\n const worldAxis = result.axis;\n\n const rotationMatrix = Matrix3d.createRotationAroundVector(worldAxis, radians);\n if (undefined === rotationMatrix)\n return;\n\n const worldTransform = Transform.createFixedPointAndMatrix(this._startPtWorld, rotationMatrix);\n const frustum = this._frustum.transformBy(worldTransform);\n vp.setupViewFromFrustum(frustum);\n }\n\n private handle3dPanZoom(ev?: BeTouchEvent): void {\n const vp = this.viewport;\n if (undefined === vp)\n return;\n\n const zoomRatio = this.computeZoomRatio(ev);\n\n if (vp.isCameraOn) {\n const targetWorld = vp.viewToWorld(this._lastPtView);\n const preTrans = Transform.createTranslationXYZ(-targetWorld.x, -targetWorld.y, -targetWorld.z);\n const postTrans = Transform.createTranslation(this._startPtWorld);\n\n preTrans.origin.scaleInPlace(zoomRatio);\n preTrans.matrix.scale(zoomRatio, preTrans.matrix);\n const cameraTransform = postTrans.multiplyTransformTransform(preTrans);\n\n const view = vp.view as ViewState3d;\n const oldEyePoint = view.getEyePoint();\n const newEyePoint = cameraTransform.multiplyPoint3d(oldEyePoint);\n const cameraOffset = newEyePoint.minus(oldEyePoint);\n const cameraOffsetTransform = Transform.createTranslation(cameraOffset);\n\n const frustum = this._frustum.transformBy(cameraOffsetTransform);\n vp.setupViewFromFrustum(frustum);\n return;\n }\n\n const targetNpc = vp.viewToNpc(this._lastPtView);\n const transform = Transform.createFixedPointAndMatrix(targetNpc, Matrix3d.createScale(zoomRatio, zoomRatio, 1.0));\n const viewCenter = Point3d.create(.5, .5, .5);\n const startPtNpc = vp.viewToNpc(this._startPtView);\n const shift = startPtNpc.minus(targetNpc);\n shift.z = 0.0;\n const offset = Transform.createTranslation(shift);\n\n offset.multiplyTransformTransform(transform, transform);\n transform.multiplyPoint3d(viewCenter, viewCenter);\n vp.npcToWorld(viewCenter, viewCenter);\n vp.zoom(viewCenter, zoomRatio, { noSaveInUndo: true });\n }\n\n private handleEvent(ev: BeTouchEvent): void {\n if (undefined === this.viewport)\n return;\n\n if (this._startTouchCount !== ev.touchCount) {\n this.onStart(ev);\n return;\n }\n\n this._inertiaVec = undefined;\n const thisPt = ev.viewPoint;\n const smallDistance = 2.0;\n const samePoint = this._lastPtView.isAlmostEqualXY(thisPt, smallDistance);\n if (1 === ev.touchCount && samePoint)\n return; // Don't early return if multi-touch, center doesn't have to move for zoom...\n\n if (this._startPtView.isAlmostEqualXY(thisPt, smallDistance)) {\n this._lastPtView.setFrom(this._startPtView);\n } else {\n if (!samePoint) {\n this._inertiaVec = this._lastPtView.vectorTo(thisPt);\n this._inertiaVec.z = 0;\n }\n this._singleTouch = ev.isSingleTouch;\n this._lastPtView.setFrom(thisPt);\n this._lastPtView.z = this._startPtView.z;\n }\n this.perform(ev);\n }\n\n private perform(ev?: BeTouchEvent) {\n const vp = this.viewport;\n if (undefined === vp)\n return;\n\n vp.setupViewFromFrustum(this._frustum);\n\n const singleTouch = this._singleTouch;\n return (!this._only2dManipulations && vp.view.allow3dManipulations()) ?\n singleTouch ? this.handle3dRotate() : this.handle3dPanZoom(ev) :\n singleTouch ? this.handle2dPan() : this.handle2dRotateZoom(ev);\n }\n\n public override async onDataButtonDown(_ev: BeButtonEvent) { return EventHandled.Yes; }\n public override async onDataButtonUp(_ev: BeButtonEvent) { return EventHandled.Yes; }\n public override async onTouchStart(ev: BeTouchEvent): Promise<void> {\n if (undefined !== this.viewport)\n this.onStart(ev);\n }\n public override async onTouchMove(ev: BeTouchEvent): Promise<void> {\n this.handleEvent(ev);\n }\n public override async onTouchCancel(_ev: BeTouchEvent): Promise<void> { return this.exitTool(); }\n public override async onTouchComplete(_ev: BeTouchEvent): Promise<void> {\n // if we were moving when the touch ended, add inertia to the viewing operation\n if (this._inertiaVec) {\n this._duration = ToolSettings.viewingInertia.duration;\n if (this._duration.isTowardsFuture) { // ensure duration is towards future. Otherwise, don't start animation\n this._end = BeTimePoint.fromNow(this._duration);\n if (undefined !== this.viewport)\n this.viewport.setAnimator(this);\n }\n }\n\n return this.exitTool();\n }\n}\n\n/** A tool that performs view undo operation. An application could also just call Viewport.doUndo directly, creating a ViewTool isn't required.\n * @public\n */\nexport class ViewUndoTool extends ViewTool {\n public static override toolId = \"View.Undo\";\n public static override iconSpec = \"icon-window-backward\";\n\n public override async onPostInstall() {\n if (this.viewport)\n this.viewport.doUndo(ScreenViewport.animation.time.normal);\n return this.exitTool();\n }\n}\n\n/** A tool that performs view redo operation. An application could also just call Viewport.doRedo directly, creating a ViewTool isn't required.\n * @public\n */\nexport class ViewRedoTool extends ViewTool {\n public static override toolId = \"View.Redo\";\n public static override iconSpec = \"icon-window-forward\";\n\n public override async onPostInstall() {\n if (this.viewport)\n this.viewport.doRedo(ScreenViewport.animation.time.normal);\n return this.exitTool();\n }\n}\n\n/** A tool that toggles the camera on/off in a spatial view\n * @public\n */\nexport class ViewToggleCameraTool extends ViewTool {\n public static override toolId = \"View.ToggleCamera\";\n public static override iconSpec = \"icon-camera\";\n\n public override async onInstall(): Promise<boolean> { return (undefined !== this.viewport && this.viewport.view.allow3dManipulations()); }\n\n public override async onPostInstall() {\n if (this.viewport) {\n const vp = this.viewport;\n if (vp.isCameraOn)\n (vp.view as ViewState3d).turnCameraOff();\n else\n vp.turnCameraOn();\n\n vp.synchWithView();\n }\n return this.exitTool();\n }\n}\n\n/** A tool that sets the view camera by two points. This is a PrimitiveTool and not a ViewTool to allow the view to be panned, zoomed, and rotated while defining the points.\n * To show tool settings for specifying camera and target heights above the snap point, make sure formatting and parsing data are cached before the tool starts\n * by calling QuantityFormatter.onInitialized at app startup.\n * @public\n */\nexport class SetupCameraTool extends PrimitiveTool {\n public static override toolId = \"View.SetupCamera\";\n public static override iconSpec = \"icon-camera-location\";\n public viewport?: ScreenViewport;\n protected _haveEyePt: boolean = false;\n protected _eyePtWorld: Point3d = Point3d.create();\n protected _targetPtWorld: Point3d = Point3d.create();\n\n public override isCompatibleViewport(vp: Viewport | undefined, isSelectedViewChange: boolean): boolean { return (super.isCompatibleViewport(vp, isSelectedViewChange) && undefined !== vp && vp.view.allow3dManipulations()); }\n public override isValidLocation(_ev: BeButtonEvent, _isButtonEvent: boolean): boolean { return true; }\n public override requireWriteableTarget(): boolean { return false; }\n public override async onPostInstall() {\n await super.onPostInstall();\n this.setupAndPromptForNextAction();\n }\n\n public override async onUnsuspend() { this.provideToolAssistance(); }\n protected setupAndPromptForNextAction(): void {\n IModelApp.accuSnap.enableSnap(true);\n this.provideToolAssistance();\n }\n\n public override async onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled> {\n if (this._haveEyePt)\n await this.onReinitialize();\n else\n await this.exitTool();\n\n return EventHandled.Yes;\n }\n\n protected provideToolAssistance(): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(this._haveEyePt ? \"SetupCamera.Prompts.NextPoint\" : \"SetupCamera.Prompts.FirstPoint\"));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = CoreTools.translate(\"ElementSet.Inputs.AcceptPoint\");\n const rejectMsg = CoreTools.translate(this._haveEyePt ? \"ElementSet.Inputs.Restart\" : \"ElementSet.Inputs.Exit\");\n if (!ToolAssistance.createTouchCursorInstructions(touchInstructions))\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, rejectMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, rejectMsg, false, ToolAssistanceInputMethod.Mouse));\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n\n public async onRestartTool(): Promise<void> {\n const tool = new SetupCameraTool();\n if (!await tool.run())\n return this.exitTool();\n }\n\n protected getAdjustedEyePoint() { return this.useCameraHeight ? this._eyePtWorld.plusScaled(Vector3d.unitZ(), this.cameraHeight) : this._eyePtWorld; }\n protected getAdjustedTargetPoint() { return this.useTargetHeight ? this._targetPtWorld.plusScaled(Vector3d.unitZ(), this.targetHeight) : this._targetPtWorld; }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (undefined === ev.viewport) {\n return EventHandled.Yes;\n } else if (undefined === this.viewport) {\n if (!ev.viewport.view.allow3dManipulations())\n return EventHandled.Yes;\n this.viewport = ev.viewport;\n } else if (this.viewport.view.iModel !== ev.viewport.view.iModel) {\n if (this._haveEyePt)\n return EventHandled.Yes;\n this.viewport = ev.viewport;\n return EventHandled.Yes;\n }\n\n if (this._haveEyePt) {\n this._targetPtWorld.setFrom(ev.point);\n this.doManipulation();\n await this.onReinitialize();\n } else {\n this._eyePtWorld.setFrom(ev.point);\n this._targetPtWorld.setFrom(this._eyePtWorld);\n this._haveEyePt = true;\n this.setupAndPromptForNextAction();\n }\n\n return EventHandled.Yes;\n }\n\n public override async onMouseMotion(ev: BeButtonEvent) {\n if (!this._haveEyePt)\n return;\n this._targetPtWorld.setFrom(ev.point);\n IModelApp.viewManager.invalidateDecorationsAllViews();\n }\n\n public static drawCameraFrustum(context: DecorateContext, vp: ScreenViewport, eyePtWorld: Point3d, targetPtWorld: Point3d, eyeSnapPtWorld?: Point3d, targetSnapPtWorld?: Point3d) {\n if (!vp.view.is3d() || vp.view.iModel !== context.viewport.view.iModel)\n return;\n\n const zVec = Vector3d.createStartEnd(eyePtWorld, targetPtWorld);\n const focusDist = zVec.normalizeWithLength(zVec).mag;\n if (focusDist <= Constant.oneMillimeter) // eye and target are too close together\n return;\n\n const xVec = new Vector3d();\n const yVec = Vector3d.unitZ();\n if (yVec.crossProduct(zVec).normalizeWithLength(xVec).mag < Geometry.smallMetricDistance)\n return;\n if (zVec.crossProduct(xVec).normalizeWithLength(yVec).mag < Geometry.smallMetricDistance)\n return;\n\n const lensAngle = ToolSettings.walkCameraAngle;\n const extentX = Math.tan(lensAngle.radians / 2.0) * focusDist;\n const extentY = extentX * (vp.view.extents.y / vp.view.extents.x);\n\n const pt1 = targetPtWorld.plusScaled(xVec, -extentX);\n pt1.plusScaled(yVec, extentY, pt1);\n const pt2 = targetPtWorld.plusScaled(xVec, extentX);\n pt2.plusScaled(yVec, extentY, pt2);\n const pt3 = targetPtWorld.plusScaled(xVec, extentX);\n pt3.plusScaled(yVec, -extentY, pt3);\n const pt4 = targetPtWorld.plusScaled(xVec, -extentX);\n pt4.plusScaled(yVec, -extentY, pt4);\n\n const color = EditManipulator.HandleUtils.adjustForBackgroundColor(ColorDef.black, vp);\n const builderHid = context.createGraphicBuilder(GraphicType.WorldOverlay);\n\n builderHid.setSymbology(color, color, ViewHandleWeight.Bold);\n builderHid.addLineString([eyePtWorld, targetPtWorld]);\n\n builderHid.setSymbology(color, color, ViewHandleWeight.Thin, LinePixels.Code2);\n builderHid.addLineString([eyePtWorld, pt1]);\n builderHid.addLineString([eyePtWorld, pt2]);\n builderHid.addLineString([eyePtWorld, pt3]);\n builderHid.addLineString([eyePtWorld, pt4]);\n builderHid.addLineString([pt1, pt2, pt3, pt4, pt1]);\n\n if (eyeSnapPtWorld)\n builderHid.addLineString([eyeSnapPtWorld, eyePtWorld]);\n if (targetSnapPtWorld)\n builderHid.addLineString([targetSnapPtWorld, targetPtWorld]);\n\n builderHid.setSymbology(color, color, ViewHandleWeight.FatDot);\n builderHid.addPointString([eyePtWorld, targetPtWorld]);\n\n if (eyeSnapPtWorld)\n builderHid.addPointString([eyeSnapPtWorld]);\n if (targetSnapPtWorld)\n builderHid.addPointString([targetSnapPtWorld]);\n\n context.addDecorationFromBuilder(builderHid);\n\n const backColor = ColorDef.from(0, 0, 255, 200);\n const sideColor = context.viewport.hilite.color.withAlpha(25);\n const builderVis = context.createGraphicBuilder(GraphicType.WorldDecoration);\n\n builderVis.setSymbology(color, color, ViewHandleWeight.Normal);\n builderVis.addLineString([eyePtWorld, pt1]);\n builderVis.addLineString([eyePtWorld, pt2]);\n builderVis.addLineString([eyePtWorld, pt3]);\n builderVis.addLineString([eyePtWorld, pt4]);\n builderVis.addLineString([pt1, pt2, pt3, pt4, pt1]);\n\n builderVis.setSymbology(color, backColor, ViewHandleWeight.Thin);\n builderVis.addShape([pt1, pt2, pt3, pt4]);\n\n builderVis.setSymbology(color, sideColor, ViewHandleWeight.Thin);\n builderVis.addShape([eyePtWorld, pt1, pt2]);\n builderVis.addShape([eyePtWorld, pt2, pt3]);\n builderVis.addShape([eyePtWorld, pt3, pt4]);\n builderVis.addShape([eyePtWorld, pt4, pt1]);\n\n context.addDecorationFromBuilder(builderVis);\n }\n\n public override decorate(context: DecorateContext): void {\n if (!this._haveEyePt || undefined === this.viewport)\n return;\n SetupCameraTool.drawCameraFrustum(context, this.viewport, this.getAdjustedEyePoint(), this.getAdjustedTargetPoint(), this.useCameraHeight ? this._eyePtWorld : undefined, this.useTargetHeight ? this._targetPtWorld : undefined);\n }\n\n public override decorateSuspended(context: DecorateContext): void { this.decorate(context); }\n\n private doManipulation(): void {\n const vp = this.viewport;\n if (undefined === vp)\n return;\n\n const view = vp.view;\n if (!view.is3d() || !view.allow3dManipulations())\n return;\n\n const eyePoint = this.getAdjustedEyePoint();\n const targetPoint = this.getAdjustedTargetPoint();\n const lensAngle = ToolSettings.walkCameraAngle;\n if (ViewStatus.Success !== view.lookAt({ eyePoint, targetPoint, upVector: Vector3d.unitZ(), lensAngle }))\n return;\n\n vp.synchWithView({ animateFrustumChange: true });\n }\n\n private _useCameraHeightProperty: DialogProperty<boolean> | undefined;\n public get useCameraHeightProperty() {\n if (!this._useCameraHeightProperty)\n this._useCameraHeightProperty = new DialogProperty<boolean>(\n PropertyDescriptionHelper.buildLockPropertyDescription(\"useCameraHeight\"), false, undefined, false);\n return this._useCameraHeightProperty;\n }\n public get useCameraHeight(): boolean { return this.useCameraHeightProperty.value; }\n public set useCameraHeight(option: boolean) { this.useCameraHeightProperty.value = option; }\n\n private _cameraHeightProperty: DialogProperty<number> | undefined;\n public get cameraHeightProperty() {\n if (!this._cameraHeightProperty)\n this._cameraHeightProperty = new DialogProperty<number>(new LengthDescription(\"cameraHeight\", ViewTool.translate(\"SetupCamera.Labels.CameraHeight\")), 0.0);\n return this._cameraHeightProperty;\n }\n public get cameraHeight(): number { return this.cameraHeightProperty.value; }\n public set cameraHeight(value: number) { this.cameraHeightProperty.value = value; }\n\n private _useTargetHeightProperty: DialogProperty<boolean> | undefined;\n public get useTargetHeightProperty() {\n if (!this._useTargetHeightProperty)\n this._useTargetHeightProperty = new DialogProperty<boolean>(\n PropertyDescriptionHelper.buildLockPropertyDescription(\"useTargetHeight\"), false, undefined, false);\n return this._useTargetHeightProperty;\n }\n public get useTargetHeight(): boolean { return this.useTargetHeightProperty.value; }\n public set useTargetHeight(value: boolean) { this.useTargetHeightProperty.value = value; }\n\n private _targetHeightProperty: DialogProperty<number> | undefined;\n public get targetHeightProperty() {\n if (!this._targetHeightProperty)\n this._targetHeightProperty = new DialogProperty<number>(new LengthDescription(\"targetHeight\", ViewTool.translate(\"SetupCamera.Labels.TargetHeight\")), 0.0);\n return this._targetHeightProperty;\n }\n public get targetHeight(): number { return this.targetHeightProperty.value; }\n public set targetHeight(value: number) { this.targetHeightProperty.value = value; }\n\n protected override getToolSettingLockProperty(property: DialogProperty<any>): DialogProperty<boolean> | undefined {\n if (property === this.cameraHeightProperty)\n return this.useCameraHeightProperty;\n else if (property === this.targetHeightProperty)\n return this.useTargetHeightProperty;\n return undefined;\n }\n\n public override async applyToolSettingPropertyChange(updatedValue: DialogPropertySyncItem): Promise<boolean> {\n return this.changeToolSettingPropertyValue(updatedValue);\n }\n\n public override supplyToolSettingsProperties(): DialogItem[] | undefined {\n this.initializeToolSettingPropertyValues([this.useCameraHeightProperty, this.useTargetHeightProperty, this.cameraHeightProperty, this.targetHeightProperty]);\n\n const cameraHeightLock = this.useCameraHeightProperty.toDialogItem({ rowPriority: 1, columnIndex: 0 });\n const targetHeightLock = this.useTargetHeightProperty.toDialogItem({ rowPriority: 2, columnIndex: 0 });\n\n const toolSettings = new Array<DialogItem>();\n toolSettings.push(this.cameraHeightProperty.toDialogItem({ rowPriority: 1, columnIndex: 1 }, cameraHeightLock));\n toolSettings.push(this.targetHeightProperty.toDialogItem({ rowPriority: 2, columnIndex: 1 }, targetHeightLock));\n return toolSettings;\n }\n}\n\n/** A tool that sets a walk tool starting position by a floor point and look direction. This is a PrimitiveTool and not a ViewTool to allow the view to be panned, zoomed, and rotated while defining the points.\n * @public\n */\nexport class SetupWalkCameraTool extends PrimitiveTool {\n public static override toolId = \"View.SetupWalkCamera\";\n public static override iconSpec = \"icon-camera-location\";\n public viewport?: ScreenViewport;\n protected _haveEyePt: boolean = false;\n protected _eyePtWorld: Point3d = Point3d.create();\n protected _targetPtWorld: Point3d = Point3d.create();\n\n public override isCompatibleViewport(vp: Viewport | undefined, isSelectedViewChange: boolean): boolean { return (super.isCompatibleViewport(vp, isSelectedViewChange) && undefined !== vp && vp.view.allow3dManipulations()); }\n public override isValidLocation(_ev: BeButtonEvent, _isButtonEvent: boolean): boolean { return true; }\n public override requireWriteableTarget(): boolean { return false; }\n public override async onPostInstall() {\n await super.onPostInstall();\n this.setupAndPromptForNextAction();\n }\n\n public override async onUnsuspend() { this.provideToolAssistance(); }\n protected setupAndPromptForNextAction(): void {\n IModelApp.accuSnap.enableSnap(true);\n this.provideToolAssistance();\n }\n\n public override async onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled> {\n if (this._haveEyePt)\n await this.onReinitialize();\n else\n await this.exitTool();\n\n return EventHandled.Yes;\n }\n\n protected provideToolAssistance(): void {\n const mainInstruction = ToolAssistance.createInstruction(this.iconSpec, ViewTool.translate(this._haveEyePt ? \"SetupWalkCamera.Prompts.NextPoint\" : \"SetupWalkCamera.Prompts.FirstPoint\"));\n const mouseInstructions: ToolAssistanceInstruction[] = [];\n const touchInstructions: ToolAssistanceInstruction[] = [];\n\n const acceptMsg = CoreTools.translate(\"ElementSet.Inputs.AcceptPoint\");\n const rejectMsg = CoreTools.translate(this._haveEyePt ? \"ElementSet.Inputs.Restart\" : \"ElementSet.Inputs.Exit\");\n if (!ToolAssistance.createTouchCursorInstructions(touchInstructions))\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, acceptMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.LeftClick, acceptMsg, false, ToolAssistanceInputMethod.Mouse));\n touchInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TwoTouchTap, rejectMsg, false, ToolAssistanceInputMethod.Touch));\n mouseInstructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.RightClick, rejectMsg, false, ToolAssistanceInputMethod.Mouse));\n\n const sections: ToolAssistanceSection[] = [];\n sections.push(ToolAssistance.createSection(mouseInstructions, ToolAssistance.inputsLabel));\n sections.push(ToolAssistance.createSection(touchInstructions, ToolAssistance.inputsLabel));\n\n const instructions = ToolAssistance.createInstructions(mainInstruction, sections);\n IModelApp.notifications.setToolAssistance(instructions);\n }\n\n public async onRestartTool(): Promise<void> {\n const tool = new SetupWalkCameraTool();\n if (!await tool.run())\n return this.exitTool();\n }\n\n protected getAdjustedEyePoint() { return this._eyePtWorld.plusScaled(Vector3d.unitZ(), ToolSettings.walkEyeHeight); }\n protected getAdjustedTargetPoint() { return Point3d.create(this._targetPtWorld.x, this._targetPtWorld.y, this.getAdjustedEyePoint().z); }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (undefined === ev.viewport) {\n return EventHandled.Yes;\n } else if (undefined === this.viewport) {\n if (!ev.viewport.view.allow3dManipulations())\n return EventHandled.Yes;\n this.viewport = ev.viewport;\n } else if (this.viewport.view.iModel !== ev.viewport.view.iModel) {\n if (this._haveEyePt)\n return EventHandled.Yes;\n this.viewport = ev.viewport;\n return EventHandled.Yes;\n }\n\n if (this._haveEyePt) {\n this._targetPtWorld.setFrom(ev.point);\n this.doManipulation();\n await this.onReinitialize();\n } else {\n this._eyePtWorld.setFrom(ev.point);\n this._targetPtWorld.setFrom(this._eyePtWorld);\n this._haveEyePt = true;\n this.setupAndPromptForNextAction();\n }\n\n return EventHandled.Yes;\n }\n\n public override async onMouseMotion(ev: BeButtonEvent) {\n if (!this._haveEyePt)\n return;\n this._targetPtWorld.setFrom(ev.point);\n IModelApp.viewManager.invalidateDecorationsAllViews();\n }\n\n private static getFigurePoints(): Point3d[] {\n const figurePts: Point3d[] = [];\n figurePts.push(Point3d.create(1.064, -0.014));\n figurePts.push(Point3d.create(1.051, 0.039));\n figurePts.push(Point3d.create(1.008, 0.058));\n figurePts.push(Point3d.create(0.962, 0.048));\n figurePts.push(Point3d.create(0.920, 0.026));\n figurePts.push(Point3d.create(0.898, 0.026));\n figurePts.push(Point3d.create(0.853, 0.094));\n figurePts.push(Point3d.create(0.741, 0.120));\n figurePts.push(Point3d.create(0.652, 0.091));\n figurePts.push(Point3d.create(0.514, 0.107));\n figurePts.push(Point3d.create(0.304, 0.108));\n figurePts.push(Point3d.create(0.040, 0.135));\n figurePts.push(Point3d.create(-0.023, 0.133));\n figurePts.push(Point3d.create(-0.031, 0.088));\n figurePts.push(Point3d.create(0.041, 0.068));\n figurePts.push(Point3d.create(0.299, 0.035));\n figurePts.push(Point3d.create(0.447, -0.015));\n figurePts.push(Point3d.create(0.267, -0.042));\n figurePts.push(Point3d.create(0.019, -0.036));\n figurePts.push(Point3d.create(-0.027, -0.146));\n figurePts.push(Point3d.create(-0.005, -0.179));\n figurePts.push(Point3d.create(0.056, -0.108));\n figurePts.push(Point3d.create(0.270, -0.122));\n figurePts.push(Point3d.create(0.483, -0.120));\n figurePts.push(Point3d.create(0.649, -0.145));\n figurePts.push(Point3d.create(0.715, -0.186));\n figurePts.push(Point3d.create(0.865, -0.135));\n figurePts.push(Point3d.create(0.905, -0.039));\n figurePts.push(Point3d.create(0.948, -0.035));\n figurePts.push(Point3d.create(0.979, -0.051));\n figurePts.push(Point3d.create(1.037, -0.046));\n figurePts.push(figurePts[0].clone());\n return figurePts;\n }\n\n private static getFigureTransform(vp: Viewport, base: Point3d, direction: Vector3d, scale: number): Transform | undefined {\n const boresite = AccuDrawHintBuilder.getBoresite(base, vp);\n if (Math.abs(direction.dotProduct(boresite.direction)) >= 0.9999)\n return undefined;\n\n const matrix = Matrix3d.createRigidFromColumns(direction, boresite.direction, AxisOrder.XZY);\n if (undefined === matrix)\n return undefined;\n\n matrix.scaleColumnsInPlace(scale, scale, scale);\n return Transform.createRefs(base.clone(), matrix);\n }\n\n public static drawFigure(context: DecorateContext, vp: Viewport, groundPt: Point3d, eyeHeight: number): void {\n if (!vp.view.is3d() || vp.view.iModel !== context.viewport.view.iModel)\n return;\n\n const transform = this.getFigureTransform(context.viewport, groundPt, Vector3d.unitZ(), eyeHeight);\n if (undefined === transform)\n return;\n\n const figurePts = this.getFigurePoints();\n const color = EditManipulator.HandleUtils.adjustForBackgroundColor(ColorDef.black, vp);\n const fill = ColorDef.from(255, 245, 225, 100);\n\n const builderShadow = context.createGraphicBuilder(GraphicType.WorldOverlay);\n builderShadow.setSymbology(color, ColorDef.black.withAlpha(30), ViewHandleWeight.Thin);\n builderShadow.addArc(Arc3d.createXY(groundPt, eyeHeight * 0.22), true, true);\n context.addDecorationFromBuilder(builderShadow);\n\n const builderHid = context.createGraphicBuilder(GraphicType.WorldDecoration, transform);\n builderHid.setSymbology(color, fill, ViewHandleWeight.Thin);\n builderHid.addShape(figurePts); // Copies points...\n context.addDecorationFromBuilder(builderHid);\n\n const builderVis = context.createGraphicBuilder(GraphicType.WorldOverlay, transform);\n builderVis.setSymbology(color, color, ViewHandleWeight.Normal);\n builderVis.addLineString(figurePts); // Owns points...\n context.addDecorationFromBuilder(builderVis);\n }\n\n public override decorate(context: DecorateContext): void {\n if (!this._haveEyePt || undefined === this.viewport)\n return;\n SetupWalkCameraTool.drawFigure(context, this.viewport, this._eyePtWorld, ToolSettings.walkEyeHeight);\n SetupCameraTool.drawCameraFrustum(context, this.viewport, this.getAdjustedEyePoint(), this.getAdjustedTargetPoint(), this._eyePtWorld, this._targetPtWorld);\n }\n\n public override decorateSuspended(context: DecorateContext): void { this.decorate(context); }\n\n private doManipulation(): void {\n const vp = this.viewport;\n if (undefined === vp)\n return;\n\n const view = vp.view;\n if (!view.is3d() || !view.allow3dManipulations())\n return;\n\n const eyePoint = this.getAdjustedEyePoint();\n const targetPoint = this.getAdjustedTargetPoint();\n const lensAngle = ToolSettings.walkCameraAngle;\n if (ViewStatus.Success !== view.lookAt({ eyePoint, targetPoint, upVector: Vector3d.unitZ(), lensAngle }))\n return;\n\n vp.synchWithView({ animateFrustumChange: true });\n }\n}\n"]}
|