@itwin/core-common 5.4.0-dev.7 → 5.5.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -1
- 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/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/CatalogIModel.js.map +1 -1
- package/lib/cjs/CesiumIonAssets.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/ContourDisplay.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/ITwinCoreErrors.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/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.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/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/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/cjs/annotation/TextField.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.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/internal/BackendTypes.js.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
- package/lib/cjs/internal/RenderMesh.js.map +1 -1
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
- package/lib/cjs/internal/Snapping.js.map +1 -1
- package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/cjs/internal/cross-package.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/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/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/CatalogIModel.js.map +1 -1
- package/lib/esm/CesiumIonAssets.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/ContourDisplay.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/ITwinCoreErrors.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/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.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/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/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/esm/annotation/TextField.js.map +1 -1
- package/lib/esm/annotation/TextStyle.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/internal/BackendTypes.js.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
- package/lib/esm/internal/RenderMesh.js.map +1 -1
- package/lib/esm/internal/RenderTextureParams.js.map +1 -1
- package/lib/esm/internal/Snapping.js.map +1 -1
- package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/esm/internal/cross-package.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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextRealityModel.js","sourceRoot":"","sources":["../../src/ContextRealityModel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAsD;AACtD,yDAA+E;AAC/E,qDAAmG;AACnG,mEAAkH;AAClH,+EAAsG;AAatG;;GAEG;AACH,IAAY,mBAyBX;AAzBD,WAAY,mBAAmB;IAC7B;;;;;OAKG;IACH,gDAAyB,CAAA;IACzB;;;;;OAKG;IACH,kDAA2B,CAAA;IAC3B;;;;OAIG;IACH,oDAA6B,CAAA;IAC7B;;OAEG;IACH,w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CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC3D,CAAC;IAEO,4BAA4B,CAAC,QAAqC,EAAE,KAA0B;QACpG,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAEO,sBAAsB,CAAC,SAAkB,EAAE,KAA0B;QAC3E,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;CACF;AAlND,oDAkNC","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\nimport { assert, BeEvent } from \"@itwin/core-bentley\";\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\nimport { PlanarClipMaskMode, PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\nimport { SpatialClassifierProps, SpatialClassifiers, SpatialClassifiersContainer } from \"./SpatialClassification\";\nimport { RealityModelDisplayProps, RealityModelDisplaySettings } from \"./RealityModelDisplaySettings\";\n\n/** JSON representation of the blob properties for an OrbitGt property cloud.\n * @alpha\n */\nexport interface OrbitGtBlobProps {\n rdsUrl?: string;\n containerName: string;\n blobFileName: string;\n sasToken: string;\n accountName: string;\n}\n\n/** Identify the Reality Data service provider\n * @beta\n */\nexport enum RealityDataProvider {\n /**\n * This is the legacy mode where the access to the 3d tiles is hardcoded in ContextRealityModelProps.tilesetUrl property.\n * It was used to support RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\n * You should use other modes when possible\n * @see [[RealityDataSource.createKeyFromUrl]] that will try to detect provider from an URL\n */\n TilesetUrl = \"TilesetUrl\",\n /**\n * This is the legacy mode where the access to the 3d tiles is hardcoded in ContextRealityModelProps.OrbitGtBlob property.\n * It was used to support OrbitPointCloud (OPC) from other server than ContextShare\n * You should use other modes when possible\n * @see [[RealityDataSource.createKeyFromOrbitGtBlobProps]] that will try to detect provider from an URL\n */\n OrbitGtBlob = \"OrbitGtBlob\",\n /**\n * Will provide access url from realityDataId and iTwinId on contextShare for 3dTile storage format or OPC storage format\n * This provider supports all types of 3dTile storage format and OrbitPointCloud: RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles, OPC\n * @see [[RealityDataFormat]].\n */\n ContextShare = \"ContextShare\",\n /**\n * Will provide Open Street Map Building (OSM) from Cesium Ion (in 3dTile format)\n */\n CesiumIonAsset = \"CesiumIonAsset\",\n}\n\n/** Identify the Reality Data storage format\n * @beta\n */\nexport enum RealityDataFormat {\n /**\n * 3dTile supported formats; RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\n * */\n ThreeDTile = \"ThreeDTile\",\n /**\n * Orbit Point Cloud (OPC) storage format (RealityDataType.OPC)\n */\n OPC = \"OPC\",\n}\n\n/** Utility function for RealityDataFormat\n * @beta\n */\nexport namespace RealityDataFormat {\n /**\n * Try to extract the RealityDataFormat from the url\n * @param tilesetUrl the reality data attachment url\n * @returns the extracted RealityDataFormat or ThreeDTile by default if not found\n */\n export function fromUrl(tilesetUrl: string): RealityDataFormat {\n let format = RealityDataFormat.ThreeDTile;\n if (tilesetUrl.includes(\".opc\"))\n format = RealityDataFormat.OPC;\n return format;\n }\n}\n\n/**\n * Key used by RealityDataSource to identify provider and reality data format\n * This key identify one and only one reality data source on the provider\n * @beta\n */\nexport interface RealityDataSourceKey {\n /**\n * The provider that supplies the access to reality data source for displaying the reality model\n * @see [[RealityDataProvider]] for default supported value;\n */\n provider: string;\n /**\n * The format used by the provider to store the reality data\n * @see [[RealityDataFormat]] for default supported value;\n */\n format: string;\n /** The reality data id that identify a reality data for the provider */\n id: string;\n /** The context id that was used when reality data was attached - if none provided, current session iTwinId will be used */\n iTwinId?: string;\n}\n/**\n * RealityDataSourceKey utility functions\n * @beta */\nexport namespace RealityDataSourceKey {\n /** Utility function to convert a RealityDataSourceKey into its string representation */\n export function convertToString(rdSourceKey: RealityDataSourceKey): string {\n return `${rdSourceKey.provider}:${rdSourceKey.format}:${rdSourceKey.id}:${rdSourceKey?.iTwinId}`;\n }\n /** Utility function to compare two RealityDataSourceKey, we consider it equal even if itwinId is different */\n export function isEqual(key1: RealityDataSourceKey, key2: RealityDataSourceKey): boolean {\n if ((key1.provider === RealityDataProvider.CesiumIonAsset) && key2.provider === RealityDataProvider.CesiumIonAsset)\n return true; // ignore other properties for CesiumIonAsset, id is hidden\n if ((key1.provider === key2.provider) && (key1.format === key2.format) && (key1.id === key2.id)) {\n // && (key1?.iTwinId === key2?.iTwinId)) -> ignore iTwinId, consider it is the same reality data\n return true;\n }\n return false;\n }\n}\n\n/** JSON representation of the reality data reference attachment properties.\n * @beta\n*/\nexport interface RealityDataSourceProps {\n /** The source key that identify a reality data for the provider. */\n sourceKey: RealityDataSourceKey;\n}\n\n/** JSON representation of a [[ContextRealityModel]].\n * @public\n * @extensions\n */\nexport interface ContextRealityModelProps {\n /** See [[ContextRealityModel.rdSourceKey]].\n * @beta\n */\n rdSourceKey?: RealityDataSourceKey;\n /** The URL that supplies the 3d tiles for displaying the reality model. */\n tilesetUrl: string;\n /** See [[ContextRealityModel.orbitGtBlob]].\n * @alpha\n */\n orbitGtBlob?: OrbitGtBlobProps;\n /** See [[ContextRealityModel.realityDataId]]. */\n realityDataId?: string;\n /** An optional, user-friendly name for the reality model suitable for display in a user interface. */\n name?: string;\n /** An optional, user-friendly description of the reality model suitable for display in a user interface. */\n description?: string;\n /** See [[ContextRealityModel.classifiers]]. */\n classifiers?: SpatialClassifierProps[];\n /** See [[ContextRealityModel.planarClipMask]]. */\n planarClipMask?: PlanarClipMaskProps;\n /** See [[ContextRealityModel.appearanceOverrides]]. */\n appearanceOverrides?: FeatureAppearanceProps;\n /** See [[ContextRealityModel.displaySettings]].\n * @beta\n */\n displaySettings?: RealityModelDisplayProps;\n /** See [[ContextRealityModel.invisible]].\n * @beta\n */\n invisible?: boolean;\n}\n\n/** @public */\nexport namespace ContextRealityModelProps {\n /** Produce a deep copy of `input`. */\n export function clone(input: ContextRealityModelProps): ContextRealityModelProps {\n // Spread operator is shallow, and includes `undefined` properties and empty strings.\n // We want to make deep copies, omit undefined properties and empty strings, and require tilesetUrl to be defined.\n const output: ContextRealityModelProps = { tilesetUrl: input.tilesetUrl ?? \"\" };\n\n if (input.rdSourceKey)\n output.rdSourceKey = { ...input.rdSourceKey };\n\n if (input.name)\n output.name = input.name;\n\n if (input.realityDataId)\n output.realityDataId = input.realityDataId;\n\n if (input.description)\n output.description = input.description;\n\n if (input.orbitGtBlob)\n output.orbitGtBlob = { ...input.orbitGtBlob };\n\n if (input.appearanceOverrides) {\n output.appearanceOverrides = { ...input.appearanceOverrides };\n if (input.appearanceOverrides.rgb)\n output.appearanceOverrides.rgb = { ...input.appearanceOverrides.rgb };\n }\n\n if (input.displaySettings) {\n output.displaySettings = { ...input.displaySettings };\n if (input.displaySettings.pointCloud)\n output.displaySettings.pointCloud = { ...output.displaySettings.pointCloud };\n }\n\n if (input.planarClipMask)\n output.planarClipMask = { ...input.planarClipMask };\n\n if (input.classifiers)\n output.classifiers = input.classifiers.map((x) => { return { ...x, flags: { ...x.flags } }; });\n\n if (input.invisible)\n output.invisible = input.invisible;\n\n return output;\n }\n}\n\n/** A reality model not associated with a [GeometricModel]($backend) but instead defined in a [DisplayStyle]($backend) or [DisplayStyleState]($frontend).\n * Such reality models are displayed to provide context to the view and can be freely attached and detached at display time.\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\n * @see [[DisplayStyleSettings.contextRealityModels]] to define context reality models for a display style.\n * @public\n */\nexport class ContextRealityModel {\n /** @internal */\n protected readonly _props: ContextRealityModelProps;\n /**\n * The reality data source key identify the reality data provider and storage format.\n * It takes precedence over tilesetUrl and orbitGtBlob when present and can be use to actually replace these properties.\n * @beta\n */\n public readonly rdSourceKey?: RealityDataSourceKey;\n /** A name suitable for display in a user interface. By default, an empty string. */\n public readonly name: string;\n /** The URL that supplies the 3d tiles for displaying the reality model. */\n public readonly url: string;\n /** A description of the model suitable for display in a user interface. By default, an empty string. */\n public readonly description: string;\n /** An optional identifier that, if present, can be used to elide a request to the reality data service. */\n public readonly realityDataId?: string;\n\n private _invisible: boolean;\n private readonly _classifiers: SpatialClassifiers;\n /** @alpha */\n public readonly orbitGtBlob?: Readonly<OrbitGtBlobProps>;\n protected _appearanceOverrides?: FeatureAppearance;\n /** @beta */\n protected _displaySettings: RealityModelDisplaySettings;\n protected _planarClipMask?: PlanarClipMaskSettings;\n /** Event dispatched just before assignment to [[planarClipMaskSettings]]. */\n public readonly onPlanarClipMaskChanged = new BeEvent<(newSettings: PlanarClipMaskSettings | undefined, model: ContextRealityModel) => void>();\n /** Event dispatched just before assignment to [[appearanceOverrides]]. */\n public readonly onAppearanceOverridesChanged = new BeEvent<(newOverrides: FeatureAppearance | undefined, model: ContextRealityModel) => void>();\n /** Event dispatched just before assignment to [[displaySettings]].\n * @beta\n */\n public readonly onDisplaySettingsChanged = new BeEvent<(newSettings: RealityModelDisplaySettings, model: ContextRealityModel) => void>();\n /** Event dispatched just before a model become invisible\n * @beta\n */\n public readonly onInvisibleChanged = new BeEvent<(invisible: boolean, model: ContextRealityModel) => void>();\n\n /** Construct a new context reality model.\n * @param props JSON representation of the reality model, which will be kept in sync with changes made via the ContextRealityModel's methods.\n * @param options Options to customize how the reality model is created.\n */\n public constructor(props: ContextRealityModelProps, options?: { createClassifiers: (container: SpatialClassifiersContainer) => SpatialClassifiers }) {\n this._props = props;\n this.rdSourceKey = props.rdSourceKey;\n this.name = props.name ?? \"\";\n this.url = props.tilesetUrl ?? \"\";\n this.orbitGtBlob = props.orbitGtBlob;\n this.realityDataId = props.realityDataId;\n this.description = props.description ?? \"\";\n this._invisible = props.invisible ?? false;\n this._appearanceOverrides = props.appearanceOverrides ? FeatureAppearance.fromJSON(props.appearanceOverrides) : undefined;\n this._displaySettings = RealityModelDisplaySettings.fromJSON(props.displaySettings);\n\n if (props.planarClipMask && props.planarClipMask.mode !== PlanarClipMaskMode.None)\n this._planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\n\n if (options?.createClassifiers) {\n this._classifiers = options.createClassifiers(props);\n } else {\n this._classifiers = new SpatialClassifiers(props);\n }\n }\n\n /** A set of [[SpatialClassifier]]s, of which one at any given time can be used to classify the reality model. */\n public get classifiers(): SpatialClassifiers {\n return this._classifiers;\n }\n\n /** Optionally describes how the geometry of the reality model can be masked by other models. */\n public get planarClipMaskSettings(): PlanarClipMaskSettings | undefined {\n return this._planarClipMask;\n }\n public set planarClipMaskSettings(settings: PlanarClipMaskSettings | undefined) {\n this.onPlanarClipMaskChanged.raiseEvent(settings, this);\n if (!settings)\n delete this._props.planarClipMask;\n else\n this._props.planarClipMask = settings.toJSON();\n\n this._planarClipMask = settings;\n }\n\n /** Overrides applied to the appearance of the reality model. Only the rgb, transparency, nonLocatable, and emphasized properties are applicable - the rest are ignored. */\n public get appearanceOverrides(): FeatureAppearance | undefined {\n return this._appearanceOverrides;\n }\n public set appearanceOverrides(overrides: FeatureAppearance | undefined) {\n this.onAppearanceOverridesChanged.raiseEvent(overrides, this);\n if (!overrides)\n delete this._props.appearanceOverrides;\n else\n this._props.appearanceOverrides = overrides.toJSON();\n\n this._appearanceOverrides = overrides;\n }\n\n /** Settings controlling how this reality model is displayed in a [Viewport]($frontend).\n * @beta\n */\n public get displaySettings(): RealityModelDisplaySettings {\n return this._displaySettings;\n }\n public set displaySettings(settings: RealityModelDisplaySettings) {\n this.onDisplaySettingsChanged.raiseEvent(settings, this);\n this._props.displaySettings = settings.toJSON();\n this._displaySettings = settings;\n }\n\n /** If true, reality model is not drawn.\n * @beta\n */\n public get invisible(): boolean {\n return this._invisible;\n }\n public set invisible(invisible: boolean) {\n if (invisible !== this.invisible) {\n this.onInvisibleChanged.raiseEvent(invisible, this);\n }\n\n this._props.invisible = invisible;\n this._invisible = invisible;\n }\n\n /** Convert this model to its JSON representation. */\n public toJSON(): ContextRealityModelProps {\n return ContextRealityModelProps.clone(this._props);\n }\n\n /** Returns true if [[name]] and [[url]] match the specified name and url. */\n public matchesNameAndUrl(name: string, url: string): boolean {\n return this.name === name && this.url === url;\n }\n}\n\n/** An object that can store the JSON representation of a list of [[ContextRealityModel]]s.\n * @see [[ContextRealityModels]].\n * @see [[DisplayStyleSettingsProps.contextRealityModels]].\n * @public\n * @extensions\n */\nexport interface ContextRealityModelsContainer {\n /** The list of reality models. */\n contextRealityModels?: ContextRealityModelProps[];\n /** @internal used for type discrimination with ContextRealityModelsArgs. */\n container?: never;\n}\n\n/** Arguments supplied to the constructor of [[ContextRealityModels]].\n * @public\n */\nexport interface ContextRealityModelsArgs {\n /** The object that holds the JSON representation of the list of context reality models. */\n container: ContextRealityModelsContainer;\n /** Optional function used to instantiate each [[ContextRealityModel]] in the list. */\n createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel;\n /** If true, the list will not be populated by the constructor. Instead, the caller is responsible for calling [[ContextRealityModels.populate]] exactly once after construction.\n * This is chiefly intended for use internally by the [DisplayStyleState]($frontend) constructor.\n */\n deferPopulating?: boolean;\n}\n\n/** A list of [[ContextRealityModel]]s attached to a [[DisplayStyleSettings]]. The list may be presented to the user with the name and description of each model.\n * The list is automatically synchronized with the underlying JSON representation provided by the input [[ContextRealityModelsContainer]].\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\n * @see [[DisplayStyleSettings.contextRealityModels]].\n * @public\n */\nexport class ContextRealityModels {\n private readonly _container: ContextRealityModelsContainer;\n private readonly _createModel: (props: ContextRealityModelProps) => ContextRealityModel;\n private readonly _models: ContextRealityModel[] = [];\n /** Event dispatched just before [[ContextRealityModel.planarClipMaskSettings]] is modified for one of the reality models. */\n public readonly onPlanarClipMaskChanged = new BeEvent<(model: ContextRealityModel, newSettings: PlanarClipMaskSettings | undefined) => void>();\n /** Event dispatched just before [[ContextRealityModel.appearanceOverrides]] is modified for one of the reality models. */\n public readonly onAppearanceOverridesChanged = new BeEvent<(model: ContextRealityModel, newOverrides: FeatureAppearance | undefined) => void>();\n /** Event dispatched just before [[ContextRealityModel.displaySettings]] is modified for one of the reality models.\n * @beta\n */\n public readonly onDisplaySettingsChanged = new BeEvent<(model: ContextRealityModel, newSettings: RealityModelDisplaySettings) => void>();\n /** Event dispatched just before [[ContextRealityModel.invisible]] is modified for one of the reality models.\n * @beta\n */\n public readonly onInvisibleChanged = new BeEvent<(model: ContextRealityModel, invisible: boolean) => void>();\n /** Event dispatched when a model is [[add]]ed, [[delete]]d, [[replace]]d, or [[update]]d. */\n public readonly onChanged = new BeEvent<(previousModel: ContextRealityModel | undefined, newModel: ContextRealityModel | undefined) => void>();\n\n /** Construct a new list of reality models from its JSON representation. The list will be initialized from `container.contextRealityModels` and that JSON representation\n * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list\n * to become out of sync with the JSON representation.\n * @param container The object that holds the JSON representation of the list.\n * @param createContextRealityModel Optional function used to instantiate each [[ContextRealityModel]] in the list.\n */\n public constructor(container: ContextRealityModelsContainer, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel);\n\n /** Construct a new list of reality models from its JSON representation. The list will be initialized from `args.container.contextRealityModels` and that JSON representation\n * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list\n * to become out of sync with the JSON representation.\n * @param args Specifies the container and optionally customizes how the list of models is populated.\n */\n public constructor(args: ContextRealityModelsArgs);\n\n /** @internal */\n public constructor(arg0: ContextRealityModelsContainer | ContextRealityModelsArgs, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel) {\n let container: ContextRealityModelsContainer;\n let defer = false;\n if (arg0.container) {\n container = arg0.container;\n createContextRealityModel = arg0.createContextRealityModel;\n defer = true === arg0.deferPopulating;\n } else {\n container = arg0;\n }\n\n this._container = container;\n this._createModel = createContextRealityModel ?? ((props) => new ContextRealityModel(props));\n\n if (!defer)\n this.populate();\n }\n\n /** @internal needs to be invoked after DisplayStyleSettings constructor by DisplayStyleState constructor.*/\n /** Populate the list of [[models]] from the container that was supplied to the constructor.\n * This should only be invoked once, and only if [[ContextRealityModelsArgs.deferPopulating]] was specified as `true` when calling the constructor.\n * @public\n */\n public populate(): void {\n assert(this._models.length === 0, \"do not call ContextRealityModels.populate more than once\");\n const models = this._container.contextRealityModels;\n if (models)\n for (const model of models)\n this._models.push(this.createModel(model));\n }\n\n /** The read-only list of reality models. */\n public get models(): ReadonlyArray<ContextRealityModel> {\n return this._models;\n }\n\n /** Append a new reality model to the list.\n * @param The JSON representation of the reality model.\n * @returns the newly-added reality model.\n */\n public add(props: ContextRealityModelProps): ContextRealityModel {\n if (!this._container.contextRealityModels)\n this._container.contextRealityModels = [];\n\n props = ContextRealityModelProps.clone(props);\n const model = this.createModel(props);\n\n this.onChanged.raiseEvent(undefined, model);\n\n this._models.push(model);\n this._container.contextRealityModels.push(props);\n\n return model;\n }\n\n /** Remove the specified reality model from the list.\n * @param model The reality model to remove.\n * @returns true if the model was removed, or false if the model was not present in the list.\n */\n public delete(model: ContextRealityModel): boolean {\n const index = this._models.indexOf(model);\n if (-1 === index)\n return false;\n\n assert(undefined !== this._container.contextRealityModels);\n assert(index < this._container.contextRealityModels.length);\n\n this.dropEventListeners(model);\n this.onChanged.raiseEvent(model, undefined);\n\n this._models.splice(index, 1);\n if (this.models.length === 0)\n this._container.contextRealityModels = undefined;\n else\n this._container.contextRealityModels.splice(index, 1);\n\n return true;\n }\n\n /** Remove all reality models from the list. */\n public clear(): void {\n for (const model of this.models) {\n this.dropEventListeners(model);\n this.onChanged.raiseEvent(model, undefined);\n }\n\n this._container.contextRealityModels = undefined;\n this._models.length = 0;\n }\n\n /** Replace a reality model in the list.\n * @param toReplace The reality model to be replaced.\n * @param replaceWith The JSON representation of the replacement reality model.\n * @returns the newly-created reality model that replaced `toReplace`.\n * @throws Error if `toReplace` is not present in the list\n * @note The replacement occupies the same index in the list as `toReplace` did.\n */\n public replace(toReplace: ContextRealityModel, replaceWith: ContextRealityModelProps): ContextRealityModel {\n const index = this._models.indexOf(toReplace);\n if (-1 === index)\n throw new Error(\"ContextRealityModel not present in list.\");\n\n assert(undefined !== this._container.contextRealityModels);\n assert(index < this._container.contextRealityModels.length);\n\n replaceWith = ContextRealityModelProps.clone(replaceWith);\n const model = this.createModel(replaceWith);\n\n this.onChanged.raiseEvent(toReplace, model);\n this.dropEventListeners(toReplace);\n\n this._models[index] = model;\n this._container.contextRealityModels[index] = replaceWith;\n\n return model;\n }\n\n /** Change selected properties of a reality model.\n * @param toUpdate The reality model whose properties are to be modified.\n * @param updateProps The properties to change.\n * @returns The updated reality model, identical to `toUpdate` except for properties explicitly supplied by `updateProps`.\n * @throws Error if `toUpdate` is not present in the list.\n */\n public update(toUpdate: ContextRealityModel, updateProps: Partial<ContextRealityModelProps>): ContextRealityModel {\n const props = {\n ...toUpdate.toJSON(),\n ...updateProps,\n };\n\n // Partial<> makes it possible to pass `undefined` for tilesetUrl...preserve previous URL in that case.\n if (undefined === props.tilesetUrl)\n props.tilesetUrl = toUpdate.url;\n\n return this.replace(toUpdate, props);\n }\n\n private createModel(props: ContextRealityModelProps): ContextRealityModel {\n const model = this._createModel(props);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onPlanarClipMaskChanged.addListener(this.handlePlanarClipMaskChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onAppearanceOverridesChanged.addListener(this.handleAppearanceOverridesChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onDisplaySettingsChanged.addListener(this.handleDisplaySettingsChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onInvisibleChanged.addListener(this.handleInvisibleChanged, this);\n return model;\n }\n\n private dropEventListeners(model: ContextRealityModel): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onPlanarClipMaskChanged.removeListener(this.handlePlanarClipMaskChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onAppearanceOverridesChanged.removeListener(this.handleAppearanceOverridesChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onDisplaySettingsChanged.removeListener(this.handleDisplaySettingsChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onInvisibleChanged.removeListener(this.handleInvisibleChanged, this);\n }\n\n private handlePlanarClipMaskChanged(mask: PlanarClipMaskSettings | undefined, model: ContextRealityModel): void {\n this.onPlanarClipMaskChanged.raiseEvent(model, mask);\n }\n\n private handleAppearanceOverridesChanged(app: FeatureAppearance | undefined, model: ContextRealityModel): void {\n this.onAppearanceOverridesChanged.raiseEvent(model, app);\n }\n\n private handleDisplaySettingsChanged(settings: RealityModelDisplaySettings, model: ContextRealityModel): void {\n this.onDisplaySettingsChanged.raiseEvent(model, settings);\n }\n\n private handleInvisibleChanged(invisible: boolean, model: ContextRealityModel): void {\n this.onInvisibleChanged.raiseEvent(model, invisible);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ContextRealityModel.js","sourceRoot":"","sources":["../../src/ContextRealityModel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAsD;AACtD,yDAA+E;AAC/E,qDAAmG;AACnG,mEAAkH;AAClH,+EAAsG;AAatG;;GAEG;AACH,IAAY,mBAyBX;AAzBD,WAAY,mBAAmB;IAC7B;;;;;OAKG;IACH,gDAAyB,CAAA;IACzB;;;;;OAKG;IACH,kDAA2B,CAAA;IAC3B;;;;OAIG;IACH,oDAA6B,CAAA;IAC7B;;OAEG;IACH,wDAAiC,CAAA;AACnC,CAAC,EAzBW,mBAAmB,mCAAnB,mBAAmB,QAyB9B;AAED;;GAEG;AACH,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B;;SAEK;IACL,8CAAyB,CAAA;IACzB;;MAEE;IACF,gCAAW,CAAA;AACb,CAAC,EATW,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O,sBAAsB,CAAC,SAAkB,EAAE,KAA0B;QAC3E,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;CACF;AAlND,oDAkNC","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\nimport { assert, BeEvent } from \"@itwin/core-bentley\";\r\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\r\nimport { PlanarClipMaskMode, PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\r\nimport { SpatialClassifierProps, SpatialClassifiers, SpatialClassifiersContainer } from \"./SpatialClassification\";\r\nimport { RealityModelDisplayProps, RealityModelDisplaySettings } from \"./RealityModelDisplaySettings\";\r\n\r\n/** JSON representation of the blob properties for an OrbitGt property cloud.\r\n * @alpha\r\n */\r\nexport interface OrbitGtBlobProps {\r\n rdsUrl?: string;\r\n containerName: string;\r\n blobFileName: string;\r\n sasToken: string;\r\n accountName: string;\r\n}\r\n\r\n/** Identify the Reality Data service provider\r\n * @beta\r\n */\r\nexport enum RealityDataProvider {\r\n /**\r\n * This is the legacy mode where the access to the 3d tiles is hardcoded in ContextRealityModelProps.tilesetUrl property.\r\n * It was used to support RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\r\n * You should use other modes when possible\r\n * @see [[RealityDataSource.createKeyFromUrl]] that will try to detect provider from an URL\r\n */\r\n TilesetUrl = \"TilesetUrl\",\r\n /**\r\n * This is the legacy mode where the access to the 3d tiles is hardcoded in ContextRealityModelProps.OrbitGtBlob property.\r\n * It was used to support OrbitPointCloud (OPC) from other server than ContextShare\r\n * You should use other modes when possible\r\n * @see [[RealityDataSource.createKeyFromOrbitGtBlobProps]] that will try to detect provider from an URL\r\n */\r\n OrbitGtBlob = \"OrbitGtBlob\",\r\n /**\r\n * Will provide access url from realityDataId and iTwinId on contextShare for 3dTile storage format or OPC storage format\r\n * This provider supports all types of 3dTile storage format and OrbitPointCloud: RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles, OPC\r\n * @see [[RealityDataFormat]].\r\n */\r\n ContextShare = \"ContextShare\",\r\n /**\r\n * Will provide Open Street Map Building (OSM) from Cesium Ion (in 3dTile format)\r\n */\r\n CesiumIonAsset = \"CesiumIonAsset\",\r\n}\r\n\r\n/** Identify the Reality Data storage format\r\n * @beta\r\n */\r\nexport enum RealityDataFormat {\r\n /**\r\n * 3dTile supported formats; RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\r\n * */\r\n ThreeDTile = \"ThreeDTile\",\r\n /**\r\n * Orbit Point Cloud (OPC) storage format (RealityDataType.OPC)\r\n */\r\n OPC = \"OPC\",\r\n}\r\n\r\n/** Utility function for RealityDataFormat\r\n * @beta\r\n */\r\nexport namespace RealityDataFormat {\r\n /**\r\n * Try to extract the RealityDataFormat from the url\r\n * @param tilesetUrl the reality data attachment url\r\n * @returns the extracted RealityDataFormat or ThreeDTile by default if not found\r\n */\r\n export function fromUrl(tilesetUrl: string): RealityDataFormat {\r\n let format = RealityDataFormat.ThreeDTile;\r\n if (tilesetUrl.includes(\".opc\"))\r\n format = RealityDataFormat.OPC;\r\n return format;\r\n }\r\n}\r\n\r\n/**\r\n * Key used by RealityDataSource to identify provider and reality data format\r\n * This key identify one and only one reality data source on the provider\r\n * @beta\r\n */\r\nexport interface RealityDataSourceKey {\r\n /**\r\n * The provider that supplies the access to reality data source for displaying the reality model\r\n * @see [[RealityDataProvider]] for default supported value;\r\n */\r\n provider: string;\r\n /**\r\n * The format used by the provider to store the reality data\r\n * @see [[RealityDataFormat]] for default supported value;\r\n */\r\n format: string;\r\n /** The reality data id that identify a reality data for the provider */\r\n id: string;\r\n /** The context id that was used when reality data was attached - if none provided, current session iTwinId will be used */\r\n iTwinId?: string;\r\n}\r\n/**\r\n * RealityDataSourceKey utility functions\r\n * @beta */\r\nexport namespace RealityDataSourceKey {\r\n /** Utility function to convert a RealityDataSourceKey into its string representation */\r\n export function convertToString(rdSourceKey: RealityDataSourceKey): string {\r\n return `${rdSourceKey.provider}:${rdSourceKey.format}:${rdSourceKey.id}:${rdSourceKey?.iTwinId}`;\r\n }\r\n /** Utility function to compare two RealityDataSourceKey, we consider it equal even if itwinId is different */\r\n export function isEqual(key1: RealityDataSourceKey, key2: RealityDataSourceKey): boolean {\r\n if ((key1.provider === RealityDataProvider.CesiumIonAsset) && key2.provider === RealityDataProvider.CesiumIonAsset)\r\n return true; // ignore other properties for CesiumIonAsset, id is hidden\r\n if ((key1.provider === key2.provider) && (key1.format === key2.format) && (key1.id === key2.id)) {\r\n // && (key1?.iTwinId === key2?.iTwinId)) -> ignore iTwinId, consider it is the same reality data\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n/** JSON representation of the reality data reference attachment properties.\r\n * @beta\r\n*/\r\nexport interface RealityDataSourceProps {\r\n /** The source key that identify a reality data for the provider. */\r\n sourceKey: RealityDataSourceKey;\r\n}\r\n\r\n/** JSON representation of a [[ContextRealityModel]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ContextRealityModelProps {\r\n /** See [[ContextRealityModel.rdSourceKey]].\r\n * @beta\r\n */\r\n rdSourceKey?: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n tilesetUrl: string;\r\n /** See [[ContextRealityModel.orbitGtBlob]].\r\n * @alpha\r\n */\r\n orbitGtBlob?: OrbitGtBlobProps;\r\n /** See [[ContextRealityModel.realityDataId]]. */\r\n realityDataId?: string;\r\n /** An optional, user-friendly name for the reality model suitable for display in a user interface. */\r\n name?: string;\r\n /** An optional, user-friendly description of the reality model suitable for display in a user interface. */\r\n description?: string;\r\n /** See [[ContextRealityModel.classifiers]]. */\r\n classifiers?: SpatialClassifierProps[];\r\n /** See [[ContextRealityModel.planarClipMask]]. */\r\n planarClipMask?: PlanarClipMaskProps;\r\n /** See [[ContextRealityModel.appearanceOverrides]]. */\r\n appearanceOverrides?: FeatureAppearanceProps;\r\n /** See [[ContextRealityModel.displaySettings]].\r\n * @beta\r\n */\r\n displaySettings?: RealityModelDisplayProps;\r\n /** See [[ContextRealityModel.invisible]].\r\n * @beta\r\n */\r\n invisible?: boolean;\r\n}\r\n\r\n/** @public */\r\nexport namespace ContextRealityModelProps {\r\n /** Produce a deep copy of `input`. */\r\n export function clone(input: ContextRealityModelProps): ContextRealityModelProps {\r\n // Spread operator is shallow, and includes `undefined` properties and empty strings.\r\n // We want to make deep copies, omit undefined properties and empty strings, and require tilesetUrl to be defined.\r\n const output: ContextRealityModelProps = { tilesetUrl: input.tilesetUrl ?? \"\" };\r\n\r\n if (input.rdSourceKey)\r\n output.rdSourceKey = { ...input.rdSourceKey };\r\n\r\n if (input.name)\r\n output.name = input.name;\r\n\r\n if (input.realityDataId)\r\n output.realityDataId = input.realityDataId;\r\n\r\n if (input.description)\r\n output.description = input.description;\r\n\r\n if (input.orbitGtBlob)\r\n output.orbitGtBlob = { ...input.orbitGtBlob };\r\n\r\n if (input.appearanceOverrides) {\r\n output.appearanceOverrides = { ...input.appearanceOverrides };\r\n if (input.appearanceOverrides.rgb)\r\n output.appearanceOverrides.rgb = { ...input.appearanceOverrides.rgb };\r\n }\r\n\r\n if (input.displaySettings) {\r\n output.displaySettings = { ...input.displaySettings };\r\n if (input.displaySettings.pointCloud)\r\n output.displaySettings.pointCloud = { ...output.displaySettings.pointCloud };\r\n }\r\n\r\n if (input.planarClipMask)\r\n output.planarClipMask = { ...input.planarClipMask };\r\n\r\n if (input.classifiers)\r\n output.classifiers = input.classifiers.map((x) => { return { ...x, flags: { ...x.flags } }; });\r\n\r\n if (input.invisible)\r\n output.invisible = input.invisible;\r\n\r\n return output;\r\n }\r\n}\r\n\r\n/** A reality model not associated with a [GeometricModel]($backend) but instead defined in a [DisplayStyle]($backend) or [DisplayStyleState]($frontend).\r\n * Such reality models are displayed to provide context to the view and can be freely attached and detached at display time.\r\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\r\n * @see [[DisplayStyleSettings.contextRealityModels]] to define context reality models for a display style.\r\n * @public\r\n */\r\nexport class ContextRealityModel {\r\n /** @internal */\r\n protected readonly _props: ContextRealityModelProps;\r\n /**\r\n * The reality data source key identify the reality data provider and storage format.\r\n * It takes precedence over tilesetUrl and orbitGtBlob when present and can be use to actually replace these properties.\r\n * @beta\r\n */\r\n public readonly rdSourceKey?: RealityDataSourceKey;\r\n /** A name suitable for display in a user interface. By default, an empty string. */\r\n public readonly name: string;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n public readonly url: string;\r\n /** A description of the model suitable for display in a user interface. By default, an empty string. */\r\n public readonly description: string;\r\n /** An optional identifier that, if present, can be used to elide a request to the reality data service. */\r\n public readonly realityDataId?: string;\r\n\r\n private _invisible: boolean;\r\n private readonly _classifiers: SpatialClassifiers;\r\n /** @alpha */\r\n public readonly orbitGtBlob?: Readonly<OrbitGtBlobProps>;\r\n protected _appearanceOverrides?: FeatureAppearance;\r\n /** @beta */\r\n protected _displaySettings: RealityModelDisplaySettings;\r\n protected _planarClipMask?: PlanarClipMaskSettings;\r\n /** Event dispatched just before assignment to [[planarClipMaskSettings]]. */\r\n public readonly onPlanarClipMaskChanged = new BeEvent<(newSettings: PlanarClipMaskSettings | undefined, model: ContextRealityModel) => void>();\r\n /** Event dispatched just before assignment to [[appearanceOverrides]]. */\r\n public readonly onAppearanceOverridesChanged = new BeEvent<(newOverrides: FeatureAppearance | undefined, model: ContextRealityModel) => void>();\r\n /** Event dispatched just before assignment to [[displaySettings]].\r\n * @beta\r\n */\r\n public readonly onDisplaySettingsChanged = new BeEvent<(newSettings: RealityModelDisplaySettings, model: ContextRealityModel) => void>();\r\n /** Event dispatched just before a model become invisible\r\n * @beta\r\n */\r\n public readonly onInvisibleChanged = new BeEvent<(invisible: boolean, model: ContextRealityModel) => void>();\r\n\r\n /** Construct a new context reality model.\r\n * @param props JSON representation of the reality model, which will be kept in sync with changes made via the ContextRealityModel's methods.\r\n * @param options Options to customize how the reality model is created.\r\n */\r\n public constructor(props: ContextRealityModelProps, options?: { createClassifiers: (container: SpatialClassifiersContainer) => SpatialClassifiers }) {\r\n this._props = props;\r\n this.rdSourceKey = props.rdSourceKey;\r\n this.name = props.name ?? \"\";\r\n this.url = props.tilesetUrl ?? \"\";\r\n this.orbitGtBlob = props.orbitGtBlob;\r\n this.realityDataId = props.realityDataId;\r\n this.description = props.description ?? \"\";\r\n this._invisible = props.invisible ?? false;\r\n this._appearanceOverrides = props.appearanceOverrides ? FeatureAppearance.fromJSON(props.appearanceOverrides) : undefined;\r\n this._displaySettings = RealityModelDisplaySettings.fromJSON(props.displaySettings);\r\n\r\n if (props.planarClipMask && props.planarClipMask.mode !== PlanarClipMaskMode.None)\r\n this._planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\r\n\r\n if (options?.createClassifiers) {\r\n this._classifiers = options.createClassifiers(props);\r\n } else {\r\n this._classifiers = new SpatialClassifiers(props);\r\n }\r\n }\r\n\r\n /** A set of [[SpatialClassifier]]s, of which one at any given time can be used to classify the reality model. */\r\n public get classifiers(): SpatialClassifiers {\r\n return this._classifiers;\r\n }\r\n\r\n /** Optionally describes how the geometry of the reality model can be masked by other models. */\r\n public get planarClipMaskSettings(): PlanarClipMaskSettings | undefined {\r\n return this._planarClipMask;\r\n }\r\n public set planarClipMaskSettings(settings: PlanarClipMaskSettings | undefined) {\r\n this.onPlanarClipMaskChanged.raiseEvent(settings, this);\r\n if (!settings)\r\n delete this._props.planarClipMask;\r\n else\r\n this._props.planarClipMask = settings.toJSON();\r\n\r\n this._planarClipMask = settings;\r\n }\r\n\r\n /** Overrides applied to the appearance of the reality model. Only the rgb, transparency, nonLocatable, and emphasized properties are applicable - the rest are ignored. */\r\n public get appearanceOverrides(): FeatureAppearance | undefined {\r\n return this._appearanceOverrides;\r\n }\r\n public set appearanceOverrides(overrides: FeatureAppearance | undefined) {\r\n this.onAppearanceOverridesChanged.raiseEvent(overrides, this);\r\n if (!overrides)\r\n delete this._props.appearanceOverrides;\r\n else\r\n this._props.appearanceOverrides = overrides.toJSON();\r\n\r\n this._appearanceOverrides = overrides;\r\n }\r\n\r\n /** Settings controlling how this reality model is displayed in a [Viewport]($frontend).\r\n * @beta\r\n */\r\n public get displaySettings(): RealityModelDisplaySettings {\r\n return this._displaySettings;\r\n }\r\n public set displaySettings(settings: RealityModelDisplaySettings) {\r\n this.onDisplaySettingsChanged.raiseEvent(settings, this);\r\n this._props.displaySettings = settings.toJSON();\r\n this._displaySettings = settings;\r\n }\r\n\r\n /** If true, reality model is not drawn.\r\n * @beta\r\n */\r\n public get invisible(): boolean {\r\n return this._invisible;\r\n }\r\n public set invisible(invisible: boolean) {\r\n if (invisible !== this.invisible) {\r\n this.onInvisibleChanged.raiseEvent(invisible, this);\r\n }\r\n\r\n this._props.invisible = invisible;\r\n this._invisible = invisible;\r\n }\r\n\r\n /** Convert this model to its JSON representation. */\r\n public toJSON(): ContextRealityModelProps {\r\n return ContextRealityModelProps.clone(this._props);\r\n }\r\n\r\n /** Returns true if [[name]] and [[url]] match the specified name and url. */\r\n public matchesNameAndUrl(name: string, url: string): boolean {\r\n return this.name === name && this.url === url;\r\n }\r\n}\r\n\r\n/** An object that can store the JSON representation of a list of [[ContextRealityModel]]s.\r\n * @see [[ContextRealityModels]].\r\n * @see [[DisplayStyleSettingsProps.contextRealityModels]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ContextRealityModelsContainer {\r\n /** The list of reality models. */\r\n contextRealityModels?: ContextRealityModelProps[];\r\n /** @internal used for type discrimination with ContextRealityModelsArgs. */\r\n container?: never;\r\n}\r\n\r\n/** Arguments supplied to the constructor of [[ContextRealityModels]].\r\n * @public\r\n */\r\nexport interface ContextRealityModelsArgs {\r\n /** The object that holds the JSON representation of the list of context reality models. */\r\n container: ContextRealityModelsContainer;\r\n /** Optional function used to instantiate each [[ContextRealityModel]] in the list. */\r\n createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel;\r\n /** If true, the list will not be populated by the constructor. Instead, the caller is responsible for calling [[ContextRealityModels.populate]] exactly once after construction.\r\n * This is chiefly intended for use internally by the [DisplayStyleState]($frontend) constructor.\r\n */\r\n deferPopulating?: boolean;\r\n}\r\n\r\n/** A list of [[ContextRealityModel]]s attached to a [[DisplayStyleSettings]]. The list may be presented to the user with the name and description of each model.\r\n * The list is automatically synchronized with the underlying JSON representation provided by the input [[ContextRealityModelsContainer]].\r\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\r\n * @see [[DisplayStyleSettings.contextRealityModels]].\r\n * @public\r\n */\r\nexport class ContextRealityModels {\r\n private readonly _container: ContextRealityModelsContainer;\r\n private readonly _createModel: (props: ContextRealityModelProps) => ContextRealityModel;\r\n private readonly _models: ContextRealityModel[] = [];\r\n /** Event dispatched just before [[ContextRealityModel.planarClipMaskSettings]] is modified for one of the reality models. */\r\n public readonly onPlanarClipMaskChanged = new BeEvent<(model: ContextRealityModel, newSettings: PlanarClipMaskSettings | undefined) => void>();\r\n /** Event dispatched just before [[ContextRealityModel.appearanceOverrides]] is modified for one of the reality models. */\r\n public readonly onAppearanceOverridesChanged = new BeEvent<(model: ContextRealityModel, newOverrides: FeatureAppearance | undefined) => void>();\r\n /** Event dispatched just before [[ContextRealityModel.displaySettings]] is modified for one of the reality models.\r\n * @beta\r\n */\r\n public readonly onDisplaySettingsChanged = new BeEvent<(model: ContextRealityModel, newSettings: RealityModelDisplaySettings) => void>();\r\n /** Event dispatched just before [[ContextRealityModel.invisible]] is modified for one of the reality models.\r\n * @beta\r\n */\r\n public readonly onInvisibleChanged = new BeEvent<(model: ContextRealityModel, invisible: boolean) => void>();\r\n /** Event dispatched when a model is [[add]]ed, [[delete]]d, [[replace]]d, or [[update]]d. */\r\n public readonly onChanged = new BeEvent<(previousModel: ContextRealityModel | undefined, newModel: ContextRealityModel | undefined) => void>();\r\n\r\n /** Construct a new list of reality models from its JSON representation. The list will be initialized from `container.contextRealityModels` and that JSON representation\r\n * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list\r\n * to become out of sync with the JSON representation.\r\n * @param container The object that holds the JSON representation of the list.\r\n * @param createContextRealityModel Optional function used to instantiate each [[ContextRealityModel]] in the list.\r\n */\r\n public constructor(container: ContextRealityModelsContainer, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel);\r\n\r\n /** Construct a new list of reality models from its JSON representation. The list will be initialized from `args.container.contextRealityModels` and that JSON representation\r\n * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list\r\n * to become out of sync with the JSON representation.\r\n * @param args Specifies the container and optionally customizes how the list of models is populated.\r\n */\r\n public constructor(args: ContextRealityModelsArgs);\r\n\r\n /** @internal */\r\n public constructor(arg0: ContextRealityModelsContainer | ContextRealityModelsArgs, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel) {\r\n let container: ContextRealityModelsContainer;\r\n let defer = false;\r\n if (arg0.container) {\r\n container = arg0.container;\r\n createContextRealityModel = arg0.createContextRealityModel;\r\n defer = true === arg0.deferPopulating;\r\n } else {\r\n container = arg0;\r\n }\r\n\r\n this._container = container;\r\n this._createModel = createContextRealityModel ?? ((props) => new ContextRealityModel(props));\r\n\r\n if (!defer)\r\n this.populate();\r\n }\r\n\r\n /** @internal needs to be invoked after DisplayStyleSettings constructor by DisplayStyleState constructor.*/\r\n /** Populate the list of [[models]] from the container that was supplied to the constructor.\r\n * This should only be invoked once, and only if [[ContextRealityModelsArgs.deferPopulating]] was specified as `true` when calling the constructor.\r\n * @public\r\n */\r\n public populate(): void {\r\n assert(this._models.length === 0, \"do not call ContextRealityModels.populate more than once\");\r\n const models = this._container.contextRealityModels;\r\n if (models)\r\n for (const model of models)\r\n this._models.push(this.createModel(model));\r\n }\r\n\r\n /** The read-only list of reality models. */\r\n public get models(): ReadonlyArray<ContextRealityModel> {\r\n return this._models;\r\n }\r\n\r\n /** Append a new reality model to the list.\r\n * @param The JSON representation of the reality model.\r\n * @returns the newly-added reality model.\r\n */\r\n public add(props: ContextRealityModelProps): ContextRealityModel {\r\n if (!this._container.contextRealityModels)\r\n this._container.contextRealityModels = [];\r\n\r\n props = ContextRealityModelProps.clone(props);\r\n const model = this.createModel(props);\r\n\r\n this.onChanged.raiseEvent(undefined, model);\r\n\r\n this._models.push(model);\r\n this._container.contextRealityModels.push(props);\r\n\r\n return model;\r\n }\r\n\r\n /** Remove the specified reality model from the list.\r\n * @param model The reality model to remove.\r\n * @returns true if the model was removed, or false if the model was not present in the list.\r\n */\r\n public delete(model: ContextRealityModel): boolean {\r\n const index = this._models.indexOf(model);\r\n if (-1 === index)\r\n return false;\r\n\r\n assert(undefined !== this._container.contextRealityModels);\r\n assert(index < this._container.contextRealityModels.length);\r\n\r\n this.dropEventListeners(model);\r\n this.onChanged.raiseEvent(model, undefined);\r\n\r\n this._models.splice(index, 1);\r\n if (this.models.length === 0)\r\n this._container.contextRealityModels = undefined;\r\n else\r\n this._container.contextRealityModels.splice(index, 1);\r\n\r\n return true;\r\n }\r\n\r\n /** Remove all reality models from the list. */\r\n public clear(): void {\r\n for (const model of this.models) {\r\n this.dropEventListeners(model);\r\n this.onChanged.raiseEvent(model, undefined);\r\n }\r\n\r\n this._container.contextRealityModels = undefined;\r\n this._models.length = 0;\r\n }\r\n\r\n /** Replace a reality model in the list.\r\n * @param toReplace The reality model to be replaced.\r\n * @param replaceWith The JSON representation of the replacement reality model.\r\n * @returns the newly-created reality model that replaced `toReplace`.\r\n * @throws Error if `toReplace` is not present in the list\r\n * @note The replacement occupies the same index in the list as `toReplace` did.\r\n */\r\n public replace(toReplace: ContextRealityModel, replaceWith: ContextRealityModelProps): ContextRealityModel {\r\n const index = this._models.indexOf(toReplace);\r\n if (-1 === index)\r\n throw new Error(\"ContextRealityModel not present in list.\");\r\n\r\n assert(undefined !== this._container.contextRealityModels);\r\n assert(index < this._container.contextRealityModels.length);\r\n\r\n replaceWith = ContextRealityModelProps.clone(replaceWith);\r\n const model = this.createModel(replaceWith);\r\n\r\n this.onChanged.raiseEvent(toReplace, model);\r\n this.dropEventListeners(toReplace);\r\n\r\n this._models[index] = model;\r\n this._container.contextRealityModels[index] = replaceWith;\r\n\r\n return model;\r\n }\r\n\r\n /** Change selected properties of a reality model.\r\n * @param toUpdate The reality model whose properties are to be modified.\r\n * @param updateProps The properties to change.\r\n * @returns The updated reality model, identical to `toUpdate` except for properties explicitly supplied by `updateProps`.\r\n * @throws Error if `toUpdate` is not present in the list.\r\n */\r\n public update(toUpdate: ContextRealityModel, updateProps: Partial<ContextRealityModelProps>): ContextRealityModel {\r\n const props = {\r\n ...toUpdate.toJSON(),\r\n ...updateProps,\r\n };\r\n\r\n // Partial<> makes it possible to pass `undefined` for tilesetUrl...preserve previous URL in that case.\r\n if (undefined === props.tilesetUrl)\r\n props.tilesetUrl = toUpdate.url;\r\n\r\n return this.replace(toUpdate, props);\r\n }\r\n\r\n private createModel(props: ContextRealityModelProps): ContextRealityModel {\r\n const model = this._createModel(props);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onPlanarClipMaskChanged.addListener(this.handlePlanarClipMaskChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onAppearanceOverridesChanged.addListener(this.handleAppearanceOverridesChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onDisplaySettingsChanged.addListener(this.handleDisplaySettingsChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onInvisibleChanged.addListener(this.handleInvisibleChanged, this);\r\n return model;\r\n }\r\n\r\n private dropEventListeners(model: ContextRealityModel): void {\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onPlanarClipMaskChanged.removeListener(this.handlePlanarClipMaskChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onAppearanceOverridesChanged.removeListener(this.handleAppearanceOverridesChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onDisplaySettingsChanged.removeListener(this.handleDisplaySettingsChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onInvisibleChanged.removeListener(this.handleInvisibleChanged, this);\r\n }\r\n\r\n private handlePlanarClipMaskChanged(mask: PlanarClipMaskSettings | undefined, model: ContextRealityModel): void {\r\n this.onPlanarClipMaskChanged.raiseEvent(model, mask);\r\n }\r\n\r\n private handleAppearanceOverridesChanged(app: FeatureAppearance | undefined, model: ContextRealityModel): void {\r\n this.onAppearanceOverridesChanged.raiseEvent(model, app);\r\n }\r\n\r\n private handleDisplaySettingsChanged(settings: RealityModelDisplaySettings, model: ContextRealityModel): void {\r\n this.onDisplaySettingsChanged.raiseEvent(model, settings);\r\n }\r\n\r\n private handleInvisibleChanged(invisible: boolean, model: ContextRealityModel): void {\r\n this.onInvisibleChanged.raiseEvent(model, invisible);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContourDisplay.js","sourceRoot":"","sources":["../../src/ContourDisplay.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAsK;AACtK,6CAA0C;AAC1C,yCAAqD;AAoBrD;;;;GAIG;AACH,MAAa,YAAY;IACvB,oEAAoE;IACpD,KAAK,CAAW;IAChC;;;OAGG;IACa,UAAU,CAAS;IACnC,uFAAuF;IACvE,OAAO,CAAa;IAEpC,mEAAmE;IAC5D,MAAM,CAAC,KAAmB;QAC/B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,CA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,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5C,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5C,CAAC;QAED,KAAK,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,wHAAwH;IACjH,MAAM,CAAC,MAAM,CAAC,KAAyC;QAC5D,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,cAAc,EAAE,CAAC;IACxD,CAAC;IAED,yFAAyF;IAClF,mBAAmB,CAAC,eAAwB;QACjD,OAAO,eAAe,KAAK,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;IAC/G,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAAgD;QAC3D,IAAI,CAAC,YAAY;YACf,OAAO,IAAI,CAAC;QAEd,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;IAC7D,CAAC;;AAtFH,wCAuFC","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 { compareArrays, compareBooleans, compareNumbers, compareStrings, CompressedId64Set, NonFunctionPropertiesOf, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { LinePixels } from \"./LinePixels\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\n\n/** JSON representation of a [[ContourStyle]].\n * @public\n */\nexport interface ContourStyleProps {\n /** See [[ContourStyle.color]]. */\n color?: RgbColorProps;\n /** See [[ContourStyle.pixelWidth]]. */\n pixelWidth?: number;\n /** See [[ContourStyle.pattern]]. */\n pattern?: LinePixels;\n}\n\n/** A type containing all of the properties of [[ContourStyle]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourStyle.create]] and [[ContourStyle.clone]].\n * @public\n */\nexport type ContourStyleProperties = NonFunctionPropertiesOf<ContourStyle>;\n\n/** The style settings used by either a minor or major contour.\n * @see [[Contour.majorStyle]]\n * @see [[Contour.minorStyle]]\n * @public\n */\nexport class ContourStyle {\n /** The color in which to draw the contour lines. Default: black. */\n public readonly color: RgbColor;\n /** The width in screen pixels of the contour lines.\n * Useful values range between 1 and 8.5, in increments of 0.5. Other values will be rounded to meet these criteria.\n * Default: 1.0.\n */\n public readonly pixelWidth: number;\n /** The pattern for a major or minor contour line. Defaults to [[LinePixels.Solid]]. */\n public readonly pattern: LinePixels;\n\n /** Returns true if `this` and `other` are logically equivalent. */\n public equals(other: ContourStyle): boolean {\n if (!this.color.equals(other.color) || this.pixelWidth !== other.pixelWidth || this.pattern !== other.pattern) {\n return false;\n }\n return true;\n }\n\n /** Perform ordered comparison between this and another contour style. */\n public compare(other: ContourStyle): number {\n return ContourStyle.compare(this, other);\n }\n\n /** Performs ordered comparison of two contour styles.\n * @param lhs First contour style to compare\n * @param rhs Second contour style to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n * @public\n */\n public static compare(lhs: ContourStyle, rhs: ContourStyle): number {\n let diff = 0;\n if ((diff = lhs.color.compareTo(rhs.color)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.pixelWidth, rhs.pixelWidth)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.pattern, rhs.pattern)) !== 0)\n return diff;\n\n return diff;\n }\n\n private constructor(props?: Partial<ContourStyleProperties>) {\n this.color = props?.color ?? RgbColor.fromJSON({r: 0, g: 0, b: 0});\n this.pixelWidth = props?.pixelWidth ?? 1;\n this.pattern = props?.pattern ?? LinePixels.Solid;\n }\n\n public static fromJSON(props?: ContourStyleProps) {\n if (!props)\n return new ContourStyle();\n\n return new this({\n color: props?.color ? RgbColor.fromJSON(props.color) : undefined,\n pixelWidth: props?.pixelWidth,\n pattern: props?.pattern,\n });\n }\n\n public toJSON(): ContourStyleProps {\n const props: ContourStyleProps = {};\n\n if (!this.color.equals(RgbColor.fromJSON({r: 0, g: 0, b: 0})))\n props.color = this.color.toJSON();\n\n if (1 !== this.pixelWidth)\n props.pixelWidth = this.pixelWidth;\n\n if (0 !== this.pattern)\n props.pattern = this.pattern;\n\n return props;\n }\n\n /** Create a new ContourStyle. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourStyleProperties>): ContourStyle {\n return props ? new this(props) : new ContourStyle();\n }\n\n /** Create a copy of this ContourStyle, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourStyleProperties>): ContourStyle {\n if (!changedProps)\n return this;\n\n return ContourStyle.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of a [[Contour]].\n * @public\n */\nexport interface ContourProps {\n /** See [[Contour.majorStyle]]. */\n majorStyle?: ContourStyleProps;\n /** See [[Contour.minor]]. */\n minorStyle?: ContourStyleProps;\n /** See [[Contour.minorInterval]]. */\n minorInterval?: number;\n /** See [[Contour.majorIntervalCount]]. */\n majorIntervalCount?: number;\n /** See [[Contour.showGeometry]] */\n showGeometry?: boolean;\n}\n\n/** A type containing all of the properties of [[Contour]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[Contour.create]] and [[Contour.clone]].\n * @public\n */\nexport type ContourProperties = NonFunctionPropertiesOf<Contour>;\n\n/** Describes how to generate and style contour lines for geometry within a single [[ContourGroup]].\n * Contours provide a way to visualize elevation within a 3d scene by drawing lines at fixed intervals along the z-axis.\n * There are actually 2 kinds of contour lines: major and minor. Each kind can be styled independently.\n * A contour line is generated every [[minorInterval]] meters. Every `nth` line will be a *major* contour, where `n` = [[majorIntervalCount]]; the intervening lines will\n * all be *minor* contours.\n * For example, with a [[majorIntervalCount]] of `1`, every contour will be major; of `2`, every other contour will be major; and of `3`, there will be two minor contours in between\n * each major contour.\n *\n * @public\n */\nexport class Contour {\n /** Settings that describe how a major contour is styled. Defaults to an instantation of [[ContourStyle]] using `pixelWidth` of 2 and default values for the other properties. */\n public readonly majorStyle: ContourStyle;\n /** Settings that describe how a minor contour is styled. Defaults to an instantation of [[ContourStyle]] using default values for the properties. */\n public readonly minorStyle: ContourStyle;\n /** The interval for the minor contour occurrence in meters; these can be specified as fractional. Defaults to 1. If a value <= 0 is specified, this will be treated as 1 meter. */\n public readonly minorInterval: number;\n /** The count of minor contour intervals that define a major interval (integer > 0). A value of 1 means no minor contours will be shown, only major contours. Defaults to 5. If a value < 1 is specified, this will be treated as 1. If a non-integer value is specified, it will be treated as if it were rounded to the nearest integer. */\n public readonly majorIntervalCount: number;\n /** If true, show underlying geometry along with the associated contours. If false, only show the contours, not the underlying geometry. Defaults to true. */\n public readonly showGeometry: boolean;\n\n public static readonly defaults = new Contour({});\n\n /** Returns true if `this` is logically equivalent to `other`. */\n public equals(other: Contour): boolean {\n return this.compare(other) === 0;\n }\n\n /** Performs ordered comparison between this and another contour. */\n public compare(other: Contour): number {\n return Contour.compare(this, other);\n }\n\n /** Performs ordered comparison of two contours.\n * @param lhs First contour to compare\n * @param rhs Second contour to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n */\n public static compare(lhs: Contour, rhs: Contour): number {\n return ContourStyle.compare(lhs.majorStyle, rhs.majorStyle)\n || ContourStyle.compare(lhs.minorStyle, rhs.minorStyle)\n || compareNumbers(lhs.minorInterval, rhs.minorInterval)\n || compareNumbers(lhs.majorIntervalCount, rhs.majorIntervalCount)\n || compareBooleans(lhs.showGeometry, rhs.showGeometry);\n }\n\n private constructor(props?: Partial<ContourProperties>) {\n this.majorStyle = props?.majorStyle ?? ContourStyle.fromJSON({ pixelWidth: 2 });\n this.minorStyle = props?.minorStyle ?? ContourStyle.fromJSON();\n this.minorInterval = props?.minorInterval ?? 1;\n this.majorIntervalCount = props?.majorIntervalCount ?? 5;\n this.showGeometry = props?.showGeometry ?? true;\n }\n\n public static fromJSON(props?: ContourProps) {\n if (!props)\n return new Contour();\n\n return new this({\n majorStyle: props?.majorStyle ? ContourStyle.fromJSON(props.majorStyle) : undefined,\n minorStyle: props?.minorStyle ? ContourStyle.fromJSON(props.minorStyle) : undefined,\n minorInterval: props?.minorInterval,\n majorIntervalCount: props?.majorIntervalCount,\n showGeometry: props?.showGeometry,\n });\n }\n\n public toJSON(): ContourProps {\n const props: ContourProps = {};\n\n if (!this.majorStyle.equals(ContourStyle.fromJSON({ pixelWidth: 2 })))\n props.majorStyle = this.majorStyle.toJSON();\n\n if (!this.minorStyle.equals(ContourStyle.fromJSON()))\n props.minorStyle = this.minorStyle.toJSON();\n\n if (1 !== this.minorInterval)\n props.minorInterval = this.minorInterval;\n\n if (5 !== this.majorIntervalCount)\n props.majorIntervalCount = this.majorIntervalCount;\n\n if (true !== this.showGeometry)\n props.showGeometry = this.showGeometry;\n\n return props;\n }\n\n /** Create a new Contour. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourProperties>): Contour {\n return props ? new this(props) : new Contour();\n }\n\n /** Create a copy of this Contour, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourProperties>): Contour {\n if (!changedProps)\n return this;\n\n return Contour.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of a [[ContourGroup]].\n * @public\n */\nexport interface ContourGroupProps {\n /** See [[ContourGroup.contourDef]]. */\n contourDef?: ContourProps;\n /** See [[ContourGroup.subCategories]]. */\n subCategories?: CompressedId64Set;\n /** See [[ContourGroup.name]]. */\n name?: string;\n}\n\n/** A type containing all of the properties of [[ContourGroup]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourGroup.create]] and [[ContourGroup.clone]].\n * @public\n */\nexport type ContourGroupProperties = NonFunctionPropertiesOf<ContourGroup>;\n\n/** Defines a group of objects to which to apply [[Contour]] lines in a particular style.\n * The [[ContourDisplay]] settings can contain multiple groups.\n * Each group is described by a set of [SubCategory]($backend)'s; all geometry belonging to any of those subcategories belongs to the group.\n * An empty set of subcategories indicates that this is a default group, implicitly containing all subcategories that are not explicitly included in another group.\n * Each group has an optional, non-user-facing name that applications can use to assign semantics to particular groups.\n * @public\n */\nexport class ContourGroup {\n private _subCategories: CompressedId64Set;\n\n /** Describes the appearance of all of the contours applied to geometry belonging to this group. */\n public readonly contourDef: Contour;\n /** An optional, non-user-facing name that applications can use to assign semantics to particular groups.\n * Default: an empty string.\n */\n public readonly name: string;\n\n /** The set of subcategories belonging to this group, or an empty set if this is a default group. If more than one empty set exists in the [[ContourDisplay]] object's `groups` array, the last entry in that array is used for rendering the default styling.\n * @see [[isDefaultGroup]] to test if this is a default group.\n */\n public get subCategories(): OrderedId64Iterable {\n return CompressedId64Set.iterable(this._subCategories);\n }\n\n /** Returns true if [[subCategories]] is an empty set, indicating that any subcategory not included in any other [[ContourGroup]] is implicitly\n * included in this group.\n */\n public get isDefaultGroup(): boolean {\n return OrderedId64Iterable.isEmptySet(this._subCategories);\n }\n\n /** Returns true if `this` and `other` contain the exact same set of subcategories. */\n public subCategoriesEqual(other: ContourGroup): boolean {\n return this._subCategories === other._subCategories;\n }\n\n /** Perform ordered comparison between this and another contour group. */\n public compare(other: ContourGroup): number {\n return compareStrings(this.name, other.name) || compareStrings(this._subCategories, other._subCategories) || this.contourDef.compare(other.contourDef);\n }\n\n /** Returns true if `this` and `other` are logically equivalent, having the same styling, name, and set of subcategories. */\n public equals(other: ContourGroup | undefined): boolean {\n return undefined !== other && this.compare(other) === 0;\n }\n\n private constructor(props?: Partial<ContourGroupProperties>) {\n this.contourDef = props?.contourDef ?? Contour.fromJSON();\n this._subCategories = props?.subCategories ? CompressedId64Set.sortAndCompress(props.subCategories) : \"\";\n this.name = props?.name ?? \"\";\n }\n\n public static fromJSON(props?: ContourGroupProps) {\n if (!props)\n return new ContourGroup();\n\n return new this({\n contourDef: props?.contourDef ? Contour.fromJSON(props.contourDef) : undefined,\n name: props?.name,\n subCategories: props?.subCategories ? CompressedId64Set.iterable(props.subCategories) : undefined,\n });\n }\n\n public toJSON(): ContourGroupProps {\n const props: ContourGroupProps = {};\n\n if (!this.contourDef.equals(Contour.defaults))\n props.contourDef = this.contourDef.toJSON();\n\n if (this.name)\n props.name = this.name;\n\n props.subCategories = this._subCategories;\n return props;\n }\n\n /** Create a new ContourGroup. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourGroupProperties>): ContourGroup {\n return props ? new this(props) : new ContourGroup();\n }\n\n /** Create a copy of this ContourGroup, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourGroupProperties>): ContourGroup {\n if (!changedProps)\n return this;\n\n return ContourGroup.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of [[ContourDisplay]] settings.\n * @public\n */\nexport interface ContourDisplayProps {\n /** See [[ContourDisplay.groups]]. */\n groups?: ContourGroupProps[];\n /** See [[ContourDisplay.displayContours]]. */\n displayContours?: boolean;\n}\n\n/** A type containing all of the properties of [[ContourDisplay]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourDisplay.create]] and [[ContourDisplay.clone]].\n * @public\n */\nexport type ContourDisplayProperties = NonFunctionPropertiesOf<ContourDisplay>;\n\n/** Settings that specify how to apply [contour lines]($docs/learning/display/ContourDisplay.md) to groups of geometry\n * within a 3d scene.\n * @see [[DisplayStyle3dSettings.contours]] to associate contour settings with a display style.\n * @public\n */\nexport class ContourDisplay {\n /** A list of the groups, each describing their own specific contour display settings. Defaults to an empty array.\n * @note The display system supports no more than [[ContourDisplay.maxContourGroups]]. Entries in this array exceeding that maximum will\n * have no effect on the display of contour lines.\n */\n public readonly groups: ContourGroup[];\n /** Whether to display the contour lines described by these settings. Default: false.\n * @see [[withDisplayContours]] to change this flag.\n */\n public readonly displayContours: boolean;\n /** The maximum number of contour groups that the system will allow. Any contour groups added to the [[groups]] array beyond this number will be ignored\n * for display purposes.\n */\n public static readonly maxContourGroups = 5;\n\n /** Perform ordered comparison between this and another `ContourDisplay`. */\n public compare(other: ContourDisplay): number {\n return compareBooleans(this.displayContours, other.displayContours) || compareArrays(this.groups, other.groups, (lhs, rhs) => lhs.compare(rhs));\n }\n\n /** Returns true if `this` and `other` are logically equivalent, having the same groups and styling. */\n public equals(other: ContourDisplay): boolean {\n if (this.displayContours !== other.displayContours)\n return false;\n if (this.groups.length !== other.groups.length)\n return false;\n for (let index = 0, len = this.groups.length; index < len && index < ContourDisplay.maxContourGroups; ++index) {\n const match = this.groups[index].equals(other.groups[index]);\n if (!match)\n return false;\n }\n return true;\n }\n\n private constructor(props?: Partial<ContourDisplayProperties>) {\n this.displayContours = props?.displayContours ?? false;\n this.groups = props?.groups ?? [];\n }\n\n public static fromJSON(props?: ContourDisplayProps) {\n if (!props)\n return new ContourDisplay();\n\n const groups: ContourGroup[] = [];\n if (undefined !== props && undefined !== props.groups) {\n for (let n = 0; n < props.groups.length; n++) {\n groups[n] = ContourGroup.fromJSON(props.groups[n]);\n }\n }\n\n return new this({\n displayContours: props?.displayContours,\n groups: props.groups ? groups : undefined,\n });\n }\n\n public toJSON(): ContourDisplayProps {\n const props: ContourDisplayProps = {};\n\n props.groups = [];\n for (let n = 0; n < this.groups.length; n++) {\n props.groups[n] = this.groups[n].toJSON();\n }\n\n props.displayContours = this.displayContours;\n return props;\n }\n\n /** Create a new ContourDisplay. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourDisplayProperties>): ContourDisplay {\n return props ? new this(props) : new ContourDisplay();\n }\n\n /** Create a copy of these settings, changing the `displayContours` flag as specified. */\n public withDisplayContours(displayContours: boolean): ContourDisplay {\n return displayContours === this.displayContours ? this : ContourDisplay.create({ ...this, displayContours });\n }\n\n /** Create a copy of this ContourDisplay, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourDisplayProperties>): ContourDisplay {\n if (!changedProps)\n return this;\n\n return ContourDisplay.create({ ...this, ...changedProps });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ContourDisplay.js","sourceRoot":"","sources":["../../src/ContourDisplay.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAsK;AACtK,6CAA0C;AAC1C,yCAAqD;AAoBrD;;;;GAIG;AACH,MAAa,YAAY;IACvB,oEAAoE;IACpD,KAAK,CAAW;IAChC;;;OAGG;IACa,UAAU,CAAS;IACnC,uFAAuF;IACvE,OAAO,CAAa;IAEpC,mEAAmE;IAC5D,MAAM,CAAC,KAAmB;QAC/B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;YAC9G,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,yEAAyE;IAClE,OAAO,CAAC,KAAmB;QAChC,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,OAAO,CAAC,GAAiB,EAAE,GAAiB;QACxD,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,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AC,CAAC,CAAC,IAAI,cAAc,EAAE,CAAC;IACxD,CAAC;IAED,yFAAyF;IAClF,mBAAmB,CAAC,eAAwB;QACjD,OAAO,eAAe,KAAK,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;IAC/G,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAAgD;QAC3D,IAAI,CAAC,YAAY;YACf,OAAO,IAAI,CAAC;QAEd,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;IAC7D,CAAC;;AAtFH,wCAuFC","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 { compareArrays, compareBooleans, compareNumbers, compareStrings, CompressedId64Set, NonFunctionPropertiesOf, OrderedId64Iterable } from \"@itwin/core-bentley\";\r\nimport { LinePixels } from \"./LinePixels\";\r\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\r\n\r\n/** JSON representation of a [[ContourStyle]].\r\n * @public\r\n */\r\nexport interface ContourStyleProps {\r\n /** See [[ContourStyle.color]]. */\r\n color?: RgbColorProps;\r\n /** See [[ContourStyle.pixelWidth]]. */\r\n pixelWidth?: number;\r\n /** See [[ContourStyle.pattern]]. */\r\n pattern?: LinePixels;\r\n}\r\n\r\n/** A type containing all of the properties of [[ContourStyle]] with none of the methods and with the `readonly` modifiers removed.\r\n * Used by [[ContourStyle.create]] and [[ContourStyle.clone]].\r\n * @public\r\n */\r\nexport type ContourStyleProperties = NonFunctionPropertiesOf<ContourStyle>;\r\n\r\n/** The style settings used by either a minor or major contour.\r\n * @see [[Contour.majorStyle]]\r\n * @see [[Contour.minorStyle]]\r\n * @public\r\n */\r\nexport class ContourStyle {\r\n /** The color in which to draw the contour lines. Default: black. */\r\n public readonly color: RgbColor;\r\n /** The width in screen pixels of the contour lines.\r\n * Useful values range between 1 and 8.5, in increments of 0.5. Other values will be rounded to meet these criteria.\r\n * Default: 1.0.\r\n */\r\n public readonly pixelWidth: number;\r\n /** The pattern for a major or minor contour line. Defaults to [[LinePixels.Solid]]. */\r\n public readonly pattern: LinePixels;\r\n\r\n /** Returns true if `this` and `other` are logically equivalent. */\r\n public equals(other: ContourStyle): boolean {\r\n if (!this.color.equals(other.color) || this.pixelWidth !== other.pixelWidth || this.pattern !== other.pattern) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /** Perform ordered comparison between this and another contour style. */\r\n public compare(other: ContourStyle): number {\r\n return ContourStyle.compare(this, other);\r\n }\r\n\r\n /** Performs ordered comparison of two contour styles.\r\n * @param lhs First contour style to compare\r\n * @param rhs Second contour style to compare\r\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\r\n * @public\r\n */\r\n public static compare(lhs: ContourStyle, rhs: ContourStyle): number {\r\n let diff = 0;\r\n if ((diff = lhs.color.compareTo(rhs.color)) !== 0)\r\n return diff;\r\n if ((diff = compareNumbers(lhs.pixelWidth, rhs.pixelWidth)) !== 0)\r\n return diff;\r\n if ((diff = compareNumbers(lhs.pattern, rhs.pattern)) !== 0)\r\n return diff;\r\n\r\n return diff;\r\n }\r\n\r\n private constructor(props?: Partial<ContourStyleProperties>) {\r\n this.color = props?.color ?? RgbColor.fromJSON({r: 0, g: 0, b: 0});\r\n this.pixelWidth = props?.pixelWidth ?? 1;\r\n this.pattern = props?.pattern ?? LinePixels.Solid;\r\n }\r\n\r\n public static fromJSON(props?: ContourStyleProps) {\r\n if (!props)\r\n return new ContourStyle();\r\n\r\n return new this({\r\n color: props?.color ? RgbColor.fromJSON(props.color) : undefined,\r\n pixelWidth: props?.pixelWidth,\r\n pattern: props?.pattern,\r\n });\r\n }\r\n\r\n public toJSON(): ContourStyleProps {\r\n const props: ContourStyleProps = {};\r\n\r\n if (!this.color.equals(RgbColor.fromJSON({r: 0, g: 0, b: 0})))\r\n props.color = this.color.toJSON();\r\n\r\n if (1 !== this.pixelWidth)\r\n props.pixelWidth = this.pixelWidth;\r\n\r\n if (0 !== this.pattern)\r\n props.pattern = this.pattern;\r\n\r\n return props;\r\n }\r\n\r\n /** Create a new ContourStyle. Any properties not specified by `props` will be initialized to their default values. */\r\n public static create(props?: Partial<ContourStyleProperties>): ContourStyle {\r\n return props ? new this(props) : new ContourStyle();\r\n }\r\n\r\n /** Create a copy of this ContourStyle, identical except for any properties specified by `changedProps`.\r\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\r\n */\r\n public clone(changedProps?: Partial<ContourStyleProperties>): ContourStyle {\r\n if (!changedProps)\r\n return this;\r\n\r\n return ContourStyle.create({ ...this, ...changedProps });\r\n }\r\n}\r\n\r\n/** JSON representation of a [[Contour]].\r\n * @public\r\n */\r\nexport interface ContourProps {\r\n /** See [[Contour.majorStyle]]. */\r\n majorStyle?: ContourStyleProps;\r\n /** See [[Contour.minor]]. */\r\n minorStyle?: ContourStyleProps;\r\n /** See [[Contour.minorInterval]]. */\r\n minorInterval?: number;\r\n /** See [[Contour.majorIntervalCount]]. */\r\n majorIntervalCount?: number;\r\n /** See [[Contour.showGeometry]] */\r\n showGeometry?: boolean;\r\n}\r\n\r\n/** A type containing all of the properties of [[Contour]] with none of the methods and with the `readonly` modifiers removed.\r\n * Used by [[Contour.create]] and [[Contour.clone]].\r\n * @public\r\n */\r\nexport type ContourProperties = NonFunctionPropertiesOf<Contour>;\r\n\r\n/** Describes how to generate and style contour lines for geometry within a single [[ContourGroup]].\r\n * Contours provide a way to visualize elevation within a 3d scene by drawing lines at fixed intervals along the z-axis.\r\n * There are actually 2 kinds of contour lines: major and minor. Each kind can be styled independently.\r\n * A contour line is generated every [[minorInterval]] meters. Every `nth` line will be a *major* contour, where `n` = [[majorIntervalCount]]; the intervening lines will\r\n * all be *minor* contours.\r\n * For example, with a [[majorIntervalCount]] of `1`, every contour will be major; of `2`, every other contour will be major; and of `3`, there will be two minor contours in between\r\n * each major contour.\r\n *\r\n * @public\r\n */\r\nexport class Contour {\r\n /** Settings that describe how a major contour is styled. Defaults to an instantation of [[ContourStyle]] using `pixelWidth` of 2 and default values for the other properties. */\r\n public readonly majorStyle: ContourStyle;\r\n /** Settings that describe how a minor contour is styled. Defaults to an instantation of [[ContourStyle]] using default values for the properties. */\r\n public readonly minorStyle: ContourStyle;\r\n /** The interval for the minor contour occurrence in meters; these can be specified as fractional. Defaults to 1. If a value <= 0 is specified, this will be treated as 1 meter. */\r\n public readonly minorInterval: number;\r\n /** The count of minor contour intervals that define a major interval (integer > 0). A value of 1 means no minor contours will be shown, only major contours. Defaults to 5. If a value < 1 is specified, this will be treated as 1. If a non-integer value is specified, it will be treated as if it were rounded to the nearest integer. */\r\n public readonly majorIntervalCount: number;\r\n /** If true, show underlying geometry along with the associated contours. If false, only show the contours, not the underlying geometry. Defaults to true. */\r\n public readonly showGeometry: boolean;\r\n\r\n public static readonly defaults = new Contour({});\r\n\r\n /** Returns true if `this` is logically equivalent to `other`. */\r\n public equals(other: Contour): boolean {\r\n return this.compare(other) === 0;\r\n }\r\n\r\n /** Performs ordered comparison between this and another contour. */\r\n public compare(other: Contour): number {\r\n return Contour.compare(this, other);\r\n }\r\n\r\n /** Performs ordered comparison of two contours.\r\n * @param lhs First contour to compare\r\n * @param rhs Second contour to compare\r\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\r\n */\r\n public static compare(lhs: Contour, rhs: Contour): number {\r\n return ContourStyle.compare(lhs.majorStyle, rhs.majorStyle)\r\n || ContourStyle.compare(lhs.minorStyle, rhs.minorStyle)\r\n || compareNumbers(lhs.minorInterval, rhs.minorInterval)\r\n || compareNumbers(lhs.majorIntervalCount, rhs.majorIntervalCount)\r\n || compareBooleans(lhs.showGeometry, rhs.showGeometry);\r\n }\r\n\r\n private constructor(props?: Partial<ContourProperties>) {\r\n this.majorStyle = props?.majorStyle ?? ContourStyle.fromJSON({ pixelWidth: 2 });\r\n this.minorStyle = props?.minorStyle ?? ContourStyle.fromJSON();\r\n this.minorInterval = props?.minorInterval ?? 1;\r\n this.majorIntervalCount = props?.majorIntervalCount ?? 5;\r\n this.showGeometry = props?.showGeometry ?? true;\r\n }\r\n\r\n public static fromJSON(props?: ContourProps) {\r\n if (!props)\r\n return new Contour();\r\n\r\n return new this({\r\n majorStyle: props?.majorStyle ? ContourStyle.fromJSON(props.majorStyle) : undefined,\r\n minorStyle: props?.minorStyle ? ContourStyle.fromJSON(props.minorStyle) : undefined,\r\n minorInterval: props?.minorInterval,\r\n majorIntervalCount: props?.majorIntervalCount,\r\n showGeometry: props?.showGeometry,\r\n });\r\n }\r\n\r\n public toJSON(): ContourProps {\r\n const props: ContourProps = {};\r\n\r\n if (!this.majorStyle.equals(ContourStyle.fromJSON({ pixelWidth: 2 })))\r\n props.majorStyle = this.majorStyle.toJSON();\r\n\r\n if (!this.minorStyle.equals(ContourStyle.fromJSON()))\r\n props.minorStyle = this.minorStyle.toJSON();\r\n\r\n if (1 !== this.minorInterval)\r\n props.minorInterval = this.minorInterval;\r\n\r\n if (5 !== this.majorIntervalCount)\r\n props.majorIntervalCount = this.majorIntervalCount;\r\n\r\n if (true !== this.showGeometry)\r\n props.showGeometry = this.showGeometry;\r\n\r\n return props;\r\n }\r\n\r\n /** Create a new Contour. Any properties not specified by `props` will be initialized to their default values. */\r\n public static create(props?: Partial<ContourProperties>): Contour {\r\n return props ? new this(props) : new Contour();\r\n }\r\n\r\n /** Create a copy of this Contour, identical except for any properties specified by `changedProps`.\r\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\r\n */\r\n public clone(changedProps?: Partial<ContourProperties>): Contour {\r\n if (!changedProps)\r\n return this;\r\n\r\n return Contour.create({ ...this, ...changedProps });\r\n }\r\n}\r\n\r\n/** JSON representation of a [[ContourGroup]].\r\n * @public\r\n */\r\nexport interface ContourGroupProps {\r\n /** See [[ContourGroup.contourDef]]. */\r\n contourDef?: ContourProps;\r\n /** See [[ContourGroup.subCategories]]. */\r\n subCategories?: CompressedId64Set;\r\n /** See [[ContourGroup.name]]. */\r\n name?: string;\r\n}\r\n\r\n/** A type containing all of the properties of [[ContourGroup]] with none of the methods and with the `readonly` modifiers removed.\r\n * Used by [[ContourGroup.create]] and [[ContourGroup.clone]].\r\n * @public\r\n */\r\nexport type ContourGroupProperties = NonFunctionPropertiesOf<ContourGroup>;\r\n\r\n/** Defines a group of objects to which to apply [[Contour]] lines in a particular style.\r\n * The [[ContourDisplay]] settings can contain multiple groups.\r\n * Each group is described by a set of [SubCategory]($backend)'s; all geometry belonging to any of those subcategories belongs to the group.\r\n * An empty set of subcategories indicates that this is a default group, implicitly containing all subcategories that are not explicitly included in another group.\r\n * Each group has an optional, non-user-facing name that applications can use to assign semantics to particular groups.\r\n * @public\r\n */\r\nexport class ContourGroup {\r\n private _subCategories: CompressedId64Set;\r\n\r\n /** Describes the appearance of all of the contours applied to geometry belonging to this group. */\r\n public readonly contourDef: Contour;\r\n /** An optional, non-user-facing name that applications can use to assign semantics to particular groups.\r\n * Default: an empty string.\r\n */\r\n public readonly name: string;\r\n\r\n /** The set of subcategories belonging to this group, or an empty set if this is a default group. If more than one empty set exists in the [[ContourDisplay]] object's `groups` array, the last entry in that array is used for rendering the default styling.\r\n * @see [[isDefaultGroup]] to test if this is a default group.\r\n */\r\n public get subCategories(): OrderedId64Iterable {\r\n return CompressedId64Set.iterable(this._subCategories);\r\n }\r\n\r\n /** Returns true if [[subCategories]] is an empty set, indicating that any subcategory not included in any other [[ContourGroup]] is implicitly\r\n * included in this group.\r\n */\r\n public get isDefaultGroup(): boolean {\r\n return OrderedId64Iterable.isEmptySet(this._subCategories);\r\n }\r\n\r\n /** Returns true if `this` and `other` contain the exact same set of subcategories. */\r\n public subCategoriesEqual(other: ContourGroup): boolean {\r\n return this._subCategories === other._subCategories;\r\n }\r\n\r\n /** Perform ordered comparison between this and another contour group. */\r\n public compare(other: ContourGroup): number {\r\n return compareStrings(this.name, other.name) || compareStrings(this._subCategories, other._subCategories) || this.contourDef.compare(other.contourDef);\r\n }\r\n\r\n /** Returns true if `this` and `other` are logically equivalent, having the same styling, name, and set of subcategories. */\r\n public equals(other: ContourGroup | undefined): boolean {\r\n return undefined !== other && this.compare(other) === 0;\r\n }\r\n\r\n private constructor(props?: Partial<ContourGroupProperties>) {\r\n this.contourDef = props?.contourDef ?? Contour.fromJSON();\r\n this._subCategories = props?.subCategories ? CompressedId64Set.sortAndCompress(props.subCategories) : \"\";\r\n this.name = props?.name ?? \"\";\r\n }\r\n\r\n public static fromJSON(props?: ContourGroupProps) {\r\n if (!props)\r\n return new ContourGroup();\r\n\r\n return new this({\r\n contourDef: props?.contourDef ? Contour.fromJSON(props.contourDef) : undefined,\r\n name: props?.name,\r\n subCategories: props?.subCategories ? CompressedId64Set.iterable(props.subCategories) : undefined,\r\n });\r\n }\r\n\r\n public toJSON(): ContourGroupProps {\r\n const props: ContourGroupProps = {};\r\n\r\n if (!this.contourDef.equals(Contour.defaults))\r\n props.contourDef = this.contourDef.toJSON();\r\n\r\n if (this.name)\r\n props.name = this.name;\r\n\r\n props.subCategories = this._subCategories;\r\n return props;\r\n }\r\n\r\n /** Create a new ContourGroup. Any properties not specified by `props` will be initialized to their default values. */\r\n public static create(props?: Partial<ContourGroupProperties>): ContourGroup {\r\n return props ? new this(props) : new ContourGroup();\r\n }\r\n\r\n /** Create a copy of this ContourGroup, identical except for any properties specified by `changedProps`.\r\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\r\n */\r\n public clone(changedProps?: Partial<ContourGroupProperties>): ContourGroup {\r\n if (!changedProps)\r\n return this;\r\n\r\n return ContourGroup.create({ ...this, ...changedProps });\r\n }\r\n}\r\n\r\n/** JSON representation of [[ContourDisplay]] settings.\r\n * @public\r\n */\r\nexport interface ContourDisplayProps {\r\n /** See [[ContourDisplay.groups]]. */\r\n groups?: ContourGroupProps[];\r\n /** See [[ContourDisplay.displayContours]]. */\r\n displayContours?: boolean;\r\n}\r\n\r\n/** A type containing all of the properties of [[ContourDisplay]] with none of the methods and with the `readonly` modifiers removed.\r\n * Used by [[ContourDisplay.create]] and [[ContourDisplay.clone]].\r\n * @public\r\n */\r\nexport type ContourDisplayProperties = NonFunctionPropertiesOf<ContourDisplay>;\r\n\r\n/** Settings that specify how to apply [contour lines]($docs/learning/display/ContourDisplay.md) to groups of geometry\r\n * within a 3d scene.\r\n * @see [[DisplayStyle3dSettings.contours]] to associate contour settings with a display style.\r\n * @public\r\n */\r\nexport class ContourDisplay {\r\n /** A list of the groups, each describing their own specific contour display settings. Defaults to an empty array.\r\n * @note The display system supports no more than [[ContourDisplay.maxContourGroups]]. Entries in this array exceeding that maximum will\r\n * have no effect on the display of contour lines.\r\n */\r\n public readonly groups: ContourGroup[];\r\n /** Whether to display the contour lines described by these settings. Default: false.\r\n * @see [[withDisplayContours]] to change this flag.\r\n */\r\n public readonly displayContours: boolean;\r\n /** The maximum number of contour groups that the system will allow. Any contour groups added to the [[groups]] array beyond this number will be ignored\r\n * for display purposes.\r\n */\r\n public static readonly maxContourGroups = 5;\r\n\r\n /** Perform ordered comparison between this and another `ContourDisplay`. */\r\n public compare(other: ContourDisplay): number {\r\n return compareBooleans(this.displayContours, other.displayContours) || compareArrays(this.groups, other.groups, (lhs, rhs) => lhs.compare(rhs));\r\n }\r\n\r\n /** Returns true if `this` and `other` are logically equivalent, having the same groups and styling. */\r\n public equals(other: ContourDisplay): boolean {\r\n if (this.displayContours !== other.displayContours)\r\n return false;\r\n if (this.groups.length !== other.groups.length)\r\n return false;\r\n for (let index = 0, len = this.groups.length; index < len && index < ContourDisplay.maxContourGroups; ++index) {\r\n const match = this.groups[index].equals(other.groups[index]);\r\n if (!match)\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n private constructor(props?: Partial<ContourDisplayProperties>) {\r\n this.displayContours = props?.displayContours ?? false;\r\n this.groups = props?.groups ?? [];\r\n }\r\n\r\n public static fromJSON(props?: ContourDisplayProps) {\r\n if (!props)\r\n return new ContourDisplay();\r\n\r\n const groups: ContourGroup[] = [];\r\n if (undefined !== props && undefined !== props.groups) {\r\n for (let n = 0; n < props.groups.length; n++) {\r\n groups[n] = ContourGroup.fromJSON(props.groups[n]);\r\n }\r\n }\r\n\r\n return new this({\r\n displayContours: props?.displayContours,\r\n groups: props.groups ? groups : undefined,\r\n });\r\n }\r\n\r\n public toJSON(): ContourDisplayProps {\r\n const props: ContourDisplayProps = {};\r\n\r\n props.groups = [];\r\n for (let n = 0; n < this.groups.length; n++) {\r\n props.groups[n] = this.groups[n].toJSON();\r\n }\r\n\r\n props.displayContours = this.displayContours;\r\n return props;\r\n }\r\n\r\n /** Create a new ContourDisplay. Any properties not specified by `props` will be initialized to their default values. */\r\n public static create(props?: Partial<ContourDisplayProperties>): ContourDisplay {\r\n return props ? new this(props) : new ContourDisplay();\r\n }\r\n\r\n /** Create a copy of these settings, changing the `displayContours` flag as specified. */\r\n public withDisplayContours(displayContours: boolean): ContourDisplay {\r\n return displayContours === this.displayContours ? this : ContourDisplay.create({ ...this, displayContours });\r\n }\r\n\r\n /** Create a copy of this ContourDisplay, identical except for any properties specified by `changedProps`.\r\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\r\n */\r\n public clone(changedProps?: Partial<ContourDisplayProperties>): ContourDisplay {\r\n if (!changedProps)\r\n return this;\r\n\r\n return ContourDisplay.create({ ...this, ...changedProps });\r\n }\r\n}\r\n"]}
|