@itwin/core-common 4.6.0-dev.8 → 4.6.0-dev.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/AuthorizationClient.js.map +1 -1
- package/lib/cjs/BackendTypes.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/Base64EncodedString.js.map +1 -1
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ChangedEntities.js.map +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorByName.js.map +1 -1
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSchemaProps.js.map +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/EntityReference.js.map +1 -1
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GenericInstanceFilter.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryContainment.js.map +1 -1
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/LinePixels.js.map +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/ModelGeometryChanges.js.map +1 -1
- package/lib/cjs/ModelProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/Render.js.map +1 -1
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SessionProps.js.map +1 -1
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/Snapping.js.map +1 -1
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/TxnAction.js.map +1 -1
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
- package/lib/cjs/domains/GenericElementProps.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/WipRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/AuthorizationClient.js.map +1 -1
- package/lib/esm/BackendTypes.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/Base64EncodedString.js.map +1 -1
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/ChangedElements.js.map +1 -1
- package/lib/esm/ChangedEntities.js.map +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorByName.js.map +1 -1
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSchemaProps.js.map +1 -1
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EmphasizeElementsProps.js.map +1 -1
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/EntityReference.js.map +1 -1
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GenericInstanceFilter.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryContainment.js.map +1 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/LinePixels.js.map +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/MaterialProps.js.map +1 -1
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/ModelGeometryChanges.js.map +1 -1
- package/lib/esm/ModelProps.js.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/Render.js.map +1 -1
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SessionProps.js.map +1 -1
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/Snapping.js.map +1 -1
- package/lib/esm/SolarCalculate.js.map +1 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/TxnAction.js.map +1 -1
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
- package/lib/esm/domains/GenericElementProps.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/WipRpcInterface.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
- package/package.json +6 -6
package/lib/esm/ViewProps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewProps.js","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAgPH;;;GAGG;AACH,MAAM,KAAW,YAAY,CA0W5B;AA1WD,WAAiB,YAAY;IAE3B;;;;OAIG;IACU,oBAAO,GAAG,OAAgB,CAAC;IAkCxC,qGAAqG;IACxF,0BAAa,GAAG,CAAC,EAAiB,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;AAgUnF,CAAC,EA1WgB,YAAY,KAAZ,YAAY,QA0W5B","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 Views\n */\n\nimport { CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { AngleProps, Range3dProps, TransformProps, XYProps, XYZProps, YawPitchRollProps } from \"@itwin/core-geometry\";\nimport { CameraProps } from \"./Camera\";\nimport { DisplayStyleProps, DisplayStyleSettingsProps } from \"./DisplayStyleSettings\";\nimport { DefinitionElementProps, DisplayStyleLoadProps, ElementProps, RenderTimelineProps, SheetProps, ViewAttachmentProps } from \"./ElementProps\";\nimport { EntityQueryParams } from \"./EntityProps\";\nimport { ModelProps } from \"./ModelProps\";\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\nimport { ViewDetails3dProps, ViewDetailsProps } from \"./ViewDetails\";\nimport { ThumbnailProps } from \"./Thumbnail\";\nimport { RenderSchedule } from \"./RenderSchedule\";\n\n/** The id of either an element or an entry in a ViewStore.\n * @public\n */\nexport type ViewIdString = Id64String; // should also include ViewStoreRpc.IdString when that's @public\n\n/** As part of a [[ViewStateProps]], describes the [[SpatialViewDefinition]] from which a [SectionDrawing]($backend) was generated.\n * @see [[SectionDrawingProps]]\n * @public\n * @extensions\n */\nexport interface SectionDrawingViewProps {\n /** The Id of the spatial view from which the SectionDrawing was generated. */\n spatialView: Id64String;\n /** If true, the spatial view should be displayed in the context of the drawing view. */\n displaySpatialView: boolean;\n /** Transform from drawing coordinates to spatial coordinates. If undefined, use identity transform. */\n drawingToSpatialTransform?: TransformProps;\n}\n\n/** The response props from the getCustomViewState3dData RPC endpoint\n * @internal\n */\nexport interface CustomViewState3dProps {\n modelIds: CompressedId64Set;\n modelExtents: Range3dProps;\n categoryIds: CompressedId64Set;\n}\n\n/**\n * The options passed to the getCustomViewState3dData RPC endpoint.\n * @internal\n */\nexport interface CustomViewState3dCreatorOptions {\n modelIds?: CompressedId64Set;\n}\n\n/**\n * A result row from querying for subcategories\n * @internal\n */\nexport interface SubCategoryResultRow {\n parentId: Id64String;\n id: Id64String;\n appearance: SubCategoryAppearance.Props;\n}\n\n/**\n * Request props for the hydrateViewState RPC endpoint.\n * @internal\n */\nexport interface HydrateViewStateRequestProps {\n acsId?: string;\n notLoadedModelSelectorStateModels?: CompressedId64Set;\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\n notLoadedCategoryIds?: CompressedId64Set;\n sheetViewAttachmentIds?: CompressedId64Set;\n viewStateLoadProps?: ViewStateLoadProps;\n baseModelId?: Id64String;\n spatialViewId?: Id64String;\n}\n\n/** Response props from the hydrateViewState RPC endpoint.\n * @internal\n */\nexport interface HydrateViewStateResponseProps {\n acsElementProps?: ElementProps;\n modelSelectorStateModels?: ModelProps[];\n // cast this to viewAttachmentInfo[] on the frontend.\n sheetViewAttachmentProps?: ViewAttachmentProps[];\n sheetViewViews?: (ViewStateProps | undefined)[];\n baseModelProps?: ModelProps;\n spatialViewProps?: ViewStateProps;\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\n categoryIdsResult?: SubCategoryResultRow[];\n}\n\n/** Returned from [IModelDb.Views.getViewStateData]($backend).\n * @public\n * @extensions\n */\nexport interface ViewStateProps {\n viewDefinitionProps: ViewDefinitionProps;\n categorySelectorProps: CategorySelectorProps;\n modelSelectorProps?: ModelSelectorProps;\n displayStyleProps: DisplayStyleProps;\n /** Sheet-specific properties, if this is a view of a [SheetModel]($backend). */\n sheetProps?: SheetProps;\n /** The Ids of the [ViewAttachment]($backend)s contained within the [SheetModel]($backend), if this is a sheet view. */\n sheetAttachments?: Id64Array;\n /** For a [DrawingViewState]($frontend), the extents of the [DrawingModel]($backend), used for determining the upper limits of the view's extents. */\n modelExtents?: Range3dProps;\n /** Information about the [SectionDrawing]($backend) relevant to displaying a drawing view. */\n sectionDrawing?: SectionDrawingViewProps;\n}\n\n/** Options for loading a [[ViewStateProps]] via [IModelConnection.Views.load]($frontend) or [IModelDb.Views.getViewStateData]($backend).\n * @public\n * @extensions\n */\nexport interface ViewStateLoadProps {\n /** Options for loading the view's [[DisplayStyleProps]]. */\n displayStyle?: DisplayStyleLoadProps;\n\n /**\n * bindings for query-based selectors\n * @beta\n */\n queryBindings?: {\n modelSelector?: ViewStoreRpc.QueryBindings;\n categorySelector?: ViewStoreRpc.QueryBindings;\n };\n}\n\n/** Properties that define a ModelSelector\n * @public\n * @extensions\n */\nexport interface ModelSelectorProps extends DefinitionElementProps {\n models: Id64Array;\n}\n\n/** Properties that define a CategorySelector\n * @public\n * @extensions\n */\nexport interface CategorySelectorProps extends DefinitionElementProps {\n categories: Id64Array;\n}\n\n/** Parameters for performing a query on [ViewDefinition]($backend) classes.\n * @public\n * @extensions\n */\nexport interface ViewQueryParams extends EntityQueryParams {\n wantPrivate?: boolean;\n}\n\n/** Parameters used to construct a ViewDefinition\n * @public\n * @extensions\n */\nexport interface ViewDefinitionProps extends DefinitionElementProps {\n categorySelectorId: ViewIdString;\n displayStyleId: ViewIdString;\n description?: string;\n jsonProperties?: {\n /** Additional properties of the view. */\n viewDetails?: ViewDetailsProps;\n };\n}\n\n/** Parameters to construct a ViewDefinition3d\n * @public\n * @extensions\n */\nexport interface ViewDefinition3dProps extends ViewDefinitionProps {\n /** if true, camera is valid. */\n cameraOn: boolean;\n /** The lower left back corner of the view frustum. */\n origin: XYZProps;\n /** The extent of the view frustum. */\n extents: XYZProps;\n /** Rotation of the view frustum (could be undefined if going Matrix3d -> YawPitchRoll). */\n angles?: YawPitchRollProps;\n /** The camera used for this view. */\n camera: CameraProps;\n jsonProperties?: {\n /** Additional properties of the view. */\n viewDetails?: ViewDetails3dProps;\n };\n}\n\n/** Parameters to construct a SpatialViewDefinition\n * @public\n * @extensions\n */\nexport interface SpatialViewDefinitionProps extends ViewDefinition3dProps {\n modelSelectorId: ViewIdString;\n}\n\n/** Parameters used to construct a ViewDefinition2d\n * @public\n * @extensions\n */\nexport interface ViewDefinition2dProps extends ViewDefinitionProps {\n baseModelId: Id64String;\n origin: XYProps;\n delta: XYProps;\n angle: AngleProps;\n}\n\n/**\n * @public\n * @extensions\n */\nexport interface AuxCoordSystemProps extends ElementProps {\n type?: number;\n description?: string;\n}\n\n/** Properties of AuxCoordSystem2d\n * @public\n * @extensions\n */\nexport interface AuxCoordSystem2dProps extends AuxCoordSystemProps {\n /** Origin of the AuxCoordSystem2d */\n origin?: XYProps;\n /** Rotation angle */\n angle?: AngleProps;\n}\n\n/** Properties of AuxCoordSystem3d\n * @public\n * @extensions\n */\nexport interface AuxCoordSystem3dProps extends AuxCoordSystemProps {\n /** Origin of the AuxCoordSystem3d */\n origin?: XYZProps;\n /** Yaw angle */\n yaw?: AngleProps;\n /** Pitch angle */\n pitch?: AngleProps;\n /** Roll angle */\n roll?: AngleProps;\n}\n\n/**\n * Access to a ViewStore from the frontend.\n * @beta\n */\nexport namespace ViewStoreRpc {\n\n /**\n * Version of the Rpc interface. If any methods or interfaces of this API change, this number should\n * be incremented according to the rules of semantic versioning. See .\\rpc\\README-RpcInterfaceVersioning.md for more information.\n * @internal\n */\n export const version = \"4.0.0\" as const;\n\n /** an Id of a View, DisplayStyle, ModelSelector, CategorySelector, or Timeline in a ViewStore.\n * Will be a base-36 number with a leading \"@\".\n * @public\n */\n export type IdString = string;\n\n /**\n * A string identifying a group. This may either be a \"group name path\" or the RowString of a group (e.g. either \"group1/design/issues\" or \"@4e3\")\n * The syntax is not ambiguous because ViewStoreIdStrings always start with \"@\" and Group names can never contain \"@\".\n */\n export type ViewGroupSpec = IdString | ViewGroupPath;\n\n /** The name for a view. */\n export type ViewName = string;\n\n /** The name for a Tag. */\n export type TagName = string;\n\n /** The name of an \"owner\". Should come from the authentication system, so it will be guaranteed unique.\n * This name should be chosen by the user rather than their email address.\n */\n export type OwnerName = string;\n\n /** The path name of a view group (e.g. \"group1/design/issues\"). Does not include the \"root\" group. */\n export type ViewGroupPath = string;\n\n /** The name for a view group. */\n export type ViewGroupName = string;\n\n /** The name for a view group. */\n export type ClassFullName = string;\n\n /** Determine if a string is an Id of an entry in a ViewStore (base-36 integer with a leading \"@\") */\n export const isViewStoreId = (id?: ViewIdString) => true === id?.startsWith(\"@\");\n\n /** Parameters for querying for views in a ViewStore. */\n export interface QueryParams {\n /** a list of classFullNames to accept. If not present, all classes are returned. */\n readonly classNames?: ClassFullName[];\n /** Optional \"LIMIT\" clause to limit the number of views returned. */\n readonly limit?: number;\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\n readonly offset?: number;\n /** A string to filter view names. May include wildcards if the `nameCompare` uses LIKE or GLOB (see SQLite documentation for LIKE and GLOB). */\n readonly nameSearch?: string;\n /** The comparison operator for `nameSearch`. Default is `=` */\n readonly nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\n /* the Id of the view group to query. If not present, the root group is used. There is no way to query for views from multiple view groups in one request. */\n readonly group?: IdString;\n /** A list of tags to filter views. If present, only views that have one or more of the tags will be returned. */\n readonly tags?: TagName[];\n /* The name of an owner for private views. If present, private views owned by the owner will also be returned. Shared views are always returned. */\n readonly owner?: OwnerName;\n }\n\n /** Parameters for specifying a Query to select Categories or Models. */\n export interface SelectorQuery {\n /**\n * The full ClassName from which to select. If this SelectorQuery is for Categories, this must be or derive from \"BisCore:Category\".\n * If this SelectorQuery is for Models, this must be or derive from \"BisCore:Model\".\n */\n from: ClassFullName;\n /** If true, only return instances of `from`. Otherwise, return instances of `from` and any subclasses of `from`. */\n only?: boolean;\n /**\n * filter for query. If present, only instances of `from` that satisfy the filter will be returned.\n * If not supplied, all instances of `from` are returned.\n * @note\n * This value is used into the ECQuery:`SELECT ECInstanceId FROM ${query.from} WHERE ${query.where}`.\n */\n where?: string;\n /** List of Model or Category ids to add to the query results.\n * @note This is only valid if there is a `where` clause. Otherwise all instances of `from` will be returned so there is no value in adding ids.\n */\n adds?: Id64Array | CompressedId64Set;\n /** List of Model or Category Ids to remove from the query results. */\n removes?: Id64Array | CompressedId64Set;\n }\n\n /** A Model or Category selector may either be a query or a list of Ids. */\n export type SelectorProps = { query: SelectorQuery, ids?: never } | { query?: never, ids: Id64Array | CompressedId64Set };\n\n /** Information about a View in a ViewStore. */\n export interface ViewInfo {\n /** The Id of the view. */\n id: IdString;\n /** The name of the view. */\n name?: ViewName;\n /** The name of the owner of the view. */\n owner?: OwnerName;\n /** The className of the view. */\n className: ClassFullName;\n /** The Id of the view group containing the view. */\n groupId: IdString;\n /** If true, the view is private (unshared) and will only be returned by queries that specify the owner's name. */\n isPrivate: boolean;\n /** The Id of a ModelSelector, if the view has one. */\n modelSelectorId?: IdString;\n /** The Id of the CategorySelector for this view. */\n categorySelectorId: IdString;\n /** The Id of a DisplayStyle for the view. */\n displayStyleId: IdString;\n /** a list of tags for the view. */\n tags?: TagName[];\n }\n\n /** Information about a ViewGroup in a ViewStore. */\n export interface ViewGroupInfo {\n /** The Id of this view group. */\n id: IdString;\n /** The name of this view group. */\n name: ViewGroupName;\n /** The Id of the parent of this view group. If undefined, this is the root group. */\n parent?: IdString;\n /** The Id of the default view for this view group. */\n defaultView?: IdString;\n }\n\n /** Arguments for adding a new view to a ViewStore. */\n export interface AddViewArgs {\n /** the properties of the ViewDefinition for the new view. */\n readonly viewDefinition: ViewDefinitionProps;\n\n /**\n * The properties of a category selector for the new view.\n * @note This value is only used, and should only be present if `viewDefinition.categorySelectorId` **not** a valid\n * `IdString`. In that case, a new category selector will be created with these properties and its Id will be used.\n * Otherwise, the categorySelectorId from the ViewDefinition is used. If it does not represent a valid category\n * selector, an error is thrown.\n */\n readonly categorySelectorProps?: CategorySelectorProps;\n\n /** The properties of a model selector for the new view.\n * @note This value is only used, and should only be present if `viewDefinition.modelSelectorId` **not** a valid\n * `IdString`. In that case, a new model selector will be created with these properties and its Id will be used.\n * Otherwise, the modelSelectorId from the ViewDefinition is used. If it does not represent a valid model selector,\n * an error is thrown.\n */\n readonly modelSelectorProps?: ModelSelectorProps;\n\n /** The properties of a display style for the new view.\n * @note This value is only used, and should only be present if `viewDefinition.displayStyleId` **not** a valid\n * `IdString`. In that case, a new display style will be created with these properties and its Id will be used.\n * Otherwise, the displayStyleId from the ViewDefinition is used. If it does not represent a valid display style, an\n * error is thrown.\n */\n readonly displayStyleProps?: DisplayStyleProps;\n\n /* the owner of the view. Must be present if isPrivate is true. */\n readonly owner?: OwnerName;\n\n /* the Id of the view group for the view. If not present, the view is added to the root group. */\n readonly group?: IdString;\n\n /* if true, the view is private (unshared). */\n readonly isPrivate?: boolean;\n\n /* an optional list of tags for the view. */\n readonly tags?: TagName[];\n\n /** optional thumbnail for the view. */\n readonly thumbnail?: ThumbnailProps;\n }\n\n /** Argument for finding a category selector, model selector, display style, or timeline by name or Id. */\n export type NameOrId = { name: string, id?: never } | { id: IdString, name?: never };\n\n /** Bindings for parameterized values in where clause of SelectorQuery\n * @see[[ECSqlStatement.bindValues]]\n */\n export interface QueryBindings {\n bindings?: any[] | object;\n }\n\n /**\n * Methods for reading from a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreReader`. These\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\n * user only needs read permission to the ViewStore.\n */\n export interface Reader {\n /** Find all views owned by the supplied owner name. */\n findViewsByOwner(args: { owner: OwnerName }): Promise<ViewInfo[]>;\n\n /** Get a category selector by Id. Throws if it does not exist. */\n getCategorySelector(args: NameOrId & QueryBindings): Promise<CategorySelectorProps>;\n\n /** Get a display style by Id. Throws if it does not exist. */\n getDisplayStyle(args: NameOrId & { opts?: DisplayStyleLoadProps }): Promise<DisplayStyleProps>;\n\n /** Get a model selector by Id. Throws if it does not exist. */\n getModelSelector(args: NameOrId & QueryBindings): Promise<ModelSelectorProps>;\n\n /** Get a thumbnail for a view. */\n getThumbnail(args: { viewId: IdString }): Promise<ThumbnailProps | undefined>;\n\n /** Get a render timeline by Id. Throws if it does not exist. */\n getTimeline(args: NameOrId): Promise<RenderTimelineProps>;\n\n /** Get a view by name. The name can include the *view group path*, if no `groupId` is supplied. */\n getViewByName(arg: { name: ViewName, groupId?: IdString }): Promise<ViewInfo | undefined>;\n\n /** Get a view definition by viewId. Throws if it does not exist. */\n getViewDefinition(args: { viewId: IdString }): Promise<ViewDefinitionProps>;\n\n /** get the properties of a ViewGroup by id. This will include the defaultViewId, if one exists. */\n getViewGroupInfo(args: { groupId?: IdString }): Promise<ViewGroupInfo | undefined>;\n\n /** Get a list of ViewGroups that are children of the supplied parent. If no parent is supplied, the root group is used.\n * Each entry in the list includes the id and name of the ViewGroup.\n */\n getViewGroups(args: { parent?: ViewGroupSpec }): Promise<{ id: IdString, name: string }[]>;\n\n /** Get the ViewInfo for a view by Id. Returns undefined if the view does not exist. */\n getViewInfo(args: { viewId: IdString }): Promise<ViewInfo | undefined>;\n\n /** Query for a list of ViewInfos for views that match the supplied [[QueryParams]].\n * @note The array will be sorted by name, ascending. To limit the size of the array, supply `limit` and `offset` in the QueryParams.\n */\n queryViews(queryParams: QueryParams): Promise<ViewInfo[]>;\n }\n\n /**\n * Methods for writing to a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreWriter`. These\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\n * user must have write permission to the ViewStore.\n */\n export interface Writer {\n /**\n * Add a category selector to a ViewStore.\n * @returns The IdString of the new category selector.\n */\n addCategorySelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\n\n /** Add a display style to a ViewStore.\n * @returns The IdString of the new display style.\n */\n addDisplayStyle(args: { name?: string, className: string, settings: DisplayStyleSettingsProps, owner?: OwnerName }): Promise<IdString>;\n\n /**\n * Add a model selector to a ViewStore.\n * @returns The IdString of the new model selector.\n */\n addModelSelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\n\n /**\n * Add a thumbnail for a view. If the view already has a thumbnail, it is replaced.\n * If a view is deleted, its thumbnail is also deleted.\n * @note The thumbnail must be a valid image in PNG or JPEG format.\n */\n addOrReplaceThumbnail(args: { viewId: IdString, thumbnail: ThumbnailProps }): Promise<void>;\n\n /** Add tags to a view. If the view already has tags, the new tags are appended to the existing tags. */\n addTagsToView(args: { viewId: IdString, tags: TagName[] }): Promise<void>;\n\n /** Add a render timeline to a ViewStore.\n * @returns The IdString of the new timeline.\n */\n addTimeline(args: { name?: string, timeline: RenderSchedule.ScriptProps, owner?: OwnerName }): Promise<IdString>;\n\n /** Add a view to a ViewStore. If no group is supplied, the new view is added to the root view group.\n * @returns The IdString of the new view\n */\n addView(args: AddViewArgs): Promise<IdString>;\n\n /** Add a view group to a ViewStore. If no parent is supplied, the new group is added to the root view group.\n * @returns the IdString of new view group\n */\n addViewGroup(args: { name: string, parentId?: IdString, owner?: OwnerName }): Promise<IdString>;\n\n /** Change the default view for a view group. If no group is supplied, this changes the default view for the root view group. */\n changeDefaultViewId(args: { defaultView: IdString, group?: ViewGroupSpec }): Promise<void>;\n\n /** Delete the thumbnail for a view. */\n deleteThumbnail(args: { viewId: IdString }): Promise<void>;\n\n /**\n * Delete a view from a ViewStore. If this is the default view for a view group, it cannot be deleted until another\n * view is set as the default.\n * @note If this view references a category selector, model selector, or display style that is not referenced by any\n * other view, *and do not have a name*, they will each also be deleted. If the view has a thumbnail, it is also\n * deleted.\n */\n deleteView(args: { viewId: IdString }): Promise<void>;\n\n /** Delete a view group from a ViewStore. This will also delete all views in the group. */\n deleteViewGroup(args: { name: ViewGroupSpec }): Promise<void>;\n\n /** Delete a display style from a ViewStore. If the display style is referenced by any view, it cannot be deleted\n * and an exception will be thrown.\n */\n deleteDisplayStyle(args: { id: IdString }): Promise<void>;\n\n /** Delete a model selector from a ViewStore. If the model selector is referenced by any view, it cannot be deleted\n * and an exception will be thrown. */\n deleteModelSelector(args: { id: IdString }): Promise<void>;\n\n /** Delete a category selector from a ViewStore. If the category selector is referenced by any view, it cannot be\n * deleted and an exception will be thrown.\n */\n deleteCategorySelector(args: { id: IdString }): Promise<void>;\n\n /** Delete a render timeline from a ViewStore. */\n deleteTimeline(args: { id: IdString }): Promise<void>;\n\n /** Delete a tag. This removes it from all views where it was used. */\n deleteTag(args: { name: TagName }): Promise<void>;\n\n /** remove a tag from a view. */\n removeTagFromView(args: { viewId: IdString, tag: TagName }): Promise<void>;\n\n /** Update the properties of a category selector. */\n updateCategorySelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\n\n /** Update the properties of a display style. */\n updateDisplayStyle(args: NameOrId & { className: string, settings: DisplayStyleSettingsProps }): Promise<void>;\n\n /** Update the properties of a model selector. */\n updateModelSelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\n\n /** Update the properties of a render timeline. */\n updateTimeline(args: NameOrId & { timeline: RenderSchedule.ScriptProps }): Promise<void>;\n\n /** Update the properties of a view definition. */\n updateViewDefinition(args: { viewId: IdString, viewDefinition: ViewDefinitionProps }): Promise<void>;\n\n /** Change a view from shared to private, or vice versa. If changing to private, the owner must be supplied. */\n updateViewShared(arg: { viewId: IdString, isShared: boolean, owner?: string }): Promise<void>;\n\n /** Set the name of a category selector. */\n renameCategorySelector(args: { id: IdString, name?: string }): Promise<void>;\n\n /** Set the name of a display style. */\n renameDisplayStyle(args: { id: IdString, name?: string }): Promise<void>;\n\n /** Set the name of a model selector. */\n renameModelSelector(args: { id: IdString, name?: string }): Promise<void>;\n\n /** Set the name of a render timeline. */\n renameTimeline(args: { id: IdString, name?: string }): Promise<void>;\n\n /** Set the name of a view. */\n renameView(args: { viewId: IdString, name: string }): Promise<void>;\n\n /** Set the name of a view group. */\n renameViewGroup(args: { groupId: IdString, name: string }): Promise<void>;\n\n /** rename an existing tag. */\n renameTag(args: { oldName: TagName, newName: TagName }): Promise<void>;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ViewProps.js","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAgPH;;;GAGG;AACH,MAAM,KAAW,YAAY,CA0W5B;AA1WD,WAAiB,YAAY;IAE3B;;;;OAIG;IACU,oBAAO,GAAG,OAAgB,CAAC;IAkCxC,qGAAqG;IACxF,0BAAa,GAAG,CAAC,EAAiB,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;AAgUnF,CAAC,EA1WgB,YAAY,KAAZ,YAAY,QA0W5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { AngleProps, Range3dProps, TransformProps, XYProps, XYZProps, YawPitchRollProps } from \"@itwin/core-geometry\";\r\nimport { CameraProps } from \"./Camera\";\r\nimport { DisplayStyleProps, DisplayStyleSettingsProps } from \"./DisplayStyleSettings\";\r\nimport { DefinitionElementProps, DisplayStyleLoadProps, ElementProps, RenderTimelineProps, SheetProps, ViewAttachmentProps } from \"./ElementProps\";\r\nimport { EntityQueryParams } from \"./EntityProps\";\r\nimport { ModelProps } from \"./ModelProps\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\nimport { ViewDetails3dProps, ViewDetailsProps } from \"./ViewDetails\";\r\nimport { ThumbnailProps } from \"./Thumbnail\";\r\nimport { RenderSchedule } from \"./RenderSchedule\";\r\n\r\n/** The id of either an element or an entry in a ViewStore.\r\n * @public\r\n */\r\nexport type ViewIdString = Id64String; // should also include ViewStoreRpc.IdString when that's @public\r\n\r\n/** As part of a [[ViewStateProps]], describes the [[SpatialViewDefinition]] from which a [SectionDrawing]($backend) was generated.\r\n * @see [[SectionDrawingProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingViewProps {\r\n /** The Id of the spatial view from which the SectionDrawing was generated. */\r\n spatialView: Id64String;\r\n /** If true, the spatial view should be displayed in the context of the drawing view. */\r\n displaySpatialView: boolean;\r\n /** Transform from drawing coordinates to spatial coordinates. If undefined, use identity transform. */\r\n drawingToSpatialTransform?: TransformProps;\r\n}\r\n\r\n/** The response props from the getCustomViewState3dData RPC endpoint\r\n * @internal\r\n */\r\nexport interface CustomViewState3dProps {\r\n modelIds: CompressedId64Set;\r\n modelExtents: Range3dProps;\r\n categoryIds: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * The options passed to the getCustomViewState3dData RPC endpoint.\r\n * @internal\r\n */\r\nexport interface CustomViewState3dCreatorOptions {\r\n modelIds?: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * A result row from querying for subcategories\r\n * @internal\r\n */\r\nexport interface SubCategoryResultRow {\r\n parentId: Id64String;\r\n id: Id64String;\r\n appearance: SubCategoryAppearance.Props;\r\n}\r\n\r\n/**\r\n * Request props for the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateRequestProps {\r\n acsId?: string;\r\n notLoadedModelSelectorStateModels?: CompressedId64Set;\r\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n notLoadedCategoryIds?: CompressedId64Set;\r\n sheetViewAttachmentIds?: CompressedId64Set;\r\n viewStateLoadProps?: ViewStateLoadProps;\r\n baseModelId?: Id64String;\r\n spatialViewId?: Id64String;\r\n}\r\n\r\n/** Response props from the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateResponseProps {\r\n acsElementProps?: ElementProps;\r\n modelSelectorStateModels?: ModelProps[];\r\n // cast this to viewAttachmentInfo[] on the frontend.\r\n sheetViewAttachmentProps?: ViewAttachmentProps[];\r\n sheetViewViews?: (ViewStateProps | undefined)[];\r\n baseModelProps?: ModelProps;\r\n spatialViewProps?: ViewStateProps;\r\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n categoryIdsResult?: SubCategoryResultRow[];\r\n}\r\n\r\n/** Returned from [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateProps {\r\n viewDefinitionProps: ViewDefinitionProps;\r\n categorySelectorProps: CategorySelectorProps;\r\n modelSelectorProps?: ModelSelectorProps;\r\n displayStyleProps: DisplayStyleProps;\r\n /** Sheet-specific properties, if this is a view of a [SheetModel]($backend). */\r\n sheetProps?: SheetProps;\r\n /** The Ids of the [ViewAttachment]($backend)s contained within the [SheetModel]($backend), if this is a sheet view. */\r\n sheetAttachments?: Id64Array;\r\n /** For a [DrawingViewState]($frontend), the extents of the [DrawingModel]($backend), used for determining the upper limits of the view's extents. */\r\n modelExtents?: Range3dProps;\r\n /** Information about the [SectionDrawing]($backend) relevant to displaying a drawing view. */\r\n sectionDrawing?: SectionDrawingViewProps;\r\n}\r\n\r\n/** Options for loading a [[ViewStateProps]] via [IModelConnection.Views.load]($frontend) or [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateLoadProps {\r\n /** Options for loading the view's [[DisplayStyleProps]]. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n\r\n /**\r\n * bindings for query-based selectors\r\n * @beta\r\n */\r\n queryBindings?: {\r\n modelSelector?: ViewStoreRpc.QueryBindings;\r\n categorySelector?: ViewStoreRpc.QueryBindings;\r\n };\r\n}\r\n\r\n/** Properties that define a ModelSelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelSelectorProps extends DefinitionElementProps {\r\n models: Id64Array;\r\n}\r\n\r\n/** Properties that define a CategorySelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategorySelectorProps extends DefinitionElementProps {\r\n categories: Id64Array;\r\n}\r\n\r\n/** Parameters for performing a query on [ViewDefinition]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewQueryParams extends EntityQueryParams {\r\n wantPrivate?: boolean;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinitionProps extends DefinitionElementProps {\r\n categorySelectorId: ViewIdString;\r\n displayStyleId: ViewIdString;\r\n description?: string;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetailsProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a ViewDefinition3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition3dProps extends ViewDefinitionProps {\r\n /** if true, camera is valid. */\r\n cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n origin: XYZProps;\r\n /** The extent of the view frustum. */\r\n extents: XYZProps;\r\n /** Rotation of the view frustum (could be undefined if going Matrix3d -> YawPitchRoll). */\r\n angles?: YawPitchRollProps;\r\n /** The camera used for this view. */\r\n camera: CameraProps;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetails3dProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a SpatialViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialViewDefinitionProps extends ViewDefinition3dProps {\r\n modelSelectorId: ViewIdString;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition2dProps extends ViewDefinitionProps {\r\n baseModelId: Id64String;\r\n origin: XYProps;\r\n delta: XYProps;\r\n angle: AngleProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystemProps extends ElementProps {\r\n type?: number;\r\n description?: string;\r\n}\r\n\r\n/** Properties of AuxCoordSystem2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem2dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem2d */\r\n origin?: XYProps;\r\n /** Rotation angle */\r\n angle?: AngleProps;\r\n}\r\n\r\n/** Properties of AuxCoordSystem3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem3dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem3d */\r\n origin?: XYZProps;\r\n /** Yaw angle */\r\n yaw?: AngleProps;\r\n /** Pitch angle */\r\n pitch?: AngleProps;\r\n /** Roll angle */\r\n roll?: AngleProps;\r\n}\r\n\r\n/**\r\n * Access to a ViewStore from the frontend.\r\n * @beta\r\n */\r\nexport namespace ViewStoreRpc {\r\n\r\n /**\r\n * Version of the Rpc interface. If any methods or interfaces of this API change, this number should\r\n * be incremented according to the rules of semantic versioning. See .\\rpc\\README-RpcInterfaceVersioning.md for more information.\r\n * @internal\r\n */\r\n export const version = \"4.0.0\" as const;\r\n\r\n /** an Id of a View, DisplayStyle, ModelSelector, CategorySelector, or Timeline in a ViewStore.\r\n * Will be a base-36 number with a leading \"@\".\r\n * @public\r\n */\r\n export type IdString = string;\r\n\r\n /**\r\n * A string identifying a group. This may either be a \"group name path\" or the RowString of a group (e.g. either \"group1/design/issues\" or \"@4e3\")\r\n * The syntax is not ambiguous because ViewStoreIdStrings always start with \"@\" and Group names can never contain \"@\".\r\n */\r\n export type ViewGroupSpec = IdString | ViewGroupPath;\r\n\r\n /** The name for a view. */\r\n export type ViewName = string;\r\n\r\n /** The name for a Tag. */\r\n export type TagName = string;\r\n\r\n /** The name of an \"owner\". Should come from the authentication system, so it will be guaranteed unique.\r\n * This name should be chosen by the user rather than their email address.\r\n */\r\n export type OwnerName = string;\r\n\r\n /** The path name of a view group (e.g. \"group1/design/issues\"). Does not include the \"root\" group. */\r\n export type ViewGroupPath = string;\r\n\r\n /** The name for a view group. */\r\n export type ViewGroupName = string;\r\n\r\n /** The name for a view group. */\r\n export type ClassFullName = string;\r\n\r\n /** Determine if a string is an Id of an entry in a ViewStore (base-36 integer with a leading \"@\") */\r\n export const isViewStoreId = (id?: ViewIdString) => true === id?.startsWith(\"@\");\r\n\r\n /** Parameters for querying for views in a ViewStore. */\r\n export interface QueryParams {\r\n /** a list of classFullNames to accept. If not present, all classes are returned. */\r\n readonly classNames?: ClassFullName[];\r\n /** Optional \"LIMIT\" clause to limit the number of views returned. */\r\n readonly limit?: number;\r\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\r\n readonly offset?: number;\r\n /** A string to filter view names. May include wildcards if the `nameCompare` uses LIKE or GLOB (see SQLite documentation for LIKE and GLOB). */\r\n readonly nameSearch?: string;\r\n /** The comparison operator for `nameSearch`. Default is `=` */\r\n readonly nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\r\n /* the Id of the view group to query. If not present, the root group is used. There is no way to query for views from multiple view groups in one request. */\r\n readonly group?: IdString;\r\n /** A list of tags to filter views. If present, only views that have one or more of the tags will be returned. */\r\n readonly tags?: TagName[];\r\n /* The name of an owner for private views. If present, private views owned by the owner will also be returned. Shared views are always returned. */\r\n readonly owner?: OwnerName;\r\n }\r\n\r\n /** Parameters for specifying a Query to select Categories or Models. */\r\n export interface SelectorQuery {\r\n /**\r\n * The full ClassName from which to select. If this SelectorQuery is for Categories, this must be or derive from \"BisCore:Category\".\r\n * If this SelectorQuery is for Models, this must be or derive from \"BisCore:Model\".\r\n */\r\n from: ClassFullName;\r\n /** If true, only return instances of `from`. Otherwise, return instances of `from` and any subclasses of `from`. */\r\n only?: boolean;\r\n /**\r\n * filter for query. If present, only instances of `from` that satisfy the filter will be returned.\r\n * If not supplied, all instances of `from` are returned.\r\n * @note\r\n * This value is used into the ECQuery:`SELECT ECInstanceId FROM ${query.from} WHERE ${query.where}`.\r\n */\r\n where?: string;\r\n /** List of Model or Category ids to add to the query results.\r\n * @note This is only valid if there is a `where` clause. Otherwise all instances of `from` will be returned so there is no value in adding ids.\r\n */\r\n adds?: Id64Array | CompressedId64Set;\r\n /** List of Model or Category Ids to remove from the query results. */\r\n removes?: Id64Array | CompressedId64Set;\r\n }\r\n\r\n /** A Model or Category selector may either be a query or a list of Ids. */\r\n export type SelectorProps = { query: SelectorQuery, ids?: never } | { query?: never, ids: Id64Array | CompressedId64Set };\r\n\r\n /** Information about a View in a ViewStore. */\r\n export interface ViewInfo {\r\n /** The Id of the view. */\r\n id: IdString;\r\n /** The name of the view. */\r\n name?: ViewName;\r\n /** The name of the owner of the view. */\r\n owner?: OwnerName;\r\n /** The className of the view. */\r\n className: ClassFullName;\r\n /** The Id of the view group containing the view. */\r\n groupId: IdString;\r\n /** If true, the view is private (unshared) and will only be returned by queries that specify the owner's name. */\r\n isPrivate: boolean;\r\n /** The Id of a ModelSelector, if the view has one. */\r\n modelSelectorId?: IdString;\r\n /** The Id of the CategorySelector for this view. */\r\n categorySelectorId: IdString;\r\n /** The Id of a DisplayStyle for the view. */\r\n displayStyleId: IdString;\r\n /** a list of tags for the view. */\r\n tags?: TagName[];\r\n }\r\n\r\n /** Information about a ViewGroup in a ViewStore. */\r\n export interface ViewGroupInfo {\r\n /** The Id of this view group. */\r\n id: IdString;\r\n /** The name of this view group. */\r\n name: ViewGroupName;\r\n /** The Id of the parent of this view group. If undefined, this is the root group. */\r\n parent?: IdString;\r\n /** The Id of the default view for this view group. */\r\n defaultView?: IdString;\r\n }\r\n\r\n /** Arguments for adding a new view to a ViewStore. */\r\n export interface AddViewArgs {\r\n /** the properties of the ViewDefinition for the new view. */\r\n readonly viewDefinition: ViewDefinitionProps;\r\n\r\n /**\r\n * The properties of a category selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.categorySelectorId` **not** a valid\r\n * `IdString`. In that case, a new category selector will be created with these properties and its Id will be used.\r\n * Otherwise, the categorySelectorId from the ViewDefinition is used. If it does not represent a valid category\r\n * selector, an error is thrown.\r\n */\r\n readonly categorySelectorProps?: CategorySelectorProps;\r\n\r\n /** The properties of a model selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.modelSelectorId` **not** a valid\r\n * `IdString`. In that case, a new model selector will be created with these properties and its Id will be used.\r\n * Otherwise, the modelSelectorId from the ViewDefinition is used. If it does not represent a valid model selector,\r\n * an error is thrown.\r\n */\r\n readonly modelSelectorProps?: ModelSelectorProps;\r\n\r\n /** The properties of a display style for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.displayStyleId` **not** a valid\r\n * `IdString`. In that case, a new display style will be created with these properties and its Id will be used.\r\n * Otherwise, the displayStyleId from the ViewDefinition is used. If it does not represent a valid display style, an\r\n * error is thrown.\r\n */\r\n readonly displayStyleProps?: DisplayStyleProps;\r\n\r\n /* the owner of the view. Must be present if isPrivate is true. */\r\n readonly owner?: OwnerName;\r\n\r\n /* the Id of the view group for the view. If not present, the view is added to the root group. */\r\n readonly group?: IdString;\r\n\r\n /* if true, the view is private (unshared). */\r\n readonly isPrivate?: boolean;\r\n\r\n /* an optional list of tags for the view. */\r\n readonly tags?: TagName[];\r\n\r\n /** optional thumbnail for the view. */\r\n readonly thumbnail?: ThumbnailProps;\r\n }\r\n\r\n /** Argument for finding a category selector, model selector, display style, or timeline by name or Id. */\r\n export type NameOrId = { name: string, id?: never } | { id: IdString, name?: never };\r\n\r\n /** Bindings for parameterized values in where clause of SelectorQuery\r\n * @see[[ECSqlStatement.bindValues]]\r\n */\r\n export interface QueryBindings {\r\n bindings?: any[] | object;\r\n }\r\n\r\n /**\r\n * Methods for reading from a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreReader`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user only needs read permission to the ViewStore.\r\n */\r\n export interface Reader {\r\n /** Find all views owned by the supplied owner name. */\r\n findViewsByOwner(args: { owner: OwnerName }): Promise<ViewInfo[]>;\r\n\r\n /** Get a category selector by Id. Throws if it does not exist. */\r\n getCategorySelector(args: NameOrId & QueryBindings): Promise<CategorySelectorProps>;\r\n\r\n /** Get a display style by Id. Throws if it does not exist. */\r\n getDisplayStyle(args: NameOrId & { opts?: DisplayStyleLoadProps }): Promise<DisplayStyleProps>;\r\n\r\n /** Get a model selector by Id. Throws if it does not exist. */\r\n getModelSelector(args: NameOrId & QueryBindings): Promise<ModelSelectorProps>;\r\n\r\n /** Get a thumbnail for a view. */\r\n getThumbnail(args: { viewId: IdString }): Promise<ThumbnailProps | undefined>;\r\n\r\n /** Get a render timeline by Id. Throws if it does not exist. */\r\n getTimeline(args: NameOrId): Promise<RenderTimelineProps>;\r\n\r\n /** Get a view by name. The name can include the *view group path*, if no `groupId` is supplied. */\r\n getViewByName(arg: { name: ViewName, groupId?: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Get a view definition by viewId. Throws if it does not exist. */\r\n getViewDefinition(args: { viewId: IdString }): Promise<ViewDefinitionProps>;\r\n\r\n /** get the properties of a ViewGroup by id. This will include the defaultViewId, if one exists. */\r\n getViewGroupInfo(args: { groupId?: IdString }): Promise<ViewGroupInfo | undefined>;\r\n\r\n /** Get a list of ViewGroups that are children of the supplied parent. If no parent is supplied, the root group is used.\r\n * Each entry in the list includes the id and name of the ViewGroup.\r\n */\r\n getViewGroups(args: { parent?: ViewGroupSpec }): Promise<{ id: IdString, name: string }[]>;\r\n\r\n /** Get the ViewInfo for a view by Id. Returns undefined if the view does not exist. */\r\n getViewInfo(args: { viewId: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Query for a list of ViewInfos for views that match the supplied [[QueryParams]].\r\n * @note The array will be sorted by name, ascending. To limit the size of the array, supply `limit` and `offset` in the QueryParams.\r\n */\r\n queryViews(queryParams: QueryParams): Promise<ViewInfo[]>;\r\n }\r\n\r\n /**\r\n * Methods for writing to a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreWriter`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user must have write permission to the ViewStore.\r\n */\r\n export interface Writer {\r\n /**\r\n * Add a category selector to a ViewStore.\r\n * @returns The IdString of the new category selector.\r\n */\r\n addCategorySelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a display style to a ViewStore.\r\n * @returns The IdString of the new display style.\r\n */\r\n addDisplayStyle(args: { name?: string, className: string, settings: DisplayStyleSettingsProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a model selector to a ViewStore.\r\n * @returns The IdString of the new model selector.\r\n */\r\n addModelSelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a thumbnail for a view. If the view already has a thumbnail, it is replaced.\r\n * If a view is deleted, its thumbnail is also deleted.\r\n * @note The thumbnail must be a valid image in PNG or JPEG format.\r\n */\r\n addOrReplaceThumbnail(args: { viewId: IdString, thumbnail: ThumbnailProps }): Promise<void>;\r\n\r\n /** Add tags to a view. If the view already has tags, the new tags are appended to the existing tags. */\r\n addTagsToView(args: { viewId: IdString, tags: TagName[] }): Promise<void>;\r\n\r\n /** Add a render timeline to a ViewStore.\r\n * @returns The IdString of the new timeline.\r\n */\r\n addTimeline(args: { name?: string, timeline: RenderSchedule.ScriptProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a view to a ViewStore. If no group is supplied, the new view is added to the root view group.\r\n * @returns The IdString of the new view\r\n */\r\n addView(args: AddViewArgs): Promise<IdString>;\r\n\r\n /** Add a view group to a ViewStore. If no parent is supplied, the new group is added to the root view group.\r\n * @returns the IdString of new view group\r\n */\r\n addViewGroup(args: { name: string, parentId?: IdString, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Change the default view for a view group. If no group is supplied, this changes the default view for the root view group. */\r\n changeDefaultViewId(args: { defaultView: IdString, group?: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete the thumbnail for a view. */\r\n deleteThumbnail(args: { viewId: IdString }): Promise<void>;\r\n\r\n /**\r\n * Delete a view from a ViewStore. If this is the default view for a view group, it cannot be deleted until another\r\n * view is set as the default.\r\n * @note If this view references a category selector, model selector, or display style that is not referenced by any\r\n * other view, *and do not have a name*, they will each also be deleted. If the view has a thumbnail, it is also\r\n * deleted.\r\n */\r\n deleteView(args: { viewId: IdString }): Promise<void>;\r\n\r\n /** Delete a view group from a ViewStore. This will also delete all views in the group. */\r\n deleteViewGroup(args: { name: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete a display style from a ViewStore. If the display style is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown.\r\n */\r\n deleteDisplayStyle(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a model selector from a ViewStore. If the model selector is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown. */\r\n deleteModelSelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a category selector from a ViewStore. If the category selector is referenced by any view, it cannot be\r\n * deleted and an exception will be thrown.\r\n */\r\n deleteCategorySelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a render timeline from a ViewStore. */\r\n deleteTimeline(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a tag. This removes it from all views where it was used. */\r\n deleteTag(args: { name: TagName }): Promise<void>;\r\n\r\n /** remove a tag from a view. */\r\n removeTagFromView(args: { viewId: IdString, tag: TagName }): Promise<void>;\r\n\r\n /** Update the properties of a category selector. */\r\n updateCategorySelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a display style. */\r\n updateDisplayStyle(args: NameOrId & { className: string, settings: DisplayStyleSettingsProps }): Promise<void>;\r\n\r\n /** Update the properties of a model selector. */\r\n updateModelSelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a render timeline. */\r\n updateTimeline(args: NameOrId & { timeline: RenderSchedule.ScriptProps }): Promise<void>;\r\n\r\n /** Update the properties of a view definition. */\r\n updateViewDefinition(args: { viewId: IdString, viewDefinition: ViewDefinitionProps }): Promise<void>;\r\n\r\n /** Change a view from shared to private, or vice versa. If changing to private, the owner must be supplied. */\r\n updateViewShared(arg: { viewId: IdString, isShared: boolean, owner?: string }): Promise<void>;\r\n\r\n /** Set the name of a category selector. */\r\n renameCategorySelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a display style. */\r\n renameDisplayStyle(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a model selector. */\r\n renameModelSelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a render timeline. */\r\n renameTimeline(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a view. */\r\n renameView(args: { viewId: IdString, name: string }): Promise<void>;\r\n\r\n /** Set the name of a view group. */\r\n renameViewGroup(args: { groupId: IdString, name: string }): Promise<void>;\r\n\r\n /** rename an existing tag. */\r\n renameTag(args: { oldName: TagName, newName: TagName }): Promise<void>;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhiteOnWhiteReversalSettings.js","sourceRoot":"","sources":["../../src/WhiteOnWhiteReversalSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;;;;;GAMG;AACH,MAAa,4BAA4B;IAOvC,YAAoB,gBAAyB;QAC3C,IAAI,CAAC,qBAAqB,GAAG,gBAAgB,CAAC;IAChD,CAAC;IAKD,uCAAuC;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,OAAO,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACtE,CAAC;IAED,mHAAmH;IAC5G,MAAM;QACX,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,CAAC;IAED,uDAAuD;IAChD,MAAM,CAAC,KAAmC;QAC/C,OAAO,IAAI,KAAK,KAAK,CAAC;IACxB,CAAC;;AAhBc,sCAAS,GAAG,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;AACnD,oCAAO,GAAG,IAAI,4BAA4B,CAAC,KAAK,CAAC,CAAC;SAZtD,4BAA4B","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 DisplayStyles\n */\n\n/** JSON representation of a [[WhiteOnWhiteReversalSettings]].\n * @public\n * @extensions\n */\nexport interface WhiteOnWhiteReversalProps {\n /** Default: false.\n * @see [[WhiteOnWhiteReversalSettings.ignoreBackgroundColor]].\n */\n ignoreBackgroundColor?: boolean;\n}\n\n/** As part of a [[DisplayStyleSettings]], controls how white-on-white reversal is applied to make white geometry more\n * visible in the view.\n * By default, pure white geometry is displayed as black instead if the [[DisplayStyleSettings.backgroundColor]] is also pure white.\n * These settings are only applied if the display style's [[ViewFlags.whiteOnWhiteReversal]] flag is enabled.\n * @see [[DisplayStyleSettings.whiteOnWhiteReversal]] to change these settings for a display style.\n * @public\n */\nexport class WhiteOnWhiteReversalSettings {\n /** If true, white-on-white reversal ignores the display style's background color; otherwise, white-on-white reversal applies only\n * if the background color is pure white.\n * @see [[DisplayStyleSettings.backgroundColor]] to change the background color.\n */\n public readonly ignoreBackgroundColor: boolean;\n\n private constructor(ignoreBackground: boolean) {\n this.ignoreBackgroundColor = ignoreBackground;\n }\n\n private static _noIgnore = new WhiteOnWhiteReversalSettings(true);\n private static _ignore = new WhiteOnWhiteReversalSettings(false);\n\n /** Create from JSON representation. */\n public static fromJSON(props?: WhiteOnWhiteReversalProps): WhiteOnWhiteReversalSettings {\n return props?.ignoreBackgroundColor ? this._noIgnore : this._ignore;\n }\n\n /** Convert to JSON representation. The JSON representation is `undefined` if these settings match the defaults. */\n public toJSON(): WhiteOnWhiteReversalProps | undefined {\n return this.ignoreBackgroundColor ? { ignoreBackgroundColor: true } : undefined;\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public equals(other: WhiteOnWhiteReversalSettings): boolean {\n return this === other;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"WhiteOnWhiteReversalSettings.js","sourceRoot":"","sources":["../../src/WhiteOnWhiteReversalSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;;;;;GAMG;AACH,MAAa,4BAA4B;IAOvC,YAAoB,gBAAyB;QAC3C,IAAI,CAAC,qBAAqB,GAAG,gBAAgB,CAAC;IAChD,CAAC;IAKD,uCAAuC;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,OAAO,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACtE,CAAC;IAED,mHAAmH;IAC5G,MAAM;QACX,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,CAAC;IAED,uDAAuD;IAChD,MAAM,CAAC,KAAmC;QAC/C,OAAO,IAAI,KAAK,KAAK,CAAC;IACxB,CAAC;;AAhBc,sCAAS,GAAG,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;AACnD,oCAAO,GAAG,IAAI,4BAA4B,CAAC,KAAK,CAAC,CAAC;SAZtD,4BAA4B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\n/** JSON representation of a [[WhiteOnWhiteReversalSettings]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface WhiteOnWhiteReversalProps {\r\n /** Default: false.\r\n * @see [[WhiteOnWhiteReversalSettings.ignoreBackgroundColor]].\r\n */\r\n ignoreBackgroundColor?: boolean;\r\n}\r\n\r\n/** As part of a [[DisplayStyleSettings]], controls how white-on-white reversal is applied to make white geometry more\r\n * visible in the view.\r\n * By default, pure white geometry is displayed as black instead if the [[DisplayStyleSettings.backgroundColor]] is also pure white.\r\n * These settings are only applied if the display style's [[ViewFlags.whiteOnWhiteReversal]] flag is enabled.\r\n * @see [[DisplayStyleSettings.whiteOnWhiteReversal]] to change these settings for a display style.\r\n * @public\r\n */\r\nexport class WhiteOnWhiteReversalSettings {\r\n /** If true, white-on-white reversal ignores the display style's background color; otherwise, white-on-white reversal applies only\r\n * if the background color is pure white.\r\n * @see [[DisplayStyleSettings.backgroundColor]] to change the background color.\r\n */\r\n public readonly ignoreBackgroundColor: boolean;\r\n\r\n private constructor(ignoreBackground: boolean) {\r\n this.ignoreBackgroundColor = ignoreBackground;\r\n }\r\n\r\n private static _noIgnore = new WhiteOnWhiteReversalSettings(true);\r\n private static _ignore = new WhiteOnWhiteReversalSettings(false);\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props?: WhiteOnWhiteReversalProps): WhiteOnWhiteReversalSettings {\r\n return props?.ignoreBackgroundColor ? this._noIgnore : this._ignore;\r\n }\r\n\r\n /** Convert to JSON representation. The JSON representation is `undefined` if these settings match the defaults. */\r\n public toJSON(): WhiteOnWhiteReversalProps | undefined {\r\n return this.ignoreBackgroundColor ? { ignoreBackgroundColor: true } : undefined;\r\n }\r\n\r\n /** Returns true if `this` is equivalent to `other`. */\r\n public equals(other: WhiteOnWhiteReversalSettings): boolean {\r\n return this === other;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAA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,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAE/C;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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*--------------------------------------------------------------------------------------------*/\nexport * from \"./AmbientOcclusion\";\nexport * from \"./AnalysisStyle\";\nexport * from \"./Atmosphere\";\nexport * from \"./AuthorizationClient\";\nexport * from \"./BackgroundMapProvider\";\nexport * from \"./BackgroundMapSettings\";\nexport * from \"./Base64EncodedString\";\nexport * from \"./BriefcaseTypes\";\nexport * from \"./Camera\";\nexport * from \"./ChangedElements\";\nexport * from \"./ChangedEntities\";\nexport * from \"./ChangesetProps\";\nexport * from \"./ClipStyle\";\nexport * from \"./Code\";\nexport * from \"./ColorByName\";\nexport * from \"./ColorDef\";\nexport * from \"./CommonLoggerCategory\";\nexport * from \"./ContextRealityModel\";\nexport * from \"./DisplayStyleSettings\";\nexport * from \"./domains/FunctionalElementProps\";\nexport * from \"./domains/GenericElementProps\";\nexport * from \"./ECSqlTypes\";\nexport * from \"./ECSchemaProps\";\nexport * from \"./ElementMesh\";\nexport * from \"./ElementProps\";\nexport * from \"./EmphasizeElementsProps\";\nexport * from \"./EntityProps\";\nexport * from \"./EntityReference\";\nexport * from \"./Environment\";\nexport * from \"./FeatureIndex\";\nexport * from \"./FeatureSymbology\";\nexport * from \"./FeatureTable\";\nexport * from \"./Fonts\";\nexport * from \"./Frustum\";\nexport * from \"./GenericInstanceFilter\";\nexport * from \"./GeoCoordinateServices\";\nexport * from \"./geometry/AdditionalTransform\";\nexport * from \"./geometry/AreaPattern\";\nexport * from \"./geometry/BoundingSphere\";\nexport * from \"./geometry/Cartographic\";\nexport * from \"./geometry/CoordinateReferenceSystem\";\nexport * from \"./geometry/ElementGeometry\";\nexport * from \"./geometry/FrustumPlanes\";\nexport * from \"./geometry/GeodeticDatum\";\nexport * from \"./geometry/GeodeticEllipsoid\";\nexport * from \"./geometry/GeometryStream\";\nexport * from \"./geometry/ImageGraphic\";\nexport * from \"./geometry/LineStyle\";\nexport * from \"./geometry/Placement\";\nexport * from \"./geometry/Projection\";\nexport * from \"./geometry/TextString\";\nexport * from \"./GeometryContainment\";\nexport * from \"./GeometryParams\";\nexport * from \"./GeometrySummary\";\nexport * from \"./Gradient\";\nexport * from \"./GraphicParams\";\nexport * from \"./GroundPlane\";\nexport * from \"./HiddenLine\";\nexport * from \"./Hilite\";\nexport * from \"./HSLColor\";\nexport * from \"./HSVColor\";\nexport * from \"./Image\";\nexport * from \"./IModel\";\nexport * from \"./IModelError\";\nexport * from \"./IModelVersion\";\nexport * from \"./ipc/IpcSocket\";\nexport * from \"./ipc/IpcWebSocket\";\nexport * from \"./ipc/IpcWebSocketTransport\";\nexport * from \"./ipc/IpcSession\";\nexport * from \"./IpcAppProps\";\nexport * from \"./LightSettings\";\nexport * from \"./LinePixels\";\nexport * from \"./Localization\";\nexport * from \"./MapImagerySettings\";\nexport * from \"./MapLayerSettings\";\nexport * from \"./MassProperties\";\nexport * from \"./MaterialProps\";\nexport * from \"./ModelClipGroup\";\nexport * from \"./ModelProps\";\nexport * from \"./NativeAppProps\";\nexport * from \"./OctEncodedNormal\";\nexport * from \"./ConcurrentQuery\";\nexport * from \"./ECSqlReader\";\nexport * from \"./PlanarClipMask\";\nexport * from \"./ModelGeometryChanges\";\nexport * from \"./PlanProjectionSettings\";\nexport * from \"./BackendTypes\";\nexport * from \"./QPoint\";\nexport * from \"./RealityDataAccessProps\";\nexport * from \"./RealityModelDisplaySettings\";\nexport * from \"./Render\";\nexport * from \"./RenderMaterial\";\nexport * from \"./RenderSchedule\";\nexport * from \"./RenderTexture\";\nexport * from \"./RgbColor\";\nexport * from \"./RpcManager\";\nexport * from \"./SessionProps\";\nexport * from \"./SkyBox\";\nexport * from \"./Snapping\";\nexport * from \"./SolarCalculate\";\nexport * from \"./SolarShadows\";\nexport * from \"./SpatialClassification\";\nexport * from \"./SubCategoryAppearance\";\nexport * from \"./SubCategoryOverride\";\nexport * from \"./TerrainSettings\";\nexport * from \"./TextureMapping\";\nexport * from \"./TextureProps\";\nexport * from \"./ThematicDisplay\";\nexport * from \"./Thumbnail\";\nexport * from \"./TileProps\";\nexport * from \"./Tween\";\nexport * from \"./TxnAction\";\nexport * from \"./ViewDetails\";\nexport * from \"./ViewFlags\";\nexport * from \"./ViewProps\";\nexport * from \"./rpc/core/RpcConstants\";\nexport * from \"./rpc/core/RpcControl\";\nexport * from \"./rpc/core/RpcInvocation\";\nexport * from \"./rpc/core/RpcSessionInvocation\";\nexport * from \"./rpc/core/RpcMarshaling\";\nexport * from \"./rpc/core/RpcOperation\";\nexport * from \"./rpc/core/RpcPendingQueue\";\nexport * from \"./rpc/core/RpcProtocol\";\nexport * from \"./rpc/core/RpcRegistry\";\nexport * from \"./rpc/core/RpcRequest\";\nexport * from \"./rpc/core/RpcRequestContext\";\nexport * from \"./rpc/core/RpcRoutingToken\";\nexport * from \"./rpc/core/RpcPush\";\nexport * from \"./rpc/core/RpcConfiguration\";\nexport * from \"./rpc/DevToolsRpcInterface\";\nexport * from \"./rpc/IModelReadRpcInterface\";\nexport * from \"./rpc/IModelTileRpcInterface\";\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\nexport * from \"./rpc/TestRpcManager\";\nexport * from \"./rpc/WipRpcInterface\";\nexport * from \"./RpcInterface\";\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\nexport * from \"./rpc/web/OpenAPI\";\nexport * from \"./rpc/web/RpcMultipart\";\nexport * from \"./rpc/web/WebAppRpcProtocol\";\nexport * from \"./rpc/web/WebAppRpcRequest\";\nexport * from \"./rpc/web/WebAppRpcLogging\";\nexport * from \"./tile/B3dmTileIO\";\nexport * from \"./tile/CompositeTileIO\";\nexport * from \"./tile/ElementGraphics\";\nexport * from \"./tile/GltfTileIO\";\nexport * from \"./tile/I3dmTileIO\";\nexport * from \"./tile/IModelTileIO\";\nexport * from \"./tile/PntsTileIO\";\nexport * from \"./tile/TileIO\";\nexport * from \"./tile/TileMetadata\";\nexport * from \"./tile/Tileset3dSchema\";\nexport * from \"./WhiteOnWhiteReversalSettings\";\n\n/** @docs-package-description\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Entities\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\n */\n/**\n * @docs-group-description Codes\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\n */\n/**\n * @docs-group-description Geometry\n * Types for working with geometry.\n */\n/**\n * @docs-group-description Serialization\n * Types for serializing geometry\n */\n/**\n * @docs-group-description Views\n * Types for defining graphical views of the contents of an iModel.\n */\n/**\n * @docs-group-description DisplayStyles\n * Types for describing how the contents of Views should be rendered.\n */\n/**\n * @docs-group-description Rendering\n * Types describing geometry, views, and symbology for consumption by a display system.\n */\n/**\n * @docs-group-description Symbology\n * Types that define the appearance of geometry.\n */\n/**\n * @docs-group-description iModels\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\n */\n/**\n * @docs-group-description RpcInterface\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n/**\n * @docs-group-description IpcSocket\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\n */\n/**\n * @docs-group-description ECSQL\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description CloudStorage\n * Types for working with Cloud Storage.\n */\n/**\n * @docs-group-description Tween\n * Tweening library adapted from tween.js.\n */\n/**\n * @docs-group-description Tile\n * Types for working with 3d tile formats.\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description NativeApp\n * [Native applications]($docs/learning/NativeApps.md)\n */\n/**\n * @docs-group-description Localization\n * Classes for internationalization and localization of your app.\n */\n/**\n * @docs-group-description Authorization\n * Classes for managing AccessToken used for all requests in other classes.\n */\n/**\n * @docs-group-description RealityData\n * Types for working with the RealityData API.\n */\n/**\n * @docs-group-description MapLayers\n * Types for working with the MapLayers API.\n */\n"]}
|
|
1
|
+
{"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;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6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAE/C;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nexport * from \"./AmbientOcclusion\";\r\nexport * from \"./AnalysisStyle\";\r\nexport * from \"./Atmosphere\";\r\nexport * from \"./AuthorizationClient\";\r\nexport * from \"./BackgroundMapProvider\";\r\nexport * from \"./BackgroundMapSettings\";\r\nexport * from \"./Base64EncodedString\";\r\nexport * from \"./BriefcaseTypes\";\r\nexport * from \"./Camera\";\r\nexport * from \"./ChangedElements\";\r\nexport * from \"./ChangedEntities\";\r\nexport * from \"./ChangesetProps\";\r\nexport * from \"./ClipStyle\";\r\nexport * from \"./Code\";\r\nexport * from \"./ColorByName\";\r\nexport * from \"./ColorDef\";\r\nexport * from \"./CommonLoggerCategory\";\r\nexport * from \"./ContextRealityModel\";\r\nexport * from \"./DisplayStyleSettings\";\r\nexport * from \"./domains/FunctionalElementProps\";\r\nexport * from \"./domains/GenericElementProps\";\r\nexport * from \"./ECSqlTypes\";\r\nexport * from \"./ECSchemaProps\";\r\nexport * from \"./ElementMesh\";\r\nexport * from \"./ElementProps\";\r\nexport * from \"./EmphasizeElementsProps\";\r\nexport * from \"./EntityProps\";\r\nexport * from \"./EntityReference\";\r\nexport * from \"./Environment\";\r\nexport * from \"./FeatureIndex\";\r\nexport * from \"./FeatureSymbology\";\r\nexport * from \"./FeatureTable\";\r\nexport * from \"./Fonts\";\r\nexport * from \"./Frustum\";\r\nexport * from \"./GenericInstanceFilter\";\r\nexport * from \"./GeoCoordinateServices\";\r\nexport * from \"./geometry/AdditionalTransform\";\r\nexport * from \"./geometry/AreaPattern\";\r\nexport * from \"./geometry/BoundingSphere\";\r\nexport * from \"./geometry/Cartographic\";\r\nexport * from \"./geometry/CoordinateReferenceSystem\";\r\nexport * from \"./geometry/ElementGeometry\";\r\nexport * from \"./geometry/FrustumPlanes\";\r\nexport * from \"./geometry/GeodeticDatum\";\r\nexport * from \"./geometry/GeodeticEllipsoid\";\r\nexport * from \"./geometry/GeometryStream\";\r\nexport * from \"./geometry/ImageGraphic\";\r\nexport * from \"./geometry/LineStyle\";\r\nexport * from \"./geometry/Placement\";\r\nexport * from \"./geometry/Projection\";\r\nexport * from \"./geometry/TextString\";\r\nexport * from \"./GeometryContainment\";\r\nexport * from \"./GeometryParams\";\r\nexport * from \"./GeometrySummary\";\r\nexport * from \"./Gradient\";\r\nexport * from \"./GraphicParams\";\r\nexport * from \"./GroundPlane\";\r\nexport * from \"./HiddenLine\";\r\nexport * from \"./Hilite\";\r\nexport * from \"./HSLColor\";\r\nexport * from \"./HSVColor\";\r\nexport * from \"./Image\";\r\nexport * from \"./IModel\";\r\nexport * from \"./IModelError\";\r\nexport * from \"./IModelVersion\";\r\nexport * from \"./ipc/IpcSocket\";\r\nexport * from \"./ipc/IpcWebSocket\";\r\nexport * from \"./ipc/IpcWebSocketTransport\";\r\nexport * from \"./ipc/IpcSession\";\r\nexport * from \"./IpcAppProps\";\r\nexport * from \"./LightSettings\";\r\nexport * from \"./LinePixels\";\r\nexport * from \"./Localization\";\r\nexport * from \"./MapImagerySettings\";\r\nexport * from \"./MapLayerSettings\";\r\nexport * from \"./MassProperties\";\r\nexport * from \"./MaterialProps\";\r\nexport * from \"./ModelClipGroup\";\r\nexport * from \"./ModelProps\";\r\nexport * from \"./NativeAppProps\";\r\nexport * from \"./OctEncodedNormal\";\r\nexport * from \"./ConcurrentQuery\";\r\nexport * from \"./ECSqlReader\";\r\nexport * from \"./PlanarClipMask\";\r\nexport * from \"./ModelGeometryChanges\";\r\nexport * from \"./PlanProjectionSettings\";\r\nexport * from \"./BackendTypes\";\r\nexport * from \"./QPoint\";\r\nexport * from \"./RealityDataAccessProps\";\r\nexport * from \"./RealityModelDisplaySettings\";\r\nexport * from \"./Render\";\r\nexport * from \"./RenderMaterial\";\r\nexport * from \"./RenderSchedule\";\r\nexport * from \"./RenderTexture\";\r\nexport * from \"./RgbColor\";\r\nexport * from \"./RpcManager\";\r\nexport * from \"./SessionProps\";\r\nexport * from \"./SkyBox\";\r\nexport * from \"./Snapping\";\r\nexport * from \"./SolarCalculate\";\r\nexport * from \"./SolarShadows\";\r\nexport * from \"./SpatialClassification\";\r\nexport * from \"./SubCategoryAppearance\";\r\nexport * from \"./SubCategoryOverride\";\r\nexport * from \"./TerrainSettings\";\r\nexport * from \"./TextureMapping\";\r\nexport * from \"./TextureProps\";\r\nexport * from \"./ThematicDisplay\";\r\nexport * from \"./Thumbnail\";\r\nexport * from \"./TileProps\";\r\nexport * from \"./Tween\";\r\nexport * from \"./TxnAction\";\r\nexport * from \"./ViewDetails\";\r\nexport * from \"./ViewFlags\";\r\nexport * from \"./ViewProps\";\r\nexport * from \"./rpc/core/RpcConstants\";\r\nexport * from \"./rpc/core/RpcControl\";\r\nexport * from \"./rpc/core/RpcInvocation\";\r\nexport * from \"./rpc/core/RpcSessionInvocation\";\r\nexport * from \"./rpc/core/RpcMarshaling\";\r\nexport * from \"./rpc/core/RpcOperation\";\r\nexport * from \"./rpc/core/RpcPendingQueue\";\r\nexport * from \"./rpc/core/RpcProtocol\";\r\nexport * from \"./rpc/core/RpcRegistry\";\r\nexport * from \"./rpc/core/RpcRequest\";\r\nexport * from \"./rpc/core/RpcRequestContext\";\r\nexport * from \"./rpc/core/RpcRoutingToken\";\r\nexport * from \"./rpc/core/RpcPush\";\r\nexport * from \"./rpc/core/RpcConfiguration\";\r\nexport * from \"./rpc/DevToolsRpcInterface\";\r\nexport * from \"./rpc/IModelReadRpcInterface\";\r\nexport * from \"./rpc/IModelTileRpcInterface\";\r\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\r\nexport * from \"./rpc/TestRpcManager\";\r\nexport * from \"./rpc/WipRpcInterface\";\r\nexport * from \"./RpcInterface\";\r\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\r\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\r\nexport * from \"./rpc/web/OpenAPI\";\r\nexport * from \"./rpc/web/RpcMultipart\";\r\nexport * from \"./rpc/web/WebAppRpcProtocol\";\r\nexport * from \"./rpc/web/WebAppRpcRequest\";\r\nexport * from \"./rpc/web/WebAppRpcLogging\";\r\nexport * from \"./tile/B3dmTileIO\";\r\nexport * from \"./tile/CompositeTileIO\";\r\nexport * from \"./tile/ElementGraphics\";\r\nexport * from \"./tile/GltfTileIO\";\r\nexport * from \"./tile/I3dmTileIO\";\r\nexport * from \"./tile/IModelTileIO\";\r\nexport * from \"./tile/PntsTileIO\";\r\nexport * from \"./tile/TileIO\";\r\nexport * from \"./tile/TileMetadata\";\r\nexport * from \"./tile/Tileset3dSchema\";\r\nexport * from \"./WhiteOnWhiteReversalSettings\";\r\n\r\n/** @docs-package-description\r\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Entities\r\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\r\n */\r\n/**\r\n * @docs-group-description Geometry\r\n * Types for working with geometry.\r\n */\r\n/**\r\n * @docs-group-description Serialization\r\n * Types for serializing geometry\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Types for defining graphical views of the contents of an iModel.\r\n */\r\n/**\r\n * @docs-group-description DisplayStyles\r\n * Types for describing how the contents of Views should be rendered.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Types describing geometry, views, and symbology for consumption by a display system.\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Types that define the appearance of geometry.\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description IpcSocket\r\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description CloudStorage\r\n * Types for working with Cloud Storage.\r\n */\r\n/**\r\n * @docs-group-description Tween\r\n * Tweening library adapted from tween.js.\r\n */\r\n/**\r\n * @docs-group-description Tile\r\n * Types for working with 3d tile formats.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * [Native applications]($docs/learning/NativeApps.md)\r\n */\r\n/**\r\n * @docs-group-description Localization\r\n * Classes for internationalization and localization of your app.\r\n */\r\n/**\r\n * @docs-group-description Authorization\r\n * Classes for managing AccessToken used for all requests in other classes.\r\n */\r\n/**\r\n * @docs-group-description RealityData\r\n * Types for working with the RealityData API.\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Types for working with the MapLayers API.\r\n */\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionalElementProps.js","sourceRoot":"","sources":["../../../src/domains/FunctionalElementProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Entities\n */\n\nimport { ElementProps, RelatedElementProps } from \"../ElementProps\";\n\n/**\n * @public\n * @extensions\n */\nexport interface FunctionalElementProps extends ElementProps {\n typeDefinition?: RelatedElementProps;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FunctionalElementProps.js","sourceRoot":"","sources":["../../../src/domains/FunctionalElementProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { ElementProps, RelatedElementProps } from \"../ElementProps\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FunctionalElementProps extends ElementProps {\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericElementProps.js","sourceRoot":"","sources":["../../../src/domains/GenericElementProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Entities\n */\n\nimport { GeometricElement2dProps, RelatedElementProps } from \"../ElementProps\";\n\n/**\n * @public\n * @extensions\n */\nexport interface ViewAttachmentLabelProps extends GeometricElement2dProps {\n viewAttachment?: RelatedElementProps;\n}\n\n/**\n * @public\n * @extensions\n */\nexport interface CalloutProps extends GeometricElement2dProps {\n drawingModel?: RelatedElementProps;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GenericElementProps.js","sourceRoot":"","sources":["../../../src/domains/GenericElementProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { GeometricElement2dProps, RelatedElementProps } from \"../ElementProps\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewAttachmentLabelProps extends GeometricElement2dProps {\r\n viewAttachment?: RelatedElementProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CalloutProps extends GeometricElement2dProps {\r\n drawingModel?: RelatedElementProps;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdditionalTransform.js","sourceRoot":"","sources":["../../../src/geometry/AdditionalTransform.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,wBAAwB;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAwBhD;;;;;;;;;GASG;AACH,MAAM,OAAO,oBAAoB;IAY/B,YA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AQ,CAAC,aAAa,CAAC,CAAC;IACjE,CAAC;CACF;AAWD;;;;;EAKE;AACF,MAAM,OAAO,mBAAmB;IAK9B,YAAmB,IAA+B;QAChD,IAAI,IAAI;YACN,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjI,CAAC;IAED;iBACa;IACN,MAAM,CAAC,QAAQ,CAAC,IAA8B;QACnD,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;iBACa;IACN,MAAM;QACX,OAAO,EAAE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7D,CAAC;IAED;kBACc;IACP,MAAM,CAAC,KAA0B;QACtC,IAAI,CAAC,IAAI,CAAC,oBAAoB,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,KAAK,SAAS,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,IAAI,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAqB,CAAC;YAC7F,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n// cspell:ignore Helmert\n\nimport { Geometry } from \"@itwin/core-geometry\";\n\n/** An affine transformation with an additional Z Offset.\n * The equations are:\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\n * X = a * x - b * y + translationX\n * Y = b * x + a * y + translationY\n * Z = z + translationZ\n * @public\n * @extensions\n */\nexport interface Helmert2DWithZOffsetProps {\n /** The X post translation */\n translationX: number;\n /** The Y post-translation */\n translationY: number;\n /** The Z post-translation or Z offset*/\n translationZ: number;\n /** The rotation in the trigonometric (CCW) direction in degrees. */\n rotDeg: number;\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\n scale: number;\n}\n\n/** An affine transformation with an additional Z Offset.\n * The equations are:\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\n * X = a * x - b * y + translationX\n * Y = b * x + a * y + translationY\n * Z = z + translationZ\n *\n * Note that the class only implements the definition and not the operation.\n * @public\n */\nexport class Helmert2DWithZOffset implements Helmert2DWithZOffsetProps {\n /** The X post translation */\n public translationX!: number;\n /** The Y post-translation */\n public translationY!: number;\n /** The Z post-translation or Z offset*/\n public translationZ!: number;\n /** The rotation in the trigonometric (CCW) direction in degrees. */\n public rotDeg!: number;\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\n public scale!: number;\n\n constructor(data?: Helmert2DWithZOffsetProps) {\n if (data) {\n this.translationX = data.translationX;\n this.translationY = data.translationY;\n this.translationZ = data.translationZ;\n this.rotDeg = data.rotDeg;\n this.scale = data.scale;\n }\n }\n\n /** Creates an Helmert Transform from JSON representation.\n * @public */\n public static fromJSON(data: Helmert2DWithZOffsetProps): Helmert2DWithZOffset {\n return new Helmert2DWithZOffset(data);\n }\n\n /** Creates a JSON from the Helmert Transform definition\n * @public */\n public toJSON(): Helmert2DWithZOffsetProps {\n return { translationX: this.translationX, translationY: this.translationY, translationZ: this.translationZ, rotDeg: this.rotDeg, scale: this.scale };\n }\n\n /** Compares two Helmert2DWithZOffset objects applying a minuscule tolerance.\n * @public */\n public equals(other: Helmert2DWithZOffset): boolean {\n return (Math.abs(this.translationX - other.translationX) < Geometry.smallMetricDistance &&\n Math.abs(this.translationY - other.translationY) < Geometry.smallMetricDistance &&\n Math.abs(this.translationZ - other.translationZ) < Geometry.smallMetricDistance &&\n Math.abs(this.rotDeg - other.rotDeg) < Geometry.smallAngleDegrees &&\n Math.abs(this.scale - other.scale) < Geometry.smallFraction);\n }\n}\n\n/** Additional Transform definition\n * @public\n * @extensions\n */\nexport interface AdditionalTransformProps {\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\n helmert2DWithZOffset?: Helmert2DWithZOffsetProps;\n}\n\n/** Additional Transform implementation.\n * An additional transform is a transformation that can apply to either the horizontal or vertical coordinates of a\n * geographic CRS. The transformation is applied after the latitude/longitude have been projected thus the process\n * is applied to the result Cartesian coordinates of the projection process.\n * @public\n*/\nexport class AdditionalTransform implements AdditionalTransformProps {\n\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\n public readonly helmert2DWithZOffset?: Helmert2DWithZOffset;\n\n public constructor(data?: AdditionalTransformProps) {\n if (data)\n this.helmert2DWithZOffset = data.helmert2DWithZOffset ? Helmert2DWithZOffset.fromJSON(data.helmert2DWithZOffset) : undefined;\n }\n\n /** Creates an Additional Transform from JSON representation.\n * @public */\n public static fromJSON(data: AdditionalTransformProps): AdditionalTransform {\n return new AdditionalTransform(data);\n }\n\n /** Creates a JSON from the Additional Transform definition\n * @public */\n public toJSON(): AdditionalTransformProps {\n return { helmert2DWithZOffset: this.helmert2DWithZOffset };\n }\n\n /** Compares two additional transforms applying a minuscule tolerance to comparing numbers.\n * @public */\n public equals(other: AdditionalTransform): boolean {\n if ((this.helmert2DWithZOffset === undefined) !== (other.helmert2DWithZOffset === undefined))\n return false;\n\n if (this.helmert2DWithZOffset && !this.helmert2DWithZOffset.equals(other.helmert2DWithZOffset!))\n return false;\n\n return true;\n }\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"AdditionalTransform.js","sourceRoot":"","sources":["../../../src/geometry/AdditionalTransform.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,wBAAwB;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAwBhD;;;;;;;;;GASG;AACH,MAAM,OAAO,oBAAoB;IAY/B,YAAY,IAAgC;QAC1C,IAAI,IAAI,EAAE;YACR,IAAI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AAWD;;;;;EAKE;AACF,MAAM,OAAO,mBAAmB;IAK9B,YAAmB,IAA+B;QAChD,IAAI,IAAI;YACN,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjI,CAAC;IAED;iBACa;IACN,MAAM,CAAC,QAAQ,CAAC,IAA8B;QACnD,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;iBACa;IACN,MAAM;QACX,OAAO,EAAE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7D,CAAC;IAED;kBACc;IACP,MAAM,CAAC,KAA0B;QACtC,IAAI,CAAC,IAAI,CAAC,oBAAoB,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,KAAK,SAAS,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,IAAI,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAqB,CAAC;YAC7F,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n// cspell:ignore Helmert\r\n\r\nimport { Geometry } from \"@itwin/core-geometry\";\r\n\r\n/** An affine transformation with an additional Z Offset.\r\n * The equations are:\r\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\r\n * X = a * x - b * y + translationX\r\n * Y = b * x + a * y + translationY\r\n * Z = z + translationZ\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Helmert2DWithZOffsetProps {\r\n /** The X post translation */\r\n translationX: number;\r\n /** The Y post-translation */\r\n translationY: number;\r\n /** The Z post-translation or Z offset*/\r\n translationZ: number;\r\n /** The rotation in the trigonometric (CCW) direction in degrees. */\r\n rotDeg: number;\r\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\r\n scale: number;\r\n}\r\n\r\n/** An affine transformation with an additional Z Offset.\r\n * The equations are:\r\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\r\n * X = a * x - b * y + translationX\r\n * Y = b * x + a * y + translationY\r\n * Z = z + translationZ\r\n *\r\n * Note that the class only implements the definition and not the operation.\r\n * @public\r\n */\r\nexport class Helmert2DWithZOffset implements Helmert2DWithZOffsetProps {\r\n /** The X post translation */\r\n public translationX!: number;\r\n /** The Y post-translation */\r\n public translationY!: number;\r\n /** The Z post-translation or Z offset*/\r\n public translationZ!: number;\r\n /** The rotation in the trigonometric (CCW) direction in degrees. */\r\n public rotDeg!: number;\r\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\r\n public scale!: number;\r\n\r\n constructor(data?: Helmert2DWithZOffsetProps) {\r\n if (data) {\r\n this.translationX = data.translationX;\r\n this.translationY = data.translationY;\r\n this.translationZ = data.translationZ;\r\n this.rotDeg = data.rotDeg;\r\n this.scale = data.scale;\r\n }\r\n }\r\n\r\n /** Creates an Helmert Transform from JSON representation.\r\n * @public */\r\n public static fromJSON(data: Helmert2DWithZOffsetProps): Helmert2DWithZOffset {\r\n return new Helmert2DWithZOffset(data);\r\n }\r\n\r\n /** Creates a JSON from the Helmert Transform definition\r\n * @public */\r\n public toJSON(): Helmert2DWithZOffsetProps {\r\n return { translationX: this.translationX, translationY: this.translationY, translationZ: this.translationZ, rotDeg: this.rotDeg, scale: this.scale };\r\n }\r\n\r\n /** Compares two Helmert2DWithZOffset objects applying a minuscule tolerance.\r\n * @public */\r\n public equals(other: Helmert2DWithZOffset): boolean {\r\n return (Math.abs(this.translationX - other.translationX) < Geometry.smallMetricDistance &&\r\n Math.abs(this.translationY - other.translationY) < Geometry.smallMetricDistance &&\r\n Math.abs(this.translationZ - other.translationZ) < Geometry.smallMetricDistance &&\r\n Math.abs(this.rotDeg - other.rotDeg) < Geometry.smallAngleDegrees &&\r\n Math.abs(this.scale - other.scale) < Geometry.smallFraction);\r\n }\r\n}\r\n\r\n/** Additional Transform definition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AdditionalTransformProps {\r\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\r\n helmert2DWithZOffset?: Helmert2DWithZOffsetProps;\r\n}\r\n\r\n/** Additional Transform implementation.\r\n * An additional transform is a transformation that can apply to either the horizontal or vertical coordinates of a\r\n * geographic CRS. The transformation is applied after the latitude/longitude have been projected thus the process\r\n * is applied to the result Cartesian coordinates of the projection process.\r\n * @public\r\n*/\r\nexport class AdditionalTransform implements AdditionalTransformProps {\r\n\r\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\r\n public readonly helmert2DWithZOffset?: Helmert2DWithZOffset;\r\n\r\n public constructor(data?: AdditionalTransformProps) {\r\n if (data)\r\n this.helmert2DWithZOffset = data.helmert2DWithZOffset ? Helmert2DWithZOffset.fromJSON(data.helmert2DWithZOffset) : undefined;\r\n }\r\n\r\n /** Creates an Additional Transform from JSON representation.\r\n * @public */\r\n public static fromJSON(data: AdditionalTransformProps): AdditionalTransform {\r\n return new AdditionalTransform(data);\r\n }\r\n\r\n /** Creates a JSON from the Additional Transform definition\r\n * @public */\r\n public toJSON(): AdditionalTransformProps {\r\n return { helmert2DWithZOffset: this.helmert2DWithZOffset };\r\n }\r\n\r\n /** Compares two additional transforms applying a minuscule tolerance to comparing numbers.\r\n * @public */\r\n public equals(other: AdditionalTransform): boolean {\r\n if ((this.helmert2DWithZOffset === undefined) !== (other.helmert2DWithZOffset === undefined))\r\n return false;\r\n\r\n if (this.helmert2DWithZOffset && !this.helmert2DWithZOffset.equals(other.helmert2DWithZOffset!))\r\n return false;\r\n\r\n return true;\r\n }\r\n}\r\n\r\n"]}
|
|
@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iBAAM;gBACL,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC7G,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM;oBAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;aAC5F;YAED,MAAM,GAAG,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YAC3C,OAAO,CAAC,oBAAoB,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACxD,MAAM,UAAU,GAAG,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;YAC7D,IAAI,CAAC,UAAU;gBACb,OAAO,KAAK,CAAC;YACf,MAAM,WAAW,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;YACtE,IAAI,SAAS,KAAK,WAAW;gBAC3B,OAAO,KAAK,CAAC;YACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC;YAC5B,OAAO,IAAI,CAAC;QACd,CAAC;KACF;IAzMY,kBAAM,SAyMlB,CAAA;AACH,CAAC,EA1QgB,WAAW,KAAX,WAAW,QA0Q3B","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 Symbology\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport {\n Angle, AngleProps, Geometry, Matrix3d, Point2d, Point3d, Transform, XYProps, XYZProps, YawPitchRollAngles, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\n\n/** @public */\nexport namespace AreaPattern {\n /** Single hatch line definition */\n export interface HatchDefLineProps {\n /** Angle of hatch line, 0.0 if undefined */\n angle?: AngleProps;\n /** Origin point (relative to placement) the hatch passes through, 0.0,0.0 if undefined */\n through?: XYProps;\n /** Offset of successive lines. X offset staggers dashes (ignored for solid lines) and Y offset controls the distance between both solid and dashed lines, 0.0,0.0 if undefined */\n offset?: XYProps;\n /** Array of gap and dash lengths for creating non-solid hatch lines, max of 20. A positive value denotes dash, a negative value a gap, solid line if undefined */\n dashes?: number[];\n }\n\n export class HatchDefLine implements HatchDefLineProps {\n public angle?: Angle;\n public through?: Point2d;\n public offset?: Point2d;\n public dashes?: number[];\n\n public constructor(json: HatchDefLineProps) {\n this.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\n this.through = json.through ? Point2d.fromJSON(json.through) : undefined;\n this.offset = json.offset ? Point2d.fromJSON(json.offset) : undefined;\n if (json.dashes) {\n const dashes: number[] = [];\n json.dashes.forEach((dash) => dashes.push(dash));\n this.dashes = dashes;\n }\n }\n }\n\n /** Definition of a hatch, cross-hatch, or area pattern that can be applied to the interior of a planar region.\n * @see [[GeometryStreamEntryProps]]\n */\n export interface ParamsProps {\n /** Pattern offset (relative to placement), 0.0,0.0,0.0 if undefined */\n origin?: XYZProps;\n /** Pattern orientation (relative to placement), 0.0,0.0,0.0 if undefined */\n rotation?: YawPitchRollProps;\n /** Spacing of first set of parallel lines in a hatch pattern, or row spacing between area pattern tiles, 0.0 if undefined */\n space1?: number;\n /** Spacing of second set of parallel lines in a cross-hatch (leave undefined or 0 for a hatch), or column spacing between area pattern tiles, 0.0 if undefined */\n space2?: number;\n /** Angle of first set of parallel lines in a hatch pattern or area pattern tile direction, 0.0 if undefined */\n angle1?: AngleProps;\n /** Angle of second set of parallel lines in a cross-hatch, 0.0 if undefined */\n angle2?: AngleProps;\n /** Scale to apply to area pattern symbol, 1.0 if undefined */\n scale?: number;\n /** Pattern color, leave undefined to inherit color from parent element. For area patterns, does not override explicit colors stored in symbol */\n color?: ColorDefProps;\n /** Pattern weight, leave undefined to inherit weight from parent element. For area patterns, does not override explicit weights stored in symbol */\n weight?: number;\n /** Set to inhibit display of pattern boundary, not applicable when boundary is also filled, false if undefined */\n invisibleBoundary?: boolean;\n /** Set to allow snapping to pattern geometry, false if undefined */\n snappable?: boolean;\n /** [[GeometryPart]] id to use for tiled area pattern display */\n symbolId?: Id64String;\n /** Define an area pattern by supplying hatch line definitions instead of using a [[GeometryPart]] */\n defLines?: HatchDefLineProps[];\n }\n\n /** Defines a hatch, cross hatch, or area pattern. */\n export class Params {\n public origin?: Point3d;\n public rotation?: YawPitchRollAngles;\n public space1?: number;\n public space2?: number;\n public angle1?: Angle;\n public angle2?: Angle;\n public scale?: number;\n public color?: ColorDef;\n public weight?: number;\n public invisibleBoundary?: boolean;\n public snappable?: boolean;\n public symbolId?: Id64String;\n public defLines?: HatchDefLine[];\n\n /** create an AreaPattern.Params from a json object. */\n public static fromJSON(json?: ParamsProps) {\n const result = new Params();\n if (!json)\n return result;\n result.origin = json.origin ? Point3d.fromJSON(json.origin) : undefined;\n result.rotation = json.rotation ? YawPitchRollAngles.fromJSON(json.rotation) : undefined;\n result.space1 = json.space1;\n result.space2 = json.space2;\n result.angle1 = json.angle1 ? Angle.fromJSON(json.angle1) : undefined;\n result.angle2 = json.angle2 ? Angle.fromJSON(json.angle2) : undefined;\n result.scale = json.scale;\n result.color = json.color ? ColorDef.fromJSON(json.color) : undefined;\n result.weight = json.weight;\n result.invisibleBoundary = json.invisibleBoundary;\n result.snappable = json.snappable;\n result.symbolId = json.symbolId ? Id64.fromJSON(json.symbolId) : undefined;\n if (!json.defLines)\n return result;\n const defLines: HatchDefLine[] = [];\n json.defLines.forEach((defLine) => defLines.push(new HatchDefLine(defLine)));\n result.defLines = defLines;\n return result;\n }\n\n public toJSON(): ParamsProps {\n return {\n ...this,\n color: this.color?.toJSON(),\n };\n }\n\n public clone(): Params {\n return Params.fromJSON(this.toJSON());\n }\n\n public equals(other: Params): boolean {\n if (this === other)\n return true; // Same pointer\n\n if (this.scale !== other.scale ||\n this.space1 !== other.space1 ||\n this.space2 !== other.space2 ||\n this.weight !== other.weight ||\n this.invisibleBoundary !== other.invisibleBoundary ||\n this.snappable !== other.snappable)\n return false;\n\n if ((this.color === undefined) !== (other.color === undefined))\n return false;\n if (this.color && !this.color.equals(other.color!))\n return false;\n\n if ((this.angle1 === undefined) !== (other.angle1 === undefined))\n return false;\n if (this.angle1 && !this.angle1.isAlmostEqualNoPeriodShift(other.angle1!))\n return false;\n\n if ((this.angle2 === undefined) !== (other.angle2 === undefined))\n return false;\n if (this.angle2 && !this.angle2.isAlmostEqualNoPeriodShift(other.angle2!))\n return false;\n\n if ((this.origin === undefined) !== (other.origin === undefined))\n return false;\n if (this.origin && !this.origin.isAlmostEqual(other.origin!))\n return false;\n\n if ((this.rotation === undefined) !== (other.rotation === undefined))\n return false;\n if (this.rotation && !this.rotation.isAlmostEqual(other.rotation!))\n return false;\n\n if ((this.symbolId === undefined) !== (other.symbolId === undefined))\n return false;\n if (this.symbolId && !(this.symbolId === other.symbolId!))\n return false;\n\n if ((this.defLines === undefined) !== (other.defLines === undefined))\n return false;\n if (this.defLines) {\n if (this.defLines.length !== other.defLines!.length)\n return false;\n\n for (let i = 0; i < this.defLines.length; ++i) {\n const otherLine = other.defLines![i];\n const thisLine = this.defLines[i];\n\n if ((thisLine.angle === undefined) !== (otherLine.angle === undefined))\n return false;\n if (thisLine.angle && !thisLine.angle.isAlmostEqualNoPeriodShift(otherLine.angle!))\n return false;\n\n if ((thisLine.through === undefined) !== (otherLine.through === undefined))\n return false;\n if (thisLine.through && !thisLine.through.isAlmostEqual(otherLine.through!))\n return false;\n\n if ((thisLine.offset === undefined) !== (otherLine.offset === undefined))\n return false;\n if (thisLine.offset && !thisLine.offset.isAlmostEqual(otherLine.offset!))\n return false;\n\n if ((thisLine.dashes === undefined) !== (otherLine.dashes === undefined))\n return false;\n if (thisLine.dashes && thisLine.dashes.length !== otherLine.dashes!.length)\n return false;\n if (thisLine.dashes) {\n for (let dash = 0; dash < thisLine.dashes.length; ++dash) {\n if (!Geometry.isSameCoordinate(thisLine.dashes[dash], otherLine.dashes![dash]))\n return false;\n }\n }\n }\n }\n return true;\n }\n\n public static transformPatternSpace(transform: Transform, oldSpace: number, patRot: Matrix3d, angle?: Angle): number {\n let tmpRot: Matrix3d;\n if (angle && !angle.isAlmostZero) {\n const yprTriple = new YawPitchRollAngles(angle);\n const angRot = yprTriple.toMatrix3d();\n tmpRot = patRot.multiplyMatrixMatrix(angRot);\n } else {\n tmpRot = patRot;\n }\n const yDir = tmpRot.getColumn(1);\n yDir.scale(oldSpace, yDir);\n transform.multiplyVector(yDir, yDir);\n return yDir.magnitude();\n }\n\n public static getTransformPatternScale(transform: Transform): number {\n const xDir = transform.matrix.getColumn(0);\n const mag = xDir.magnitude();\n return (mag > 1.0e-10) ? mag : 1.0;\n }\n\n public applyTransform(transform: Transform): boolean {\n if (transform.isIdentity)\n return true;\n let origin = this.origin ? this.origin : Point3d.createZero();\n const rMatrix = this.rotation ? this.rotation.toMatrix3d() : Matrix3d.createIdentity();\n if (this.symbolId !== undefined) {\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\n this.space2 = Params.transformPatternSpace(transform, this.space2 ? this.space2 : 0.0, rMatrix, this.angle2);\n const scale = Params.getTransformPatternScale(transform);\n this.scale = this.scale ? this.scale * scale : scale;\n } else if (this.defLines) {\n const scale = Params.getTransformPatternScale(transform);\n if (!Geometry.isSameCoordinate(scale, 1.0)) {\n this.scale = this.scale ? this.scale * scale : scale;\n for (const line of this.defLines) {\n if (line.through) {\n line.through.x *= scale;\n line.through.y *= scale;\n }\n if (line.offset) {\n line.offset.x *= scale;\n line.offset.y *= scale;\n }\n if (line.dashes) {\n for (let iDash = 0; iDash < line.dashes.length; iDash++)\n line.dashes[iDash] *= scale;\n }\n }\n }\n } else {\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\n if (this.space2 && 0 !== this.space2)\n this.space2 = Params.transformPatternSpace(transform, this.space2, rMatrix, this.angle2);\n }\n\n origin = transform.multiplyPoint3d(origin);\n rMatrix.multiplyMatrixMatrix(transform.matrix, rMatrix);\n const normalized = Matrix3d.createRigidFromMatrix3d(rMatrix);\n if (!normalized)\n return false;\n const newRotation = YawPitchRollAngles.createFromMatrix3d(normalized);\n if (undefined === newRotation)\n return false;\n this.origin = origin;\n this.rotation = newRotation;\n return true;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AreaPattern.js","sourceRoot":"","sources":["../../../src/geometry/AreaPattern.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACL,KAAK,EAAc,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAgC,kBAAkB,GAC1G,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAiB,MAAM,aAAa,CAAC;AAEtD,cAAc;AACd,MAAM,KAAW,WAAW,CA0Q3B;AA1QD,WAAiB,WAAW;IAa1B,MAAa,YAAY;QAMvB,YAAmB,IAAuB;YACxC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACjE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACzE,IAAI,CAAC,MAAM,GAAG,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KAAK,CAAC;YACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC;YAC5B,OAAO,IAAI,CAAC;QACd,CAAC;KACF;IAzMY,kBAAM,SAyMlB,CAAA;AACH,CAAC,EA1QgB,WAAW,KAAX,WAAW,QA0Q3B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n Angle, AngleProps, Geometry, Matrix3d, Point2d, Point3d, Transform, XYProps, XYZProps, YawPitchRollAngles, YawPitchRollProps,\r\n} from \"@itwin/core-geometry\";\r\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\r\n\r\n/** @public */\r\nexport namespace AreaPattern {\r\n /** Single hatch line definition */\r\n export interface HatchDefLineProps {\r\n /** Angle of hatch line, 0.0 if undefined */\r\n angle?: AngleProps;\r\n /** Origin point (relative to placement) the hatch passes through, 0.0,0.0 if undefined */\r\n through?: XYProps;\r\n /** Offset of successive lines. X offset staggers dashes (ignored for solid lines) and Y offset controls the distance between both solid and dashed lines, 0.0,0.0 if undefined */\r\n offset?: XYProps;\r\n /** Array of gap and dash lengths for creating non-solid hatch lines, max of 20. A positive value denotes dash, a negative value a gap, solid line if undefined */\r\n dashes?: number[];\r\n }\r\n\r\n export class HatchDefLine implements HatchDefLineProps {\r\n public angle?: Angle;\r\n public through?: Point2d;\r\n public offset?: Point2d;\r\n public dashes?: number[];\r\n\r\n public constructor(json: HatchDefLineProps) {\r\n this.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\r\n this.through = json.through ? Point2d.fromJSON(json.through) : undefined;\r\n this.offset = json.offset ? Point2d.fromJSON(json.offset) : undefined;\r\n if (json.dashes) {\r\n const dashes: number[] = [];\r\n json.dashes.forEach((dash) => dashes.push(dash));\r\n this.dashes = dashes;\r\n }\r\n }\r\n }\r\n\r\n /** Definition of a hatch, cross-hatch, or area pattern that can be applied to the interior of a planar region.\r\n * @see [[GeometryStreamEntryProps]]\r\n */\r\n export interface ParamsProps {\r\n /** Pattern offset (relative to placement), 0.0,0.0,0.0 if undefined */\r\n origin?: XYZProps;\r\n /** Pattern orientation (relative to placement), 0.0,0.0,0.0 if undefined */\r\n rotation?: YawPitchRollProps;\r\n /** Spacing of first set of parallel lines in a hatch pattern, or row spacing between area pattern tiles, 0.0 if undefined */\r\n space1?: number;\r\n /** Spacing of second set of parallel lines in a cross-hatch (leave undefined or 0 for a hatch), or column spacing between area pattern tiles, 0.0 if undefined */\r\n space2?: number;\r\n /** Angle of first set of parallel lines in a hatch pattern or area pattern tile direction, 0.0 if undefined */\r\n angle1?: AngleProps;\r\n /** Angle of second set of parallel lines in a cross-hatch, 0.0 if undefined */\r\n angle2?: AngleProps;\r\n /** Scale to apply to area pattern symbol, 1.0 if undefined */\r\n scale?: number;\r\n /** Pattern color, leave undefined to inherit color from parent element. For area patterns, does not override explicit colors stored in symbol */\r\n color?: ColorDefProps;\r\n /** Pattern weight, leave undefined to inherit weight from parent element. For area patterns, does not override explicit weights stored in symbol */\r\n weight?: number;\r\n /** Set to inhibit display of pattern boundary, not applicable when boundary is also filled, false if undefined */\r\n invisibleBoundary?: boolean;\r\n /** Set to allow snapping to pattern geometry, false if undefined */\r\n snappable?: boolean;\r\n /** [[GeometryPart]] id to use for tiled area pattern display */\r\n symbolId?: Id64String;\r\n /** Define an area pattern by supplying hatch line definitions instead of using a [[GeometryPart]] */\r\n defLines?: HatchDefLineProps[];\r\n }\r\n\r\n /** Defines a hatch, cross hatch, or area pattern. */\r\n export class Params {\r\n public origin?: Point3d;\r\n public rotation?: YawPitchRollAngles;\r\n public space1?: number;\r\n public space2?: number;\r\n public angle1?: Angle;\r\n public angle2?: Angle;\r\n public scale?: number;\r\n public color?: ColorDef;\r\n public weight?: number;\r\n public invisibleBoundary?: boolean;\r\n public snappable?: boolean;\r\n public symbolId?: Id64String;\r\n public defLines?: HatchDefLine[];\r\n\r\n /** create an AreaPattern.Params from a json object. */\r\n public static fromJSON(json?: ParamsProps) {\r\n const result = new Params();\r\n if (!json)\r\n return result;\r\n result.origin = json.origin ? Point3d.fromJSON(json.origin) : undefined;\r\n result.rotation = json.rotation ? YawPitchRollAngles.fromJSON(json.rotation) : undefined;\r\n result.space1 = json.space1;\r\n result.space2 = json.space2;\r\n result.angle1 = json.angle1 ? Angle.fromJSON(json.angle1) : undefined;\r\n result.angle2 = json.angle2 ? Angle.fromJSON(json.angle2) : undefined;\r\n result.scale = json.scale;\r\n result.color = json.color ? ColorDef.fromJSON(json.color) : undefined;\r\n result.weight = json.weight;\r\n result.invisibleBoundary = json.invisibleBoundary;\r\n result.snappable = json.snappable;\r\n result.symbolId = json.symbolId ? Id64.fromJSON(json.symbolId) : undefined;\r\n if (!json.defLines)\r\n return result;\r\n const defLines: HatchDefLine[] = [];\r\n json.defLines.forEach((defLine) => defLines.push(new HatchDefLine(defLine)));\r\n result.defLines = defLines;\r\n return result;\r\n }\r\n\r\n public toJSON(): ParamsProps {\r\n return {\r\n ...this,\r\n color: this.color?.toJSON(),\r\n };\r\n }\r\n\r\n public clone(): Params {\r\n return Params.fromJSON(this.toJSON());\r\n }\r\n\r\n public equals(other: Params): boolean {\r\n if (this === other)\r\n return true; // Same pointer\r\n\r\n if (this.scale !== other.scale ||\r\n this.space1 !== other.space1 ||\r\n this.space2 !== other.space2 ||\r\n this.weight !== other.weight ||\r\n this.invisibleBoundary !== other.invisibleBoundary ||\r\n this.snappable !== other.snappable)\r\n return false;\r\n\r\n if ((this.color === undefined) !== (other.color === undefined))\r\n return false;\r\n if (this.color && !this.color.equals(other.color!))\r\n return false;\r\n\r\n if ((this.angle1 === undefined) !== (other.angle1 === undefined))\r\n return false;\r\n if (this.angle1 && !this.angle1.isAlmostEqualNoPeriodShift(other.angle1!))\r\n return false;\r\n\r\n if ((this.angle2 === undefined) !== (other.angle2 === undefined))\r\n return false;\r\n if (this.angle2 && !this.angle2.isAlmostEqualNoPeriodShift(other.angle2!))\r\n return false;\r\n\r\n if ((this.origin === undefined) !== (other.origin === undefined))\r\n return false;\r\n if (this.origin && !this.origin.isAlmostEqual(other.origin!))\r\n return false;\r\n\r\n if ((this.rotation === undefined) !== (other.rotation === undefined))\r\n return false;\r\n if (this.rotation && !this.rotation.isAlmostEqual(other.rotation!))\r\n return false;\r\n\r\n if ((this.symbolId === undefined) !== (other.symbolId === undefined))\r\n return false;\r\n if (this.symbolId && !(this.symbolId === other.symbolId!))\r\n return false;\r\n\r\n if ((this.defLines === undefined) !== (other.defLines === undefined))\r\n return false;\r\n if (this.defLines) {\r\n if (this.defLines.length !== other.defLines!.length)\r\n return false;\r\n\r\n for (let i = 0; i < this.defLines.length; ++i) {\r\n const otherLine = other.defLines![i];\r\n const thisLine = this.defLines[i];\r\n\r\n if ((thisLine.angle === undefined) !== (otherLine.angle === undefined))\r\n return false;\r\n if (thisLine.angle && !thisLine.angle.isAlmostEqualNoPeriodShift(otherLine.angle!))\r\n return false;\r\n\r\n if ((thisLine.through === undefined) !== (otherLine.through === undefined))\r\n return false;\r\n if (thisLine.through && !thisLine.through.isAlmostEqual(otherLine.through!))\r\n return false;\r\n\r\n if ((thisLine.offset === undefined) !== (otherLine.offset === undefined))\r\n return false;\r\n if (thisLine.offset && !thisLine.offset.isAlmostEqual(otherLine.offset!))\r\n return false;\r\n\r\n if ((thisLine.dashes === undefined) !== (otherLine.dashes === undefined))\r\n return false;\r\n if (thisLine.dashes && thisLine.dashes.length !== otherLine.dashes!.length)\r\n return false;\r\n if (thisLine.dashes) {\r\n for (let dash = 0; dash < thisLine.dashes.length; ++dash) {\r\n if (!Geometry.isSameCoordinate(thisLine.dashes[dash], otherLine.dashes![dash]))\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n public static transformPatternSpace(transform: Transform, oldSpace: number, patRot: Matrix3d, angle?: Angle): number {\r\n let tmpRot: Matrix3d;\r\n if (angle && !angle.isAlmostZero) {\r\n const yprTriple = new YawPitchRollAngles(angle);\r\n const angRot = yprTriple.toMatrix3d();\r\n tmpRot = patRot.multiplyMatrixMatrix(angRot);\r\n } else {\r\n tmpRot = patRot;\r\n }\r\n const yDir = tmpRot.getColumn(1);\r\n yDir.scale(oldSpace, yDir);\r\n transform.multiplyVector(yDir, yDir);\r\n return yDir.magnitude();\r\n }\r\n\r\n public static getTransformPatternScale(transform: Transform): number {\r\n const xDir = transform.matrix.getColumn(0);\r\n const mag = xDir.magnitude();\r\n return (mag > 1.0e-10) ? mag : 1.0;\r\n }\r\n\r\n public applyTransform(transform: Transform): boolean {\r\n if (transform.isIdentity)\r\n return true;\r\n let origin = this.origin ? this.origin : Point3d.createZero();\r\n const rMatrix = this.rotation ? this.rotation.toMatrix3d() : Matrix3d.createIdentity();\r\n if (this.symbolId !== undefined) {\r\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\r\n this.space2 = Params.transformPatternSpace(transform, this.space2 ? this.space2 : 0.0, rMatrix, this.angle2);\r\n const scale = Params.getTransformPatternScale(transform);\r\n this.scale = this.scale ? this.scale * scale : scale;\r\n } else if (this.defLines) {\r\n const scale = Params.getTransformPatternScale(transform);\r\n if (!Geometry.isSameCoordinate(scale, 1.0)) {\r\n this.scale = this.scale ? this.scale * scale : scale;\r\n for (const line of this.defLines) {\r\n if (line.through) {\r\n line.through.x *= scale;\r\n line.through.y *= scale;\r\n }\r\n if (line.offset) {\r\n line.offset.x *= scale;\r\n line.offset.y *= scale;\r\n }\r\n if (line.dashes) {\r\n for (let iDash = 0; iDash < line.dashes.length; iDash++)\r\n line.dashes[iDash] *= scale;\r\n }\r\n }\r\n }\r\n } else {\r\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\r\n if (this.space2 && 0 !== this.space2)\r\n this.space2 = Params.transformPatternSpace(transform, this.space2, rMatrix, this.angle2);\r\n }\r\n\r\n origin = transform.multiplyPoint3d(origin);\r\n rMatrix.multiplyMatrixMatrix(transform.matrix, rMatrix);\r\n const normalized = Matrix3d.createRigidFromMatrix3d(rMatrix);\r\n if (!normalized)\r\n return false;\r\n const newRotation = YawPitchRollAngles.createFromMatrix3d(normalized);\r\n if (undefined === newRotation)\r\n return false;\r\n this.origin = origin;\r\n this.rotation = newRotation;\r\n return true;\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoundingSphere.js","sourceRoot":"","sources":["../../../src/geometry/BoundingSphere.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAa,MAAM,sBAAsB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,OAAO,cAAc;IAMzB,yEAAyE;IACzE,YAAY,SAAkB,OAAO,CAAC,UAAU,EAAE,EAAE,MAAM,GAAG,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,kDAAkD;IAC3C,IAAI,CAAC,MAAe,EAAE,MAAc;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,SAAoB,EAAE,MAAuB;QAC9D,MAAM,GAAG,MAAM,IAAI,IAAI,cAAc,EAAE,CAAC;QACxC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC;QAClK,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,6DAA6D;IACtD,gBAAgB,CAAC,SAAoB;QAC1C,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { Point3d, Transform } from \"@itwin/core-geometry\";\n\n/** Describes a spherical volume of space as an approximation of the shape of some more complex geometric entity fully contained within that volume.\n * When performing tests for intersection or containment, the approximation can be used as a first, quick check.\n * @see [[FrustumPlanes.computeContainment]], for example.\n * @public\n */\nexport class BoundingSphere {\n /** The point at the center of the sphere. */\n public center: Point3d;\n /** The radius of the sphere. */\n public radius: number;\n\n /** Create a new bounding sphere with the specified center and radius. */\n constructor(center: Point3d = Point3d.createZero(), radius = 0) {\n this.center = center;\n this.radius = radius;\n }\n\n /** Change the center and radius of the sphere. */\n public init(center: Point3d, radius: number): void {\n this.center = center;\n this.radius = radius;\n }\n\n /** Applies the specified transformation matrix to produce a new bounding sphere.\n * @param transform The transformation matrix to apply.\n * @param result An optional preallocated object to hold the result, to avoid allocating a new object. May be the same object as `this`.\n * @returns A bounding sphere equivalent to `this` with the specified transform applied.\n */\n public transformBy(transform: Transform, result?: BoundingSphere): BoundingSphere {\n result = result ?? new BoundingSphere();\n transform.multiplyPoint3d(this.center, result.center);\n result.radius = this.radius * Math.max(transform.matrix.columnXMagnitude(), Math.max(transform.matrix.columnYMagnitude(), (transform.matrix.columnZMagnitude())));\n return result;\n }\n\n /** Apply the specified transform to this bounding sphere. */\n public transformInPlace(transform: Transform): void {\n this.transformBy(transform, this);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BoundingSphere.js","sourceRoot":"","sources":["../../../src/geometry/BoundingSphere.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAa,MAAM,sBAAsB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,OAAO,cAAc;IAMzB,yEAAyE;IACzE,YAAY,SAAkB,OAAO,CAAC,UAAU,EAAE,EAAE,MAAM,GAAG,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,kDAAkD;IAC3C,IAAI,CAAC,MAAe,EAAE,MAAc;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,SAAoB,EAAE,MAAuB;QAC9D,MAAM,GAAG,MAAM,IAAI,IAAI,cAAc,EAAE,CAAC;QACxC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC;QAClK,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,6DAA6D;IACtD,gBAAgB,CAAC,SAAoB;QAC1C,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { Point3d, Transform } from \"@itwin/core-geometry\";\r\n\r\n/** Describes a spherical volume of space as an approximation of the shape of some more complex geometric entity fully contained within that volume.\r\n * When performing tests for intersection or containment, the approximation can be used as a first, quick check.\r\n * @see [[FrustumPlanes.computeContainment]], for example.\r\n * @public\r\n */\r\nexport class BoundingSphere {\r\n /** The point at the center of the sphere. */\r\n public center: Point3d;\r\n /** The radius of the sphere. */\r\n public radius: number;\r\n\r\n /** Create a new bounding sphere with the specified center and radius. */\r\n constructor(center: Point3d = Point3d.createZero(), radius = 0) {\r\n this.center = center;\r\n this.radius = radius;\r\n }\r\n\r\n /** Change the center and radius of the sphere. */\r\n public init(center: Point3d, radius: number): void {\r\n this.center = center;\r\n this.radius = radius;\r\n }\r\n\r\n /** Applies the specified transformation matrix to produce a new bounding sphere.\r\n * @param transform The transformation matrix to apply.\r\n * @param result An optional preallocated object to hold the result, to avoid allocating a new object. May be the same object as `this`.\r\n * @returns A bounding sphere equivalent to `this` with the specified transform applied.\r\n */\r\n public transformBy(transform: Transform, result?: BoundingSphere): BoundingSphere {\r\n result = result ?? new BoundingSphere();\r\n transform.multiplyPoint3d(this.center, result.center);\r\n result.radius = this.radius * Math.max(transform.matrix.columnXMagnitude(), Math.max(transform.matrix.columnYMagnitude(), (transform.matrix.columnZMagnitude())));\r\n return result;\r\n }\r\n\r\n /** Apply the specified transform to this bounding sphere. */\r\n public transformInPlace(transform: Transform): void {\r\n this.transformBy(transform, this);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cartographic.js","sourceRoot":"","sources":["../../../src/geometry/Cartographic.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,QAA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C,CAAC,CAAC;aACtH;SACF;IACH,CAAC;IAEM,eAAe,CAAC,KAAwB;QAC7C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO;YAC9B,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,OAAO;gBACpC,IAAI,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC;oBACnC,OAAO,IAAI,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;;;OAOG;IACI,+BAA+B;QACpC,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1G,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { Angle, Constant, Point3d, Range1d, Range2d, Range3d, Transform, Vector3d, XYAndZ, XYZ } from \"@itwin/core-geometry\";\nimport { assert } from \"@itwin/core-bentley\";\n\n// portions adapted from Cesium.js Copyright 2011 - 2017 Cesium Contributors\n\n/** The JSON representation of a Cartographic object.\n * @public\n * @extensions\n **/\nexport interface CartographicProps {\n /** The longitude, specified in radians. */\n longitude: number;\n /** The latitude, specified in radians. */\n latitude: number;\n /** The height, specified in meters above the ellipsoid. */\n height: number;\n}\n\n/** A position on the earth defined by longitude, latitude, and height above the [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) ellipsoid.\n * @public\n */\nexport class Cartographic implements CartographicProps {\n /**\n * @param longitude longitude, in radians.\n * @param latitude latitude, in radians.\n * @param height The height, in meters, above the ellipsoid.\n */\n private constructor(public longitude: number = 0, public latitude: number = 0, public height: number = 0) { }\n\n /** Create a Cartographic object with longitude, latitude, and height of zero. */\n public static createZero() {\n return new Cartographic(0, 0, 0);\n }\n\n /** Create a new Cartographic from longitude and latitude specified in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in radians. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object onto which to store the result.\n */\n public static fromRadians(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\n if (!result)\n return new Cartographic(args.longitude, args.latitude, args.height);\n\n result.longitude = args.longitude;\n result.latitude = args.latitude;\n result.height = args.height !== undefined ? args.height : 0;\n return result;\n }\n\n /** Create a JSON representation of a Cartographic object. */\n public toJSON(): CartographicProps {\n return {\n latitude: this.latitude,\n longitude: this.longitude,\n height: this.height,\n };\n }\n\n /** Freeze this Cartographic */\n public freeze(): Readonly<this> {\n return Object.freeze(this);\n }\n\n /** longitude, in degrees */\n public get longitudeDegrees() {\n return Angle.radiansToDegrees(this.longitude);\n }\n\n /** latitude, in degrees */\n public get latitudeDegrees() {\n return Angle.radiansToDegrees(this.latitude);\n }\n\n private static _oneMinusF = 1 - (Constant.earthRadiusWGS84.equator - Constant.earthRadiusWGS84.polar) / Constant.earthRadiusWGS84.equator;\n private static _equatorOverPolar = Constant.earthRadiusWGS84.equator / Constant.earthRadiusWGS84.polar;\n /** return the geocentric latitude angle for the input geodetic latitude angle (both in radians).\n * @param geodeticLatitude geodetic latitude angle in radians\n */\n public static geocentricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Math.tan(geodeticLatitude));\n }\n /** return the parametric latitude angle for the input geodetic latitude angle (both in radians). The parametric latitude\n * is appropriate for input to the Ellipsoid methods.\n * @param geodeticLatitude geodetic latitude angle in radians\n */\n public static parametricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Cartographic._equatorOverPolar * Math.tan(geodeticLatitude));\n }\n\n /** Create a new Cartographic from longitude and latitude specified in degrees. The values in the resulting object will be in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in degrees. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object onto which to store the result.\n */\n public static fromDegrees(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\n return Cartographic.fromRadians({ longitude: Angle.degreesToRadians(args.longitude), latitude: Angle.degreesToRadians(args.latitude), height: args.height }, result);\n }\n\n /** Create a new Cartographic from longitude and latitude in [Angle]($geometry)s. The values in the resulting object will be in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are Angle objects. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object into which to store the result (optional)\n */\n public static fromAngles(args: { longitude: Angle, latitude: Angle, height?: number }, result?: Cartographic) {\n return Cartographic.fromRadians({ longitude: args.longitude.radians, latitude: args.latitude.radians, height: args.height }, result);\n }\n\n private static _cartesianToCartographicN = new Point3d();\n private static _cartesianToCartographicP = new Point3d();\n private static _cartesianToCartographicH = new Vector3d();\n private static _wgs84OneOverRadii = new Point3d(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.3142451793);\n private static _wgs84OneOverRadiiSquared = new Point3d(1.0 / (6378137.0 * 6378137.0), 1.0 / (6378137.0 * 6378137.0), 1.0 / (6356752.3142451793 * 6356752.3142451793));\n private static _wgs84RadiiSquared = new Point3d(6378137.0 * 6378137.0, 6378137.0 * 6378137.0, 6356752.3142451793 * 6356752.3142451793);\n private static _wgs84CenterToleranceSquared = 0.1;\n private static _scratchN = new Vector3d();\n private static _scratchK = new Vector3d();\n\n /** Creates a new Cartographic from an [ECEF](https://en.wikipedia.org/wiki/ECEF) position.\n * @param cartesian The position, in ECEF, to convert to cartographic representation.\n * @param [result] The object onto which to store the result.\n * @returns The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\n */\n public static fromEcef(cartesian: Point3d, result?: Cartographic): Cartographic | undefined {\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\n const p = Cartographic.scalePointToGeodeticSurface(cartesian, Cartographic._cartesianToCartographicP);\n\n if (!p)\n return undefined;\n\n const n = Cartographic._cartesianToCartographicN;\n Cartographic.multiplyComponents(p, oneOverRadiiSquared, n);\n Cartographic.normalize(n, n);\n\n const h = p.vectorTo(cartesian, Cartographic._cartesianToCartographicH);\n const longitude = Math.atan2(n.y, n.x);\n const latitude = Math.asin(n.z);\n const height = Math.sign(h.dotProduct(cartesian)) * h.magnitude();\n\n if (!result)\n return new Cartographic(longitude, latitude, height);\n\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n }\n\n /** Scale point to geodetic surface\n * @param point in ECEF to scale to the surface\n * @param [result] The object onto which to store the result.\n * @returns a point on the geodetic surface\n */\n public static scalePointToGeodeticSurface(point: Point3d, result?: Point3d): Point3d | undefined {\n const oneOverRadii = Cartographic._wgs84OneOverRadii;\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\n const centerToleranceSquared = Cartographic._wgs84CenterToleranceSquared;\n return Cartographic._scaleToGeodeticSurface(point, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result);\n }\n\n /** Duplicates a Cartographic. */\n public clone(result?: Cartographic): Cartographic {\n if (!result)\n return new Cartographic(this.longitude, this.latitude, this.height);\n\n result.longitude = this.longitude;\n result.latitude = this.latitude;\n result.height = this.height;\n return result;\n }\n\n /** Return true if this Cartographic is the same as right */\n public equals(right: CartographicProps): boolean {\n return (this === right) ||\n ((this.longitude === right.longitude) &&\n (this.latitude === right.latitude) &&\n (this.height === right.height));\n }\n\n /** Compares this Cartographic component-wise and returns true if they are within the provided epsilon, */\n public equalsEpsilon(right: CartographicProps, epsilon: number): boolean {\n return (this === right) ||\n ((Math.abs(this.longitude - right.longitude) <= epsilon) &&\n (Math.abs(this.latitude - right.latitude) <= epsilon) &&\n (Math.abs(this.height - right.height) <= epsilon));\n }\n\n private static normalize(cartesian: XYZ, result: XYZ) {\n const magnitude = cartesian.magnitude();\n result.x = cartesian.x / magnitude;\n result.y = cartesian.y / magnitude;\n result.z = cartesian.z / magnitude;\n }\n\n private static multiplyComponents(left: XYAndZ, right: XYAndZ, result: XYZ) {\n result.x = left.x * right.x;\n result.y = left.y * right.y;\n result.z = left.z * right.z;\n }\n\n private static scalePoint(cartesian: XYAndZ, scalar: number, result: XYZ) {\n result.x = cartesian.x * scalar;\n result.y = cartesian.y * scalar;\n result.z = cartesian.z * scalar;\n }\n\n private static addPoints(left: XYAndZ, right: XYAndZ, result: XYZ) {\n result.x = left.x + right.x;\n result.y = left.y + right.y;\n result.z = left.z + right.z;\n }\n\n /** Create a string representing this cartographic in the format '(longitude, latitude, height)'. */\n public toString(): string { return `(${this.longitude}, ${this.latitude}, ${this.height})`; }\n\n private static _scaleToGeodeticSurfaceIntersection = new Point3d();\n private static _scaleToGeodeticSurfaceGradient = new Point3d();\n private static _scaleToGeodeticSurface(cartesian: Point3d, oneOverRadii: XYAndZ, oneOverRadiiSquared: XYAndZ, centerToleranceSquared: number, result?: Point3d) {\n const positionX = cartesian.x;\n const positionY = cartesian.y;\n const positionZ = cartesian.z;\n\n const oneOverRadiiX = oneOverRadii.x;\n const oneOverRadiiY = oneOverRadii.y;\n const oneOverRadiiZ = oneOverRadii.z;\n\n const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;\n const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;\n const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;\n\n // Compute the squared ellipsoid norm.\n const squaredNorm = x2 + y2 + z2;\n const ratio = Math.sqrt(1.0 / squaredNorm);\n\n // As an initial approximation, assume that the radial intersection is the projection point.\n const intersection = Cartographic._scaleToGeodeticSurfaceIntersection;\n Cartographic.scalePoint(cartesian, ratio, intersection);\n\n // If the position is near the center, the iteration will not converge.\n if (squaredNorm < centerToleranceSquared) {\n return !isFinite(ratio) ? undefined : Point3d.createFrom(intersection, result);\n }\n\n const oneOverRadiiSquaredX = oneOverRadiiSquared.x;\n const oneOverRadiiSquaredY = oneOverRadiiSquared.y;\n const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\n\n // Use the gradient at the intersection point in place of the true unit normal.\n // The difference in magnitude will be absorbed in the multiplier.\n const gradient = Cartographic._scaleToGeodeticSurfaceGradient;\n gradient.x = intersection.x * oneOverRadiiSquaredX * 2.0;\n gradient.y = intersection.y * oneOverRadiiSquaredY * 2.0;\n gradient.z = intersection.z * oneOverRadiiSquaredZ * 2.0;\n\n // Compute the initial guess at the normal vector multiplier, lambda.\n let lambda = (1.0 - ratio) * cartesian.magnitude() / (0.5 * gradient.magnitude());\n let correction = 0.0;\n let func;\n let denominator;\n let xMultiplier;\n let yMultiplier;\n let zMultiplier;\n let xMultiplier2;\n let yMultiplier2;\n let zMultiplier2;\n let xMultiplier3;\n let yMultiplier3;\n let zMultiplier3;\n\n do {\n lambda -= correction;\n\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\n\n xMultiplier2 = xMultiplier * xMultiplier;\n yMultiplier2 = yMultiplier * yMultiplier;\n zMultiplier2 = zMultiplier * zMultiplier;\n\n xMultiplier3 = xMultiplier2 * xMultiplier;\n yMultiplier3 = yMultiplier2 * yMultiplier;\n zMultiplier3 = zMultiplier2 * zMultiplier;\n\n func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\n\n // \"denominator\" here refers to the use of this expression in the velocity and acceleration\n // computations in the sections to follow.\n denominator = x2 * xMultiplier3 * oneOverRadiiSquaredX + y2 * yMultiplier3 * oneOverRadiiSquaredY + z2 * zMultiplier3 * oneOverRadiiSquaredZ;\n\n const derivative = -2.0 * denominator;\n\n correction = func / derivative;\n } while (Math.abs(func) > 0.01);\n\n if (!result)\n return new Point3d(positionX * xMultiplier, positionY * yMultiplier, positionZ * zMultiplier);\n\n result.x = positionX * xMultiplier;\n result.y = positionY * yMultiplier;\n result.z = positionZ * zMultiplier;\n return result;\n }\n\n /** Return an ECEF point from a Cartographic point */\n public toEcef(result?: Point3d): Point3d {\n const cosLatitude = Math.cos(this.latitude);\n const scratchN = Cartographic._scratchN;\n const scratchK = Cartographic._scratchK;\n scratchN.x = cosLatitude * Math.cos(this.longitude);\n scratchN.y = cosLatitude * Math.sin(this.longitude);\n scratchN.z = Math.sin(this.latitude);\n Cartographic.normalize(scratchN, scratchN);\n\n Cartographic.multiplyComponents(Cartographic._wgs84RadiiSquared, scratchN, scratchK);\n const gamma = Math.sqrt(scratchN.dotProduct(scratchK));\n Cartographic.scalePoint(scratchK, 1.0 / gamma, scratchK);\n Cartographic.scalePoint(scratchN, this.height, scratchN);\n\n result = result ? result : new Point3d();\n Cartographic.addPoints(scratchK, scratchN, result);\n return result;\n }\n}\n/** A cartographic range representing a rectangular region if low longitude/latitude > high then area crossing seam is indicated.\n * @public\n */\nexport class CartographicRange {\n private _ranges: Range2d[] = [];\n\n // These following are used to preserve the min/max latitude and longitudes.\n // The longitudes are raw values and may cross over the -PI or 2PI boundaries.\n private _minLongitude = 0;\n private _maxLongitude = 0;\n private _minLatitude = 0;\n private _maxLatitude = 0;\n constructor(spatialRange: Range3d, spatialToEcef: Transform) {\n // Compute 8 corners in spatial coordinate system before converting to ECEF\n // We want a box oriented in the spatial coordinate system and not in the ECEF coordinate system\n const spatialCorners = spatialRange.corners();\n const ecefCorners = spatialToEcef.multiplyPoint3dArray(spatialCorners);\n let low: Cartographic | undefined, high: Cartographic | undefined;\n\n for (const ecefCorner of ecefCorners) {\n const geoPt = Cartographic.fromEcef(ecefCorner);\n if (!geoPt)\n continue;\n if (undefined === low || undefined === high) {\n low = geoPt;\n high = geoPt.clone();\n continue;\n }\n low.latitude = Math.min(low.latitude, geoPt.latitude);\n low.longitude = Math.min(low.longitude, geoPt.longitude);\n high.latitude = Math.max(high.latitude, geoPt.latitude);\n high.longitude = Math.max(high.longitude, geoPt.longitude);\n }\n\n if (!low || !high) {\n assert(false);\n return;\n }\n\n const longitudeRanges = [];\n this._minLongitude = Math.min(low.longitude, high.longitude), this._maxLongitude = Math.max(low.longitude, high.longitude);\n if (this._maxLongitude - this._minLongitude > Angle.piRadians) {\n longitudeRanges.push(Range1d.createXX(0.0, this._minLongitude));\n longitudeRanges.push(Range1d.createXX(this._maxLongitude, Angle.pi2Radians));\n } else {\n longitudeRanges.push(Range1d.createXX(this._minLongitude, this._maxLongitude));\n }\n\n for (const longitudeRange of longitudeRanges) {\n this._minLatitude = Math.min(low.latitude, high.latitude), this._maxLatitude = Math.max(low.latitude, high.latitude);\n if (this._maxLatitude - this._minLatitude > Angle.piOver2Radians) {\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, 0.0, longitudeRange.high, this._minLatitude));\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._maxLatitude, longitudeRange.high, Angle.piRadians));\n } else {\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._minLatitude, longitudeRange.high, this._maxLatitude));\n }\n }\n }\n\n public intersectsRange(other: CartographicRange): boolean {\n for (const range of this._ranges)\n for (const otherRange of other._ranges)\n if (range.intersectsRange(otherRange))\n return true;\n return false;\n }\n\n /** This method returns the raw latitude / longitude for the range in a Range2d object.\n * The X value represents the longitude and the Y value the latitudes.\n * Y values are kept between -PI and +PI while\n * longitude values can be expressed in any range between -2PI to +2PI\n * given the minimum longitude is always smaller numerically than the maximum longitude.\n * Note that usually the longitudes are usually by convention in the range of -PI to PI except\n * for ranges that overlap the -PI/+PI frontier in which case either representation is acceptable.\n */\n public getLongitudeLatitudeBoundingBox(): Range2d {\n return Range2d.createXYXY(this._minLongitude, this._minLatitude, this._maxLongitude, this._maxLatitude);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Cartographic.js","sourceRoot":"","sources":["../../../src/geometry/Cartographic.ts"],"names":[],"mappings":"AAAA;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,YAAY,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;aACtH;SACF;IACH,CAAC;IAEM,eAAe,CAAC,KAAwB;QAC7C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO;YAC9B,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,OAAO;gBACpC,IAAI,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC;oBACnC,OAAO,IAAI,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;;;OAOG;IACI,+BAA+B;QACpC,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1G,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { Angle, Constant, Point3d, Range1d, Range2d, Range3d, Transform, Vector3d, XYAndZ, XYZ } from \"@itwin/core-geometry\";\r\nimport { assert } from \"@itwin/core-bentley\";\r\n\r\n// portions adapted from Cesium.js Copyright 2011 - 2017 Cesium Contributors\r\n\r\n/** The JSON representation of a Cartographic object.\r\n * @public\r\n * @extensions\r\n **/\r\nexport interface CartographicProps {\r\n /** The longitude, specified in radians. */\r\n longitude: number;\r\n /** The latitude, specified in radians. */\r\n latitude: number;\r\n /** The height, specified in meters above the ellipsoid. */\r\n height: number;\r\n}\r\n\r\n/** A position on the earth defined by longitude, latitude, and height above the [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) ellipsoid.\r\n * @public\r\n */\r\nexport class Cartographic implements CartographicProps {\r\n /**\r\n * @param longitude longitude, in radians.\r\n * @param latitude latitude, in radians.\r\n * @param height The height, in meters, above the ellipsoid.\r\n */\r\n private constructor(public longitude: number = 0, public latitude: number = 0, public height: number = 0) { }\r\n\r\n /** Create a Cartographic object with longitude, latitude, and height of zero. */\r\n public static createZero() {\r\n return new Cartographic(0, 0, 0);\r\n }\r\n\r\n /** Create a new Cartographic from longitude and latitude specified in radians.\r\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in radians. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\r\n * @param result The object onto which to store the result.\r\n */\r\n public static fromRadians(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\r\n if (!result)\r\n return new Cartographic(args.longitude, args.latitude, args.height);\r\n\r\n result.longitude = args.longitude;\r\n result.latitude = args.latitude;\r\n result.height = args.height !== undefined ? args.height : 0;\r\n return result;\r\n }\r\n\r\n /** Create a JSON representation of a Cartographic object. */\r\n public toJSON(): CartographicProps {\r\n return {\r\n latitude: this.latitude,\r\n longitude: this.longitude,\r\n height: this.height,\r\n };\r\n }\r\n\r\n /** Freeze this Cartographic */\r\n public freeze(): Readonly<this> {\r\n return Object.freeze(this);\r\n }\r\n\r\n /** longitude, in degrees */\r\n public get longitudeDegrees() {\r\n return Angle.radiansToDegrees(this.longitude);\r\n }\r\n\r\n /** latitude, in degrees */\r\n public get latitudeDegrees() {\r\n return Angle.radiansToDegrees(this.latitude);\r\n }\r\n\r\n private static _oneMinusF = 1 - (Constant.earthRadiusWGS84.equator - Constant.earthRadiusWGS84.polar) / Constant.earthRadiusWGS84.equator;\r\n private static _equatorOverPolar = Constant.earthRadiusWGS84.equator / Constant.earthRadiusWGS84.polar;\r\n /** return the geocentric latitude angle for the input geodetic latitude angle (both in radians).\r\n * @param geodeticLatitude geodetic latitude angle in radians\r\n */\r\n public static geocentricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\r\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Math.tan(geodeticLatitude));\r\n }\r\n /** return the parametric latitude angle for the input geodetic latitude angle (both in radians). The parametric latitude\r\n * is appropriate for input to the Ellipsoid methods.\r\n * @param geodeticLatitude geodetic latitude angle in radians\r\n */\r\n public static parametricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\r\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Cartographic._equatorOverPolar * Math.tan(geodeticLatitude));\r\n }\r\n\r\n /** Create a new Cartographic from longitude and latitude specified in degrees. The values in the resulting object will be in radians.\r\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in degrees. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\r\n * @param result The object onto which to store the result.\r\n */\r\n public static fromDegrees(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\r\n return Cartographic.fromRadians({ longitude: Angle.degreesToRadians(args.longitude), latitude: Angle.degreesToRadians(args.latitude), height: args.height }, result);\r\n }\r\n\r\n /** Create a new Cartographic from longitude and latitude in [Angle]($geometry)s. The values in the resulting object will be in radians.\r\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are Angle objects. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\r\n * @param result The object into which to store the result (optional)\r\n */\r\n public static fromAngles(args: { longitude: Angle, latitude: Angle, height?: number }, result?: Cartographic) {\r\n return Cartographic.fromRadians({ longitude: args.longitude.radians, latitude: args.latitude.radians, height: args.height }, result);\r\n }\r\n\r\n private static _cartesianToCartographicN = new Point3d();\r\n private static _cartesianToCartographicP = new Point3d();\r\n private static _cartesianToCartographicH = new Vector3d();\r\n private static _wgs84OneOverRadii = new Point3d(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.3142451793);\r\n private static _wgs84OneOverRadiiSquared = new Point3d(1.0 / (6378137.0 * 6378137.0), 1.0 / (6378137.0 * 6378137.0), 1.0 / (6356752.3142451793 * 6356752.3142451793));\r\n private static _wgs84RadiiSquared = new Point3d(6378137.0 * 6378137.0, 6378137.0 * 6378137.0, 6356752.3142451793 * 6356752.3142451793);\r\n private static _wgs84CenterToleranceSquared = 0.1;\r\n private static _scratchN = new Vector3d();\r\n private static _scratchK = new Vector3d();\r\n\r\n /** Creates a new Cartographic from an [ECEF](https://en.wikipedia.org/wiki/ECEF) position.\r\n * @param cartesian The position, in ECEF, to convert to cartographic representation.\r\n * @param [result] The object onto which to store the result.\r\n * @returns The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\r\n */\r\n public static fromEcef(cartesian: Point3d, result?: Cartographic): Cartographic | undefined {\r\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\r\n const p = Cartographic.scalePointToGeodeticSurface(cartesian, Cartographic._cartesianToCartographicP);\r\n\r\n if (!p)\r\n return undefined;\r\n\r\n const n = Cartographic._cartesianToCartographicN;\r\n Cartographic.multiplyComponents(p, oneOverRadiiSquared, n);\r\n Cartographic.normalize(n, n);\r\n\r\n const h = p.vectorTo(cartesian, Cartographic._cartesianToCartographicH);\r\n const longitude = Math.atan2(n.y, n.x);\r\n const latitude = Math.asin(n.z);\r\n const height = Math.sign(h.dotProduct(cartesian)) * h.magnitude();\r\n\r\n if (!result)\r\n return new Cartographic(longitude, latitude, height);\r\n\r\n result.longitude = longitude;\r\n result.latitude = latitude;\r\n result.height = height;\r\n return result;\r\n }\r\n\r\n /** Scale point to geodetic surface\r\n * @param point in ECEF to scale to the surface\r\n * @param [result] The object onto which to store the result.\r\n * @returns a point on the geodetic surface\r\n */\r\n public static scalePointToGeodeticSurface(point: Point3d, result?: Point3d): Point3d | undefined {\r\n const oneOverRadii = Cartographic._wgs84OneOverRadii;\r\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\r\n const centerToleranceSquared = Cartographic._wgs84CenterToleranceSquared;\r\n return Cartographic._scaleToGeodeticSurface(point, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result);\r\n }\r\n\r\n /** Duplicates a Cartographic. */\r\n public clone(result?: Cartographic): Cartographic {\r\n if (!result)\r\n return new Cartographic(this.longitude, this.latitude, this.height);\r\n\r\n result.longitude = this.longitude;\r\n result.latitude = this.latitude;\r\n result.height = this.height;\r\n return result;\r\n }\r\n\r\n /** Return true if this Cartographic is the same as right */\r\n public equals(right: CartographicProps): boolean {\r\n return (this === right) ||\r\n ((this.longitude === right.longitude) &&\r\n (this.latitude === right.latitude) &&\r\n (this.height === right.height));\r\n }\r\n\r\n /** Compares this Cartographic component-wise and returns true if they are within the provided epsilon, */\r\n public equalsEpsilon(right: CartographicProps, epsilon: number): boolean {\r\n return (this === right) ||\r\n ((Math.abs(this.longitude - right.longitude) <= epsilon) &&\r\n (Math.abs(this.latitude - right.latitude) <= epsilon) &&\r\n (Math.abs(this.height - right.height) <= epsilon));\r\n }\r\n\r\n private static normalize(cartesian: XYZ, result: XYZ) {\r\n const magnitude = cartesian.magnitude();\r\n result.x = cartesian.x / magnitude;\r\n result.y = cartesian.y / magnitude;\r\n result.z = cartesian.z / magnitude;\r\n }\r\n\r\n private static multiplyComponents(left: XYAndZ, right: XYAndZ, result: XYZ) {\r\n result.x = left.x * right.x;\r\n result.y = left.y * right.y;\r\n result.z = left.z * right.z;\r\n }\r\n\r\n private static scalePoint(cartesian: XYAndZ, scalar: number, result: XYZ) {\r\n result.x = cartesian.x * scalar;\r\n result.y = cartesian.y * scalar;\r\n result.z = cartesian.z * scalar;\r\n }\r\n\r\n private static addPoints(left: XYAndZ, right: XYAndZ, result: XYZ) {\r\n result.x = left.x + right.x;\r\n result.y = left.y + right.y;\r\n result.z = left.z + right.z;\r\n }\r\n\r\n /** Create a string representing this cartographic in the format '(longitude, latitude, height)'. */\r\n public toString(): string { return `(${this.longitude}, ${this.latitude}, ${this.height})`; }\r\n\r\n private static _scaleToGeodeticSurfaceIntersection = new Point3d();\r\n private static _scaleToGeodeticSurfaceGradient = new Point3d();\r\n private static _scaleToGeodeticSurface(cartesian: Point3d, oneOverRadii: XYAndZ, oneOverRadiiSquared: XYAndZ, centerToleranceSquared: number, result?: Point3d) {\r\n const positionX = cartesian.x;\r\n const positionY = cartesian.y;\r\n const positionZ = cartesian.z;\r\n\r\n const oneOverRadiiX = oneOverRadii.x;\r\n const oneOverRadiiY = oneOverRadii.y;\r\n const oneOverRadiiZ = oneOverRadii.z;\r\n\r\n const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;\r\n const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;\r\n const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;\r\n\r\n // Compute the squared ellipsoid norm.\r\n const squaredNorm = x2 + y2 + z2;\r\n const ratio = Math.sqrt(1.0 / squaredNorm);\r\n\r\n // As an initial approximation, assume that the radial intersection is the projection point.\r\n const intersection = Cartographic._scaleToGeodeticSurfaceIntersection;\r\n Cartographic.scalePoint(cartesian, ratio, intersection);\r\n\r\n // If the position is near the center, the iteration will not converge.\r\n if (squaredNorm < centerToleranceSquared) {\r\n return !isFinite(ratio) ? undefined : Point3d.createFrom(intersection, result);\r\n }\r\n\r\n const oneOverRadiiSquaredX = oneOverRadiiSquared.x;\r\n const oneOverRadiiSquaredY = oneOverRadiiSquared.y;\r\n const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\r\n\r\n // Use the gradient at the intersection point in place of the true unit normal.\r\n // The difference in magnitude will be absorbed in the multiplier.\r\n const gradient = Cartographic._scaleToGeodeticSurfaceGradient;\r\n gradient.x = intersection.x * oneOverRadiiSquaredX * 2.0;\r\n gradient.y = intersection.y * oneOverRadiiSquaredY * 2.0;\r\n gradient.z = intersection.z * oneOverRadiiSquaredZ * 2.0;\r\n\r\n // Compute the initial guess at the normal vector multiplier, lambda.\r\n let lambda = (1.0 - ratio) * cartesian.magnitude() / (0.5 * gradient.magnitude());\r\n let correction = 0.0;\r\n let func;\r\n let denominator;\r\n let xMultiplier;\r\n let yMultiplier;\r\n let zMultiplier;\r\n let xMultiplier2;\r\n let yMultiplier2;\r\n let zMultiplier2;\r\n let xMultiplier3;\r\n let yMultiplier3;\r\n let zMultiplier3;\r\n\r\n do {\r\n lambda -= correction;\r\n\r\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\r\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\r\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\r\n\r\n xMultiplier2 = xMultiplier * xMultiplier;\r\n yMultiplier2 = yMultiplier * yMultiplier;\r\n zMultiplier2 = zMultiplier * zMultiplier;\r\n\r\n xMultiplier3 = xMultiplier2 * xMultiplier;\r\n yMultiplier3 = yMultiplier2 * yMultiplier;\r\n zMultiplier3 = zMultiplier2 * zMultiplier;\r\n\r\n func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\r\n\r\n // \"denominator\" here refers to the use of this expression in the velocity and acceleration\r\n // computations in the sections to follow.\r\n denominator = x2 * xMultiplier3 * oneOverRadiiSquaredX + y2 * yMultiplier3 * oneOverRadiiSquaredY + z2 * zMultiplier3 * oneOverRadiiSquaredZ;\r\n\r\n const derivative = -2.0 * denominator;\r\n\r\n correction = func / derivative;\r\n } while (Math.abs(func) > 0.01);\r\n\r\n if (!result)\r\n return new Point3d(positionX * xMultiplier, positionY * yMultiplier, positionZ * zMultiplier);\r\n\r\n result.x = positionX * xMultiplier;\r\n result.y = positionY * yMultiplier;\r\n result.z = positionZ * zMultiplier;\r\n return result;\r\n }\r\n\r\n /** Return an ECEF point from a Cartographic point */\r\n public toEcef(result?: Point3d): Point3d {\r\n const cosLatitude = Math.cos(this.latitude);\r\n const scratchN = Cartographic._scratchN;\r\n const scratchK = Cartographic._scratchK;\r\n scratchN.x = cosLatitude * Math.cos(this.longitude);\r\n scratchN.y = cosLatitude * Math.sin(this.longitude);\r\n scratchN.z = Math.sin(this.latitude);\r\n Cartographic.normalize(scratchN, scratchN);\r\n\r\n Cartographic.multiplyComponents(Cartographic._wgs84RadiiSquared, scratchN, scratchK);\r\n const gamma = Math.sqrt(scratchN.dotProduct(scratchK));\r\n Cartographic.scalePoint(scratchK, 1.0 / gamma, scratchK);\r\n Cartographic.scalePoint(scratchN, this.height, scratchN);\r\n\r\n result = result ? result : new Point3d();\r\n Cartographic.addPoints(scratchK, scratchN, result);\r\n return result;\r\n }\r\n}\r\n/** A cartographic range representing a rectangular region if low longitude/latitude > high then area crossing seam is indicated.\r\n * @public\r\n */\r\nexport class CartographicRange {\r\n private _ranges: Range2d[] = [];\r\n\r\n // These following are used to preserve the min/max latitude and longitudes.\r\n // The longitudes are raw values and may cross over the -PI or 2PI boundaries.\r\n private _minLongitude = 0;\r\n private _maxLongitude = 0;\r\n private _minLatitude = 0;\r\n private _maxLatitude = 0;\r\n constructor(spatialRange: Range3d, spatialToEcef: Transform) {\r\n // Compute 8 corners in spatial coordinate system before converting to ECEF\r\n // We want a box oriented in the spatial coordinate system and not in the ECEF coordinate system\r\n const spatialCorners = spatialRange.corners();\r\n const ecefCorners = spatialToEcef.multiplyPoint3dArray(spatialCorners);\r\n let low: Cartographic | undefined, high: Cartographic | undefined;\r\n\r\n for (const ecefCorner of ecefCorners) {\r\n const geoPt = Cartographic.fromEcef(ecefCorner);\r\n if (!geoPt)\r\n continue;\r\n if (undefined === low || undefined === high) {\r\n low = geoPt;\r\n high = geoPt.clone();\r\n continue;\r\n }\r\n low.latitude = Math.min(low.latitude, geoPt.latitude);\r\n low.longitude = Math.min(low.longitude, geoPt.longitude);\r\n high.latitude = Math.max(high.latitude, geoPt.latitude);\r\n high.longitude = Math.max(high.longitude, geoPt.longitude);\r\n }\r\n\r\n if (!low || !high) {\r\n assert(false);\r\n return;\r\n }\r\n\r\n const longitudeRanges = [];\r\n this._minLongitude = Math.min(low.longitude, high.longitude), this._maxLongitude = Math.max(low.longitude, high.longitude);\r\n if (this._maxLongitude - this._minLongitude > Angle.piRadians) {\r\n longitudeRanges.push(Range1d.createXX(0.0, this._minLongitude));\r\n longitudeRanges.push(Range1d.createXX(this._maxLongitude, Angle.pi2Radians));\r\n } else {\r\n longitudeRanges.push(Range1d.createXX(this._minLongitude, this._maxLongitude));\r\n }\r\n\r\n for (const longitudeRange of longitudeRanges) {\r\n this._minLatitude = Math.min(low.latitude, high.latitude), this._maxLatitude = Math.max(low.latitude, high.latitude);\r\n if (this._maxLatitude - this._minLatitude > Angle.piOver2Radians) {\r\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, 0.0, longitudeRange.high, this._minLatitude));\r\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._maxLatitude, longitudeRange.high, Angle.piRadians));\r\n } else {\r\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._minLatitude, longitudeRange.high, this._maxLatitude));\r\n }\r\n }\r\n }\r\n\r\n public intersectsRange(other: CartographicRange): boolean {\r\n for (const range of this._ranges)\r\n for (const otherRange of other._ranges)\r\n if (range.intersectsRange(otherRange))\r\n return true;\r\n return false;\r\n }\r\n\r\n /** This method returns the raw latitude / longitude for the range in a Range2d object.\r\n * The X value represents the longitude and the Y value the latitudes.\r\n * Y values are kept between -PI and +PI while\r\n * longitude values can be expressed in any range between -2PI to +2PI\r\n * given the minimum longitude is always smaller numerically than the maximum longitude.\r\n * Note that usually the longitudes are usually by convention in the range of -PI to PI except\r\n * for ranges that overlap the -PI/+PI frontier in which case either representation is acceptable.\r\n */\r\n public getLongitudeLatitudeBoundingBox(): Range2d {\r\n return Range2d.createXYXY(this._minLongitude, this._minLatitude, this._maxLongitude, this._maxLatitude);\r\n }\r\n}\r\n"]}
|