@itwin/core-common 5.5.0-dev.2 → 5.5.0-dev.4
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 +12 -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
package/lib/cjs/Frustum.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Frustum.js","sourceRoot":"","sources":["../../src/Frustum.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAE8B;AAE9B;;;GAGG;AACH,IAAY,GA8BX;AA9BD,WAAY,GAAG;IACb,uBAAuB;IACvB,6BAAQ,CAAA;IACR,wBAAwB;IACxB,6BAAQ,CAAA;IACR,oBAAoB;IACpB,6BAAQ,CAAA;IACR,qBAAqB;IACrB,6BAAQ,CAAA;IACR,wBAAwB;IACxB,6BAAQ,CAAA;IAC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,wBAAQ,CAAC,0BAA0B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;YACnG,IAAI,aAAa,CAAC,gBAAgB,EAAE;gBAClC,SAAS,CAAC,mBAAmB,CAAC,yBAAS,CAAC,uBAAuB,CAAC,aAAa,EAAE,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC;QACpJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,mIAAmI;IAC5H,wBAAwB,CAAC,KAAmC;QACjE,MAAM,SAAS,GAAG,yBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,UAAU,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;QAClE,IAAI,SAAS,KAAK,UAAU;YAC1B,OAAO,SAAS,CAAC;QAEnB,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACvD,MAAM,UAAU,GAAG,IAAI,gCAAgB,EAAE,CAAC;QAC1C,MAAM,SAAS,GAAG,IAAI,gCAAgB,EAAE,CAAC;QACzC,SAAS,CAAC,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;QAEzD,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;IACxE,CAAC;CACF;AA/PD,0BA+PC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Views\n */\n\nimport {\n AxisOrder, ClipPlane, ConvexClipPlaneSet, Geometry, GrowableXYZArray, LowAndHighXY, LowAndHighXYZ, Map4d, Matrix3d, Plane3dByOriginAndUnitNormal, Point3d, Range3d, Transform, Vector3d, XYAndZ,\n} from \"@itwin/core-geometry\";\n\n/** The 8 corners of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\n * @public\n * @extensions\n */\nexport enum Npc {\n /** Left bottom rear */\n _000 = 0,\n /** Right bottom rear */\n _100 = 1,\n /** Left top rear */\n _010 = 2,\n /** Right top rear */\n _110 = 3,\n /** Left bottom front */\n _001 = 4,\n /** Right bottom front */\n _101 = 5,\n /** Left top front */\n _011 = 6,\n /** Right top front */\n _111 = 7,\n\n /* eslint-disable @typescript-eslint/no-duplicate-enum-values */\n LeftBottomRear = 0,\n RightBottomRear = 1,\n LeftTopRear = 2,\n RightTopRear = 3,\n LeftBottomFront = 4,\n RightBottomFront = 5,\n LeftTopFront = 6,\n RightTopFront = 7,\n /* eslint-enable @typescript-eslint/no-duplicate-enum-values */\n /** useful for sizing arrays */\n CORNER_COUNT = 8,\n}\n\n/** The 8 corners of an [[Npc]] Frustum.\n * @public\n */\nexport const NpcCorners = [ // eslint-disable-line @typescript-eslint/naming-convention\n new Point3d(0.0, 0.0, 0.0),\n new Point3d(1.0, 0.0, 0.0),\n new Point3d(0.0, 1.0, 0.0),\n new Point3d(1.0, 1.0, 0.0),\n new Point3d(0.0, 0.0, 1.0),\n new Point3d(1.0, 0.0, 1.0),\n new Point3d(0.0, 1.0, 1.0),\n new Point3d(1.0, 1.0, 1.0),\n];\nNpcCorners.forEach((corner) => Object.freeze(corner));\nObject.freeze(NpcCorners);\n\n/** The center point of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\n * @public\n */\nexport const NpcCenter = new Point3d(.5, .5, .5); // eslint-disable-line @typescript-eslint/naming-convention\nObject.freeze(NpcCenter);\n\n/** The region of physical (3d) space that appears in a view. It forms the field-of-view of a camera.\n * It is stored as 8 points, in [[Npc]] order, that must define a truncated pyramid.\n * @public\n */\nexport class Frustum {\n /** Array of the 8 points of this Frustum. */\n public readonly points: Point3d[] = [];\n /** Constructor for Frustum. Members are initialized to the Npc cube. */\n public constructor() {\n for (let i = 0; i < 8; ++i)\n this.points[i] = NpcCorners[i].clone();\n }\n\n /** Initialize this Frustum to the 8 corners of the NPC cube. */\n public initNpc() {\n for (let i = 0; i < 8; ++i)\n Point3d.createFrom(NpcCorners[i], this.points[i]);\n\n return this;\n }\n\n /** Get a corner Point from this Frustum. */\n public getCorner(i: number) { return this.points[i]; }\n /** Get the point at the center of this Frustum (halfway between RightTopFront and LeftBottomRear. */\n public getCenter(): Point3d {\n return this.getCorner(Npc.RightTopFront).interpolate(0.5, this.getCorner(Npc.LeftBottomRear));\n }\n\n /** Get the distance between two corners of this Frustum. */\n public distance(corner1: number, corner2: number): number {\n return this.getCorner(corner1).distance(this.getCorner(corner2));\n }\n\n /** Get the ratio of the length of the diagonal of the front plane to the diagonal of the back plane. */\n public getFraction(): number {\n return Geometry.safeDivideFraction(this.distance(Npc.LeftTopFront, Npc.RightBottomFront), this.distance(Npc.LeftTopRear, Npc.RightBottomRear), 0);\n }\n\n /** Multiply all the points of this Frustum by a Transform, in place. */\n public multiply(trans: Transform): void {\n trans.multiplyPoint3dArrayInPlace(this.points);\n }\n\n /** Offset all of the points of this Frustum by a vector. */\n public translate(offset: XYAndZ): void {\n for (const pt of this.points)\n pt.plus(offset, pt);\n }\n\n /** Transform all the points of this Frustum and return the result in another Frustum. */\n public transformBy(trans: Transform, result?: Frustum): Frustum {\n result = result ? result : new Frustum();\n trans.multiplyPoint3dArray(this.points, result.points);\n return result;\n }\n\n /** Calculate a bounding range from the 8 points in this Frustum. */\n public toRange(range?: Range3d): Range3d {\n return Range3d.createArray(this.points, range);\n }\n\n /** Make a copy of this Frustum.\n * @param result Optional Frustum for copy. If undefined allocate a new Frustum.\n */\n public clone(result?: Frustum): Frustum {\n result = result ? result : new Frustum();\n result.setFrom(this);\n return result;\n }\n\n /** Set the points of this Frustum to be copies of the points in another Frustum. */\n public setFrom(other: Frustum) { this.setFromCorners(other.points); }\n /** Set the points of this frustum from array of corner points in NPC order. */\n public setFromCorners(corners: Point3d[]) {\n for (let i = 0; i < 8; ++i)\n this.points[i].setFrom(corners[i]);\n }\n\n /** Scale this Frustum, in place, about its center by a scale factor. */\n public scaleAboutCenter(scale: number): void {\n const orig = this.clone();\n const f = 0.5 * (1.0 + scale);\n orig.points[Npc._111].interpolate(f, orig.points[Npc._000], this.points[Npc._000]);\n orig.points[Npc._011].interpolate(f, orig.points[Npc._100], this.points[Npc._100]);\n orig.points[Npc._101].interpolate(f, orig.points[Npc._010], this.points[Npc._010]);\n orig.points[Npc._001].interpolate(f, orig.points[Npc._110], this.points[Npc._110]);\n orig.points[Npc._110].interpolate(f, orig.points[Npc._001], this.points[Npc._001]);\n orig.points[Npc._010].interpolate(f, orig.points[Npc._101], this.points[Npc._101]);\n orig.points[Npc._100].interpolate(f, orig.points[Npc._011], this.points[Npc._011]);\n orig.points[Npc._000].interpolate(f, orig.points[Npc._111], this.points[Npc._111]);\n }\n /** The point at the center of the front face of this frustum */\n public get frontCenter() {\n return this.getCorner(Npc.LeftBottomFront).interpolate(.5, this.getCorner(Npc.RightTopFront));\n }\n\n /** The point at the center of the rear face of this frustum */\n public get rearCenter() {\n return this.getCorner(Npc.LeftBottomRear).interpolate(.5, this.getCorner(Npc.RightTopRear));\n }\n\n /** Scale this frustum's XY (viewing) plane about its center */\n public scaleXYAboutCenter(scale: number) {\n const frontCenter = this.frontCenter, rearCenter = this.rearCenter;\n frontCenter.interpolate(scale, this.points[Npc.LeftTopFront], this.points[Npc.LeftTopFront]);\n frontCenter.interpolate(scale, this.points[Npc.RightTopFront], this.points[Npc.RightTopFront]);\n frontCenter.interpolate(scale, this.points[Npc.LeftBottomFront], this.points[Npc.LeftBottomFront]);\n frontCenter.interpolate(scale, this.points[Npc.RightBottomFront], this.points[Npc.RightBottomFront]);\n\n rearCenter.interpolate(scale, this.points[Npc.LeftTopRear], this.points[Npc.LeftTopRear]);\n rearCenter.interpolate(scale, this.points[Npc.RightTopRear], this.points[Npc.RightTopRear]);\n rearCenter.interpolate(scale, this.points[Npc.LeftBottomRear], this.points[Npc.LeftBottomRear]);\n rearCenter.interpolate(scale, this.points[Npc.RightBottomRear], this.points[Npc.RightBottomRear]);\n }\n\n /** Create a Map4d that converts world coordinates to/from [[Npc]] coordinates of this Frustum. */\n public toMap4d(): Map4d | undefined {\n const org = this.getCorner(Npc.LeftBottomRear);\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\n return Map4d.createVectorFrustum(org, xVec, yVec, zVec, this.getFraction());\n }\n\n /** Get the rotation matrix to the frame of this frustum. This is equivalent to the view rotation matrix. */\n public getRotation(result?: Matrix3d): Matrix3d | undefined {\n const org = this.getCorner(Npc.LeftBottomRear);\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\n const matrix = Matrix3d.createRigidFromColumns(xVec, yVec, AxisOrder.XYZ, result);\n if (matrix)\n matrix.transposeInPlace();\n return matrix;\n }\n\n /** Get the eye point - undefined if parallel projection */\n public getEyePoint(result?: Point3d): Point3d | undefined {\n const fraction = this.getFraction();\n\n if (Math.abs(fraction - 1) < 1E-8)\n return undefined; // Parallel.\n\n const org = this.getCorner(Npc.LeftBottomRear);\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\n\n return org.plusScaled(zVec, 1 / (1 - fraction), result);\n }\n\n /** Invalidate this Frustum by setting all 8 points to zero. */\n public invalidate(): void {\n for (let i = 0; i < 8; ++i)\n this.points[i].set(0, 0, 0);\n }\n\n /** Return true if this Frustum is equal to another Frustum */\n public equals(rhs: Frustum): boolean {\n for (let i = 0; i < 8; ++i) {\n if (!this.points[i].isExactEqual(rhs.points[i]))\n return false;\n }\n return true;\n }\n /** Return true if all of the points in this Frustum are *almost* the same as the points in another Frustum.\n * @see [[equals]], [XYZ.isAlmostEqual]($geometry)\n */\n public isSame(other: Frustum): boolean {\n for (let i = 0; i < 8; ++i) {\n if (!this.points[i].isAlmostEqual(other.points[i]))\n return false;\n }\n\n return true;\n }\n\n /** Initialize this Frustum from a Range */\n public initFromRange(range: LowAndHighXYZ | LowAndHighXY): void {\n const getZ = (arg: any): number => arg.z !== undefined ? arg.z : 0;\n const pts = this.points;\n pts[0].x = pts[2].x = pts[4].x = pts[6].x = range.low.x;\n pts[1].x = pts[3].x = pts[5].x = pts[7].x = range.high.x;\n pts[0].y = pts[1].y = pts[4].y = pts[5].y = range.low.y;\n pts[2].y = pts[3].y = pts[6].y = pts[7].y = range.high.y;\n pts[0].z = pts[1].z = pts[2].z = pts[3].z = getZ(range.low);\n pts[4].z = pts[5].z = pts[6].z = pts[7].z = getZ(range.high);\n }\n\n /** Create a new Frustum from a Range3d */\n public static fromRange(range: LowAndHighXYZ | LowAndHighXY, out?: Frustum): Frustum {\n const frustum = undefined !== out ? out : new Frustum();\n frustum.initFromRange(range);\n return frustum;\n }\n\n /** Return true if this Frustum has a mirror (is not in the correct order.) */\n public get hasMirror(): boolean {\n const pts = this.points;\n const u = pts[Npc._000].vectorTo(pts[Npc._001]);\n const v = pts[Npc._000].vectorTo(pts[Npc._010]);\n const w = pts[Npc._000].vectorTo(pts[Npc._100]);\n return (u.tripleProduct(v, w) > 0);\n }\n /** Make sure the frustum point order does not include mirroring. If so, reverse the order. */\n public fixPointOrder(): void {\n if (!this.hasMirror)\n return;\n\n // frustum has mirroring, reverse points\n const pts = this.points;\n for (let i = 0; i < 8; i += 2) {\n const tmpPoint = pts[i];\n pts[i] = pts[i + 1];\n pts[i + 1] = tmpPoint;\n }\n }\n\n /** Get a convex set of clipping planes bounding the region contained by this Frustum. */\n public getRangePlanes(clipFront: boolean, clipBack: boolean, expandPlaneDistance: number): ConvexClipPlaneSet {\n const convexSet = ConvexClipPlaneSet.createEmpty();\n const scratchNormal = Vector3d.create();\n Vector3d.createCrossProductToPoints(this.points[5], this.points[3], this.points[1], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[1]) - expandPlaneDistance));\n Vector3d.createCrossProductToPoints(this.points[2], this.points[4], this.points[0], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\n Vector3d.createCrossProductToPoints(this.points[3], this.points[6], this.points[2], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[2]) - expandPlaneDistance));\n Vector3d.createCrossProductToPoints(this.points[4], this.points[1], this.points[0], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\n\n if (clipBack) {\n Vector3d.createCrossProductToPoints(this.points[1], this.points[2], this.points[0], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\n }\n if (clipFront) {\n Vector3d.createCrossProductToPoints(this.points[6], this.points[5], this.points[4], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[4]) - expandPlaneDistance));\n }\n return convexSet;\n }\n\n /** Get a (convex) polygon that represents the intersection of this frustum with a plane, or undefined if no intersection exists */\n public getIntersectionWithPlane(plane: Plane3dByOriginAndUnitNormal): Point3d[] | undefined {\n const clipPlane = ClipPlane.createPlane(plane);\n const loopPoints = clipPlane.intersectRange(this.toRange(), true);\n if (undefined === loopPoints)\n return undefined;\n\n const convexSet = this.getRangePlanes(false, false, 0);\n const workPoints = new GrowableXYZArray();\n const outPoints = new GrowableXYZArray();\n convexSet.polygonClip(loopPoints, outPoints, workPoints);\n\n return outPoints.length < 4 ? undefined : outPoints.getPoint3dArray();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Frustum.js","sourceRoot":"","sources":["../../src/Frustum.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAE8B;AAE9B;;;GAGG;AACH,IAAY,GA8BX;AA9BD,WAAY,GAAG;IACb,uBAAuB;IACvB,6BAAQ,CAAA;IACR,wBAAwB;IACxB,6BAAQ,CAAA;IACR,oBAAoB;IACpB,6BAAQ,CAAA;IACR,qBAAqB;IACrB,6BAAQ,CAAA;IACR,wBAAwB;IACxB,6BAAQ,CAAA;IACR,yBAAyB;IACzB,6BAAQ,CAAA;IACR,qBAAqB;IACrB,6BAAQ,CAAA;IACR,sBAAsB;IACtB,6BAAQ,CAAA;IAER,gEAAgE;IAChE,iDAAkB,CAAA;IAClB,mDAAmB,CAAA;IACnB,2CAAe,CAAA;IACf,6CAAgB,CAAA;IAChB,mDAAmB,CAAA;IACnB,qDAAoB,CAAA;IACpB,6CAAgB,CAAA;IAChB,+CAAiB,CAAA;IACjB,+DAA+D;IAC/D,+BAA+B;IAC/B,6CAAgB,CAAA;AAClB,CAAC,EA9BW,GAAG,mBAAH,GAAG,QA8Bd;AAED;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,IAAI,uBAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC1B,IAAI,uBAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC1B,IAAI,uBAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GA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c,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;QAClE,IAAI,SAAS,KAAK,UAAU;YAC1B,OAAO,SAAS,CAAC;QAEnB,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACvD,MAAM,UAAU,GAAG,IAAI,gCAAgB,EAAE,CAAC;QAC1C,MAAM,SAAS,GAAG,IAAI,gCAAgB,EAAE,CAAC;QACzC,SAAS,CAAC,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;QAEzD,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;IACxE,CAAC;CACF;AA/PD,0BA+PC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport {\r\n AxisOrder, ClipPlane, ConvexClipPlaneSet, Geometry, GrowableXYZArray, LowAndHighXY, LowAndHighXYZ, Map4d, Matrix3d, Plane3dByOriginAndUnitNormal, Point3d, Range3d, Transform, Vector3d, XYAndZ,\r\n} from \"@itwin/core-geometry\";\r\n\r\n/** The 8 corners of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum Npc {\r\n /** Left bottom rear */\r\n _000 = 0,\r\n /** Right bottom rear */\r\n _100 = 1,\r\n /** Left top rear */\r\n _010 = 2,\r\n /** Right top rear */\r\n _110 = 3,\r\n /** Left bottom front */\r\n _001 = 4,\r\n /** Right bottom front */\r\n _101 = 5,\r\n /** Left top front */\r\n _011 = 6,\r\n /** Right top front */\r\n _111 = 7,\r\n\r\n /* eslint-disable @typescript-eslint/no-duplicate-enum-values */\r\n LeftBottomRear = 0,\r\n RightBottomRear = 1,\r\n LeftTopRear = 2,\r\n RightTopRear = 3,\r\n LeftBottomFront = 4,\r\n RightBottomFront = 5,\r\n LeftTopFront = 6,\r\n RightTopFront = 7,\r\n /* eslint-enable @typescript-eslint/no-duplicate-enum-values */\r\n /** useful for sizing arrays */\r\n CORNER_COUNT = 8,\r\n}\r\n\r\n/** The 8 corners of an [[Npc]] Frustum.\r\n * @public\r\n */\r\nexport const NpcCorners = [ // eslint-disable-line @typescript-eslint/naming-convention\r\n new Point3d(0.0, 0.0, 0.0),\r\n new Point3d(1.0, 0.0, 0.0),\r\n new Point3d(0.0, 1.0, 0.0),\r\n new Point3d(1.0, 1.0, 0.0),\r\n new Point3d(0.0, 0.0, 1.0),\r\n new Point3d(1.0, 0.0, 1.0),\r\n new Point3d(0.0, 1.0, 1.0),\r\n new Point3d(1.0, 1.0, 1.0),\r\n];\r\nNpcCorners.forEach((corner) => Object.freeze(corner));\r\nObject.freeze(NpcCorners);\r\n\r\n/** The center point of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\r\n * @public\r\n */\r\nexport const NpcCenter = new Point3d(.5, .5, .5); // eslint-disable-line @typescript-eslint/naming-convention\r\nObject.freeze(NpcCenter);\r\n\r\n/** The region of physical (3d) space that appears in a view. It forms the field-of-view of a camera.\r\n * It is stored as 8 points, in [[Npc]] order, that must define a truncated pyramid.\r\n * @public\r\n */\r\nexport class Frustum {\r\n /** Array of the 8 points of this Frustum. */\r\n public readonly points: Point3d[] = [];\r\n /** Constructor for Frustum. Members are initialized to the Npc cube. */\r\n public constructor() {\r\n for (let i = 0; i < 8; ++i)\r\n this.points[i] = NpcCorners[i].clone();\r\n }\r\n\r\n /** Initialize this Frustum to the 8 corners of the NPC cube. */\r\n public initNpc() {\r\n for (let i = 0; i < 8; ++i)\r\n Point3d.createFrom(NpcCorners[i], this.points[i]);\r\n\r\n return this;\r\n }\r\n\r\n /** Get a corner Point from this Frustum. */\r\n public getCorner(i: number) { return this.points[i]; }\r\n /** Get the point at the center of this Frustum (halfway between RightTopFront and LeftBottomRear. */\r\n public getCenter(): Point3d {\r\n return this.getCorner(Npc.RightTopFront).interpolate(0.5, this.getCorner(Npc.LeftBottomRear));\r\n }\r\n\r\n /** Get the distance between two corners of this Frustum. */\r\n public distance(corner1: number, corner2: number): number {\r\n return this.getCorner(corner1).distance(this.getCorner(corner2));\r\n }\r\n\r\n /** Get the ratio of the length of the diagonal of the front plane to the diagonal of the back plane. */\r\n public getFraction(): number {\r\n return Geometry.safeDivideFraction(this.distance(Npc.LeftTopFront, Npc.RightBottomFront), this.distance(Npc.LeftTopRear, Npc.RightBottomRear), 0);\r\n }\r\n\r\n /** Multiply all the points of this Frustum by a Transform, in place. */\r\n public multiply(trans: Transform): void {\r\n trans.multiplyPoint3dArrayInPlace(this.points);\r\n }\r\n\r\n /** Offset all of the points of this Frustum by a vector. */\r\n public translate(offset: XYAndZ): void {\r\n for (const pt of this.points)\r\n pt.plus(offset, pt);\r\n }\r\n\r\n /** Transform all the points of this Frustum and return the result in another Frustum. */\r\n public transformBy(trans: Transform, result?: Frustum): Frustum {\r\n result = result ? result : new Frustum();\r\n trans.multiplyPoint3dArray(this.points, result.points);\r\n return result;\r\n }\r\n\r\n /** Calculate a bounding range from the 8 points in this Frustum. */\r\n public toRange(range?: Range3d): Range3d {\r\n return Range3d.createArray(this.points, range);\r\n }\r\n\r\n /** Make a copy of this Frustum.\r\n * @param result Optional Frustum for copy. If undefined allocate a new Frustum.\r\n */\r\n public clone(result?: Frustum): Frustum {\r\n result = result ? result : new Frustum();\r\n result.setFrom(this);\r\n return result;\r\n }\r\n\r\n /** Set the points of this Frustum to be copies of the points in another Frustum. */\r\n public setFrom(other: Frustum) { this.setFromCorners(other.points); }\r\n /** Set the points of this frustum from array of corner points in NPC order. */\r\n public setFromCorners(corners: Point3d[]) {\r\n for (let i = 0; i < 8; ++i)\r\n this.points[i].setFrom(corners[i]);\r\n }\r\n\r\n /** Scale this Frustum, in place, about its center by a scale factor. */\r\n public scaleAboutCenter(scale: number): void {\r\n const orig = this.clone();\r\n const f = 0.5 * (1.0 + scale);\r\n orig.points[Npc._111].interpolate(f, orig.points[Npc._000], this.points[Npc._000]);\r\n orig.points[Npc._011].interpolate(f, orig.points[Npc._100], this.points[Npc._100]);\r\n orig.points[Npc._101].interpolate(f, orig.points[Npc._010], this.points[Npc._010]);\r\n orig.points[Npc._001].interpolate(f, orig.points[Npc._110], this.points[Npc._110]);\r\n orig.points[Npc._110].interpolate(f, orig.points[Npc._001], this.points[Npc._001]);\r\n orig.points[Npc._010].interpolate(f, orig.points[Npc._101], this.points[Npc._101]);\r\n orig.points[Npc._100].interpolate(f, orig.points[Npc._011], this.points[Npc._011]);\r\n orig.points[Npc._000].interpolate(f, orig.points[Npc._111], this.points[Npc._111]);\r\n }\r\n /** The point at the center of the front face of this frustum */\r\n public get frontCenter() {\r\n return this.getCorner(Npc.LeftBottomFront).interpolate(.5, this.getCorner(Npc.RightTopFront));\r\n }\r\n\r\n /** The point at the center of the rear face of this frustum */\r\n public get rearCenter() {\r\n return this.getCorner(Npc.LeftBottomRear).interpolate(.5, this.getCorner(Npc.RightTopRear));\r\n }\r\n\r\n /** Scale this frustum's XY (viewing) plane about its center */\r\n public scaleXYAboutCenter(scale: number) {\r\n const frontCenter = this.frontCenter, rearCenter = this.rearCenter;\r\n frontCenter.interpolate(scale, this.points[Npc.LeftTopFront], this.points[Npc.LeftTopFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.RightTopFront], this.points[Npc.RightTopFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.LeftBottomFront], this.points[Npc.LeftBottomFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.RightBottomFront], this.points[Npc.RightBottomFront]);\r\n\r\n rearCenter.interpolate(scale, this.points[Npc.LeftTopRear], this.points[Npc.LeftTopRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.RightTopRear], this.points[Npc.RightTopRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.LeftBottomRear], this.points[Npc.LeftBottomRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.RightBottomRear], this.points[Npc.RightBottomRear]);\r\n }\r\n\r\n /** Create a Map4d that converts world coordinates to/from [[Npc]] coordinates of this Frustum. */\r\n public toMap4d(): Map4d | undefined {\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\r\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\r\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\r\n return Map4d.createVectorFrustum(org, xVec, yVec, zVec, this.getFraction());\r\n }\r\n\r\n /** Get the rotation matrix to the frame of this frustum. This is equivalent to the view rotation matrix. */\r\n public getRotation(result?: Matrix3d): Matrix3d | undefined {\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\r\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\r\n const matrix = Matrix3d.createRigidFromColumns(xVec, yVec, AxisOrder.XYZ, result);\r\n if (matrix)\r\n matrix.transposeInPlace();\r\n return matrix;\r\n }\r\n\r\n /** Get the eye point - undefined if parallel projection */\r\n public getEyePoint(result?: Point3d): Point3d | undefined {\r\n const fraction = this.getFraction();\r\n\r\n if (Math.abs(fraction - 1) < 1E-8)\r\n return undefined; // Parallel.\r\n\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\r\n\r\n return org.plusScaled(zVec, 1 / (1 - fraction), result);\r\n }\r\n\r\n /** Invalidate this Frustum by setting all 8 points to zero. */\r\n public invalidate(): void {\r\n for (let i = 0; i < 8; ++i)\r\n this.points[i].set(0, 0, 0);\r\n }\r\n\r\n /** Return true if this Frustum is equal to another Frustum */\r\n public equals(rhs: Frustum): boolean {\r\n for (let i = 0; i < 8; ++i) {\r\n if (!this.points[i].isExactEqual(rhs.points[i]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n /** Return true if all of the points in this Frustum are *almost* the same as the points in another Frustum.\r\n * @see [[equals]], [XYZ.isAlmostEqual]($geometry)\r\n */\r\n public isSame(other: Frustum): boolean {\r\n for (let i = 0; i < 8; ++i) {\r\n if (!this.points[i].isAlmostEqual(other.points[i]))\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /** Initialize this Frustum from a Range */\r\n public initFromRange(range: LowAndHighXYZ | LowAndHighXY): void {\r\n const getZ = (arg: any): number => arg.z !== undefined ? arg.z : 0;\r\n const pts = this.points;\r\n pts[0].x = pts[2].x = pts[4].x = pts[6].x = range.low.x;\r\n pts[1].x = pts[3].x = pts[5].x = pts[7].x = range.high.x;\r\n pts[0].y = pts[1].y = pts[4].y = pts[5].y = range.low.y;\r\n pts[2].y = pts[3].y = pts[6].y = pts[7].y = range.high.y;\r\n pts[0].z = pts[1].z = pts[2].z = pts[3].z = getZ(range.low);\r\n pts[4].z = pts[5].z = pts[6].z = pts[7].z = getZ(range.high);\r\n }\r\n\r\n /** Create a new Frustum from a Range3d */\r\n public static fromRange(range: LowAndHighXYZ | LowAndHighXY, out?: Frustum): Frustum {\r\n const frustum = undefined !== out ? out : new Frustum();\r\n frustum.initFromRange(range);\r\n return frustum;\r\n }\r\n\r\n /** Return true if this Frustum has a mirror (is not in the correct order.) */\r\n public get hasMirror(): boolean {\r\n const pts = this.points;\r\n const u = pts[Npc._000].vectorTo(pts[Npc._001]);\r\n const v = pts[Npc._000].vectorTo(pts[Npc._010]);\r\n const w = pts[Npc._000].vectorTo(pts[Npc._100]);\r\n return (u.tripleProduct(v, w) > 0);\r\n }\r\n /** Make sure the frustum point order does not include mirroring. If so, reverse the order. */\r\n public fixPointOrder(): void {\r\n if (!this.hasMirror)\r\n return;\r\n\r\n // frustum has mirroring, reverse points\r\n const pts = this.points;\r\n for (let i = 0; i < 8; i += 2) {\r\n const tmpPoint = pts[i];\r\n pts[i] = pts[i + 1];\r\n pts[i + 1] = tmpPoint;\r\n }\r\n }\r\n\r\n /** Get a convex set of clipping planes bounding the region contained by this Frustum. */\r\n public getRangePlanes(clipFront: boolean, clipBack: boolean, expandPlaneDistance: number): ConvexClipPlaneSet {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n const scratchNormal = Vector3d.create();\r\n Vector3d.createCrossProductToPoints(this.points[5], this.points[3], this.points[1], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[1]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[2], this.points[4], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[3], this.points[6], this.points[2], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[2]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[4], this.points[1], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n\r\n if (clipBack) {\r\n Vector3d.createCrossProductToPoints(this.points[1], this.points[2], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n }\r\n if (clipFront) {\r\n Vector3d.createCrossProductToPoints(this.points[6], this.points[5], this.points[4], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[4]) - expandPlaneDistance));\r\n }\r\n return convexSet;\r\n }\r\n\r\n /** Get a (convex) polygon that represents the intersection of this frustum with a plane, or undefined if no intersection exists */\r\n public getIntersectionWithPlane(plane: Plane3dByOriginAndUnitNormal): Point3d[] | undefined {\r\n const clipPlane = ClipPlane.createPlane(plane);\r\n const loopPoints = clipPlane.intersectRange(this.toRange(), true);\r\n if (undefined === loopPoints)\r\n return undefined;\r\n\r\n const convexSet = this.getRangePlanes(false, false, 0);\r\n const workPoints = new GrowableXYZArray();\r\n const outPoints = new GrowableXYZArray();\r\n convexSet.polygonClip(loopPoints, outPoints, workPoints);\r\n\r\n return outPoints.length < 4 ? undefined : outPoints.getPoint3dArray();\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericInstanceFilter.js","sourceRoot":"","sources":["../../src/GenericInstanceFilter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA4EH,YAAY;AACZ,2DAA2D;AAC3D,IAAiB,8BAA8B,CAkC9C;AAlCD,WAAiB,8BAA8B;IAc7C,gKAAgK;IAChK,SAAgB,SAAS,CAAC,KAA4C;QACpE,OAAQ,KAAgD,CAAC,CAAC,KAAK,SAAS,IAAK,KAAgD,CAAC,CAAC,KAAK,SAAS,CAAC;IAChJ,CAAC;IAFe,wCAAS,YAExB,CAAA;IACD,mFAAmF;IACnF,SAAgB,SAAS,CAAC,KAA4C;QACpE,OAAO,SAAS,CAAC,KAAK,CAAC,IAAK,KAAgD,CAAC,CAAC,KAAK,SAAS,CAAC;IAC/F,CAAC;IAFe,wCAAS,YAExB,CAAA;IACD,uFAAuF;IACvF,SAAgB,aAAa,CAAC,KAA4C;QACxE,OAAQ,KAAoD,KAAK,SAAS,IAAK,KAAoD,CAAC,SAAS,KAAK,SAAS,CAAC;IAC9J,CAAC;IAFe,4CAAa,gBAE5B,CAAA;AASH,CAAC,EAlCgB,8BAA8B,8CAA9B,8BAA8B,QAkC9C;AAsFD,YAAY;AACZ,IAAiB,qBAAqB,CAQrC;AARD,WAAiB,qBAAqB;IACpC;;;OAGG;IACH,SAAgB,iBAAiB,CAAC,GAA+D;QAC/F,OAAQ,GAAsC,CAAC,KAAK,KAAK,SAAS,CAAC;IACrE,CAAC;IAFe,uCAAiB,oBAEhC,CAAA;AACH,CAAC,EARgB,qBAAqB,qCAArB,qBAAqB,QAQrC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utils\n */\n\n/**\n * Generic instance filter that has all the necessary information to build filtering query.\n * @beta\n */\nexport interface GenericInstanceFilter {\n /** Single filter rule or multiple rules joined by logical operator. */\n rules: GenericInstanceFilterRule | GenericInstanceFilterRuleGroup;\n /**\n * Information about related instances that has access to the properties used in filter.\n * These can be used to create `JOIN` clause when building `ECSQL` query. Each related property\n * used in rule will have [[GenericInstanceFilterRule.sourceAlias]] that matches [[GenericInstanceFilterRelatedInstanceDescription.alias]].\n * If more than one property of the same related instance is used, they will share the same alias.\n */\n relatedInstances: GenericInstanceFilterRelatedInstanceDescription[];\n /**\n * List of class names whose properties are used in rules. Might be used to find common base class when building\n * filter for instances of different classes.\n */\n propertyClassNames: string[];\n /**\n * List of class names which will be used for additionally only querying instances of specific classes.\n */\n filteredClassNames?: string[];\n}\n\n/**\n * Type definition that describes operators supported by [[GenericInstanceFilterRule]].\n * @note `like` operator should be handled as a contains operator - it matches all strings that contain a given string.\n * @beta\n */\nexport type GenericInstanceFilterRuleOperator =\n | \"is-equal\"\n | \"is-not-equal\"\n | \"is-null\"\n | \"is-not-null\"\n | \"is-true\"\n | \"is-false\"\n | \"less\"\n | \"less-or-equal\"\n | \"greater\"\n | \"greater-or-equal\"\n | \"like\";\n\n/**\n * Type definition that describes numeric values of [[GenericInstanceFilterRule]].\n * @beta\n */\ninterface GenericInstanceFilterRuleNumericValue {\n displayValue: string;\n rawValue: number;\n /**\n * Rounding error that should be taken into consideration when comparing numeric values. This is useful\n * when numeric display value is rounded and displayed with less precision than actual value.\n *\n * Example: entered value is 0.12 but it should match values like 0.12345. In that case `roundingError` can be set to `0.005` and comparison should be done in `0.115` to `0.125` range.\n */\n roundingError?: number;\n}\n\n/**\n * Type definition that describes non-numeric values of [[GenericInstanceFilterRule]].\n * @beta\n */\ninterface GenericInstanceFilterRuleNonNumericValue {\n displayValue: string;\n rawValue: Exclude<GenericInstanceFilterRuleValue.Values, number>;\n}\n\n/**\n * Type definition that describes value of [[GenericInstanceFilterRule]].\n * @beta\n */\nexport type GenericInstanceFilterRuleValue = GenericInstanceFilterRuleNumericValue | GenericInstanceFilterRuleNonNumericValue;\n\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace GenericInstanceFilterRuleValue {\n export interface Point2d {\n x: number;\n y: number;\n }\n export interface Point3d {\n x: number;\n y: number;\n z: number;\n }\n export interface InstanceKey {\n id: string;\n className: string;\n }\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.Point2d]] like. Returns `true` for `Point2d` and [[GenericInstanceFilterRuleValue.Point3d]]. */\n export function isPoint2d(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.Point2d {\n return (value as GenericInstanceFilterRuleValue.Point2d).x !== undefined && (value as GenericInstanceFilterRuleValue.Point2d).y !== undefined;\n }\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.Point3d]] like. */\n export function isPoint3d(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.Point3d {\n return isPoint2d(value) && (value as GenericInstanceFilterRuleValue.Point3d).z !== undefined;\n }\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.InstanceKey]] like. */\n export function isInstanceKey(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.InstanceKey {\n return (value as GenericInstanceFilterRuleValue.InstanceKey) !== undefined && (value as GenericInstanceFilterRuleValue.InstanceKey).className !== undefined;\n }\n export type Values =\n | string\n | number\n | boolean\n | Date\n | GenericInstanceFilterRuleValue.Point2d\n | GenericInstanceFilterRuleValue.Point3d\n | GenericInstanceFilterRuleValue.InstanceKey;\n}\n\n/**\n * Defines single filter rule.\n * @beta\n */\nexport interface GenericInstanceFilterRule {\n /**\n * Alias of the source to access this property. For related properties `sourceAlias` should match\n * [[GenericInstanceFilterRelatedInstanceDescription.alias]] of one [[GenericInstanceFilter.relatedInstances]].\n */\n sourceAlias: string;\n /**\n * Property name for accessing property value.\n */\n propertyName: string;\n /**\n * Comparison operator that should be used to compare property value.\n */\n operator: GenericInstanceFilterRuleOperator;\n /**\n * Value to which property values is compared to. For unary operators value is `undefined`.\n */\n value?: GenericInstanceFilterRuleValue;\n /**\n * Type name of the property.\n */\n propertyTypeName: string;\n}\n\n/**\n * Type definition that describes operators supported by [[GenericInstanceFilterRuleGroup]].\n * @beta\n */\nexport type GenericInstanceFilterRuleGroupOperator = \"and\" | \"or\";\n\n/**\n * Group of filter rules joined by logical operator.\n * @beta\n */\nexport interface GenericInstanceFilterRuleGroup {\n /**\n * Operator that should be used to join rules.\n */\n operator: GenericInstanceFilterRuleGroupOperator;\n /**\n * List of rules or rule groups that should be joined by `operator`.\n */\n rules: Array<GenericInstanceFilterRule | GenericInstanceFilterRuleGroup>;\n}\n\n/**\n * Describes related instance whose property was used in the filter.\n * @beta\n */\nexport interface GenericInstanceFilterRelatedInstanceDescription {\n /**\n * Describes path that should be used to reach related instance from the source.\n */\n path: GenericInstanceFilterRelationshipStep[];\n /**\n * Related instance alias. This alias match [[GenericInstanceFilterRule.sourceAlias]] in all filter rules where\n * properties of this related instance is used.\n */\n alias: string;\n}\n\n/**\n * Describes single step between source class and target class.\n * @beta\n */\nexport interface GenericInstanceFilterRelationshipStep {\n /** Full class name of the source class, e.g. `BisCore:Element`. */\n sourceClassName: string;\n /** Full class name of the target class, e.g. `BisCore:Element`. */\n targetClassName: string;\n /** Full class name of the relationship class that should be used to move from source to target, e.g. `BisCore:ElementOwnsChildElements`. */\n relationshipClassName: string;\n /**\n * A flag that describes if this step follows relationship class in forward or backward direction.\n * If the step follows relationship in forward direction then `sourceClassName` matches relationship's source class and `targetClassName` matches relationship's target class.\n * Otherwise, `sourceClassName` matches relationship's target class and `targetClassName` matches relationship's source class.\n */\n isForwardRelationship: boolean;\n}\n\n/** @beta */\nexport namespace GenericInstanceFilter {\n /**\n * Function that checks if supplied object is [[GenericInstanceFilterRuleGroup]].\n * @beta\n */\n export function isFilterRuleGroup(obj: GenericInstanceFilterRule | GenericInstanceFilterRuleGroup): obj is GenericInstanceFilterRuleGroup {\n return (obj as GenericInstanceFilterRuleGroup).rules !== undefined;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GenericInstanceFilter.js","sourceRoot":"","sources":["../../src/GenericInstanceFilter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA4EH,YAAY;AACZ,2DAA2D;AAC3D,IAAiB,8BAA8B,CAkC9C;AAlCD,WAAiB,8BAA8B;IAc7C,gKAAgK;IAChK,SAAgB,SAAS,CAAC,KAA4C;QACpE,OAAQ,KAAgD,CAAC,CAAC,KAAK,SAAS,IAAK,KAAgD,CAAC,CAAC,KAAK,SAAS,CAAC;IAChJ,CAAC;IAFe,wCAAS,YAExB,CAAA;IACD,mFAAmF;IACnF,SAAgB,SAAS,CAAC,KAA4C;QACpE,OAAO,SAAS,CAAC,KAAK,CAAC,IAAK,KAAgD,CAAC,CAAC,KAAK,SAAS,CAAC;IAC/F,CAAC;IAFe,wCAAS,YAExB,CAAA;IACD,uFAAuF;IACvF,SAAgB,aAAa,CAAC,KAA4C;QACxE,OAAQ,KAAoD,KAAK,SAAS,IAAK,KAAoD,CAAC,SAAS,KAAK,SAAS,CAAC;IAC9J,CAAC;IAFe,4CAAa,gBAE5B,CAAA;AASH,CAAC,EAlCgB,8BAA8B,8CAA9B,8BAA8B,QAkC9C;AAsFD,YAAY;AACZ,IAAiB,qBAAqB,CAQrC;AARD,WAAiB,qBAAqB;IACpC;;;OAGG;IACH,SAAgB,iBAAiB,CAAC,GAA+D;QAC/F,OAAQ,GAAsC,CAAC,KAAK,KAAK,SAAS,CAAC;IACrE,CAAC;IAFe,uCAAiB,oBAEhC,CAAA;AACH,CAAC,EARgB,qBAAqB,qCAArB,qBAAqB,QAQrC","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 Utils\r\n */\r\n\r\n/**\r\n * Generic instance filter that has all the necessary information to build filtering query.\r\n * @beta\r\n */\r\nexport interface GenericInstanceFilter {\r\n /** Single filter rule or multiple rules joined by logical operator. */\r\n rules: GenericInstanceFilterRule | GenericInstanceFilterRuleGroup;\r\n /**\r\n * Information about related instances that has access to the properties used in filter.\r\n * These can be used to create `JOIN` clause when building `ECSQL` query. Each related property\r\n * used in rule will have [[GenericInstanceFilterRule.sourceAlias]] that matches [[GenericInstanceFilterRelatedInstanceDescription.alias]].\r\n * If more than one property of the same related instance is used, they will share the same alias.\r\n */\r\n relatedInstances: GenericInstanceFilterRelatedInstanceDescription[];\r\n /**\r\n * List of class names whose properties are used in rules. Might be used to find common base class when building\r\n * filter for instances of different classes.\r\n */\r\n propertyClassNames: string[];\r\n /**\r\n * List of class names which will be used for additionally only querying instances of specific classes.\r\n */\r\n filteredClassNames?: string[];\r\n}\r\n\r\n/**\r\n * Type definition that describes operators supported by [[GenericInstanceFilterRule]].\r\n * @note `like` operator should be handled as a contains operator - it matches all strings that contain a given string.\r\n * @beta\r\n */\r\nexport type GenericInstanceFilterRuleOperator =\r\n | \"is-equal\"\r\n | \"is-not-equal\"\r\n | \"is-null\"\r\n | \"is-not-null\"\r\n | \"is-true\"\r\n | \"is-false\"\r\n | \"less\"\r\n | \"less-or-equal\"\r\n | \"greater\"\r\n | \"greater-or-equal\"\r\n | \"like\";\r\n\r\n/**\r\n * Type definition that describes numeric values of [[GenericInstanceFilterRule]].\r\n * @beta\r\n */\r\ninterface GenericInstanceFilterRuleNumericValue {\r\n displayValue: string;\r\n rawValue: number;\r\n /**\r\n * Rounding error that should be taken into consideration when comparing numeric values. This is useful\r\n * when numeric display value is rounded and displayed with less precision than actual value.\r\n *\r\n * Example: entered value is 0.12 but it should match values like 0.12345. In that case `roundingError` can be set to `0.005` and comparison should be done in `0.115` to `0.125` range.\r\n */\r\n roundingError?: number;\r\n}\r\n\r\n/**\r\n * Type definition that describes non-numeric values of [[GenericInstanceFilterRule]].\r\n * @beta\r\n */\r\ninterface GenericInstanceFilterRuleNonNumericValue {\r\n displayValue: string;\r\n rawValue: Exclude<GenericInstanceFilterRuleValue.Values, number>;\r\n}\r\n\r\n/**\r\n * Type definition that describes value of [[GenericInstanceFilterRule]].\r\n * @beta\r\n */\r\nexport type GenericInstanceFilterRuleValue = GenericInstanceFilterRuleNumericValue | GenericInstanceFilterRuleNonNumericValue;\r\n\r\n/** @beta */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace GenericInstanceFilterRuleValue {\r\n export interface Point2d {\r\n x: number;\r\n y: number;\r\n }\r\n export interface Point3d {\r\n x: number;\r\n y: number;\r\n z: number;\r\n }\r\n export interface InstanceKey {\r\n id: string;\r\n className: string;\r\n }\r\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.Point2d]] like. Returns `true` for `Point2d` and [[GenericInstanceFilterRuleValue.Point3d]]. */\r\n export function isPoint2d(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.Point2d {\r\n return (value as GenericInstanceFilterRuleValue.Point2d).x !== undefined && (value as GenericInstanceFilterRuleValue.Point2d).y !== undefined;\r\n }\r\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.Point3d]] like. */\r\n export function isPoint3d(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.Point3d {\r\n return isPoint2d(value) && (value as GenericInstanceFilterRuleValue.Point3d).z !== undefined;\r\n }\r\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.InstanceKey]] like. */\r\n export function isInstanceKey(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.InstanceKey {\r\n return (value as GenericInstanceFilterRuleValue.InstanceKey) !== undefined && (value as GenericInstanceFilterRuleValue.InstanceKey).className !== undefined;\r\n }\r\n export type Values =\r\n | string\r\n | number\r\n | boolean\r\n | Date\r\n | GenericInstanceFilterRuleValue.Point2d\r\n | GenericInstanceFilterRuleValue.Point3d\r\n | GenericInstanceFilterRuleValue.InstanceKey;\r\n}\r\n\r\n/**\r\n * Defines single filter rule.\r\n * @beta\r\n */\r\nexport interface GenericInstanceFilterRule {\r\n /**\r\n * Alias of the source to access this property. For related properties `sourceAlias` should match\r\n * [[GenericInstanceFilterRelatedInstanceDescription.alias]] of one [[GenericInstanceFilter.relatedInstances]].\r\n */\r\n sourceAlias: string;\r\n /**\r\n * Property name for accessing property value.\r\n */\r\n propertyName: string;\r\n /**\r\n * Comparison operator that should be used to compare property value.\r\n */\r\n operator: GenericInstanceFilterRuleOperator;\r\n /**\r\n * Value to which property values is compared to. For unary operators value is `undefined`.\r\n */\r\n value?: GenericInstanceFilterRuleValue;\r\n /**\r\n * Type name of the property.\r\n */\r\n propertyTypeName: string;\r\n}\r\n\r\n/**\r\n * Type definition that describes operators supported by [[GenericInstanceFilterRuleGroup]].\r\n * @beta\r\n */\r\nexport type GenericInstanceFilterRuleGroupOperator = \"and\" | \"or\";\r\n\r\n/**\r\n * Group of filter rules joined by logical operator.\r\n * @beta\r\n */\r\nexport interface GenericInstanceFilterRuleGroup {\r\n /**\r\n * Operator that should be used to join rules.\r\n */\r\n operator: GenericInstanceFilterRuleGroupOperator;\r\n /**\r\n * List of rules or rule groups that should be joined by `operator`.\r\n */\r\n rules: Array<GenericInstanceFilterRule | GenericInstanceFilterRuleGroup>;\r\n}\r\n\r\n/**\r\n * Describes related instance whose property was used in the filter.\r\n * @beta\r\n */\r\nexport interface GenericInstanceFilterRelatedInstanceDescription {\r\n /**\r\n * Describes path that should be used to reach related instance from the source.\r\n */\r\n path: GenericInstanceFilterRelationshipStep[];\r\n /**\r\n * Related instance alias. This alias match [[GenericInstanceFilterRule.sourceAlias]] in all filter rules where\r\n * properties of this related instance is used.\r\n */\r\n alias: string;\r\n}\r\n\r\n/**\r\n * Describes single step between source class and target class.\r\n * @beta\r\n */\r\nexport interface GenericInstanceFilterRelationshipStep {\r\n /** Full class name of the source class, e.g. `BisCore:Element`. */\r\n sourceClassName: string;\r\n /** Full class name of the target class, e.g. `BisCore:Element`. */\r\n targetClassName: string;\r\n /** Full class name of the relationship class that should be used to move from source to target, e.g. `BisCore:ElementOwnsChildElements`. */\r\n relationshipClassName: string;\r\n /**\r\n * A flag that describes if this step follows relationship class in forward or backward direction.\r\n * If the step follows relationship in forward direction then `sourceClassName` matches relationship's source class and `targetClassName` matches relationship's target class.\r\n * Otherwise, `sourceClassName` matches relationship's target class and `targetClassName` matches relationship's source class.\r\n */\r\n isForwardRelationship: boolean;\r\n}\r\n\r\n/** @beta */\r\nexport namespace GenericInstanceFilter {\r\n /**\r\n * Function that checks if supplied object is [[GenericInstanceFilterRuleGroup]].\r\n * @beta\r\n */\r\n export function isFilterRuleGroup(obj: GenericInstanceFilterRule | GenericInstanceFilterRuleGroup): obj is GenericInstanceFilterRuleGroup {\r\n return (obj as GenericInstanceFilterRuleGroup).rules !== undefined;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoCoordinateServices.js","sourceRoot":"","sources":["../../src/GeoCoordinateServices.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA+DH,sDAaC;AA1ED,qDAAqD;AAErD,sDAAuD;AAIvD;;;;;;GAMG;AACH,IAAY,cA2CX;AA3CD,WAAY,cAAc;IACxB,kDAAkD;IAClD,yDAAW,CAAA;IACX,sIAAsI;IACtI,qEAAkB,CAAA;IAClB;;;;;;;;;;OAUG;IACH,2EAAoB,CAAA;IACpB;;;;OAIG;IACH,yFAA2B,CAAA;IAC3B;;;;OAIG;IACH,4EAAqB,CAAA;IACrB;;;;OAIG;IACH,8FAA8B,CAAA;IAC9B,sGAAsG;IACtG,kEAAiB,CAAA;IACjB;;;;OAIG;IACH,8DAAgB,CAAA;AAClB,CAAC,EA3CW,cAAc,8BAAd,cAAc,QA2CzB;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAiB;IACrD,QAAQ,CAAC,EAAE,CAAC;QACV,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC;QAC7D,KAAK,cAAc,CAAC,YAAY,CAAC,CAAC,OAAO,+BAAgB,CAAC,aAAa,CAAC;QACxE,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,uBAAuB,CAAC,CAAC,OAAO,+BAAgB,CAAC,uBAAuB,CAAC;QAC7F,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,yBAAyB,CAAC,CAAC,OAAO,+BAAgB,CAAC,yBAAyB,CAAC;QACjG,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,OAAO,+BAAgB,CAAC,UAAU,CAAC;QACnE,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC,CAAC,uDAAuD;QACrH;YACE,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IACpF,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\n\n// cspell:ignore NGVD, NAVD, COMPD_CS, PROJCS, GEOGCS\n\nimport { GeoServiceStatus } from \"@itwin/core-bentley\";\nimport { XYZProps } from \"@itwin/core-geometry\";\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\n\n/** This enumeration lists all possible status as returned from a coordinate conversion to or from a\n * [[GeographicCRS]] and either another [[GeographicCRS]] or a [[GeodeticDatum]].\n * @see [[GeoConverter]] to perform coordinate conversions.\n * @see [[PointWithStatus]] for the result of a coordinate conversion, including its status code.\n * @public\n * @extensions\n */\nexport enum GeoCoordStatus {\n /** Indicates successful coordinate conversion. */\n Success = 0,\n /** Indicates that the source or target of the conversion is not defined, usually the iModel Geographic Coordinate Reference System.*/\n NoGCSDefined = 100,\n /** This value indicates that the conversion was performed outside of the normal use of application of either Geographic Coordinate Reference Systems.\n * This return value can often be treated as a warning in specific cases. For example, global imagery extent spans the whole globe and\n * may extend far beyond the normal area of the iModel project extents and the extent of normal use of its Geographic Coordinate Reference System.\n * In such cases this value can be considered a warning as accuracy and precision is not expected in this specific case and approximate localization\n * of global imagery or other low accuracy context data is not essential far from the project.\n * If this status is returned for high accuracy data then it indicates that either Geographic Coordinate Reference Systems were inappropriately selected\n * for the iModel or other geolocated data. If this is the case the status should be somehow reported so action\n * can be performed to verify used geolocation parameters.\n * In either case the returned coordinates are to be considered valid though they may be inaccurate or result in some unexpected distortion of graphical\n * elements.\n */\n OutOfUsefulRange = 1,\n /** Indicates a hard error where conversions were requested outside of the area of the mathematical capacity of the conversion process for either\n * Geographic Coordinate Reference Systems involved. An example could be to attempt a conversion involving a Transverse Mercator more than 60 degrees\n * East or West of the projection central meridian.\n * The values returned may or may not be valid and should be discarded.\n */\n OutOfMathematicalDomain = 2,\n /** Indicates that datum transformation between the two Geographic Coordinate Reference Systems could not be performed.\n * This error is usually the result of a datum transformation path requiring use of latitude/longitude grid shift files that could not be obtained\n * or installed. In this case the latitude/longitude transformation is bypassed but the remainder of the conversion process is completed.\n * This error can be ignored for low accuracy data but should be somehow reported so actions can be performed to provide the missing files.\n */\n NoDatumConverter = 25,\n /** Indicates that a problem occurred during vertical datum conversion. This may the result of the inability to access the\n * Geoid separation data or vertical datum differential data (such as used by NGVD29 to NAVD88 conversion).\n * The horizontal coordinates returned are valid but the elevation ordinate will be returned unchanged or partially changed.\n * This status should be somehow reported so actions can be performed to provide the missing information.\n */\n VerticalDatumConvertError = 26,\n /** General inner conversion engine error. Coordinates returned are invalid and should be discarded */\n CSMapError = 4096,\n /** This temporary status is used to mark coordinates for which the conversion has not yet been processed by the backend\n * as opposed to other coordinate conversions that may have been resolved otherwise (typically a cache).\n * At the completion of the conversion promise no coordinates should have this status.\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Pending is no longer returned as a status for coordinate conversions.\n */\n Pending = -41556,\n}\n\n/** Maps a GeoCoordStatus to the equivalent GeoServiceStatus.\n * @public\n */\nexport function mapToGeoServiceStatus(s: GeoCoordStatus): GeoServiceStatus {\n switch (s) {\n case GeoCoordStatus.Success: return GeoServiceStatus.Success;\n case GeoCoordStatus.NoGCSDefined: return GeoServiceStatus.NoGeoLocation;\n case GeoCoordStatus.OutOfUsefulRange: return GeoServiceStatus.OutOfUsefulRange;\n case GeoCoordStatus.OutOfMathematicalDomain: return GeoServiceStatus.OutOfMathematicalDomain;\n case GeoCoordStatus.NoDatumConverter: return GeoServiceStatus.NoDatumConverter;\n case GeoCoordStatus.VerticalDatumConvertError: return GeoServiceStatus.VerticalDatumConvertError;\n case GeoCoordStatus.CSMapError: return GeoServiceStatus.CSMapError;\n case GeoCoordStatus.Pending: return GeoServiceStatus.Pending; // eslint-disable-line @typescript-eslint/no-deprecated\n default:\n throw new Error(\"GeoCoordStatus -> GeoServiceStatus - Missing enum conversion\");\n }\n}\n\n/** Information required to request conversion of an array of Geographic coordinates (Longitude/Latitude) to iModel coordinates\n * @beta\n */\nexport interface IModelCoordinatesRequestProps {\n source: string;\n geoCoords: XYZProps[];\n}\n\n/** A point converted to iModel coordinates to geographic coordinates or vice-versa by a [[GeoConverter]].\n * The status [[s]] indicates the converted point [[p]]'s degree of accuracy.\n * @public\n */\nexport interface PointWithStatus {\n /** A JSON representation of the converted point. */\n p: XYZProps;\n /** A status code indicating the degree of accuracy with the point [[p]] was converted. */\n s: GeoCoordStatus;\n}\n\n/** @beta */\nexport interface IModelCoordinatesResponseProps {\n iModelCoords: PointWithStatus[];\n fromCache: number; // the number that were read from the cache rather than calculated.\n}\n\n/** Information required to request conversion of an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\n * @beta\n */\nexport interface GeoCoordinatesRequestProps {\n target: string;\n iModelCoords: XYZProps[];\n}\n\n/** Information returned from a request to convert an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\n * @beta\n */\nexport interface GeoCoordinatesResponseProps {\n geoCoords: PointWithStatus[];\n fromCache: number; // the number that were read from the cache rather than calculated.\n}\n\n/** Information required to interpret or complete a Geographic CRS in the specified format.\n * The only currently supported formats are JSON (for completion) and WKT (OGC Well Known Text)\n * @beta\n */\nexport interface GeographicCRSInterpretRequestProps {\n /** The format of the geographic CRS definition provided in the geographicCRSDef property. */\n format: \"WKT\" | \"JSON\";\n /** The geographic CRS definition in the format specified in the format property.\n * Note that when the WKT is used the WKT fragment provided can start with a COMPD_CS clause\n * which should then contain both the horizontal CRS definition as well as the vertical CRS specification.\n * WKT fragments starting with PROJCS or GEOGCS are also supported but the vertical CRS will be assigned a\n * default value.\n */\n geographicCRSDef: string;\n}\n\n/** Information returned from a request to interpret or complete a Geographic CRS\n * @beta\n */\nexport interface GeographicCRSInterpretResponseProps {\n /** The result status of the interpret operation. A value of zero indicates successful interpretation.\n * Any value other than zero is to be considered a hard error and no valid result will\n * be returned in the geographicCRS property.\n */\n status: number;\n /** The property that receives the interpreted geographic CRS if the process was successful. */\n geographicCRS?: GeographicCRSProps;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GeoCoordinateServices.js","sourceRoot":"","sources":["../../src/GeoCoordinateServices.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA+DH,sDAaC;AA1ED,qDAAqD;AAErD,sDAAuD;AAIvD;;;;;;GAMG;AACH,IAAY,cA2CX;AA3CD,WAAY,cAAc;IACxB,kDAAkD;IAClD,yDAAW,CAAA;IACX,sIAAsI;IACtI,qEAAkB,CAAA;IAClB;;;;;;;;;;OAUG;IACH,2EAAoB,CAAA;IACpB;;;;OAIG;IACH,yFAA2B,CAAA;IAC3B;;;;OAIG;IACH,4EAAqB,CAAA;IACrB;;;;OAIG;IACH,8FAA8B,CAAA;IAC9B,sGAAsG;IACtG,kEAAiB,CAAA;IACjB;;;;OAIG;IACH,8DAAgB,CAAA;AAClB,CAAC,EA3CW,cAAc,8BAAd,cAAc,QA2CzB;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAiB;IACrD,QAAQ,CAAC,EAAE,CAAC;QACV,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC;QAC7D,KAAK,cAAc,CAAC,YAAY,CAAC,CAAC,OAAO,+BAAgB,CAAC,aAAa,CAAC;QACxE,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,uBAAuB,CAAC,CAAC,OAAO,+BAAgB,CAAC,uBAAuB,CAAC;QAC7F,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,yBAAyB,CAAC,CAAC,OAAO,+BAAgB,CAAC,yBAAyB,CAAC;QACjG,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,OAAO,+BAAgB,CAAC,UAAU,CAAC;QACnE,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC,CAAC,uDAAuD;QACrH;YACE,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IACpF,CAAC;AACH,CAAC","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 iModels\r\n */\r\n\r\n// cspell:ignore NGVD, NAVD, COMPD_CS, PROJCS, GEOGCS\r\n\r\nimport { GeoServiceStatus } from \"@itwin/core-bentley\";\r\nimport { XYZProps } from \"@itwin/core-geometry\";\r\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\r\n\r\n/** This enumeration lists all possible status as returned from a coordinate conversion to or from a\r\n * [[GeographicCRS]] and either another [[GeographicCRS]] or a [[GeodeticDatum]].\r\n * @see [[GeoConverter]] to perform coordinate conversions.\r\n * @see [[PointWithStatus]] for the result of a coordinate conversion, including its status code.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GeoCoordStatus {\r\n /** Indicates successful coordinate conversion. */\r\n Success = 0,\r\n /** Indicates that the source or target of the conversion is not defined, usually the iModel Geographic Coordinate Reference System.*/\r\n NoGCSDefined = 100,\r\n /** This value indicates that the conversion was performed outside of the normal use of application of either Geographic Coordinate Reference Systems.\r\n * This return value can often be treated as a warning in specific cases. For example, global imagery extent spans the whole globe and\r\n * may extend far beyond the normal area of the iModel project extents and the extent of normal use of its Geographic Coordinate Reference System.\r\n * In such cases this value can be considered a warning as accuracy and precision is not expected in this specific case and approximate localization\r\n * of global imagery or other low accuracy context data is not essential far from the project.\r\n * If this status is returned for high accuracy data then it indicates that either Geographic Coordinate Reference Systems were inappropriately selected\r\n * for the iModel or other geolocated data. If this is the case the status should be somehow reported so action\r\n * can be performed to verify used geolocation parameters.\r\n * In either case the returned coordinates are to be considered valid though they may be inaccurate or result in some unexpected distortion of graphical\r\n * elements.\r\n */\r\n OutOfUsefulRange = 1,\r\n /** Indicates a hard error where conversions were requested outside of the area of the mathematical capacity of the conversion process for either\r\n * Geographic Coordinate Reference Systems involved. An example could be to attempt a conversion involving a Transverse Mercator more than 60 degrees\r\n * East or West of the projection central meridian.\r\n * The values returned may or may not be valid and should be discarded.\r\n */\r\n OutOfMathematicalDomain = 2,\r\n /** Indicates that datum transformation between the two Geographic Coordinate Reference Systems could not be performed.\r\n * This error is usually the result of a datum transformation path requiring use of latitude/longitude grid shift files that could not be obtained\r\n * or installed. In this case the latitude/longitude transformation is bypassed but the remainder of the conversion process is completed.\r\n * This error can be ignored for low accuracy data but should be somehow reported so actions can be performed to provide the missing files.\r\n */\r\n NoDatumConverter = 25,\r\n /** Indicates that a problem occurred during vertical datum conversion. This may the result of the inability to access the\r\n * Geoid separation data or vertical datum differential data (such as used by NGVD29 to NAVD88 conversion).\r\n * The horizontal coordinates returned are valid but the elevation ordinate will be returned unchanged or partially changed.\r\n * This status should be somehow reported so actions can be performed to provide the missing information.\r\n */\r\n VerticalDatumConvertError = 26,\r\n /** General inner conversion engine error. Coordinates returned are invalid and should be discarded */\r\n CSMapError = 4096,\r\n /** This temporary status is used to mark coordinates for which the conversion has not yet been processed by the backend\r\n * as opposed to other coordinate conversions that may have been resolved otherwise (typically a cache).\r\n * At the completion of the conversion promise no coordinates should have this status.\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Pending is no longer returned as a status for coordinate conversions.\r\n */\r\n Pending = -41556,\r\n}\r\n\r\n/** Maps a GeoCoordStatus to the equivalent GeoServiceStatus.\r\n * @public\r\n */\r\nexport function mapToGeoServiceStatus(s: GeoCoordStatus): GeoServiceStatus {\r\n switch (s) {\r\n case GeoCoordStatus.Success: return GeoServiceStatus.Success;\r\n case GeoCoordStatus.NoGCSDefined: return GeoServiceStatus.NoGeoLocation;\r\n case GeoCoordStatus.OutOfUsefulRange: return GeoServiceStatus.OutOfUsefulRange;\r\n case GeoCoordStatus.OutOfMathematicalDomain: return GeoServiceStatus.OutOfMathematicalDomain;\r\n case GeoCoordStatus.NoDatumConverter: return GeoServiceStatus.NoDatumConverter;\r\n case GeoCoordStatus.VerticalDatumConvertError: return GeoServiceStatus.VerticalDatumConvertError;\r\n case GeoCoordStatus.CSMapError: return GeoServiceStatus.CSMapError;\r\n case GeoCoordStatus.Pending: return GeoServiceStatus.Pending; // eslint-disable-line @typescript-eslint/no-deprecated\r\n default:\r\n throw new Error(\"GeoCoordStatus -> GeoServiceStatus - Missing enum conversion\");\r\n }\r\n}\r\n\r\n/** Information required to request conversion of an array of Geographic coordinates (Longitude/Latitude) to iModel coordinates\r\n * @beta\r\n */\r\nexport interface IModelCoordinatesRequestProps {\r\n source: string;\r\n geoCoords: XYZProps[];\r\n}\r\n\r\n/** A point converted to iModel coordinates to geographic coordinates or vice-versa by a [[GeoConverter]].\r\n * The status [[s]] indicates the converted point [[p]]'s degree of accuracy.\r\n * @public\r\n */\r\nexport interface PointWithStatus {\r\n /** A JSON representation of the converted point. */\r\n p: XYZProps;\r\n /** A status code indicating the degree of accuracy with the point [[p]] was converted. */\r\n s: GeoCoordStatus;\r\n}\r\n\r\n/** @beta */\r\nexport interface IModelCoordinatesResponseProps {\r\n iModelCoords: PointWithStatus[];\r\n fromCache: number; // the number that were read from the cache rather than calculated.\r\n}\r\n\r\n/** Information required to request conversion of an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\r\n * @beta\r\n */\r\nexport interface GeoCoordinatesRequestProps {\r\n target: string;\r\n iModelCoords: XYZProps[];\r\n}\r\n\r\n/** Information returned from a request to convert an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\r\n * @beta\r\n */\r\nexport interface GeoCoordinatesResponseProps {\r\n geoCoords: PointWithStatus[];\r\n fromCache: number; // the number that were read from the cache rather than calculated.\r\n}\r\n\r\n/** Information required to interpret or complete a Geographic CRS in the specified format.\r\n * The only currently supported formats are JSON (for completion) and WKT (OGC Well Known Text)\r\n * @beta\r\n */\r\nexport interface GeographicCRSInterpretRequestProps {\r\n /** The format of the geographic CRS definition provided in the geographicCRSDef property. */\r\n format: \"WKT\" | \"JSON\";\r\n /** The geographic CRS definition in the format specified in the format property.\r\n * Note that when the WKT is used the WKT fragment provided can start with a COMPD_CS clause\r\n * which should then contain both the horizontal CRS definition as well as the vertical CRS specification.\r\n * WKT fragments starting with PROJCS or GEOGCS are also supported but the vertical CRS will be assigned a\r\n * default value.\r\n */\r\n geographicCRSDef: string;\r\n}\r\n\r\n/** Information returned from a request to interpret or complete a Geographic CRS\r\n * @beta\r\n */\r\nexport interface GeographicCRSInterpretResponseProps {\r\n /** The result status of the interpret operation. A value of zero indicates successful interpretation.\r\n * Any value other than zero is to be considered a hard error and no valid result will\r\n * be returned in the geographicCRS property.\r\n */\r\n status: number;\r\n /** The property that receives the interpreted geographic CRS if the process was successful. */\r\n geographicCRS?: GeographicCRSProps;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeometryContainment.js","sourceRoot":"","sources":["../../src/GeometryContainment.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { BentleyStatus, Id64Array } from \"@itwin/core-bentley\";\nimport { ViewFlagProps } from \"./ViewFlags\";\nimport { ClipPlaneContainment, ClipVectorProps } from \"@itwin/core-geometry\";\n\n/** Information required to request clip containment status for elements from the front end to the back end.\n * @public\n * @extensions\n */\nexport interface GeometryContainmentRequestProps {\n candidates: Id64Array;\n clip: ClipVectorProps;\n allowOverlaps?: boolean;\n viewFlags?: ViewFlagProps;\n offSubCategories?: Id64Array;\n}\n\n/** Information returned from the back end to the front end holding the result of the geometry containment query.\n * @public\n * @extensions\n */\nexport interface GeometryContainmentResponseProps {\n status: BentleyStatus;\n candidatesContainment?: ClipPlaneContainment[]; // status for candidate array entry at the same index.\n numInside?: number;\n numOutside?: number;\n numOverlap?: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GeometryContainment.js","sourceRoot":"","sources":["../../src/GeometryContainment.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { BentleyStatus, Id64Array } from \"@itwin/core-bentley\";\r\nimport { ViewFlagProps } from \"./ViewFlags\";\r\nimport { ClipPlaneContainment, ClipVectorProps } from \"@itwin/core-geometry\";\r\n\r\n/** Information required to request clip containment status for elements from the front end to the back end.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometryContainmentRequestProps {\r\n candidates: Id64Array;\r\n clip: ClipVectorProps;\r\n allowOverlaps?: boolean;\r\n viewFlags?: ViewFlagProps;\r\n offSubCategories?: Id64Array;\r\n}\r\n\r\n/** Information returned from the back end to the front end holding the result of the geometry containment query.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometryContainmentResponseProps {\r\n status: BentleyStatus;\r\n candidatesContainment?: ClipPlaneContainment[]; // status for candidate array entry at the same index.\r\n numInside?: number;\r\n numOutside?: number;\r\n numOverlap?: number;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeometryParams.js","sourceRoot":"","sources":["../../src/GeometryParams.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AAKvD,qCAAkC;AAElC;;;GAGG;AACH,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,gEAAgE;IAChE,+CAAS,CAAA;IACT,wDAAwD;IACxD,iD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C;YACf,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc,CAAC,IAAI,EAAE,CAAC;gBACrF,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC;oBACpE,OAAO,KAAK,CAAC;gBACf,oEAAoE;gBACpE,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAU,CAAC;oBAC5D,OAAO,KAAK,CAAC;YACjB,CAAC;QACH,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC;YAChE,OAAO,KAAK,CAAC;QACf,oEAAoE;QACpE,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAQ,CAAC;YACtD,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oLAAoL;IAC7K,aAAa,CAAC,UAAsB,EAAE,wBAAwB,GAAG,IAAI;QAC1E,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,eAAM,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAChE,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED,gHAAgH;IACzG,gBAAgB,CAAC,aAAyB,EAAE,wBAAwB,GAAG,IAAI;QAChF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;CACF;AA1LD,wCA0LC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { ColorDef } from \"./ColorDef\";\nimport { AreaPattern } from \"./geometry/AreaPattern\";\nimport { LineStyle } from \"./geometry/LineStyle\";\nimport { Gradient } from \"./Gradient\";\nimport { IModel } from \"./IModel\";\n\n/** Whether a closed region should be drawn for wireframe display with its internal area filled or not.\n * @public\n * @extensions\n */\nexport enum FillDisplay {\n /** don't fill, even if fill attribute is on for the viewport */\n Never = 0,\n /** fill if the fill attribute is on for the viewport */\n ByView = 1,\n /** always fill, even if the fill attribute is off for the viewport */\n Always = 2,\n /** always fill, fill will always be behind other geometry belonging to the same element.\n * @note Edge geometry is not produced for shapes with this fill type. If you want an outline, add it as separate geometry.\n */\n Blanking = 3,\n}\n\n/** Describes how a view's background color affects the interior area of a closed region.\n * @public\n * @extensions\n */\nexport enum BackgroundFill {\n /** single color fill uses the fill color and line color to draw either a solid or outline fill */\n None = 0,\n /** single color fill uses the view's background color to draw a solid fill */\n Solid = 1,\n /** single color fill uses the view's background color and line color to draw an outline fill */\n Outline = 2,\n}\n\n/** Categorizes a piece of geometry within a GeometryStream. Visibility of classes of geometry can be toggled\n * within a view using [[ViewFlags]].\n * @see [[GeometryStreamProps]].\n * @see [[Feature]].\n * @public\n * @extensions\n */\nexport enum GeometryClass {\n /** Used to classify the \"real\" geometry within a model. Most geometry falls within this class. */\n Primary = 0,\n /** Used to classify geometry used as a drawing aid in constructing the Primary geometry. For example, grid lines. */\n Construction = 1,\n /** Used to classify annotations which dimension (measure) the Primary geometry. */\n Dimension = 2,\n /** Used to classify geometry used to fill planar regions with a 2d pattern (e.g., hatch lines). */\n Pattern = 3,\n}\n\n/** Describes the display properties of graphics in a persistent element's GeometryStream that aren't inherited from [[SubCategoryAppearance]].\n * @see [[GeometryStreamProps]].\n * @public\n */\nexport class GeometryParams {\n /** Optional render material to override [[SubCategoryAppearance.materialId]].\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.materialId]] with no material.\n */\n public materialId?: Id64String;\n /** Optional display priority added to [[SubCategoryAppearance.priority]].\n * The net display priority value is used to control z ordering when drawing to 2d views.\n */\n public elmPriority?: number;\n /** Optional line weight to override [[SubCategoryAppearance.weight]].\n * The weight is an integer in the range of [0,31] that by default corresponds to a pixel width of weight+1.\n */\n public weight?: number;\n /** Optional line color to override [[SubCategoryAppearance.color]].\n * The transparency component is ignored and should instead be specified using [[elmTransparency]].\n */\n public lineColor?: ColorDef;\n /** Optional fill color for region interiors. Set the same as [[lineColor]] for an opaque fill.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]], [[gradient]] is undefined, and [[backgroundFill]] is [[BackgroundFill.None]].\n * The transparency component is ignored and should instead be specified using [[fillTransparency]].\n */\n public fillColor?: ColorDef;\n /** Optional fill using the current view background color for region interiors.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]] and [[gradient]] is undefined. Default is [[BackgroundFill.None]].\n */\n public backgroundFill?: BackgroundFill;\n /** Optional fill specification that determines when and if a region interior will display using [[gradient]], [[backgroundFill]], or [[fillColor]] in that order of preference.\n * Fill only applies to [[RenderMode.Wireframe]] views. In a [[RenderMode.SmoothShade]] or [[RenderMode.SolidFill]] view, regions will always display as surfaces preferring [[fillColor]] when present over [[lineColor]].\n * Default is [[FillDisplay.Never]].\n */\n public fillDisplay?: FillDisplay;\n /** Optional line color transparency to combine with [[SubCategoryAppearance.transparency]].\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent element on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque and 1.0 for completely transparent.\n */\n public elmTransparency?: number;\n /** Optional fill color transparency to combine with [[SubCategoryAppearance.transparency]].\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent fill on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque, 1.0 for completely transparent, or leave undefined to use [[elmTransparency]].\n */\n public fillTransparency?: number;\n /** Optional geometry classification that can be toggled off with a [[ViewFlags]] independent of [[SubCategoryAppearance.invisible]].\n * Default is [[GeometryClass.Primary]].\n */\n public geometryClass?: GeometryClass;\n /** Optional line style to override [[SubCategoryAppearance.styleId]] plus modifiers to override the line style definition.\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.styleId]] with a solid line.\n */\n public styleInfo?: LineStyle.Info;\n /** Optional gradient fill settings for region interiors.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]].\n */\n public gradient?: Gradient.Symb;\n /** Optional area pattern settings for region interiors.\n * Independent of fill, a region can have both fill and pattern.\n */\n public pattern?: AreaPattern.Params;\n\n /** Create a GeometryParams given a [[Category]] Id for a [[GeometricElement]] and optional [[SubCategory]] Id. The [[SubCategory.appearance]] establishes the non-overriden display properties of\n * graphics in a GeometricElement's [[GeometryStreamProps]]. A GeometricElement refers to a single Category through [[GeometricElement.category]], while it's graphics can appear on multiple SubCategories\n * by adding a [[GeometryAppearanceProps]] with a SubCategory change to the GeometryStream.\n * @note If a valid SubCategory Id is not supplied, the default SubCategory for the parent Category is used. To be considered valid, [[SubCategory.getCategoryId]] must refer to the specified Category Id.\n */\n constructor(public categoryId: Id64String, public subCategoryId = Id64.invalid) {\n if (!Id64.isValid(subCategoryId))\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\n }\n\n public clone(): GeometryParams {\n const retVal = new GeometryParams(this.categoryId, this.subCategoryId);\n retVal.materialId = this.materialId;\n retVal.elmPriority = this.elmPriority;\n retVal.weight = this.weight;\n retVal.lineColor = this.lineColor;\n retVal.fillColor = this.fillColor;\n retVal.backgroundFill = this.backgroundFill;\n retVal.fillDisplay = this.fillDisplay;\n retVal.elmTransparency = this.elmTransparency;\n retVal.fillTransparency = this.fillTransparency;\n retVal.geometryClass = this.geometryClass;\n retVal.styleInfo = this.styleInfo ? this.styleInfo.clone() : undefined;\n retVal.gradient = this.gradient ? this.gradient.clone() : undefined;\n retVal.pattern = this.pattern ? this.pattern.clone() : undefined;\n return retVal;\n }\n\n /** Clears [[SubCategoryAppearance]] overrides while preserving [[categoryId]] and [[subCategoryId]]. */\n public resetAppearance() {\n this.materialId = undefined;\n this.elmPriority = undefined;\n this.weight = undefined;\n this.lineColor = undefined;\n this.fillColor = undefined;\n this.backgroundFill = undefined;\n this.fillDisplay = undefined;\n this.elmTransparency = undefined;\n this.fillTransparency = undefined;\n this.geometryClass = undefined;\n this.styleInfo = undefined;\n this.gradient = undefined;\n this.pattern = undefined;\n }\n\n /** Compare two [[GeometryParams]] for equivalence, i.e. both values are undefined and inherited from [[SubCategoryAppearance]] or have the same override. */\n public isEquivalent(other: GeometryParams): boolean {\n if (this === other)\n return true; // Same pointer\n\n if (this.categoryId !== other.categoryId)\n return false;\n if (this.subCategoryId !== other.subCategoryId)\n return false;\n if (this.geometryClass !== other.geometryClass)\n return false;\n\n if (this.elmPriority !== other.elmPriority)\n return false;\n if (this.elmTransparency !== other.elmTransparency)\n return false;\n if (this.fillTransparency !== other.fillTransparency)\n return false;\n\n if ((this.lineColor === undefined) !== (other.lineColor === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.lineColor && !this.lineColor.equals(other.lineColor!))\n return false;\n\n if (this.weight !== other.weight)\n return false;\n\n if ((this.materialId === undefined) !== (other.materialId === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.materialId && this.materialId !== other.materialId!)\n return false;\n\n if ((this.styleInfo === undefined) !== (other.styleInfo === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.styleInfo && !this.styleInfo.equals(other.styleInfo!))\n return false;\n\n if (this.fillDisplay !== other.fillDisplay)\n return false;\n\n if (this.fillDisplay !== undefined && this.fillDisplay !== FillDisplay.Never) {\n if ((this.gradient === undefined) !== (other.gradient === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.gradient && !this.gradient.equals(other.gradient!))\n return false;\n if (this.backgroundFill !== other.backgroundFill)\n return false;\n if (this.backgroundFill === undefined || this.backgroundFill === BackgroundFill.None) {\n if ((this.fillColor === undefined) !== (other.fillColor === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.fillColor && !this.fillColor.equals(other.fillColor!))\n return false;\n }\n }\n\n if ((this.pattern === undefined) !== (other.pattern === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.pattern && !this.pattern.equals(other.pattern!))\n return false;\n\n return true;\n }\n\n /** Change [[categoryId]] to the supplied id, [[subCategoryId]] to the supplied category's the default subCategory, and optionally clear any [[SubCategoryAppearance]] overrides. */\n public setCategoryId(categoryId: Id64String, clearAppearanceOverrides = true) {\n this.categoryId = categoryId;\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\n if (clearAppearanceOverrides)\n this.resetAppearance();\n }\n\n /** Change [[subCategoryId]] to the supplied id and optionally clear any [[SubCategoryAppearance]] overrides. */\n public setSubCategoryId(subCategoryId: Id64String, clearAppearanceOverrides = true) {\n this.subCategoryId = subCategoryId;\n if (clearAppearanceOverrides)\n this.resetAppearance();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GeometryParams.js","sourceRoot":"","sources":["../../src/GeometryParams.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AAKvD,qCAAkC;AAElC;;;GAGG;AACH,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,gEAAgE;IAChE,+CAAS,CAAA;IACT,wDAAwD;IACxD,iDAAU,CAAA;IACV,sEAAsE;IACtE,iDAAU,CAAA;IACV;;OAEG;IACH,qDAAY,CAAA;AACd,CAAC,EAXW,WAAW,2BAAX,WAAW,QAWtB;AAED;;;GAGG;AACH,IAAY,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KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC;oBACpE,OAAO,KAAK,CAAC;gBACf,oEAAoE;gBACpE,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAU,CAAC;oBAC5D,OAAO,KAAK,CAAC;YACjB,CAAC;QACH,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC;YAChE,OAAO,KAAK,CAAC;QACf,oEAAoE;QACpE,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAQ,CAAC;YACtD,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oLAAoL;IAC7K,aAAa,CAAC,UAAsB,EAAE,wBAAwB,GAAG,IAAI;QAC1E,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,eAAM,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAChE,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED,gHAAgH;IACzG,gBAAgB,CAAC,aAAyB,EAAE,wBAAwB,GAAG,IAAI;QAChF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;CACF;AA1LD,wCA0LC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { ColorDef } from \"./ColorDef\";\r\nimport { AreaPattern } from \"./geometry/AreaPattern\";\r\nimport { LineStyle } from \"./geometry/LineStyle\";\r\nimport { Gradient } from \"./Gradient\";\r\nimport { IModel } from \"./IModel\";\r\n\r\n/** Whether a closed region should be drawn for wireframe display with its internal area filled or not.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum FillDisplay {\r\n /** don't fill, even if fill attribute is on for the viewport */\r\n Never = 0,\r\n /** fill if the fill attribute is on for the viewport */\r\n ByView = 1,\r\n /** always fill, even if the fill attribute is off for the viewport */\r\n Always = 2,\r\n /** always fill, fill will always be behind other geometry belonging to the same element.\r\n * @note Edge geometry is not produced for shapes with this fill type. If you want an outline, add it as separate geometry.\r\n */\r\n Blanking = 3,\r\n}\r\n\r\n/** Describes how a view's background color affects the interior area of a closed region.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum BackgroundFill {\r\n /** single color fill uses the fill color and line color to draw either a solid or outline fill */\r\n None = 0,\r\n /** single color fill uses the view's background color to draw a solid fill */\r\n Solid = 1,\r\n /** single color fill uses the view's background color and line color to draw an outline fill */\r\n Outline = 2,\r\n}\r\n\r\n/** Categorizes a piece of geometry within a GeometryStream. Visibility of classes of geometry can be toggled\r\n * within a view using [[ViewFlags]].\r\n * @see [[GeometryStreamProps]].\r\n * @see [[Feature]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GeometryClass {\r\n /** Used to classify the \"real\" geometry within a model. Most geometry falls within this class. */\r\n Primary = 0,\r\n /** Used to classify geometry used as a drawing aid in constructing the Primary geometry. For example, grid lines. */\r\n Construction = 1,\r\n /** Used to classify annotations which dimension (measure) the Primary geometry. */\r\n Dimension = 2,\r\n /** Used to classify geometry used to fill planar regions with a 2d pattern (e.g., hatch lines). */\r\n Pattern = 3,\r\n}\r\n\r\n/** Describes the display properties of graphics in a persistent element's GeometryStream that aren't inherited from [[SubCategoryAppearance]].\r\n * @see [[GeometryStreamProps]].\r\n * @public\r\n */\r\nexport class GeometryParams {\r\n /** Optional render material to override [[SubCategoryAppearance.materialId]].\r\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.materialId]] with no material.\r\n */\r\n public materialId?: Id64String;\r\n /** Optional display priority added to [[SubCategoryAppearance.priority]].\r\n * The net display priority value is used to control z ordering when drawing to 2d views.\r\n */\r\n public elmPriority?: number;\r\n /** Optional line weight to override [[SubCategoryAppearance.weight]].\r\n * The weight is an integer in the range of [0,31] that by default corresponds to a pixel width of weight+1.\r\n */\r\n public weight?: number;\r\n /** Optional line color to override [[SubCategoryAppearance.color]].\r\n * The transparency component is ignored and should instead be specified using [[elmTransparency]].\r\n */\r\n public lineColor?: ColorDef;\r\n /** Optional fill color for region interiors. Set the same as [[lineColor]] for an opaque fill.\r\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]], [[gradient]] is undefined, and [[backgroundFill]] is [[BackgroundFill.None]].\r\n * The transparency component is ignored and should instead be specified using [[fillTransparency]].\r\n */\r\n public fillColor?: ColorDef;\r\n /** Optional fill using the current view background color for region interiors.\r\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]] and [[gradient]] is undefined. Default is [[BackgroundFill.None]].\r\n */\r\n public backgroundFill?: BackgroundFill;\r\n /** Optional fill specification that determines when and if a region interior will display using [[gradient]], [[backgroundFill]], or [[fillColor]] in that order of preference.\r\n * Fill only applies to [[RenderMode.Wireframe]] views. In a [[RenderMode.SmoothShade]] or [[RenderMode.SolidFill]] view, regions will always display as surfaces preferring [[fillColor]] when present over [[lineColor]].\r\n * Default is [[FillDisplay.Never]].\r\n */\r\n public fillDisplay?: FillDisplay;\r\n /** Optional line color transparency to combine with [[SubCategoryAppearance.transparency]].\r\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent element on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\r\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque and 1.0 for completely transparent.\r\n */\r\n public elmTransparency?: number;\r\n /** Optional fill color transparency to combine with [[SubCategoryAppearance.transparency]].\r\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent fill on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\r\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque, 1.0 for completely transparent, or leave undefined to use [[elmTransparency]].\r\n */\r\n public fillTransparency?: number;\r\n /** Optional geometry classification that can be toggled off with a [[ViewFlags]] independent of [[SubCategoryAppearance.invisible]].\r\n * Default is [[GeometryClass.Primary]].\r\n */\r\n public geometryClass?: GeometryClass;\r\n /** Optional line style to override [[SubCategoryAppearance.styleId]] plus modifiers to override the line style definition.\r\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.styleId]] with a solid line.\r\n */\r\n public styleInfo?: LineStyle.Info;\r\n /** Optional gradient fill settings for region interiors.\r\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]].\r\n */\r\n public gradient?: Gradient.Symb;\r\n /** Optional area pattern settings for region interiors.\r\n * Independent of fill, a region can have both fill and pattern.\r\n */\r\n public pattern?: AreaPattern.Params;\r\n\r\n /** Create a GeometryParams given a [[Category]] Id for a [[GeometricElement]] and optional [[SubCategory]] Id. The [[SubCategory.appearance]] establishes the non-overriden display properties of\r\n * graphics in a GeometricElement's [[GeometryStreamProps]]. A GeometricElement refers to a single Category through [[GeometricElement.category]], while it's graphics can appear on multiple SubCategories\r\n * by adding a [[GeometryAppearanceProps]] with a SubCategory change to the GeometryStream.\r\n * @note If a valid SubCategory Id is not supplied, the default SubCategory for the parent Category is used. To be considered valid, [[SubCategory.getCategoryId]] must refer to the specified Category Id.\r\n */\r\n constructor(public categoryId: Id64String, public subCategoryId = Id64.invalid) {\r\n if (!Id64.isValid(subCategoryId))\r\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\r\n }\r\n\r\n public clone(): GeometryParams {\r\n const retVal = new GeometryParams(this.categoryId, this.subCategoryId);\r\n retVal.materialId = this.materialId;\r\n retVal.elmPriority = this.elmPriority;\r\n retVal.weight = this.weight;\r\n retVal.lineColor = this.lineColor;\r\n retVal.fillColor = this.fillColor;\r\n retVal.backgroundFill = this.backgroundFill;\r\n retVal.fillDisplay = this.fillDisplay;\r\n retVal.elmTransparency = this.elmTransparency;\r\n retVal.fillTransparency = this.fillTransparency;\r\n retVal.geometryClass = this.geometryClass;\r\n retVal.styleInfo = this.styleInfo ? this.styleInfo.clone() : undefined;\r\n retVal.gradient = this.gradient ? this.gradient.clone() : undefined;\r\n retVal.pattern = this.pattern ? this.pattern.clone() : undefined;\r\n return retVal;\r\n }\r\n\r\n /** Clears [[SubCategoryAppearance]] overrides while preserving [[categoryId]] and [[subCategoryId]]. */\r\n public resetAppearance() {\r\n this.materialId = undefined;\r\n this.elmPriority = undefined;\r\n this.weight = undefined;\r\n this.lineColor = undefined;\r\n this.fillColor = undefined;\r\n this.backgroundFill = undefined;\r\n this.fillDisplay = undefined;\r\n this.elmTransparency = undefined;\r\n this.fillTransparency = undefined;\r\n this.geometryClass = undefined;\r\n this.styleInfo = undefined;\r\n this.gradient = undefined;\r\n this.pattern = undefined;\r\n }\r\n\r\n /** Compare two [[GeometryParams]] for equivalence, i.e. both values are undefined and inherited from [[SubCategoryAppearance]] or have the same override. */\r\n public isEquivalent(other: GeometryParams): boolean {\r\n if (this === other)\r\n return true; // Same pointer\r\n\r\n if (this.categoryId !== other.categoryId)\r\n return false;\r\n if (this.subCategoryId !== other.subCategoryId)\r\n return false;\r\n if (this.geometryClass !== other.geometryClass)\r\n return false;\r\n\r\n if (this.elmPriority !== other.elmPriority)\r\n return false;\r\n if (this.elmTransparency !== other.elmTransparency)\r\n return false;\r\n if (this.fillTransparency !== other.fillTransparency)\r\n return false;\r\n\r\n if ((this.lineColor === undefined) !== (other.lineColor === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.lineColor && !this.lineColor.equals(other.lineColor!))\r\n return false;\r\n\r\n if (this.weight !== other.weight)\r\n return false;\r\n\r\n if ((this.materialId === undefined) !== (other.materialId === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.materialId && this.materialId !== other.materialId!)\r\n return false;\r\n\r\n if ((this.styleInfo === undefined) !== (other.styleInfo === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.styleInfo && !this.styleInfo.equals(other.styleInfo!))\r\n return false;\r\n\r\n if (this.fillDisplay !== other.fillDisplay)\r\n return false;\r\n\r\n if (this.fillDisplay !== undefined && this.fillDisplay !== FillDisplay.Never) {\r\n if ((this.gradient === undefined) !== (other.gradient === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.gradient && !this.gradient.equals(other.gradient!))\r\n return false;\r\n if (this.backgroundFill !== other.backgroundFill)\r\n return false;\r\n if (this.backgroundFill === undefined || this.backgroundFill === BackgroundFill.None) {\r\n if ((this.fillColor === undefined) !== (other.fillColor === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.fillColor && !this.fillColor.equals(other.fillColor!))\r\n return false;\r\n }\r\n }\r\n\r\n if ((this.pattern === undefined) !== (other.pattern === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.pattern && !this.pattern.equals(other.pattern!))\r\n return false;\r\n\r\n return true;\r\n }\r\n\r\n /** Change [[categoryId]] to the supplied id, [[subCategoryId]] to the supplied category's the default subCategory, and optionally clear any [[SubCategoryAppearance]] overrides. */\r\n public setCategoryId(categoryId: Id64String, clearAppearanceOverrides = true) {\r\n this.categoryId = categoryId;\r\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\r\n if (clearAppearanceOverrides)\r\n this.resetAppearance();\r\n }\r\n\r\n /** Change [[subCategoryId]] to the supplied id and optionally clear any [[SubCategoryAppearance]] overrides. */\r\n public setSubCategoryId(subCategoryId: Id64String, clearAppearanceOverrides = true) {\r\n this.subCategoryId = subCategoryId;\r\n if (clearAppearanceOverrides)\r\n this.resetAppearance();\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeometrySummary.js","sourceRoot":"","sources":["../../src/GeometrySummary.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;GAGG;AACH,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,sDAAsD;IACtD,0EAAU,CAAA;IACV,4IAA4I;IAC5I,gFAAa,CAAA;IACb,sKAAsK;IACtK,wEAAS,CAAA;AACX,CAAC,EAPW,wBAAwB,wCAAxB,wBAAwB,QAOnC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { Id64Array } from \"@itwin/core-bentley\";\n\n/** Describes the level of detail with which to report each geometric primitive in a [[GeometrySummaryRequestProps]].\n * @public\n * @extensions\n */\nexport enum GeometrySummaryVerbosity {\n /** Simply output the type of geometry as a string. */\n Basic = 10,\n /** Output some details of the geometry. e.g., for a sphere, include the center and radius; for a line string, the number of points; etc. */\n Detailed = 20,\n /** Output extremely detailed information. e.g., for a line string, the coordinates of each point. This may produce an enormous amount of data for some primitives. */\n Full = 30,\n}\n\n/** Describes what information to include in a [[GeometrySummaryRequestProps]].\n * @public\n * @extensions\n */\nexport interface GeometrySummaryOptions {\n /** If true, include detailed description of each symbology change (e.g., output material Id, line/fill color, etc). */\n verboseSymbology?: boolean;\n /** If true, include placement information for geometric elements. */\n includePlacement?: boolean;\n /** The level of detail with which to summarize each geometric primitive. Default: Basic. */\n geometryVerbosity?: GeometrySummaryVerbosity;\n /** If defined, for each geometry part, output a list of all geometric elements that reference that part in their geometry streams.\n * @note This requires an exhaustive search through every geometric element in the iModel and may be extremely slow.\n */\n includePartReferences?: \"2d\" | \"3d\";\n}\n\n/** Describes the elements for which to generate an array of geometry summaries and the options controlling the contents of each summary.\n * @see [IModelConnection.getGeometrySummary]($frontend).\n * @public\n * @extensions\n */\nexport interface GeometrySummaryRequestProps {\n /** The Ids of the elements whose geometry is to be summarized. This can include the Ids of [GeometricElement]($backend)s and [GeometryPart]($backend)s.\n * The response will include an entry for each element Id.\n */\n elementIds: Id64Array;\n\n /** Options controlling the contents of the summary. */\n options?: GeometrySummaryOptions;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GeometrySummary.js","sourceRoot":"","sources":["../../src/GeometrySummary.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;GAGG;AACH,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,sDAAsD;IACtD,0EAAU,CAAA;IACV,4IAA4I;IAC5I,gFAAa,CAAA;IACb,sKAAsK;IACtK,wEAAS,CAAA;AACX,CAAC,EAPW,wBAAwB,wCAAxB,wBAAwB,QAOnC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { Id64Array } from \"@itwin/core-bentley\";\r\n\r\n/** Describes the level of detail with which to report each geometric primitive in a [[GeometrySummaryRequestProps]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GeometrySummaryVerbosity {\r\n /** Simply output the type of geometry as a string. */\r\n Basic = 10,\r\n /** Output some details of the geometry. e.g., for a sphere, include the center and radius; for a line string, the number of points; etc. */\r\n Detailed = 20,\r\n /** Output extremely detailed information. e.g., for a line string, the coordinates of each point. This may produce an enormous amount of data for some primitives. */\r\n Full = 30,\r\n}\r\n\r\n/** Describes what information to include in a [[GeometrySummaryRequestProps]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometrySummaryOptions {\r\n /** If true, include detailed description of each symbology change (e.g., output material Id, line/fill color, etc). */\r\n verboseSymbology?: boolean;\r\n /** If true, include placement information for geometric elements. */\r\n includePlacement?: boolean;\r\n /** The level of detail with which to summarize each geometric primitive. Default: Basic. */\r\n geometryVerbosity?: GeometrySummaryVerbosity;\r\n /** If defined, for each geometry part, output a list of all geometric elements that reference that part in their geometry streams.\r\n * @note This requires an exhaustive search through every geometric element in the iModel and may be extremely slow.\r\n */\r\n includePartReferences?: \"2d\" | \"3d\";\r\n}\r\n\r\n/** Describes the elements for which to generate an array of geometry summaries and the options controlling the contents of each summary.\r\n * @see [IModelConnection.getGeometrySummary]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometrySummaryRequestProps {\r\n /** The Ids of the elements whose geometry is to be summarized. This can include the Ids of [GeometricElement]($backend)s and [GeometryPart]($backend)s.\r\n * The response will include an entry for each element Id.\r\n */\r\n elementIds: Id64Array;\r\n\r\n /** Options controlling the contents of the summary. */\r\n options?: GeometrySummaryOptions;\r\n}\r\n"]}
|
package/lib/cjs/Gradient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gradient.js","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,wDAAyD;AACzD,yCAAqD;AACrD,mCAAyD;AACzD,uDAA+I;AAE/I;;;;GAIG;AACH,IAAiB,QAAQ,CA2fxB;AA3fD,WAAiB,QAAQ;IACvB,4CAA4C;IAC5C,IAAY,KAOX;IAPD,WAAY,KAAK;QACf,gBAAgB;QAChB,iCAAQ,CAAA;QACR,8CAA8C;QAC9C,qCAAU,CAAA;QACV,2EAA2E;QAC3E,uCAAW,CAAA;IACb,CAAC,EAPW,KAAK,GAAL,cAAK,KAAL,cAAK,QAOhB;IAED,+FAA+F;IAC/F,IAAY,IASX;IATD,WAAY,IAAI;QACd,+BAAQ,CAAA;QACR,mCAAU,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AM,EAAC,SAAS,KAAK,WAAW,CAAC,CAAC;YAClC,OAAO,WAAW,CAAC;QACrB,CAAC;;IAraU,aAAI,OAsahB,CAAA;AACH,CAAC,EA3fgB,QAAQ,wBAAR,QAAQ,QA2fxB","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 { assert } from \"@itwin/core-bentley\";\nimport { Angle, AngleProps } from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { ImageBuffer, ImageBufferFormat } from \"./Image\";\nimport { ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\n\n/** Namespace containing types for defining a color gradient, often used for filled planar regions.\n * @see [[GeometryParams]]\n * @see [[GraphicParams]]\n * @public\n */\nexport namespace Gradient {\n /** Flags applied to a [[Gradient.Symb]]. */\n export enum Flags {\n /** No flags. */\n None = 0,\n /** Reverse the order of the gradient keys. */\n Invert = 1,\n /** Draw an outline around the surface to which the gradient is applied. */\n Outline = 2,\n }\n\n /** Enumerates the modes by which a [[Gradient.Symb]]'s keys are applied to create an image. */\n export enum Mode {\n None = 0,\n Linear = 1,\n Curved = 2,\n Cylindrical = 3,\n Spherical = 4,\n Hemispherical = 5,\n /** For a gradient created based for [[ThematicDisplay]]. */\n Thematic = 6,\n }\n\n /** Gradient fraction value to [[ColorDef]] pair */\n export interface KeyColorProps {\n /** Fraction from 0.0 to 1.0 to denote position along gradient */\n value: number;\n /** Color value for given fraction */\n color: ColorDefProps;\n }\n\n /** Gradient fraction value to [[ColorDef]] pair\n * @see [[Gradient.KeyColorProps]]\n */\n export class KeyColor {\n public value: number;\n public color: ColorDef;\n public constructor(json: KeyColorProps) {\n this.value = json.value;\n this.color = ColorDef.fromJSON(json.color);\n }\n }\n\n /** Compare two KeyColor objects for equality. Returns true if equal. */\n export function keyColorEquals(a: KeyColor, b: KeyColor): boolean {\n return (a.value === b.value) && a.color.equals(b.color);\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position */\n export interface SymbProps {\n /** Gradient type, must be set to something other than [[Gradient.Mode.None]] to display fill */\n mode: Mode;\n /** Gradient flags to enable outline display and invert color fractions, Flags.None if undefined */\n flags?: Flags;\n /** Gradient rotation angle, 0.0 if undefined */\n angle?: AngleProps;\n /** Gradient tint value from 0.0 to 1.0, only used when [[Gradient.KeyColorProps]] size is 1, 0.0 if undefined */\n tint?: number;\n /** Gradient shift value from 0.0 to 1.0, 0.0 if undefined */\n shift?: number;\n /** Gradient fraction value/color pairs, 1 minimum (uses tint for 2nd color), 8 maximum */\n keys: KeyColorProps[];\n /** Settings applicable to [[ThematicDisplay]]. */\n thematicSettings?: ThematicGradientSettingsProps;\n }\n\n /** Arguments supplied to [[Gradient.Symb.produceImage]].\n * @public\n */\n export interface ProduceImageArgs {\n /** The desired width of the image in pixels. Must be an integer greater than zero. */\n width: number;\n /** The desired height of the image in pixels. Must be an integer greater than zero. */\n height: number;\n /** If true and the gradient uses [[Gradient.Mode.Thematic]], the margin color specified by [[ThematicGradientSettings.marginColor]] will be included\n * in the top and bottom rows of the image; otherwise only the gradient colors will be included in the image.\n */\n includeThematicMargin?: boolean;\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position.\n * Gradient fill can be applied to planar regions.\n * @see [[Gradient.SymbProps]]\n */\n export class Symb {\n public mode = Mode.None;\n public flags: Flags = Flags.None;\n public angle?: Angle;\n public tint?: number;\n public shift: number = 0;\n public thematicSettings?: ThematicGradientSettings;\n public keys: KeyColor[] = [];\n\n /** create a GradientSymb from a json object. */\n public static fromJSON(json?: SymbProps) {\n const result = new Symb();\n if (!json)\n return result;\n result.mode = json.mode;\n result.flags = (json.flags === undefined) ? Flags.None : json.flags;\n result.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\n result.tint = json.tint;\n result.shift = json.shift ? json.shift : 0;\n json.keys.forEach((key) => result.keys.push(new KeyColor(key)));\n result.thematicSettings = (json.thematicSettings === undefined) ? undefined : ThematicGradientSettings.fromJSON(json.thematicSettings);\n\n return result;\n }\n\n private static _fixedSchemeKeys = [\n // NB: these color values are ordered as rbg. Note how the components are applied below.\n [[0.0, 0, 255, 0], [0.25, 0, 255, 255], [0.5, 0, 0, 255], [0.75, 255, 0, 255], [1.0, 255, 0, 0]], // Blue Red.\n [[0.0, 255, 0, 0], [0.25, 255, 0, 255], [0.5, 0, 0, 255], [0.75, 0, 255, 255], [1.0, 0, 255, 0]], // Red blue.\n [[0.0, 0, 0, 0], [1.0, 255, 255, 255]], // Monochrome.\n [[0.0, 152, 148, 188], [0.5, 204, 160, 204], [1.0, 152, 72, 128]], // Based off of the topographic gradients in Point Clouds.\n [[0.0, 0, 255, 0], [0.2, 72, 96, 160], [0.4, 152, 96, 160], [0.6, 128, 32, 104], [0.7, 148, 180, 128], [1.0, 240, 240, 240]], // Based off of the sea-mountain gradient in Point Clouds.\n ];\n private static _fixedCustomKeys = [[0.0, 255, 0, 0], [1.0, 0, 255, 0]];\n\n /** Create for [[ThematicDisplay]]. */\n public static createThematic(settings: ThematicGradientSettings) {\n const result = new Symb();\n result.mode = Mode.Thematic;\n result.thematicSettings = settings;\n\n if (settings.colorScheme < ThematicGradientColorScheme.Custom) {\n for (const keyValue of Gradient.Symb._fixedSchemeKeys[settings.colorScheme])\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\n } else { // custom color scheme; must use custom keys\n assert(settings.customKeys.length > 1, \"Custom thematic mode requires at least two keys to be defined\");\n if (settings.customKeys.length > 1) {\n settings.customKeys.forEach((keyColor) => result.keys.push(keyColor));\n } else { // if custom color keys are not specified properly, revert to some basic key scheme and assert\n for (const keyValue of Gradient.Symb._fixedCustomKeys)\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.from(keyValue[1], keyValue[3], keyValue[2]).toJSON() }));\n }\n }\n return result;\n }\n\n public toJSON(): SymbProps {\n return {\n ...this,\n thematicSettings: this.thematicSettings?.toJSON(),\n keys: this.keys.map((key) => ({ value: key.value, color: key.color.toJSON() })),\n };\n }\n\n public clone(): Symb {\n return Symb.fromJSON(this.toJSON());\n }\n\n /** Returns true if this symbology is equal to another, false otherwise. */\n public equals(other: Symb): boolean {\n return Symb.compareSymb(this, other) === 0;\n }\n\n /** Compares two gradient symbologies. Used for ordering Gradient.Symb objects.\n * @param lhs First gradient to compare\n * @param rhs Second gradient 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 compareSymb(lhs: Gradient.Symb, rhs: Gradient.Symb): number {\n if (lhs === rhs)\n return 0; // Same pointer\n if (lhs.mode !== rhs.mode)\n return lhs.mode - rhs.mode;\n if (lhs.flags !== rhs.flags)\n if (lhs.flags === undefined)\n return -1;\n else if (rhs.flags === undefined)\n return 1;\n else\n return lhs.flags - rhs.flags;\n if (lhs.tint !== rhs.tint)\n if (lhs.tint === undefined)\n return -1;\n else if (rhs.tint === undefined)\n return 1;\n else\n return lhs.tint - rhs.tint;\n if (lhs.shift !== rhs.shift)\n if (lhs.shift === undefined)\n return -1;\n else if (rhs.shift === undefined)\n return 1;\n else\n return lhs.shift - rhs.shift;\n if ((lhs.angle === undefined) !== (rhs.angle === undefined))\n if (lhs.angle === undefined)\n return -1;\n else\n return 1;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return lhs.angle.radians - rhs.angle!.radians;\n if (lhs.keys.length !== rhs.keys.length)\n return lhs.keys.length - rhs.keys.length;\n for (let i = 0; i < lhs.keys.length; i++) {\n if (lhs.keys[i].value !== rhs.keys[i].value)\n return lhs.keys[i].value - rhs.keys[i].value;\n if (!lhs.keys[i].color.equals(rhs.keys[i].color))\n return lhs.keys[i].color.tbgr - rhs.keys[i].color.tbgr;\n }\n if (lhs.thematicSettings !== rhs.thematicSettings)\n if (undefined === lhs.thematicSettings)\n return -1;\n else if (undefined === rhs.thematicSettings)\n return 1;\n else {\n const thematicCompareResult = ThematicGradientSettings.compare(lhs.thematicSettings, rhs.thematicSettings);\n if (0 !== thematicCompareResult)\n return thematicCompareResult;\n }\n return 0;\n }\n\n /** Compare this symbology to another.\n * @see [[Gradient.Symb.compareSymb]]\n */\n public compare(other: Symb): number {\n return Gradient.Symb.compareSymb(this, other);\n }\n\n /**\n * Ensure the value given is within the range of 0 to 255,\n * and truncate the value to only the 8 least significant bits.\n */\n private roundToByte(num: number): number {\n return Math.min(num + .5, 255.0) & 0xFF;\n }\n\n /** Maps a value to an RGBA value adjusted from a color present in this symbology's array. */\n public mapColor(value: number) {\n if (value < 0)\n value = 0;\n else if (value > 1)\n value = 1;\n\n if ((this.flags & Flags.Invert) !== 0)\n value = 1 - value;\n\n let idx = 0;\n let d;\n let w0;\n let w1;\n if (this.keys.length <= 2) {\n w0 = 1.0 - value;\n w1 = value;\n } else { // locate value in map, blend corresponding colors\n while (idx < (this.keys.length - 2) && value > this.keys[idx + 1].value)\n idx++;\n\n d = this.keys[idx + 1].value - this.keys[idx].value;\n w1 = d < 0.0001 ? 0.0 : (value - this.keys[idx].value) / d;\n w0 = 1.0 - w1;\n }\n\n const color0 = this.keys[idx].color;\n const color1 = this.keys[idx + 1].color;\n const colors0 = color0.colors;\n const colors1 = color1.colors;\n const red = w0 * colors0.r + w1 * colors1.r;\n const green = w0 * colors0.g + w1 * colors1.g;\n const blue = w0 * colors0.b + w1 * colors1.b;\n const transparency = w0 * colors0.t + w1 * colors1.t;\n\n return ColorDef.from(this.roundToByte(red), this.roundToByte(green), this.roundToByte(blue), this.roundToByte(transparency));\n }\n\n public get hasTranslucency(): boolean {\n for (const key of this.keys) {\n if (!key.color.isOpaque)\n return true;\n }\n\n return false;\n }\n\n /** Returns true if the [[Gradient.Flags.Outline]] flag is set. */\n public get isOutlined(): boolean { return 0 !== (this.flags & Flags.Outline); }\n\n /** Produce an image suitable for use for thematic rendering.\n * This function is chiefly useful for the WebGL renderer.\n * @see [[Gradient.Symb.getImage]] to obtain a generally useful image instead.\n */\n public getThematicImageForRenderer(maxDimension: number): ImageBuffer {\n assert(Mode.Thematic === this.mode, \"getThematicImageForRenderer only is used for thematic display.\");\n\n let settings = this.thematicSettings;\n if (settings === undefined) {\n settings = ThematicGradientSettings.defaults;\n }\n\n const stepCount = Math.min(settings.stepCount, maxDimension);\n const dimension = (ThematicGradientMode.Smooth === settings.mode) ? maxDimension : stepCount;\n const image = new Uint8Array(1 * dimension * 4);\n let currentIdx = image.length - 1;\n\n function addColor(color: ColorDef) {\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n\n switch (settings.mode) {\n case ThematicGradientMode.Smooth: {\n for (let j = 0; j < dimension; j++) {\n const f = (1 - j / (dimension));\n addColor(this.mapColor(f));\n }\n break;\n }\n\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n // The work to generate the delimiter lines and isolines is done completely in the shader.\n // Therefore, we just fall through here and use a regular stepped gradient.\n case ThematicGradientMode.Stepped: {\n assert(settings.stepCount > 1, \"Step count must be at least two to generate renderer gradient for thematic display\");\n for (let j = 0; j < dimension; j++) {\n // If we use Smooth's approach to generate the gradient...\n // We would get these values for stepCount five: 0 .2 .4 .6 .8\n // We really want these values: 0 .25 .5 .75 1\n // This preserves an exact color mapping of a n-step gradient when stepCount also equals n.\n // stepCount must be at least two for this. The thematic API enforces stepCount of at least 2.\n const f = (1 - j / (dimension - 1));\n addColor(this.mapColor(f));\n }\n break;\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, 1);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n\n /** Produces a bitmap image from this gradient.\n * @param width Width of the image\n * @param height Height of the image\n * @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.\n * @see [[produceImage]] for more customization.\n */\n public getImage(width: number, height: number): ImageBuffer {\n if (this.mode === Mode.Thematic)\n width = 1;\n\n return this.produceImage({ width, height, includeThematicMargin: true });\n }\n\n /** Produces a bitmap image from this gradient. */\n public produceImage(args: ProduceImageArgs): ImageBuffer {\n const { width, height, includeThematicMargin } = { ...args };\n\n const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;\n const cosA = Math.cos(thisAngle);\n const sinA = Math.sin(thisAngle);\n const image = new Uint8Array(width * height * 4);\n let currentIdx = image.length - 1;\n const shift = Math.min(1.0, Math.abs(this.shift));\n\n switch (this.mode) {\n case Mode.Linear:\n case Mode.Cylindrical: {\n const xs = 0.5 - 0.25 * shift * cosA;\n const ys = 0.5 - 0.25 * shift * sinA;\n let dMax;\n let dMin = dMax = 0.0;\n let d;\n for (let j = 0; j < 2; j++) {\n for (let i = 0; i < 2; i++) {\n d = (i - xs) * cosA + (j - ys) * sinA;\n if (d < dMin)\n dMin = d;\n if (d > dMax)\n dMax = d;\n }\n }\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n d = x * cosA + y * sinA;\n let f;\n if (this.mode === Mode.Linear) {\n if (d > 0)\n f = 0.5 + 0.5 * d / dMax;\n else\n f = 0.5 - 0.5 * d / dMin;\n } else {\n if (d > 0)\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMax));\n else\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMin));\n }\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Curved: {\n const xs = 0.5 + 0.5 * sinA - 0.25 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.25 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const xr = 0.8 * (x * cosA + y * sinA);\n const yr = y * cosA - x * sinA;\n const f = Math.sin(Math.PI / 2 * (1 - Math.sqrt(xr * xr + yr * yr)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Spherical: {\n const r = 0.5 + 0.125 * Math.sin(2.0 * thisAngle);\n const xs = 0.5 * shift * (cosA + sinA) * r;\n const ys = 0.5 * shift * (sinA - cosA) * r;\n for (let j = 0; j < height; j++) {\n const y = ys + j / height - 0.5;\n for (let i = 0; i < width; i++) {\n const x = xs + i / width - 0.5;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y) / r));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Hemispherical: {\n const xs = 0.5 + 0.5 * sinA - 0.5 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.5 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Thematic: {\n const settings = this.thematicSettings ?? ThematicGradientSettings.defaults;\n\n for (let j = 0; j < height; j++) {\n let f = 1 - j / height;\n let color: ColorDef;\n\n if (includeThematicMargin && (f < ThematicGradientSettings.margin || f > ThematicGradientSettings.contentMax)) {\n color = settings.marginColor;\n } else {\n f = (f - ThematicGradientSettings.margin) / (ThematicGradientSettings.contentRange);\n switch (settings.mode) {\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n case ThematicGradientMode.Stepped: {\n if (settings.stepCount > 1) {\n const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);\n color = this.mapColor(fStep);\n } else {\n throw new Error(`Thematic gradient mode ${String(settings.mode)} requires at least two steps.`);\n }\n break;\n }\n case ThematicGradientMode.Smooth:\n color = this.mapColor(f);\n break;\n }\n }\n\n for (let i = 0; i < width; i++) {\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, width);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Gradient.js","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,wDAAyD;AACzD,yCAAqD;AACrD,mCAAyD;AACzD,uDAA+I;AAE/I;;;;GAIG;AACH,IAAiB,QAAQ,CA2fxB;AA3fD,WAAiB,QAAQ;IACvB,4CAA4C;IAC5C,IAAY,KAOX;IAPD,WAAY,KAAK;QACf,gBAAgB;QAChB,iCAAQ,CAAA;QACR,8CAA8C;QAC9C,qCAAU,CAAA;QACV,2EAA2E;QAC3E,uCAAW,CAAA;IACb,CAAC,EAPW,KAAK,GAAL,cAAK,KAAL,cAAK,QAOhB;IAED,+FAA+F;IAC/F,IAAY,IASX;IATD,WAAY,IAAI;QACd,+BAAQ,CAAA;QACR,mCAAU,CAAA;QACV,mCAAU,CAAA;QACV,6CAA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CAAC;YAClC,OAAO,WAAW,CAAC;QACrB,CAAC;;IAraU,aAAI,OAsahB,CAAA;AACH,CAAC,EA3fgB,QAAQ,wBAAR,QAAQ,QA2fxB","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 { assert } from \"@itwin/core-bentley\";\r\nimport { Angle, AngleProps } from \"@itwin/core-geometry\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\nimport { ImageBuffer, ImageBufferFormat } from \"./Image\";\r\nimport { ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\r\n\r\n/** Namespace containing types for defining a color gradient, often used for filled planar regions.\r\n * @see [[GeometryParams]]\r\n * @see [[GraphicParams]]\r\n * @public\r\n */\r\nexport namespace Gradient {\r\n /** Flags applied to a [[Gradient.Symb]]. */\r\n export enum Flags {\r\n /** No flags. */\r\n None = 0,\r\n /** Reverse the order of the gradient keys. */\r\n Invert = 1,\r\n /** Draw an outline around the surface to which the gradient is applied. */\r\n Outline = 2,\r\n }\r\n\r\n /** Enumerates the modes by which a [[Gradient.Symb]]'s keys are applied to create an image. */\r\n export enum Mode {\r\n None = 0,\r\n Linear = 1,\r\n Curved = 2,\r\n Cylindrical = 3,\r\n Spherical = 4,\r\n Hemispherical = 5,\r\n /** For a gradient created based for [[ThematicDisplay]]. */\r\n Thematic = 6,\r\n }\r\n\r\n /** Gradient fraction value to [[ColorDef]] pair */\r\n export interface KeyColorProps {\r\n /** Fraction from 0.0 to 1.0 to denote position along gradient */\r\n value: number;\r\n /** Color value for given fraction */\r\n color: ColorDefProps;\r\n }\r\n\r\n /** Gradient fraction value to [[ColorDef]] pair\r\n * @see [[Gradient.KeyColorProps]]\r\n */\r\n export class KeyColor {\r\n public value: number;\r\n public color: ColorDef;\r\n public constructor(json: KeyColorProps) {\r\n this.value = json.value;\r\n this.color = ColorDef.fromJSON(json.color);\r\n }\r\n }\r\n\r\n /** Compare two KeyColor objects for equality. Returns true if equal. */\r\n export function keyColorEquals(a: KeyColor, b: KeyColor): boolean {\r\n return (a.value === b.value) && a.color.equals(b.color);\r\n }\r\n\r\n /** Multi-color area fill defined by a range of colors that vary by position */\r\n export interface SymbProps {\r\n /** Gradient type, must be set to something other than [[Gradient.Mode.None]] to display fill */\r\n mode: Mode;\r\n /** Gradient flags to enable outline display and invert color fractions, Flags.None if undefined */\r\n flags?: Flags;\r\n /** Gradient rotation angle, 0.0 if undefined */\r\n angle?: AngleProps;\r\n /** Gradient tint value from 0.0 to 1.0, only used when [[Gradient.KeyColorProps]] size is 1, 0.0 if undefined */\r\n tint?: number;\r\n /** Gradient shift value from 0.0 to 1.0, 0.0 if undefined */\r\n shift?: number;\r\n /** Gradient fraction value/color pairs, 1 minimum (uses tint for 2nd color), 8 maximum */\r\n keys: KeyColorProps[];\r\n /** Settings applicable to [[ThematicDisplay]]. */\r\n thematicSettings?: ThematicGradientSettingsProps;\r\n }\r\n\r\n /** Arguments supplied to [[Gradient.Symb.produceImage]].\r\n * @public\r\n */\r\n export interface ProduceImageArgs {\r\n /** The desired width of the image in pixels. Must be an integer greater than zero. */\r\n width: number;\r\n /** The desired height of the image in pixels. Must be an integer greater than zero. */\r\n height: number;\r\n /** If true and the gradient uses [[Gradient.Mode.Thematic]], the margin color specified by [[ThematicGradientSettings.marginColor]] will be included\r\n * in the top and bottom rows of the image; otherwise only the gradient colors will be included in the image.\r\n */\r\n includeThematicMargin?: boolean;\r\n }\r\n\r\n /** Multi-color area fill defined by a range of colors that vary by position.\r\n * Gradient fill can be applied to planar regions.\r\n * @see [[Gradient.SymbProps]]\r\n */\r\n export class Symb {\r\n public mode = Mode.None;\r\n public flags: Flags = Flags.None;\r\n public angle?: Angle;\r\n public tint?: number;\r\n public shift: number = 0;\r\n public thematicSettings?: ThematicGradientSettings;\r\n public keys: KeyColor[] = [];\r\n\r\n /** create a GradientSymb from a json object. */\r\n public static fromJSON(json?: SymbProps) {\r\n const result = new Symb();\r\n if (!json)\r\n return result;\r\n result.mode = json.mode;\r\n result.flags = (json.flags === undefined) ? Flags.None : json.flags;\r\n result.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\r\n result.tint = json.tint;\r\n result.shift = json.shift ? json.shift : 0;\r\n json.keys.forEach((key) => result.keys.push(new KeyColor(key)));\r\n result.thematicSettings = (json.thematicSettings === undefined) ? undefined : ThematicGradientSettings.fromJSON(json.thematicSettings);\r\n\r\n return result;\r\n }\r\n\r\n private static _fixedSchemeKeys = [\r\n // NB: these color values are ordered as rbg. Note how the components are applied below.\r\n [[0.0, 0, 255, 0], [0.25, 0, 255, 255], [0.5, 0, 0, 255], [0.75, 255, 0, 255], [1.0, 255, 0, 0]], // Blue Red.\r\n [[0.0, 255, 0, 0], [0.25, 255, 0, 255], [0.5, 0, 0, 255], [0.75, 0, 255, 255], [1.0, 0, 255, 0]], // Red blue.\r\n [[0.0, 0, 0, 0], [1.0, 255, 255, 255]], // Monochrome.\r\n [[0.0, 152, 148, 188], [0.5, 204, 160, 204], [1.0, 152, 72, 128]], // Based off of the topographic gradients in Point Clouds.\r\n [[0.0, 0, 255, 0], [0.2, 72, 96, 160], [0.4, 152, 96, 160], [0.6, 128, 32, 104], [0.7, 148, 180, 128], [1.0, 240, 240, 240]], // Based off of the sea-mountain gradient in Point Clouds.\r\n ];\r\n private static _fixedCustomKeys = [[0.0, 255, 0, 0], [1.0, 0, 255, 0]];\r\n\r\n /** Create for [[ThematicDisplay]]. */\r\n public static createThematic(settings: ThematicGradientSettings) {\r\n const result = new Symb();\r\n result.mode = Mode.Thematic;\r\n result.thematicSettings = settings;\r\n\r\n if (settings.colorScheme < ThematicGradientColorScheme.Custom) {\r\n for (const keyValue of Gradient.Symb._fixedSchemeKeys[settings.colorScheme])\r\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\r\n } else { // custom color scheme; must use custom keys\r\n assert(settings.customKeys.length > 1, \"Custom thematic mode requires at least two keys to be defined\");\r\n if (settings.customKeys.length > 1) {\r\n settings.customKeys.forEach((keyColor) => result.keys.push(keyColor));\r\n } else { // if custom color keys are not specified properly, revert to some basic key scheme and assert\r\n for (const keyValue of Gradient.Symb._fixedCustomKeys)\r\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.from(keyValue[1], keyValue[3], keyValue[2]).toJSON() }));\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n public toJSON(): SymbProps {\r\n return {\r\n ...this,\r\n thematicSettings: this.thematicSettings?.toJSON(),\r\n keys: this.keys.map((key) => ({ value: key.value, color: key.color.toJSON() })),\r\n };\r\n }\r\n\r\n public clone(): Symb {\r\n return Symb.fromJSON(this.toJSON());\r\n }\r\n\r\n /** Returns true if this symbology is equal to another, false otherwise. */\r\n public equals(other: Symb): boolean {\r\n return Symb.compareSymb(this, other) === 0;\r\n }\r\n\r\n /** Compares two gradient symbologies. Used for ordering Gradient.Symb objects.\r\n * @param lhs First gradient to compare\r\n * @param rhs Second gradient 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 compareSymb(lhs: Gradient.Symb, rhs: Gradient.Symb): number {\r\n if (lhs === rhs)\r\n return 0; // Same pointer\r\n if (lhs.mode !== rhs.mode)\r\n return lhs.mode - rhs.mode;\r\n if (lhs.flags !== rhs.flags)\r\n if (lhs.flags === undefined)\r\n return -1;\r\n else if (rhs.flags === undefined)\r\n return 1;\r\n else\r\n return lhs.flags - rhs.flags;\r\n if (lhs.tint !== rhs.tint)\r\n if (lhs.tint === undefined)\r\n return -1;\r\n else if (rhs.tint === undefined)\r\n return 1;\r\n else\r\n return lhs.tint - rhs.tint;\r\n if (lhs.shift !== rhs.shift)\r\n if (lhs.shift === undefined)\r\n return -1;\r\n else if (rhs.shift === undefined)\r\n return 1;\r\n else\r\n return lhs.shift - rhs.shift;\r\n if ((lhs.angle === undefined) !== (rhs.angle === undefined))\r\n if (lhs.angle === undefined)\r\n return -1;\r\n else\r\n return 1;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n return lhs.angle.radians - rhs.angle!.radians;\r\n if (lhs.keys.length !== rhs.keys.length)\r\n return lhs.keys.length - rhs.keys.length;\r\n for (let i = 0; i < lhs.keys.length; i++) {\r\n if (lhs.keys[i].value !== rhs.keys[i].value)\r\n return lhs.keys[i].value - rhs.keys[i].value;\r\n if (!lhs.keys[i].color.equals(rhs.keys[i].color))\r\n return lhs.keys[i].color.tbgr - rhs.keys[i].color.tbgr;\r\n }\r\n if (lhs.thematicSettings !== rhs.thematicSettings)\r\n if (undefined === lhs.thematicSettings)\r\n return -1;\r\n else if (undefined === rhs.thematicSettings)\r\n return 1;\r\n else {\r\n const thematicCompareResult = ThematicGradientSettings.compare(lhs.thematicSettings, rhs.thematicSettings);\r\n if (0 !== thematicCompareResult)\r\n return thematicCompareResult;\r\n }\r\n return 0;\r\n }\r\n\r\n /** Compare this symbology to another.\r\n * @see [[Gradient.Symb.compareSymb]]\r\n */\r\n public compare(other: Symb): number {\r\n return Gradient.Symb.compareSymb(this, other);\r\n }\r\n\r\n /**\r\n * Ensure the value given is within the range of 0 to 255,\r\n * and truncate the value to only the 8 least significant bits.\r\n */\r\n private roundToByte(num: number): number {\r\n return Math.min(num + .5, 255.0) & 0xFF;\r\n }\r\n\r\n /** Maps a value to an RGBA value adjusted from a color present in this symbology's array. */\r\n public mapColor(value: number) {\r\n if (value < 0)\r\n value = 0;\r\n else if (value > 1)\r\n value = 1;\r\n\r\n if ((this.flags & Flags.Invert) !== 0)\r\n value = 1 - value;\r\n\r\n let idx = 0;\r\n let d;\r\n let w0;\r\n let w1;\r\n if (this.keys.length <= 2) {\r\n w0 = 1.0 - value;\r\n w1 = value;\r\n } else { // locate value in map, blend corresponding colors\r\n while (idx < (this.keys.length - 2) && value > this.keys[idx + 1].value)\r\n idx++;\r\n\r\n d = this.keys[idx + 1].value - this.keys[idx].value;\r\n w1 = d < 0.0001 ? 0.0 : (value - this.keys[idx].value) / d;\r\n w0 = 1.0 - w1;\r\n }\r\n\r\n const color0 = this.keys[idx].color;\r\n const color1 = this.keys[idx + 1].color;\r\n const colors0 = color0.colors;\r\n const colors1 = color1.colors;\r\n const red = w0 * colors0.r + w1 * colors1.r;\r\n const green = w0 * colors0.g + w1 * colors1.g;\r\n const blue = w0 * colors0.b + w1 * colors1.b;\r\n const transparency = w0 * colors0.t + w1 * colors1.t;\r\n\r\n return ColorDef.from(this.roundToByte(red), this.roundToByte(green), this.roundToByte(blue), this.roundToByte(transparency));\r\n }\r\n\r\n public get hasTranslucency(): boolean {\r\n for (const key of this.keys) {\r\n if (!key.color.isOpaque)\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Returns true if the [[Gradient.Flags.Outline]] flag is set. */\r\n public get isOutlined(): boolean { return 0 !== (this.flags & Flags.Outline); }\r\n\r\n /** Produce an image suitable for use for thematic rendering.\r\n * This function is chiefly useful for the WebGL renderer.\r\n * @see [[Gradient.Symb.getImage]] to obtain a generally useful image instead.\r\n */\r\n public getThematicImageForRenderer(maxDimension: number): ImageBuffer {\r\n assert(Mode.Thematic === this.mode, \"getThematicImageForRenderer only is used for thematic display.\");\r\n\r\n let settings = this.thematicSettings;\r\n if (settings === undefined) {\r\n settings = ThematicGradientSettings.defaults;\r\n }\r\n\r\n const stepCount = Math.min(settings.stepCount, maxDimension);\r\n const dimension = (ThematicGradientMode.Smooth === settings.mode) ? maxDimension : stepCount;\r\n const image = new Uint8Array(1 * dimension * 4);\r\n let currentIdx = image.length - 1;\r\n\r\n function addColor(color: ColorDef) {\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n\r\n switch (settings.mode) {\r\n case ThematicGradientMode.Smooth: {\r\n for (let j = 0; j < dimension; j++) {\r\n const f = (1 - j / (dimension));\r\n addColor(this.mapColor(f));\r\n }\r\n break;\r\n }\r\n\r\n case ThematicGradientMode.SteppedWithDelimiter:\r\n case ThematicGradientMode.IsoLines:\r\n // The work to generate the delimiter lines and isolines is done completely in the shader.\r\n // Therefore, we just fall through here and use a regular stepped gradient.\r\n case ThematicGradientMode.Stepped: {\r\n assert(settings.stepCount > 1, \"Step count must be at least two to generate renderer gradient for thematic display\");\r\n for (let j = 0; j < dimension; j++) {\r\n // If we use Smooth's approach to generate the gradient...\r\n // We would get these values for stepCount five: 0 .2 .4 .6 .8\r\n // We really want these values: 0 .25 .5 .75 1\r\n // This preserves an exact color mapping of a n-step gradient when stepCount also equals n.\r\n // stepCount must be at least two for this. The thematic API enforces stepCount of at least 2.\r\n const f = (1 - j / (dimension - 1));\r\n addColor(this.mapColor(f));\r\n }\r\n break;\r\n }\r\n }\r\n\r\n assert(-1 === currentIdx);\r\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, 1);\r\n assert(undefined !== imageBuffer);\r\n return imageBuffer;\r\n }\r\n\r\n /** Produces a bitmap image from this gradient.\r\n * @param width Width of the image\r\n * @param height Height of the image\r\n * @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.\r\n * @see [[produceImage]] for more customization.\r\n */\r\n public getImage(width: number, height: number): ImageBuffer {\r\n if (this.mode === Mode.Thematic)\r\n width = 1;\r\n\r\n return this.produceImage({ width, height, includeThematicMargin: true });\r\n }\r\n\r\n /** Produces a bitmap image from this gradient. */\r\n public produceImage(args: ProduceImageArgs): ImageBuffer {\r\n const { width, height, includeThematicMargin } = { ...args };\r\n\r\n const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;\r\n const cosA = Math.cos(thisAngle);\r\n const sinA = Math.sin(thisAngle);\r\n const image = new Uint8Array(width * height * 4);\r\n let currentIdx = image.length - 1;\r\n const shift = Math.min(1.0, Math.abs(this.shift));\r\n\r\n switch (this.mode) {\r\n case Mode.Linear:\r\n case Mode.Cylindrical: {\r\n const xs = 0.5 - 0.25 * shift * cosA;\r\n const ys = 0.5 - 0.25 * shift * sinA;\r\n let dMax;\r\n let dMin = dMax = 0.0;\r\n let d;\r\n for (let j = 0; j < 2; j++) {\r\n for (let i = 0; i < 2; i++) {\r\n d = (i - xs) * cosA + (j - ys) * sinA;\r\n if (d < dMin)\r\n dMin = d;\r\n if (d > dMax)\r\n dMax = d;\r\n }\r\n }\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n d = x * cosA + y * sinA;\r\n let f;\r\n if (this.mode === Mode.Linear) {\r\n if (d > 0)\r\n f = 0.5 + 0.5 * d / dMax;\r\n else\r\n f = 0.5 - 0.5 * d / dMin;\r\n } else {\r\n if (d > 0)\r\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMax));\r\n else\r\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMin));\r\n }\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Curved: {\r\n const xs = 0.5 + 0.5 * sinA - 0.25 * shift * cosA;\r\n const ys = 0.5 - 0.5 * cosA - 0.25 * shift * sinA;\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n const xr = 0.8 * (x * cosA + y * sinA);\r\n const yr = y * cosA - x * sinA;\r\n const f = Math.sin(Math.PI / 2 * (1 - Math.sqrt(xr * xr + yr * yr)));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Spherical: {\r\n const r = 0.5 + 0.125 * Math.sin(2.0 * thisAngle);\r\n const xs = 0.5 * shift * (cosA + sinA) * r;\r\n const ys = 0.5 * shift * (sinA - cosA) * r;\r\n for (let j = 0; j < height; j++) {\r\n const y = ys + j / height - 0.5;\r\n for (let i = 0; i < width; i++) {\r\n const x = xs + i / width - 0.5;\r\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y) / r));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Hemispherical: {\r\n const xs = 0.5 + 0.5 * sinA - 0.5 * shift * cosA;\r\n const ys = 0.5 - 0.5 * cosA - 0.5 * shift * sinA;\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y)));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Thematic: {\r\n const settings = this.thematicSettings ?? ThematicGradientSettings.defaults;\r\n\r\n for (let j = 0; j < height; j++) {\r\n let f = 1 - j / height;\r\n let color: ColorDef;\r\n\r\n if (includeThematicMargin && (f < ThematicGradientSettings.margin || f > ThematicGradientSettings.contentMax)) {\r\n color = settings.marginColor;\r\n } else {\r\n f = (f - ThematicGradientSettings.margin) / (ThematicGradientSettings.contentRange);\r\n switch (settings.mode) {\r\n case ThematicGradientMode.SteppedWithDelimiter:\r\n case ThematicGradientMode.IsoLines:\r\n case ThematicGradientMode.Stepped: {\r\n if (settings.stepCount > 1) {\r\n const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);\r\n color = this.mapColor(fStep);\r\n } else {\r\n throw new Error(`Thematic gradient mode ${String(settings.mode)} requires at least two steps.`);\r\n }\r\n break;\r\n }\r\n case ThematicGradientMode.Smooth:\r\n color = this.mapColor(f);\r\n break;\r\n }\r\n }\r\n\r\n for (let i = 0; i < width; i++) {\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n }\r\n }\r\n\r\n assert(-1 === currentIdx);\r\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, width);\r\n assert(undefined !== imageBuffer);\r\n return imageBuffer;\r\n }\r\n }\r\n}\r\n"]}
|