@itwin/core-common 5.5.0-dev.2 → 5.5.0-dev.5
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/esm/QPoint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QPoint.js","sourceRoot":"","sources":["../../src/QPoint.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EACL,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GACvD,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;GAUG;AACH,MAAM,KAAW,YAAY,CAqC5B;AArCD,WAA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C,MAAM,EAAE,MAAM,CAAC,CAAC;IACrF,CAAC;IAED,wGAAwG;IACjG,MAAM;QACX,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;SACnC,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { assert, Uint16ArrayBuilder } from \"@itwin/core-bentley\";\nimport {\n Point2d, Point3d, Range2d, Range3d, Vector2d, Vector3d, XAndY, XYAndZ,\n} from \"@itwin/core-geometry\";\n\n/**\n * Provides facilities for quantizing floating point values within a specified range into 16-bit unsigned integers.\n * This is a lossy compression technique.\n * Given a floating point range [min, max], a floating point value `x` within that range is quantized by subtracting\n * `min`, scaling the result according to `max`, and truncating the result to an integer.\n * Therefore min quantizes to 0, max to 0xffff, (min+max)/2 to 0x7fff, and so on.\n * These routines are chiefly used by classes like [[QPoint2d]] and [[QPoint3d]] to reduce the space required to store\n * coordinate values for [RenderGraphic]($frontend)s.\n * @public\n * @extensions\n */\nexport namespace Quantization {\n export const rangeScale16 = 0xffff;\n export const rangeScale8 = 0xff;\n\n /** Compute the scale factor required to quantize `extent` to `rangeScale` discrete values. */\n export function computeScale(extent: number, rangeScale = rangeScale16): number {\n return 0.0 === extent ? extent : rangeScale / extent;\n }\n\n /** Returns true if the quantized value `qpos` fits within the specified range. */\n export function isInRange(qpos: number, rangeScale = rangeScale16): boolean {\n return qpos >= 0.0 && qpos < rangeScale + 1.0;\n }\n\n /** Return `pos` quantized to the range [`origin`, `origin + rangeScale`].\n * @see [[Quantization.unquantize]] for the inverse operation.\n */\n export function quantize(pos: number, origin: number, scale: number, rangeScale = rangeScale16): number {\n return Math.floor(Math.max(0.0, Math.min(rangeScale, 0.5 + (pos - origin) * scale)));\n }\n\n /** Returns true if the value `pos` can be quantized to the specified range. */\n export function isQuantizable(pos: number, origin: number, scale: number, rangeScale = rangeScale16) {\n return isInRange(quantize(pos, origin, scale, rangeScale));\n }\n\n /** Give `qpos` quantized to the range [`origin`, `origin + rangeScale`], return the unquantized value.\n * @see [[Quantization.quantize]] for the inverse operation.\n */\n export function unquantize(qpos: number, origin: number, scale: number): number {\n return 0.0 === scale ? origin : origin + qpos / scale;\n }\n\n /** Returns true if `qpos` is a valid quantized 16-bit value. */\n export function isQuantized(qpos: number) {\n return isInRange(qpos) && qpos === Math.floor(qpos);\n }\n}\n\n/** @alpha */\nexport interface QParams2dProps {\n origin: XAndY;\n scale: XAndY;\n}\n\n/** Parameters used for [[Quantization]] of 2d points such that the `x` and `y` components are each quantized to 16-bit unsigned integers.\n * @see [[QPoint2d]] for the quantized representation of a [Point2d]($core-geometry).\n * @see [[QPoint2dList]] for a list of [[QPoint2d]]s quantized using a [[QParams2d]].\n * @public\n * @extensions\n */\nexport class QParams2d {\n /** The origin of the quantization range. */\n public readonly origin = new Point2d();\n /** The scale applied to coordinates to quantize them. */\n public readonly scale = new Point2d();\n\n private constructor(ox = 0, oy = 0, sx = 0, sy = 0) { this.setFrom(ox, oy, sx, sy); }\n\n private setFrom(ox: number, oy: number, sx: number, sy: number) {\n this.origin.x = ox;\n this.origin.y = oy;\n this.scale.x = sx;\n this.scale.y = sy;\n }\n\n /** Set [[origin]] and [[scale]] from `src`. */\n public copyFrom(src: QParams2d): void {\n this.setFrom(src.origin.x, src.origin.y, src.scale.x, src.scale.y);\n }\n\n /** Create a copy of these params.\n * @param out If supplied, these QParams2d will be modified and returned; otherwise a new QParams2d object will be created and returned.\n */\n public clone(out?: QParams2d): QParams2d {\n const result = undefined !== out ? out : new QParams2d();\n result.copyFrom(this);\n return result;\n }\n\n /** Initialize these parameters to support quantization of values within the specified range. */\n public setFromRange(range: Range2d, rangeScale = Quantization.rangeScale16) {\n if (!range.isNull) {\n this.setFrom(range.low.x, range.low.y, Quantization.computeScale(range.high.x - range.low.x, rangeScale), Quantization.computeScale(range.high.y - range.low.y, rangeScale));\n } else {\n this.origin.x = this.origin.y = this.scale.x = this.scale.y = 0;\n }\n }\n\n /** Create parameters to support quantization of values within the specified range. */\n public static fromRange(range: Range2d, out?: QParams2d, rangeScale = Quantization.rangeScale16) {\n const params = undefined !== out ? out : new QParams2d();\n params.setFromRange(range, rangeScale);\n return params;\n }\n\n /** Return the unquantized point for the input `x` and `y` components. If `out` is supplied, it will be modified to hold the result and returned. */\n public unquantize(x: number, y: number, out?: Point2d): Point2d {\n out = out ?? new Point2d();\n out.x = Quantization.unquantize(x, this.origin.x, this.scale.x);\n out.y = Quantization.unquantize(y, this.origin.y, this.scale.y);\n return out;\n }\n\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0], appropriate for normalized 2d vectors. */\n public static fromNormalizedRange(rangeScale = Quantization.rangeScale16) {\n return QParams2d.fromRange(Range2d.createArray([Point2d.create(-1, -1), Point2d.create(1, 1)]), undefined, rangeScale);\n }\n\n /** Create parameters supporting quantization of values within the range [0.0, 1.0]. */\n public static fromZeroToOne(rangeScale = Quantization.rangeScale16) {\n return QParams2d.fromRange(Range2d.createArray([Point2d.create(0, 0), Point2d.create(1, 1)]), undefined, rangeScale);\n }\n\n /** Create parameters from origin and scale components */\n public static fromOriginAndScale(originX: number, originY: number, scaleX: number, scaleY: number) {\n return new QParams2d(originX, originY, scaleX, scaleY);\n }\n\n /** The diagonal of the unquantized range represented by these parameters. */\n public get rangeDiagonal(): Vector2d {\n return Vector2d.createFrom({ x: 0 === this.scale.x ? 0 : Quantization.rangeScale16 / this.scale.x, y: 0 === this.scale.y ? 0 : Quantization.rangeScale16 / this.scale.y });\n }\n\n /** Return true if the point point is quantizable using these parameters. */\n public isQuantizable(point: Point2d) {\n return Quantization.isQuantizable(point.x, this.origin.x, this.scale.x) && Quantization.isQuantizable(point.y, this.origin.y, this.scale.y);\n }\n\n /** @alpha */\n public toJSON(): QParams2dProps {\n return {\n origin: { x: this.origin.x, y: this.origin.y },\n scale: { x: this.scale.x, y: this.scale.y },\n };\n }\n\n /** @alpha */\n public static fromJSON(src: QParams2dProps): QParams2d {\n return this.fromOriginAndScale(src.origin.x, src.origin.y, src.scale.x, src.scale.y);\n }\n}\n\n/** Represents a [Point2d]($core-geometry) compressed such that each component `x` and `y` is quantized to the 16-bit integer range [0, 0xffff].\n * These are primarily used to reduce the space required for coordinates used by [RenderGraphic]($frontend)s.\n * @see [[QParams2d]] to define quantization parameters for a range of points.\n * @see [[QPoint2dList]] for a list of points all quantized to the same range.\n * @public\n * @extensions\n */\nexport class QPoint2d {\n private _x: number = 0;\n private _y: number = 0;\n\n /** The quantized x component. */\n public get x() { return this._x; }\n public set x(x: number) {\n assert(Quantization.isQuantized(x));\n this._x = x;\n }\n\n /** The quantized y component. */\n public get y() { return this._y; }\n public set y(y: number) {\n assert(Quantization.isQuantized(y));\n this._y = y;\n }\n\n /** Construct with `x` and `y` initialized to zero. */\n public constructor() { }\n\n /** Initialize this point by quantizing the supplied { x, y } using the specified params */\n public init(pos: XAndY, params: QParams2d) {\n this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);\n this.y = Quantization.quantize(pos.y, params.origin.y, params.scale.y);\n }\n\n /** Create a quantized point from the supplied Point2d using the specified params */\n public static create(pos: Point2d, params: QParams2d) {\n const qpt = new QPoint2d();\n qpt.init(pos, params);\n return qpt;\n }\n\n /** Initialize `x` and `y` from `src`. */\n public copyFrom(src: QPoint2d) {\n this.x = src.x;\n this.y = src.y;\n }\n\n /** Create a copy of this point.\n * @param out If supplied, it will be modified in-place and returned; otherwise a new QPoint2d will be allocated and returned.\n */\n public clone(out?: QPoint2d) {\n const result = undefined !== out ? out : new QPoint2d();\n result.copyFrom(this);\n return result;\n }\n\n /**\n * Set the x and y components directly.\n * @param x Must be an integer in the range [0, 0xffff]\n * @param y Must be an integer in the range [0, 0xffff]\n */\n public setFromScalars(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n\n /**\n * Create a QPoint2d directly from x and y components.\n * @param x Must be an integer in the range [0, 0xffff]\n * @param y Must be an integer in the range [0, 0xffff]\n */\n public static fromScalars(x: number, y: number) {\n const pt = new QPoint2d();\n pt.setFromScalars(x, y);\n return pt;\n }\n\n /** Return a Point2d unquantized according to the supplied `params`. If `out` is supplied, it will be modified in-place and returned. */\n public unquantize(params: QParams2d, out?: Point2d): Point2d {\n const pt: Point2d = undefined !== out ? out : new Point2d();\n pt.x = Quantization.unquantize(this.x, params.origin.x, params.scale.x);\n pt.y = Quantization.unquantize(this.y, params.origin.y, params.scale.y);\n return pt;\n }\n}\n\n/** A compact representation of a list of [[QPoint2d]]s stored in a `Uint16Array`\n * This representation is particularly useful when passing data to WebGL; for example, see [RealityMeshParams.uvs]($frontend).\n * @see [[QPoint3dBuffer]] for 3d points.\n * @public\n * @extensions\n */\nexport interface QPoint2dBuffer {\n /** The parameters used to quantize the [[points]]. */\n params: QParams2d;\n /** The [[QPoint2d]]s as pairs of unsigned 16-bit integers. The length must be a multiple of 2; the number of points in the array is half the array's length.\n * To obtain the `n`th point, use `QPoint2d.fromScalars(buffer.points[n * 2], buffer.points[n * 2 + 1])`.\n */\n points: Uint16Array;\n}\n\n/**\n * @public\n * @extensions\n */\nexport namespace QPoint2dBuffer {\n const scratchQPoint2d = new QPoint2d();\n\n /** Extracts the point at the specified index from a buffer.\n * @param points The buffer in which each consecutive pair of integers is a 2d quantized point.\n * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\n * @param result If supplied, a preallocated [[QPoint2d]] to initialize with the result and return.\n * @returns The point at `pointIndex`.\n * @throws Error if `pointIndex` is out of bounds.\n */\n export function getQPoint(points: Uint16Array, pointIndex: number, result?: QPoint2d): QPoint2d {\n const index = pointIndex * 2;\n const x = points[index + 0];\n const y = points[index + 1];\n if (undefined === x || undefined === y)\n throw new Error(\"Index out of range\");\n\n result = result ?? new QPoint2d();\n result.setFromScalars(x, y);\n return result;\n }\n\n /** Extracts and unquantizes the point at the specified index from a buffer.\n * @param buffer The array of points and the quantization parameters.\n * @param The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\n * @param result If supplied, a preallocated [Point2d]($core-geometry) to initialize with the result and return.\n * @returns The point at `pointIndex`.\n * @throws Error if `pointIndex` is out of bounds.\n */\n export function unquantizePoint(buffer: QPoint2dBuffer, pointIndex: number, result?: Point2d): Point2d {\n const qpt = getQPoint(buffer.points, pointIndex, scratchQPoint2d);\n return qpt.unquantize(buffer.params, result);\n }\n}\n\n/** A list of [[QPoint2d]]s all quantized to the same range.\n * @public\n * @extensions\n */\nexport class QPoint2dList {\n /** Parameters used to quantize the points. */\n public readonly params: QParams2d;\n private readonly _list = new Array<QPoint2d>();\n\n /** The list of quantized points. */\n public get list(): ReadonlyArray<QPoint2d> {\n return this._list;\n }\n\n /** Construct an empty list set up to use the supplied quantization parameters. */\n public constructor(params: QParams2d) {\n this.params = params.clone();\n }\n\n /** Removes all points from the list. */\n public clear() {\n this._list.length = 0;\n }\n\n /** Removes all points from the list and change the quantization parameters. */\n public reset(params: QParams2d) {\n this.clear();\n this.params.copyFrom(params);\n }\n\n /** Quantizes the supplied Point2d to this list's range and appends it to the list. */\n public add(pt: Point2d) {\n this._list.push(QPoint2d.create(pt, this.params));\n }\n\n /** Adds a previously-quantized point to this list. */\n public push(qpt: QPoint2d) {\n this._list.push(qpt.clone());\n }\n\n /** The number of points in the list. */\n public get length() {\n return this._list.length;\n }\n\n /** Returns the unquantized value of the point at the specified index in the list. */\n public unquantize(index: number, out?: Point2d): Point2d {\n assert(index < this.length);\n if (index < this.length) {\n return this._list[index].unquantize(this.params, out);\n } else {\n return undefined !== out ? out : new Point2d();\n }\n }\n\n /** Changes the quantization parameters and requantizes all points in the list to the new range.\n * @note The loss of precision is compounded each time the points are requantized to a new range.\n */\n public requantize(params: QParams2d) {\n for (let i = 0; i < this.length; i++) {\n const pt = this.unquantize(i);\n this._list[i].init(pt, params);\n }\n\n this.params.copyFrom(params);\n }\n\n /** Extracts the current contents of the list as a Uint16Array such that the first element of the array corresponds to the first point's `x` component,\n * the second to the first point's `y` component, and so on.\n */\n public toTypedArray(): Uint16Array {\n const array = new Uint16Array(this.length * 2);\n const pts = this._list;\n for (let i = 0; i < this.length; i++) {\n const pt = pts[i];\n array[i * 2] = pt.x;\n array[i * 2 + 1] = pt.y;\n }\n\n return array;\n }\n\n /** Create from a Uint16Array laid out such that `array[0]` corresponds to the first point's `x` component, `array[1]` to the first point's `y` component, and so on. */\n public fromTypedArray(range: Range2d, array: Uint16Array) {\n this.params.setFromRange(range);\n this._list.length = array.length / 2;\n for (let i = 0, j = 0; i < this.list.length; i++)\n this._list[i] = QPoint2d.fromScalars(array[j++], array[j++]);\n }\n\n /** Construct a QPoint2dList containing all points in the supplied list, quantized to the range of those points. */\n public static fromPoints(points: Point2d[], out?: QPoint2dList) {\n let qPoints;\n const qParams = QParams2d.fromRange(Range2d.createArray(points));\n if (out) {\n qPoints = out;\n qPoints.reset(qParams);\n } else {\n qPoints = new QPoint2dList(qParams);\n }\n\n for (const point of points)\n qPoints.add(point);\n\n return qPoints;\n }\n}\n\n/** @alpha */\nexport interface QParams3dProps {\n origin: XYAndZ;\n scale: XYAndZ;\n}\n\n/** Parameters used for [[Quantization]] of 3d points such that the `x`, `y`, and `z` components are each quantized to 16-bit unsigned integers.\n * @see [[QPoint3d]] for the quantized representation of a [Point3d]($core-geometry).\n * @see [[QPoint3dList]] for a list of [[QPoint3d]]s quantized using a [[QParams3d]].\n * @public\n * @extensions\n */\nexport class QParams3d {\n /** The origin of the quantization range. */\n public readonly origin = new Point3d();\n /** The scale applied to coordinates to quantize them. */\n public readonly scale = new Point3d();\n\n private constructor(ox = 0, oy = 0, oz = 0, sx = 0, sy = 0, sz = 0) {\n this.setFrom(ox, oy, oz, sx, sy, sz);\n }\n\n private setFrom(ox: number, oy: number, oz: number, sx: number, sy: number, sz: number) {\n this.origin.x = ox;\n this.origin.y = oy;\n this.origin.z = oz;\n this.scale.x = sx;\n this.scale.y = sy;\n this.scale.z = sz;\n }\n\n /** Set `x`, `y`, and `z` from `src. */\n public copyFrom(src: QParams3d): void {\n this.setFrom(src.origin.x, src.origin.y, src.origin.z, src.scale.x, src.scale.y, src.scale.z);\n }\n\n /** Create a copy of these parameters.\n * @param out If supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\n */\n public clone(out?: QParams3d): QParams3d {\n const result = undefined !== out ? out : new QParams3d();\n result.copyFrom(this);\n return result;\n }\n\n /** Initialize from origin and scale */\n public setFromOriginAndScale(origin: Point3d, scale: Point3d) {\n this.setFrom(origin.x, origin.y, origin.z, scale.x, scale.y, scale.z);\n }\n\n /** Initialize these parameters to support quantization of values within the specified range. */\n public setFromRange(range: Range3d, rangeScale = Quantization.rangeScale16) {\n if (!range.isNull) {\n this.setFrom(range.low.x, range.low.y, range.low.z,\n Quantization.computeScale(range.high.x - range.low.x, rangeScale), Quantization.computeScale(range.high.y - range.low.y, rangeScale), Quantization.computeScale(range.high.z - range.low.z, rangeScale));\n } else {\n this.origin.x = this.origin.y = this.origin.z = 0;\n this.scale.x = this.scale.y = this.scale.z = 0;\n }\n }\n\n /** Return the unquantized point for the input components.\n * @param out If supplied, it will be modified in-place and returned instead of allocating a new Point3d.\n */\n public unquantize(x: number, y: number, z: number, out?: Point3d): Point3d {\n const pt: Point3d = undefined !== out ? out : new Point3d();\n pt.x = Quantization.unquantize(x, this.origin.x, this.scale.x);\n pt.y = Quantization.unquantize(y, this.origin.y, this.scale.y);\n pt.z = Quantization.unquantize(z, this.origin.z, this.scale.z);\n return pt;\n }\n\n /** Creates parameters to support quantization of values within the specified range.\n * If `out` is supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\n */\n public static fromRange(range: Range3d, out?: QParams3d, rangeScale = Quantization.rangeScale16): QParams3d {\n const params = undefined !== out ? out : new QParams3d();\n params.setFromRange(range, rangeScale);\n return params;\n }\n\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0].\n * If `out` is supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\n */\n public static fromOriginAndScale(origin: Point3d, scale: Point3d, out?: QParams3d): QParams3d {\n const params = undefined !== out ? out : new QParams3d();\n params.setFromOriginAndScale(origin, scale);\n return params;\n }\n\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0]. */\n public static fromNormalizedRange(rangeScale = Quantization.rangeScale16) {\n return QParams3d.fromRange(Range3d.createArray([Point3d.create(-1, -1, -1), Point3d.create(1, 1, 1)]), undefined, rangeScale);\n }\n\n /** Creates parameters supporting quantization of values within the range [0.0, 1.0]. */\n public static fromZeroToOne(rangeScale = Quantization.rangeScale16) {\n return QParams3d.fromRange(Range3d.createArray([Point3d.create(0, 0, 0), Point3d.create(1, 1, 1)]), undefined, rangeScale);\n }\n\n /** The diagonal of the unquantized range represented by these parameters. */\n public get rangeDiagonal(): Vector3d {\n return Vector3d.createFrom({\n x: this.scale.x === 0 ? 0 : Quantization.rangeScale16 / this.scale.x,\n y: this.scale.y === 0 ? 0 : Quantization.rangeScale16 / this.scale.y,\n z: this.scale.z === 0 ? 0 : Quantization.rangeScale16 / this.scale.z,\n });\n }\n\n /** Return true if the point point is quantizable using these parameters. */\n public isQuantizable(point: Point3d) {\n return Quantization.isQuantizable(point.x, this.origin.x, this.scale.x) && Quantization.isQuantizable(point.y, this.origin.y, this.scale.y) && Quantization.isQuantizable(point.z, this.origin.z, this.scale.z);\n }\n\n /** Compute the range to which these parameters quantize. */\n public computeRange(out?: Range3d): Range3d {\n const range = Range3d.createNull(out);\n range.extendPoint(this.origin);\n range.extendPoint(this.origin.plus(this.rangeDiagonal));\n return range;\n }\n\n /** @alpha */\n public toJSON(): QParams3dProps {\n return {\n origin: { x: this.origin.x, y: this.origin.y, z: this.origin.z },\n scale: { x: this.scale.x, y: this.scale.y, z: this.scale.z },\n };\n }\n\n /** @alpha */\n public static fromJSON(src: QParams3dProps, out?: QParams3d): QParams3d {\n return this.fromOriginAndScale(Point3d.fromJSON(src.origin), Point3d.fromJSON(src.scale), out);\n }\n}\n\n/** Represents a [Point3d]($core-geometry) compressed such that each component `x`, `y`, and `z` is quantized to the 16-bit integer range [0, 0xffff].\n * These are primarily used to reduce the space required for coordinates used by [RenderGraphic]($frontend)s.\n * @see [[QParams3d]] to define quantization parameters for a range of points.\n * @see [[QPoint3dList]] for a list of points all quantized to the same range.\n * @public\n * @extensions\n */\nexport class QPoint3d {\n private _x: number = 0;\n private _y: number = 0;\n private _z: number = 0;\n\n /** The quantized x component. */\n public get x() { return this._x; }\n public set x(x: number) {\n assert(Quantization.isQuantized(x));\n this._x = x;\n }\n\n /** The quantized y component. */\n public get y() { return this._y; }\n public set y(y: number) {\n assert(Quantization.isQuantized(y));\n this._y = y;\n }\n\n /** The quantized z component. */\n public get z() { return this._z; }\n public set z(z: number) {\n assert(Quantization.isQuantized(z));\n this._z = z;\n }\n\n /** Construct with all components initialized to zero. */\n public constructor() { }\n\n /** Initialize this point by quantizing the supplied { x, y, z } using the specified params */\n public init(pos: XYAndZ, params: QParams3d): void {\n this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);\n this.y = Quantization.quantize(pos.y, params.origin.y, params.scale.y);\n this.z = Quantization.quantize(pos.z, params.origin.z, params.scale.z);\n }\n\n /** Creates a quantized point from the supplied Point3d using the specified params */\n public static create(pos: Point3d, params: QParams3d): QPoint3d {\n const qpt = new QPoint3d();\n qpt.init(pos, params);\n return qpt;\n }\n\n /** Set this points components from `src`. */\n public copyFrom(src: QPoint3d): void {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z;\n }\n\n /** Create a copy of this point.\n * @param out If supplied, it will be modified in-place instead of allocating a new QPoint3d.\n */\n public clone(out?: QPoint3d): QPoint3d {\n const result = undefined !== out ? out : new QPoint3d();\n result.copyFrom(this);\n return result;\n }\n\n /**\n * Sets the x, y, and z components directly.\n * @param x Must be an integer in the range [0, 0xffff]\n * @param y Must be an integer in the range [0, 0xffff]\n * @param z Must be an integer in the range [0, 0xffff]\n */\n public setFromScalars(x: number, y: number, z: number) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n\n /**\n * Creates a QPoint3d directly from x, y, and z components.\n * @param x Must be an integer in the range [0, 0xffff]\n * @param y Must be an integer in the range [0, 0xffff]\n * @param z Must be an integer in the range [0, 0xffff]\n * @param out If supplied, it will be modified in-place instead of allocating a new QPoint3d.\n */\n public static fromScalars(x: number, y: number, z: number, out?: QPoint3d): QPoint3d {\n const pt = undefined === out ? new QPoint3d() : out;\n pt.setFromScalars(x, y, z);\n return pt;\n }\n\n /** Returns a Point3d unquantized according to the supplied params.\n * If `out` is supplied, it will be modified in-place instead of allocating a new Point3d.\n */\n public unquantize(params: QParams3d, out?: Point3d): Point3d {\n const pt: Point3d = undefined !== out ? out : new Point3d();\n pt.x = Quantization.unquantize(this.x, params.origin.x, params.scale.x);\n pt.y = Quantization.unquantize(this.y, params.origin.y, params.scale.y);\n pt.z = Quantization.unquantize(this.z, params.origin.z, params.scale.z);\n return pt;\n }\n\n /** Return true if this point's components are identical to the other point's components. */\n public equals(other: QPoint3d): boolean {\n return this.x === other.x && this.y === other.y && this.z === other.z;\n }\n\n /** Perform ordinal comparison to another point. The function returns:\n * - Zero if this point is identical to `rhs`; or\n * - A number less than zero if this point is ordered before `rhs`; or\n * - A number greater than zero if this point is ordered after `rhs`.\n * @see [OrderedComparator]($core-bentley).\n */\n public compare(rhs: QPoint3d): number {\n let diff = this.x - rhs.x;\n if (0 === diff) {\n diff = this.y - rhs.y;\n if (0 === diff) {\n diff = this.z - rhs.z;\n }\n }\n\n return diff;\n }\n}\n\n/** A compact representation of a list of [[QPoint3d]]s stored in a `Uint16Array`.\n * This representation is particularly useful when passing data to WebGL; for example, see [RealityMeshParams.positions]($frontend).\n * @public\n * @extensions\n */\nexport interface QPoint3dBuffer {\n /** The parameters used to quantize the [[points]]. */\n params: QParams3d;\n /** The [[QPoint3d]]s as pairs of unsigned 16-bit integers. The length must be a multiple of 3; the number of points in the array is half the array's length.\n * To obtain the `n`th point, use `QPoint3d.fromScalars(buffer.points[n * 3], buffer.points[n * 3 + 1], buffer.points[n * 3 + 2])`.\n */\n points: Uint16Array;\n}\n\n/** @public\n * @extensions\n */\nexport namespace QPoint3dBuffer {\n const scratchQPoint3d = new QPoint3d();\n\n /** Extracts the point at the specified index from a buffer.\n * @param points The buffer in which each consecutive pair of integers is a 3d quantized point.\n * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\n * @param result If supplied, a preallocated [[QPoint3d]] to initialize with the result and return.\n * @returns The point at `pointIndex`.\n * @throws Error if `pointIndex` is out of bounds.\n */\n export function getQPoint(points: Uint16Array, pointIndex: number, result?: QPoint3d): QPoint3d {\n const index = pointIndex * 3;\n const x = points[index + 0];\n const y = points[index + 1];\n const z = points[index + 2];\n if (undefined === x || undefined === y || undefined === z)\n throw new Error(\"Index out of range\");\n\n result = result ?? new QPoint3d();\n result.setFromScalars(x, y, z);\n return result;\n }\n\n /** Extracts and unquantizes the point at the specified index from a buffer.\n * @param buffer The array of points and the quantization parameters.\n * @param buffer The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\n * @param result If supplied, a preallocated [Point3d]($core-geometry) to initialize with the result and return.\n * @returns The point at `pointIndex`.\n * @throws Error if `pointIndex` is out of bounds.\n */\n export function unquantizePoint(buffer: QPoint3dBuffer, pointIndex: number, result?: Point3d): Point3d {\n const qpt = getQPoint(buffer.points, pointIndex, scratchQPoint3d);\n return qpt.unquantize(buffer.params, result);\n }\n}\n\n/** A list of [[QPoint3d]]s all quantized to the same range.\n * @public\n * @extensions\n */\nexport class QPoint3dList {\n /** Parameters used to quantize the points. */\n public readonly params: QParams3d;\n private readonly _list: QPoint3d[] = [];\n\n /** The list of quantized points. */\n public get list(): ReadonlyArray<QPoint3d> {\n return this._list;\n }\n\n /** Construct an empty list set up to quantize to the supplied range.\n * @param params The quantization parameters. If omitted, a null range will be used.\n */\n public constructor(params?: QParams3d) {\n this.params = params ? params.clone() : QParams3d.fromRange(Range3d.createNull());\n }\n\n /** Construct a QPoint3dList containing all points in the supplied list, quantized to the range of those points.\n * @param points The points to quantize and add to the list.\n * @param out If supplied, it will be cleared, its parameters recomputed, and the points will be added to it; otherwise, a new QPoint3dList will be created and returned.\n */\n public static fromPoints(points: Point3d[], out?: QPoint3dList): QPoint3dList {\n let qPoints;\n const qParams = QParams3d.fromRange(Range3d.createArray(points));\n if (out) {\n qPoints = out;\n qPoints.reset(qParams);\n } else {\n qPoints = new QPoint3dList(qParams);\n }\n\n for (const point of points)\n qPoints.add(point);\n\n return qPoints;\n }\n\n /** Removes all points from the list. */\n public clear() {\n this._list.length = 0;\n }\n\n /** Clears out the contents of the list and changes the quantization parameters. */\n public reset(params: QParams3d) {\n this.clear();\n this.params.copyFrom(params);\n }\n\n /** Quantizes the supplied Point3d to this list's range and appends it to the list. */\n public add(pt: Point3d) {\n this._list.push(QPoint3d.create(pt, this.params));\n }\n\n /** Adds a previously-quantized point to this list. */\n public push(qpt: QPoint3d) {\n this._list.push(qpt.clone());\n }\n\n /** The number of points in the list. */\n public get length() {\n return this._list.length;\n }\n\n /** Returns the unquantized value of the point at the specified index in the list. */\n public unquantize(index: number, out?: Point3d): Point3d {\n assert(index < this.length);\n if (index < this.length) {\n return this._list[index].unquantize(this.params, out);\n } else {\n return undefined !== out ? out : new Point3d();\n }\n }\n\n /** Changes the quantization parameters and requantizes all points in the list to the new range.\n * @note The loss of precision is compounded each time the points are requantized to a new range.\n */\n public requantize(params: QParams3d): void {\n for (let i = 0; i < this.length; i++) {\n const pt = this.unquantize(i);\n this._list[i].init(pt, params);\n }\n\n this.params.copyFrom(params);\n }\n\n /** Extracts the current contents of the list as a Uint16Array such that the first 3 elements contain the first point's x, y, and z components,\n * the second three elements contain the second point's components, and so on.\n */\n public toTypedArray(): Uint16Array {\n const array = new Uint16Array(this.length * 3);\n const pts = this._list;\n for (let i = 0; i < this.length; i++) {\n const pt = pts[i];\n array[i * 3 + 0] = pt.x;\n array[i * 3 + 1] = pt.y;\n array[i * 3 + 2] = pt.z;\n }\n\n return array;\n }\n\n /** Reinitialize from a Uint16Array in which the first three elements specify the x, y, and z components of the first point, the second three elements specify the components\n * of the second point, and so on.\n */\n public fromTypedArray(range: Range3d, array: Uint16Array): void {\n this.params.setFromRange(range);\n this._list.length = array.length / 3;\n for (let i = 0, j = 0; i < this.list.length; i++)\n this._list[i] = QPoint3d.fromScalars(array[j++], array[j++], array[j++]);\n }\n\n /** Construct a list containing all points in the supplied list, quantized using the supplied parameters. */\n public static createFrom(points: Point3d[], params: QParams3d): QPoint3dList {\n const list = new QPoint3dList(params);\n for (const point of points)\n list.add(point);\n\n return list;\n }\n\n /** An iterator over the points in the list. */\n public [Symbol.iterator]() {\n return this.list[Symbol.iterator]();\n }\n}\n\n/** Options used to construct a [[QPoint2dBufferBuilder]].\n * @public\n * @extensions\n */\ninterface QPoint2dBufferBuilderOptions {\n /** The range to which the points will be quantized. This must be large enough to contain all of the points that will be added to the buffer. */\n range: Range2d;\n /** The number of points for which to allocate space.\n * @see [TypedArrayBuilderOptions.initialCapacity]($bentley).\n */\n initialCapacity?: number;\n /** Multiplier used to compute new capacity when resizing the buffer.\n * @see [TypedArrayBuilderOptions.growthFactor]($bentley).\n */\n growthFactor?: number;\n}\n\n/** Constructs a [[QPoint2dBuffer]] using a [Uint16ArrayBuilder]($bentley).\n * @public\n * @extensions\n */\nexport class QPoint2dBufferBuilder {\n private readonly _scratchQPoint2d = new QPoint2d();\n\n /** The parameters used to quantize the points in the [[buffer]]. */\n public readonly params: QParams2d;\n /** The buffer that holds the points. */\n public readonly buffer: Uint16ArrayBuilder;\n\n /** Construct a new buffer with a [[length]] of zero. */\n public constructor(options: QPoint2dBufferBuilderOptions) {\n this.params = QParams2d.fromRange(options.range);\n const initialCapacity = options.initialCapacity ?? 0;\n this.buffer = new Uint16ArrayBuilder({\n growthFactor: options.growthFactor,\n initialCapacity: 2 * initialCapacity,\n });\n }\n\n /** Append a point with the specified quantized coordinates. */\n public pushXY(x: number, y: number): void {\n this.buffer.push(x);\n this.buffer.push(y);\n }\n\n /** Append a point with the specified quantized coordinates. */\n public push(pt: XAndY): void {\n this.pushXY(pt.x, pt.y);\n }\n\n /** The number of points currently in the [[buffer]]. */\n public get length(): number {\n const len = this.buffer.length;\n assert(len % 2 === 0);\n return len / 2;\n }\n\n /** Returns the quantized point at the specified index in [[buffer]].\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\n * @param result If supplied, a [[QPoint2d]] to initialize with the result and return.\n * @returns The quantized point at the specified index in [[buffer]].\n * @throws Error if `pointIndex` is out of bounds.\n */\n public get(pointIndex: number, result?: QPoint2d): QPoint2d {\n return QPoint2dBuffer.getQPoint(this.buffer.toTypedArray(), pointIndex, result);\n }\n\n /** Returns the unquantized point at the specified index in [[buffer]].\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\n * @param result If supplied, a [Point2d]($core-geometry) to initialize with the result and return.\n * @returns The unquantized point at the specified index in [[buffer]].\n * @throws Error if `pointIndex` is out of bounds.\n */\n public unquantize(pointIndex: number, result?: Point2d): Point2d {\n return this.get(pointIndex, this._scratchQPoint2d).unquantize(this.params, result);\n }\n\n /** Obtain a [[QPoint2dBuffer]] containing all of the points that have been appended by this builder. */\n public finish(): QPoint2dBuffer {\n return {\n params: this.params,\n points: this.buffer.toTypedArray(),\n };\n }\n}\n\n/** Options used to construct a [[QPoint3dBufferBuilder]].\n * @public\n * @extensions\n */\ninterface QPoint3dBufferBuilderOptions {\n /** The range to which the points will be quantized. This must be large enough to contain all of the points that will be added to the buffer. */\n range: Range3d;\n /** The number of points for which to allocate space.\n * @see [TypedArrayBuilderOptions.initialCapacity]($bentley).\n */\n initialCapacity?: number;\n /** Multiplier used to compute new capacity when resizing the buffer.\n * @see [TypedArrayBuilderOptions.growthFactor]($bentley).\n */\n growthFactor?: number;\n}\n\n/** Constructs a [[QPoint3dBuffer]] using a [Uint16ArrayBuilder]($bentley).\n * @public\n * @extensions\n */\nexport class QPoint3dBufferBuilder {\n private readonly _scratchQPoint3d = new QPoint3d();\n\n /** The parameters used to quantize the points in the [[buffer]]. */\n public readonly params: QParams3d;\n /** The buffer that holds the points. */\n public readonly buffer: Uint16ArrayBuilder;\n\n /** Construct a new buffer with a [[length]] of zero. */\n public constructor(options: QPoint3dBufferBuilderOptions) {\n this.params = QParams3d.fromRange(options.range);\n const initialCapacity = options.initialCapacity ?? 0;\n this.buffer = new Uint16ArrayBuilder({\n growthFactor: options.growthFactor,\n initialCapacity: 3 * initialCapacity,\n });\n }\n\n /** Append a point with the specified quantized coordinates. */\n public pushXYZ(x: number, y: number, z: number): void {\n this.buffer.push(x);\n this.buffer.push(y);\n this.buffer.push(z);\n }\n\n /** Append a point with the specified quantized coordinates. */\n public push(pt: XYAndZ): void {\n this.pushXYZ(pt.x, pt.y, pt.z);\n }\n\n /** The number of points currently in the [[buffer]]. */\n public get length(): number {\n const len = this.buffer.length;\n assert(len % 3 === 0);\n return len / 3;\n }\n\n /** Returns the quantized point at the specified index in [[buffer]].\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\n * @param result If supplied, a [[QPoint3d]] to initialize with the result and return.\n * @returns The quantized point at the specified index in [[buffer]].\n * @throws Error if `pointIndex` is out of bounds.\n */\n public get(pointIndex: number, result?: QPoint3d): QPoint3d {\n return QPoint3dBuffer.getQPoint(this.buffer.toTypedArray(), pointIndex, result);\n }\n\n /** Returns the unquantized point at the specified index in [[buffer]].\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\n * @param result If supplied, a [Point3d]($core-geometry) to initialize with the result and return.\n * @returns The unquantized point at the specified index in [[buffer]].\n * @throws Error if `pointIndex` is out of bounds.\n */\n public unquantize(pointIndex: number, result?: Point3d): Point3d {\n return this.get(pointIndex, this._scratchQPoint3d).unquantize(this.params, result);\n }\n\n /** Obtain a [[QPoint3dBuffer]] containing all of the points that have been appended by this builder. */\n public finish(): QPoint3dBuffer {\n return {\n params: this.params,\n points: this.buffer.toTypedArray(),\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"QPoint.js","sourceRoot":"","sources":["../../src/QPoint.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EACL,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GACvD,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;GAUG;AACH,MAAM,KAAW,YAAY,CAqC5B;AArCD,WAAiB,YAAY;IACd,yBAAY,GAAG,MAAM,CAAC;IACtB,wBAAW,GAAG,IAAI,CAAC;IAEhC,8FAA8F;IAC9F,SAAgB,YAAY,CAAC,MAAc,EAAE,UAAU,GAAG,aAAA,YAAY;QACpE,OAAO,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,GAAG,MAAM,CAAC;IACvD,CAAC;IAFe,yBAAY,eAE3B,CAAA;IAED,kFAAkF;IAClF,SAAgB,SAAS,CAAC,IAAY,EAAE,UAAU,GAAG,aAAA,YAAY;QAC/D,OAAO,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,UAAU,GAAG,GAAG,CAAC;IAChD,CAAC;IAFe,sBAAS,YAExB,CAAA;IAED;;OAEG;IACH,SAAgB,QAAQ,CAAC,GAAW,EAAE,MAAc,EAAE,KAAa,EAAE,UAAU,GAAG,aAAA,YAAY;QAC5F,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,GAAG,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACvF,CAAC;IAFe,qBAAQ,WAEvB,CAAA;IAED,+EAA+E;I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AC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QACtB,OAAO,GAAG,GAAG,CAAC,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACI,GAAG,CAAC,UAAkB,EAAE,MAAiB;QAC9C,OAAO,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAClF,CAAC;IAED;;;;;OAKG;IACI,UAAU,CAAC,UAAkB,EAAE,MAAgB;QACpD,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrF,CAAC;IAED,wGAAwG;IACjG,MAAM;QACX,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;SACnC,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { assert, Uint16ArrayBuilder } from \"@itwin/core-bentley\";\r\nimport {\r\n Point2d, Point3d, Range2d, Range3d, Vector2d, Vector3d, XAndY, XYAndZ,\r\n} from \"@itwin/core-geometry\";\r\n\r\n/**\r\n * Provides facilities for quantizing floating point values within a specified range into 16-bit unsigned integers.\r\n * This is a lossy compression technique.\r\n * Given a floating point range [min, max], a floating point value `x` within that range is quantized by subtracting\r\n * `min`, scaling the result according to `max`, and truncating the result to an integer.\r\n * Therefore min quantizes to 0, max to 0xffff, (min+max)/2 to 0x7fff, and so on.\r\n * These routines are chiefly used by classes like [[QPoint2d]] and [[QPoint3d]] to reduce the space required to store\r\n * coordinate values for [RenderGraphic]($frontend)s.\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace Quantization {\r\n export const rangeScale16 = 0xffff;\r\n export const rangeScale8 = 0xff;\r\n\r\n /** Compute the scale factor required to quantize `extent` to `rangeScale` discrete values. */\r\n export function computeScale(extent: number, rangeScale = rangeScale16): number {\r\n return 0.0 === extent ? extent : rangeScale / extent;\r\n }\r\n\r\n /** Returns true if the quantized value `qpos` fits within the specified range. */\r\n export function isInRange(qpos: number, rangeScale = rangeScale16): boolean {\r\n return qpos >= 0.0 && qpos < rangeScale + 1.0;\r\n }\r\n\r\n /** Return `pos` quantized to the range [`origin`, `origin + rangeScale`].\r\n * @see [[Quantization.unquantize]] for the inverse operation.\r\n */\r\n export function quantize(pos: number, origin: number, scale: number, rangeScale = rangeScale16): number {\r\n return Math.floor(Math.max(0.0, Math.min(rangeScale, 0.5 + (pos - origin) * scale)));\r\n }\r\n\r\n /** Returns true if the value `pos` can be quantized to the specified range. */\r\n export function isQuantizable(pos: number, origin: number, scale: number, rangeScale = rangeScale16) {\r\n return isInRange(quantize(pos, origin, scale, rangeScale));\r\n }\r\n\r\n /** Give `qpos` quantized to the range [`origin`, `origin + rangeScale`], return the unquantized value.\r\n * @see [[Quantization.quantize]] for the inverse operation.\r\n */\r\n export function unquantize(qpos: number, origin: number, scale: number): number {\r\n return 0.0 === scale ? origin : origin + qpos / scale;\r\n }\r\n\r\n /** Returns true if `qpos` is a valid quantized 16-bit value. */\r\n export function isQuantized(qpos: number) {\r\n return isInRange(qpos) && qpos === Math.floor(qpos);\r\n }\r\n}\r\n\r\n/** @alpha */\r\nexport interface QParams2dProps {\r\n origin: XAndY;\r\n scale: XAndY;\r\n}\r\n\r\n/** Parameters used for [[Quantization]] of 2d points such that the `x` and `y` components are each quantized to 16-bit unsigned integers.\r\n * @see [[QPoint2d]] for the quantized representation of a [Point2d]($core-geometry).\r\n * @see [[QPoint2dList]] for a list of [[QPoint2d]]s quantized using a [[QParams2d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport class QParams2d {\r\n /** The origin of the quantization range. */\r\n public readonly origin = new Point2d();\r\n /** The scale applied to coordinates to quantize them. */\r\n public readonly scale = new Point2d();\r\n\r\n private constructor(ox = 0, oy = 0, sx = 0, sy = 0) { this.setFrom(ox, oy, sx, sy); }\r\n\r\n private setFrom(ox: number, oy: number, sx: number, sy: number) {\r\n this.origin.x = ox;\r\n this.origin.y = oy;\r\n this.scale.x = sx;\r\n this.scale.y = sy;\r\n }\r\n\r\n /** Set [[origin]] and [[scale]] from `src`. */\r\n public copyFrom(src: QParams2d): void {\r\n this.setFrom(src.origin.x, src.origin.y, src.scale.x, src.scale.y);\r\n }\r\n\r\n /** Create a copy of these params.\r\n * @param out If supplied, these QParams2d will be modified and returned; otherwise a new QParams2d object will be created and returned.\r\n */\r\n public clone(out?: QParams2d): QParams2d {\r\n const result = undefined !== out ? out : new QParams2d();\r\n result.copyFrom(this);\r\n return result;\r\n }\r\n\r\n /** Initialize these parameters to support quantization of values within the specified range. */\r\n public setFromRange(range: Range2d, rangeScale = Quantization.rangeScale16) {\r\n if (!range.isNull) {\r\n this.setFrom(range.low.x, range.low.y, Quantization.computeScale(range.high.x - range.low.x, rangeScale), Quantization.computeScale(range.high.y - range.low.y, rangeScale));\r\n } else {\r\n this.origin.x = this.origin.y = this.scale.x = this.scale.y = 0;\r\n }\r\n }\r\n\r\n /** Create parameters to support quantization of values within the specified range. */\r\n public static fromRange(range: Range2d, out?: QParams2d, rangeScale = Quantization.rangeScale16) {\r\n const params = undefined !== out ? out : new QParams2d();\r\n params.setFromRange(range, rangeScale);\r\n return params;\r\n }\r\n\r\n /** Return the unquantized point for the input `x` and `y` components. If `out` is supplied, it will be modified to hold the result and returned. */\r\n public unquantize(x: number, y: number, out?: Point2d): Point2d {\r\n out = out ?? new Point2d();\r\n out.x = Quantization.unquantize(x, this.origin.x, this.scale.x);\r\n out.y = Quantization.unquantize(y, this.origin.y, this.scale.y);\r\n return out;\r\n }\r\n\r\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0], appropriate for normalized 2d vectors. */\r\n public static fromNormalizedRange(rangeScale = Quantization.rangeScale16) {\r\n return QParams2d.fromRange(Range2d.createArray([Point2d.create(-1, -1), Point2d.create(1, 1)]), undefined, rangeScale);\r\n }\r\n\r\n /** Create parameters supporting quantization of values within the range [0.0, 1.0]. */\r\n public static fromZeroToOne(rangeScale = Quantization.rangeScale16) {\r\n return QParams2d.fromRange(Range2d.createArray([Point2d.create(0, 0), Point2d.create(1, 1)]), undefined, rangeScale);\r\n }\r\n\r\n /** Create parameters from origin and scale components */\r\n public static fromOriginAndScale(originX: number, originY: number, scaleX: number, scaleY: number) {\r\n return new QParams2d(originX, originY, scaleX, scaleY);\r\n }\r\n\r\n /** The diagonal of the unquantized range represented by these parameters. */\r\n public get rangeDiagonal(): Vector2d {\r\n return Vector2d.createFrom({ x: 0 === this.scale.x ? 0 : Quantization.rangeScale16 / this.scale.x, y: 0 === this.scale.y ? 0 : Quantization.rangeScale16 / this.scale.y });\r\n }\r\n\r\n /** Return true if the point point is quantizable using these parameters. */\r\n public isQuantizable(point: Point2d) {\r\n return Quantization.isQuantizable(point.x, this.origin.x, this.scale.x) && Quantization.isQuantizable(point.y, this.origin.y, this.scale.y);\r\n }\r\n\r\n /** @alpha */\r\n public toJSON(): QParams2dProps {\r\n return {\r\n origin: { x: this.origin.x, y: this.origin.y },\r\n scale: { x: this.scale.x, y: this.scale.y },\r\n };\r\n }\r\n\r\n /** @alpha */\r\n public static fromJSON(src: QParams2dProps): QParams2d {\r\n return this.fromOriginAndScale(src.origin.x, src.origin.y, src.scale.x, src.scale.y);\r\n }\r\n}\r\n\r\n/** Represents a [Point2d]($core-geometry) compressed such that each component `x` and `y` is quantized to the 16-bit integer range [0, 0xffff].\r\n * These are primarily used to reduce the space required for coordinates used by [RenderGraphic]($frontend)s.\r\n * @see [[QParams2d]] to define quantization parameters for a range of points.\r\n * @see [[QPoint2dList]] for a list of points all quantized to the same range.\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint2d {\r\n private _x: number = 0;\r\n private _y: number = 0;\r\n\r\n /** The quantized x component. */\r\n public get x() { return this._x; }\r\n public set x(x: number) {\r\n assert(Quantization.isQuantized(x));\r\n this._x = x;\r\n }\r\n\r\n /** The quantized y component. */\r\n public get y() { return this._y; }\r\n public set y(y: number) {\r\n assert(Quantization.isQuantized(y));\r\n this._y = y;\r\n }\r\n\r\n /** Construct with `x` and `y` initialized to zero. */\r\n public constructor() { }\r\n\r\n /** Initialize this point by quantizing the supplied { x, y } using the specified params */\r\n public init(pos: XAndY, params: QParams2d) {\r\n this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);\r\n this.y = Quantization.quantize(pos.y, params.origin.y, params.scale.y);\r\n }\r\n\r\n /** Create a quantized point from the supplied Point2d using the specified params */\r\n public static create(pos: Point2d, params: QParams2d) {\r\n const qpt = new QPoint2d();\r\n qpt.init(pos, params);\r\n return qpt;\r\n }\r\n\r\n /** Initialize `x` and `y` from `src`. */\r\n public copyFrom(src: QPoint2d) {\r\n this.x = src.x;\r\n this.y = src.y;\r\n }\r\n\r\n /** Create a copy of this point.\r\n * @param out If supplied, it will be modified in-place and returned; otherwise a new QPoint2d will be allocated and returned.\r\n */\r\n public clone(out?: QPoint2d) {\r\n const result = undefined !== out ? out : new QPoint2d();\r\n result.copyFrom(this);\r\n return result;\r\n }\r\n\r\n /**\r\n * Set the x and y components directly.\r\n * @param x Must be an integer in the range [0, 0xffff]\r\n * @param y Must be an integer in the range [0, 0xffff]\r\n */\r\n public setFromScalars(x: number, y: number) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n\r\n /**\r\n * Create a QPoint2d directly from x and y components.\r\n * @param x Must be an integer in the range [0, 0xffff]\r\n * @param y Must be an integer in the range [0, 0xffff]\r\n */\r\n public static fromScalars(x: number, y: number) {\r\n const pt = new QPoint2d();\r\n pt.setFromScalars(x, y);\r\n return pt;\r\n }\r\n\r\n /** Return a Point2d unquantized according to the supplied `params`. If `out` is supplied, it will be modified in-place and returned. */\r\n public unquantize(params: QParams2d, out?: Point2d): Point2d {\r\n const pt: Point2d = undefined !== out ? out : new Point2d();\r\n pt.x = Quantization.unquantize(this.x, params.origin.x, params.scale.x);\r\n pt.y = Quantization.unquantize(this.y, params.origin.y, params.scale.y);\r\n return pt;\r\n }\r\n}\r\n\r\n/** A compact representation of a list of [[QPoint2d]]s stored in a `Uint16Array`\r\n * This representation is particularly useful when passing data to WebGL; for example, see [RealityMeshParams.uvs]($frontend).\r\n * @see [[QPoint3dBuffer]] for 3d points.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface QPoint2dBuffer {\r\n /** The parameters used to quantize the [[points]]. */\r\n params: QParams2d;\r\n /** The [[QPoint2d]]s as pairs of unsigned 16-bit integers. The length must be a multiple of 2; the number of points in the array is half the array's length.\r\n * To obtain the `n`th point, use `QPoint2d.fromScalars(buffer.points[n * 2], buffer.points[n * 2 + 1])`.\r\n */\r\n points: Uint16Array;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace QPoint2dBuffer {\r\n const scratchQPoint2d = new QPoint2d();\r\n\r\n /** Extracts the point at the specified index from a buffer.\r\n * @param points The buffer in which each consecutive pair of integers is a 2d quantized point.\r\n * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\r\n * @param result If supplied, a preallocated [[QPoint2d]] to initialize with the result and return.\r\n * @returns The point at `pointIndex`.\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n export function getQPoint(points: Uint16Array, pointIndex: number, result?: QPoint2d): QPoint2d {\r\n const index = pointIndex * 2;\r\n const x = points[index + 0];\r\n const y = points[index + 1];\r\n if (undefined === x || undefined === y)\r\n throw new Error(\"Index out of range\");\r\n\r\n result = result ?? new QPoint2d();\r\n result.setFromScalars(x, y);\r\n return result;\r\n }\r\n\r\n /** Extracts and unquantizes the point at the specified index from a buffer.\r\n * @param buffer The array of points and the quantization parameters.\r\n * @param The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\r\n * @param result If supplied, a preallocated [Point2d]($core-geometry) to initialize with the result and return.\r\n * @returns The point at `pointIndex`.\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n export function unquantizePoint(buffer: QPoint2dBuffer, pointIndex: number, result?: Point2d): Point2d {\r\n const qpt = getQPoint(buffer.points, pointIndex, scratchQPoint2d);\r\n return qpt.unquantize(buffer.params, result);\r\n }\r\n}\r\n\r\n/** A list of [[QPoint2d]]s all quantized to the same range.\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint2dList {\r\n /** Parameters used to quantize the points. */\r\n public readonly params: QParams2d;\r\n private readonly _list = new Array<QPoint2d>();\r\n\r\n /** The list of quantized points. */\r\n public get list(): ReadonlyArray<QPoint2d> {\r\n return this._list;\r\n }\r\n\r\n /** Construct an empty list set up to use the supplied quantization parameters. */\r\n public constructor(params: QParams2d) {\r\n this.params = params.clone();\r\n }\r\n\r\n /** Removes all points from the list. */\r\n public clear() {\r\n this._list.length = 0;\r\n }\r\n\r\n /** Removes all points from the list and change the quantization parameters. */\r\n public reset(params: QParams2d) {\r\n this.clear();\r\n this.params.copyFrom(params);\r\n }\r\n\r\n /** Quantizes the supplied Point2d to this list's range and appends it to the list. */\r\n public add(pt: Point2d) {\r\n this._list.push(QPoint2d.create(pt, this.params));\r\n }\r\n\r\n /** Adds a previously-quantized point to this list. */\r\n public push(qpt: QPoint2d) {\r\n this._list.push(qpt.clone());\r\n }\r\n\r\n /** The number of points in the list. */\r\n public get length() {\r\n return this._list.length;\r\n }\r\n\r\n /** Returns the unquantized value of the point at the specified index in the list. */\r\n public unquantize(index: number, out?: Point2d): Point2d {\r\n assert(index < this.length);\r\n if (index < this.length) {\r\n return this._list[index].unquantize(this.params, out);\r\n } else {\r\n return undefined !== out ? out : new Point2d();\r\n }\r\n }\r\n\r\n /** Changes the quantization parameters and requantizes all points in the list to the new range.\r\n * @note The loss of precision is compounded each time the points are requantized to a new range.\r\n */\r\n public requantize(params: QParams2d) {\r\n for (let i = 0; i < this.length; i++) {\r\n const pt = this.unquantize(i);\r\n this._list[i].init(pt, params);\r\n }\r\n\r\n this.params.copyFrom(params);\r\n }\r\n\r\n /** Extracts the current contents of the list as a Uint16Array such that the first element of the array corresponds to the first point's `x` component,\r\n * the second to the first point's `y` component, and so on.\r\n */\r\n public toTypedArray(): Uint16Array {\r\n const array = new Uint16Array(this.length * 2);\r\n const pts = this._list;\r\n for (let i = 0; i < this.length; i++) {\r\n const pt = pts[i];\r\n array[i * 2] = pt.x;\r\n array[i * 2 + 1] = pt.y;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n /** Create from a Uint16Array laid out such that `array[0]` corresponds to the first point's `x` component, `array[1]` to the first point's `y` component, and so on. */\r\n public fromTypedArray(range: Range2d, array: Uint16Array) {\r\n this.params.setFromRange(range);\r\n this._list.length = array.length / 2;\r\n for (let i = 0, j = 0; i < this.list.length; i++)\r\n this._list[i] = QPoint2d.fromScalars(array[j++], array[j++]);\r\n }\r\n\r\n /** Construct a QPoint2dList containing all points in the supplied list, quantized to the range of those points. */\r\n public static fromPoints(points: Point2d[], out?: QPoint2dList) {\r\n let qPoints;\r\n const qParams = QParams2d.fromRange(Range2d.createArray(points));\r\n if (out) {\r\n qPoints = out;\r\n qPoints.reset(qParams);\r\n } else {\r\n qPoints = new QPoint2dList(qParams);\r\n }\r\n\r\n for (const point of points)\r\n qPoints.add(point);\r\n\r\n return qPoints;\r\n }\r\n}\r\n\r\n/** @alpha */\r\nexport interface QParams3dProps {\r\n origin: XYAndZ;\r\n scale: XYAndZ;\r\n}\r\n\r\n/** Parameters used for [[Quantization]] of 3d points such that the `x`, `y`, and `z` components are each quantized to 16-bit unsigned integers.\r\n * @see [[QPoint3d]] for the quantized representation of a [Point3d]($core-geometry).\r\n * @see [[QPoint3dList]] for a list of [[QPoint3d]]s quantized using a [[QParams3d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport class QParams3d {\r\n /** The origin of the quantization range. */\r\n public readonly origin = new Point3d();\r\n /** The scale applied to coordinates to quantize them. */\r\n public readonly scale = new Point3d();\r\n\r\n private constructor(ox = 0, oy = 0, oz = 0, sx = 0, sy = 0, sz = 0) {\r\n this.setFrom(ox, oy, oz, sx, sy, sz);\r\n }\r\n\r\n private setFrom(ox: number, oy: number, oz: number, sx: number, sy: number, sz: number) {\r\n this.origin.x = ox;\r\n this.origin.y = oy;\r\n this.origin.z = oz;\r\n this.scale.x = sx;\r\n this.scale.y = sy;\r\n this.scale.z = sz;\r\n }\r\n\r\n /** Set `x`, `y`, and `z` from `src. */\r\n public copyFrom(src: QParams3d): void {\r\n this.setFrom(src.origin.x, src.origin.y, src.origin.z, src.scale.x, src.scale.y, src.scale.z);\r\n }\r\n\r\n /** Create a copy of these parameters.\r\n * @param out If supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\r\n */\r\n public clone(out?: QParams3d): QParams3d {\r\n const result = undefined !== out ? out : new QParams3d();\r\n result.copyFrom(this);\r\n return result;\r\n }\r\n\r\n /** Initialize from origin and scale */\r\n public setFromOriginAndScale(origin: Point3d, scale: Point3d) {\r\n this.setFrom(origin.x, origin.y, origin.z, scale.x, scale.y, scale.z);\r\n }\r\n\r\n /** Initialize these parameters to support quantization of values within the specified range. */\r\n public setFromRange(range: Range3d, rangeScale = Quantization.rangeScale16) {\r\n if (!range.isNull) {\r\n this.setFrom(range.low.x, range.low.y, range.low.z,\r\n Quantization.computeScale(range.high.x - range.low.x, rangeScale), Quantization.computeScale(range.high.y - range.low.y, rangeScale), Quantization.computeScale(range.high.z - range.low.z, rangeScale));\r\n } else {\r\n this.origin.x = this.origin.y = this.origin.z = 0;\r\n this.scale.x = this.scale.y = this.scale.z = 0;\r\n }\r\n }\r\n\r\n /** Return the unquantized point for the input components.\r\n * @param out If supplied, it will be modified in-place and returned instead of allocating a new Point3d.\r\n */\r\n public unquantize(x: number, y: number, z: number, out?: Point3d): Point3d {\r\n const pt: Point3d = undefined !== out ? out : new Point3d();\r\n pt.x = Quantization.unquantize(x, this.origin.x, this.scale.x);\r\n pt.y = Quantization.unquantize(y, this.origin.y, this.scale.y);\r\n pt.z = Quantization.unquantize(z, this.origin.z, this.scale.z);\r\n return pt;\r\n }\r\n\r\n /** Creates parameters to support quantization of values within the specified range.\r\n * If `out` is supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\r\n */\r\n public static fromRange(range: Range3d, out?: QParams3d, rangeScale = Quantization.rangeScale16): QParams3d {\r\n const params = undefined !== out ? out : new QParams3d();\r\n params.setFromRange(range, rangeScale);\r\n return params;\r\n }\r\n\r\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0].\r\n * If `out` is supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\r\n */\r\n public static fromOriginAndScale(origin: Point3d, scale: Point3d, out?: QParams3d): QParams3d {\r\n const params = undefined !== out ? out : new QParams3d();\r\n params.setFromOriginAndScale(origin, scale);\r\n return params;\r\n }\r\n\r\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0]. */\r\n public static fromNormalizedRange(rangeScale = Quantization.rangeScale16) {\r\n return QParams3d.fromRange(Range3d.createArray([Point3d.create(-1, -1, -1), Point3d.create(1, 1, 1)]), undefined, rangeScale);\r\n }\r\n\r\n /** Creates parameters supporting quantization of values within the range [0.0, 1.0]. */\r\n public static fromZeroToOne(rangeScale = Quantization.rangeScale16) {\r\n return QParams3d.fromRange(Range3d.createArray([Point3d.create(0, 0, 0), Point3d.create(1, 1, 1)]), undefined, rangeScale);\r\n }\r\n\r\n /** The diagonal of the unquantized range represented by these parameters. */\r\n public get rangeDiagonal(): Vector3d {\r\n return Vector3d.createFrom({\r\n x: this.scale.x === 0 ? 0 : Quantization.rangeScale16 / this.scale.x,\r\n y: this.scale.y === 0 ? 0 : Quantization.rangeScale16 / this.scale.y,\r\n z: this.scale.z === 0 ? 0 : Quantization.rangeScale16 / this.scale.z,\r\n });\r\n }\r\n\r\n /** Return true if the point point is quantizable using these parameters. */\r\n public isQuantizable(point: Point3d) {\r\n return Quantization.isQuantizable(point.x, this.origin.x, this.scale.x) && Quantization.isQuantizable(point.y, this.origin.y, this.scale.y) && Quantization.isQuantizable(point.z, this.origin.z, this.scale.z);\r\n }\r\n\r\n /** Compute the range to which these parameters quantize. */\r\n public computeRange(out?: Range3d): Range3d {\r\n const range = Range3d.createNull(out);\r\n range.extendPoint(this.origin);\r\n range.extendPoint(this.origin.plus(this.rangeDiagonal));\r\n return range;\r\n }\r\n\r\n /** @alpha */\r\n public toJSON(): QParams3dProps {\r\n return {\r\n origin: { x: this.origin.x, y: this.origin.y, z: this.origin.z },\r\n scale: { x: this.scale.x, y: this.scale.y, z: this.scale.z },\r\n };\r\n }\r\n\r\n /** @alpha */\r\n public static fromJSON(src: QParams3dProps, out?: QParams3d): QParams3d {\r\n return this.fromOriginAndScale(Point3d.fromJSON(src.origin), Point3d.fromJSON(src.scale), out);\r\n }\r\n}\r\n\r\n/** Represents a [Point3d]($core-geometry) compressed such that each component `x`, `y`, and `z` is quantized to the 16-bit integer range [0, 0xffff].\r\n * These are primarily used to reduce the space required for coordinates used by [RenderGraphic]($frontend)s.\r\n * @see [[QParams3d]] to define quantization parameters for a range of points.\r\n * @see [[QPoint3dList]] for a list of points all quantized to the same range.\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint3d {\r\n private _x: number = 0;\r\n private _y: number = 0;\r\n private _z: number = 0;\r\n\r\n /** The quantized x component. */\r\n public get x() { return this._x; }\r\n public set x(x: number) {\r\n assert(Quantization.isQuantized(x));\r\n this._x = x;\r\n }\r\n\r\n /** The quantized y component. */\r\n public get y() { return this._y; }\r\n public set y(y: number) {\r\n assert(Quantization.isQuantized(y));\r\n this._y = y;\r\n }\r\n\r\n /** The quantized z component. */\r\n public get z() { return this._z; }\r\n public set z(z: number) {\r\n assert(Quantization.isQuantized(z));\r\n this._z = z;\r\n }\r\n\r\n /** Construct with all components initialized to zero. */\r\n public constructor() { }\r\n\r\n /** Initialize this point by quantizing the supplied { x, y, z } using the specified params */\r\n public init(pos: XYAndZ, params: QParams3d): void {\r\n this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);\r\n this.y = Quantization.quantize(pos.y, params.origin.y, params.scale.y);\r\n this.z = Quantization.quantize(pos.z, params.origin.z, params.scale.z);\r\n }\r\n\r\n /** Creates a quantized point from the supplied Point3d using the specified params */\r\n public static create(pos: Point3d, params: QParams3d): QPoint3d {\r\n const qpt = new QPoint3d();\r\n qpt.init(pos, params);\r\n return qpt;\r\n }\r\n\r\n /** Set this points components from `src`. */\r\n public copyFrom(src: QPoint3d): void {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z;\r\n }\r\n\r\n /** Create a copy of this point.\r\n * @param out If supplied, it will be modified in-place instead of allocating a new QPoint3d.\r\n */\r\n public clone(out?: QPoint3d): QPoint3d {\r\n const result = undefined !== out ? out : new QPoint3d();\r\n result.copyFrom(this);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the x, y, and z components directly.\r\n * @param x Must be an integer in the range [0, 0xffff]\r\n * @param y Must be an integer in the range [0, 0xffff]\r\n * @param z Must be an integer in the range [0, 0xffff]\r\n */\r\n public setFromScalars(x: number, y: number, z: number) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n\r\n /**\r\n * Creates a QPoint3d directly from x, y, and z components.\r\n * @param x Must be an integer in the range [0, 0xffff]\r\n * @param y Must be an integer in the range [0, 0xffff]\r\n * @param z Must be an integer in the range [0, 0xffff]\r\n * @param out If supplied, it will be modified in-place instead of allocating a new QPoint3d.\r\n */\r\n public static fromScalars(x: number, y: number, z: number, out?: QPoint3d): QPoint3d {\r\n const pt = undefined === out ? new QPoint3d() : out;\r\n pt.setFromScalars(x, y, z);\r\n return pt;\r\n }\r\n\r\n /** Returns a Point3d unquantized according to the supplied params.\r\n * If `out` is supplied, it will be modified in-place instead of allocating a new Point3d.\r\n */\r\n public unquantize(params: QParams3d, out?: Point3d): Point3d {\r\n const pt: Point3d = undefined !== out ? out : new Point3d();\r\n pt.x = Quantization.unquantize(this.x, params.origin.x, params.scale.x);\r\n pt.y = Quantization.unquantize(this.y, params.origin.y, params.scale.y);\r\n pt.z = Quantization.unquantize(this.z, params.origin.z, params.scale.z);\r\n return pt;\r\n }\r\n\r\n /** Return true if this point's components are identical to the other point's components. */\r\n public equals(other: QPoint3d): boolean {\r\n return this.x === other.x && this.y === other.y && this.z === other.z;\r\n }\r\n\r\n /** Perform ordinal comparison to another point. The function returns:\r\n * - Zero if this point is identical to `rhs`; or\r\n * - A number less than zero if this point is ordered before `rhs`; or\r\n * - A number greater than zero if this point is ordered after `rhs`.\r\n * @see [OrderedComparator]($core-bentley).\r\n */\r\n public compare(rhs: QPoint3d): number {\r\n let diff = this.x - rhs.x;\r\n if (0 === diff) {\r\n diff = this.y - rhs.y;\r\n if (0 === diff) {\r\n diff = this.z - rhs.z;\r\n }\r\n }\r\n\r\n return diff;\r\n }\r\n}\r\n\r\n/** A compact representation of a list of [[QPoint3d]]s stored in a `Uint16Array`.\r\n * This representation is particularly useful when passing data to WebGL; for example, see [RealityMeshParams.positions]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface QPoint3dBuffer {\r\n /** The parameters used to quantize the [[points]]. */\r\n params: QParams3d;\r\n /** The [[QPoint3d]]s as pairs of unsigned 16-bit integers. The length must be a multiple of 3; the number of points in the array is half the array's length.\r\n * To obtain the `n`th point, use `QPoint3d.fromScalars(buffer.points[n * 3], buffer.points[n * 3 + 1], buffer.points[n * 3 + 2])`.\r\n */\r\n points: Uint16Array;\r\n}\r\n\r\n/** @public\r\n * @extensions\r\n */\r\nexport namespace QPoint3dBuffer {\r\n const scratchQPoint3d = new QPoint3d();\r\n\r\n /** Extracts the point at the specified index from a buffer.\r\n * @param points The buffer in which each consecutive pair of integers is a 3d quantized point.\r\n * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\r\n * @param result If supplied, a preallocated [[QPoint3d]] to initialize with the result and return.\r\n * @returns The point at `pointIndex`.\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n export function getQPoint(points: Uint16Array, pointIndex: number, result?: QPoint3d): QPoint3d {\r\n const index = pointIndex * 3;\r\n const x = points[index + 0];\r\n const y = points[index + 1];\r\n const z = points[index + 2];\r\n if (undefined === x || undefined === y || undefined === z)\r\n throw new Error(\"Index out of range\");\r\n\r\n result = result ?? new QPoint3d();\r\n result.setFromScalars(x, y, z);\r\n return result;\r\n }\r\n\r\n /** Extracts and unquantizes the point at the specified index from a buffer.\r\n * @param buffer The array of points and the quantization parameters.\r\n * @param buffer The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\r\n * @param result If supplied, a preallocated [Point3d]($core-geometry) to initialize with the result and return.\r\n * @returns The point at `pointIndex`.\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n export function unquantizePoint(buffer: QPoint3dBuffer, pointIndex: number, result?: Point3d): Point3d {\r\n const qpt = getQPoint(buffer.points, pointIndex, scratchQPoint3d);\r\n return qpt.unquantize(buffer.params, result);\r\n }\r\n}\r\n\r\n/** A list of [[QPoint3d]]s all quantized to the same range.\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint3dList {\r\n /** Parameters used to quantize the points. */\r\n public readonly params: QParams3d;\r\n private readonly _list: QPoint3d[] = [];\r\n\r\n /** The list of quantized points. */\r\n public get list(): ReadonlyArray<QPoint3d> {\r\n return this._list;\r\n }\r\n\r\n /** Construct an empty list set up to quantize to the supplied range.\r\n * @param params The quantization parameters. If omitted, a null range will be used.\r\n */\r\n public constructor(params?: QParams3d) {\r\n this.params = params ? params.clone() : QParams3d.fromRange(Range3d.createNull());\r\n }\r\n\r\n /** Construct a QPoint3dList containing all points in the supplied list, quantized to the range of those points.\r\n * @param points The points to quantize and add to the list.\r\n * @param out If supplied, it will be cleared, its parameters recomputed, and the points will be added to it; otherwise, a new QPoint3dList will be created and returned.\r\n */\r\n public static fromPoints(points: Point3d[], out?: QPoint3dList): QPoint3dList {\r\n let qPoints;\r\n const qParams = QParams3d.fromRange(Range3d.createArray(points));\r\n if (out) {\r\n qPoints = out;\r\n qPoints.reset(qParams);\r\n } else {\r\n qPoints = new QPoint3dList(qParams);\r\n }\r\n\r\n for (const point of points)\r\n qPoints.add(point);\r\n\r\n return qPoints;\r\n }\r\n\r\n /** Removes all points from the list. */\r\n public clear() {\r\n this._list.length = 0;\r\n }\r\n\r\n /** Clears out the contents of the list and changes the quantization parameters. */\r\n public reset(params: QParams3d) {\r\n this.clear();\r\n this.params.copyFrom(params);\r\n }\r\n\r\n /** Quantizes the supplied Point3d to this list's range and appends it to the list. */\r\n public add(pt: Point3d) {\r\n this._list.push(QPoint3d.create(pt, this.params));\r\n }\r\n\r\n /** Adds a previously-quantized point to this list. */\r\n public push(qpt: QPoint3d) {\r\n this._list.push(qpt.clone());\r\n }\r\n\r\n /** The number of points in the list. */\r\n public get length() {\r\n return this._list.length;\r\n }\r\n\r\n /** Returns the unquantized value of the point at the specified index in the list. */\r\n public unquantize(index: number, out?: Point3d): Point3d {\r\n assert(index < this.length);\r\n if (index < this.length) {\r\n return this._list[index].unquantize(this.params, out);\r\n } else {\r\n return undefined !== out ? out : new Point3d();\r\n }\r\n }\r\n\r\n /** Changes the quantization parameters and requantizes all points in the list to the new range.\r\n * @note The loss of precision is compounded each time the points are requantized to a new range.\r\n */\r\n public requantize(params: QParams3d): void {\r\n for (let i = 0; i < this.length; i++) {\r\n const pt = this.unquantize(i);\r\n this._list[i].init(pt, params);\r\n }\r\n\r\n this.params.copyFrom(params);\r\n }\r\n\r\n /** Extracts the current contents of the list as a Uint16Array such that the first 3 elements contain the first point's x, y, and z components,\r\n * the second three elements contain the second point's components, and so on.\r\n */\r\n public toTypedArray(): Uint16Array {\r\n const array = new Uint16Array(this.length * 3);\r\n const pts = this._list;\r\n for (let i = 0; i < this.length; i++) {\r\n const pt = pts[i];\r\n array[i * 3 + 0] = pt.x;\r\n array[i * 3 + 1] = pt.y;\r\n array[i * 3 + 2] = pt.z;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n /** Reinitialize from a Uint16Array in which the first three elements specify the x, y, and z components of the first point, the second three elements specify the components\r\n * of the second point, and so on.\r\n */\r\n public fromTypedArray(range: Range3d, array: Uint16Array): void {\r\n this.params.setFromRange(range);\r\n this._list.length = array.length / 3;\r\n for (let i = 0, j = 0; i < this.list.length; i++)\r\n this._list[i] = QPoint3d.fromScalars(array[j++], array[j++], array[j++]);\r\n }\r\n\r\n /** Construct a list containing all points in the supplied list, quantized using the supplied parameters. */\r\n public static createFrom(points: Point3d[], params: QParams3d): QPoint3dList {\r\n const list = new QPoint3dList(params);\r\n for (const point of points)\r\n list.add(point);\r\n\r\n return list;\r\n }\r\n\r\n /** An iterator over the points in the list. */\r\n public [Symbol.iterator]() {\r\n return this.list[Symbol.iterator]();\r\n }\r\n}\r\n\r\n/** Options used to construct a [[QPoint2dBufferBuilder]].\r\n * @public\r\n * @extensions\r\n */\r\ninterface QPoint2dBufferBuilderOptions {\r\n /** The range to which the points will be quantized. This must be large enough to contain all of the points that will be added to the buffer. */\r\n range: Range2d;\r\n /** The number of points for which to allocate space.\r\n * @see [TypedArrayBuilderOptions.initialCapacity]($bentley).\r\n */\r\n initialCapacity?: number;\r\n /** Multiplier used to compute new capacity when resizing the buffer.\r\n * @see [TypedArrayBuilderOptions.growthFactor]($bentley).\r\n */\r\n growthFactor?: number;\r\n}\r\n\r\n/** Constructs a [[QPoint2dBuffer]] using a [Uint16ArrayBuilder]($bentley).\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint2dBufferBuilder {\r\n private readonly _scratchQPoint2d = new QPoint2d();\r\n\r\n /** The parameters used to quantize the points in the [[buffer]]. */\r\n public readonly params: QParams2d;\r\n /** The buffer that holds the points. */\r\n public readonly buffer: Uint16ArrayBuilder;\r\n\r\n /** Construct a new buffer with a [[length]] of zero. */\r\n public constructor(options: QPoint2dBufferBuilderOptions) {\r\n this.params = QParams2d.fromRange(options.range);\r\n const initialCapacity = options.initialCapacity ?? 0;\r\n this.buffer = new Uint16ArrayBuilder({\r\n growthFactor: options.growthFactor,\r\n initialCapacity: 2 * initialCapacity,\r\n });\r\n }\r\n\r\n /** Append a point with the specified quantized coordinates. */\r\n public pushXY(x: number, y: number): void {\r\n this.buffer.push(x);\r\n this.buffer.push(y);\r\n }\r\n\r\n /** Append a point with the specified quantized coordinates. */\r\n public push(pt: XAndY): void {\r\n this.pushXY(pt.x, pt.y);\r\n }\r\n\r\n /** The number of points currently in the [[buffer]]. */\r\n public get length(): number {\r\n const len = this.buffer.length;\r\n assert(len % 2 === 0);\r\n return len / 2;\r\n }\r\n\r\n /** Returns the quantized point at the specified index in [[buffer]].\r\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\r\n * @param result If supplied, a [[QPoint2d]] to initialize with the result and return.\r\n * @returns The quantized point at the specified index in [[buffer]].\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n public get(pointIndex: number, result?: QPoint2d): QPoint2d {\r\n return QPoint2dBuffer.getQPoint(this.buffer.toTypedArray(), pointIndex, result);\r\n }\r\n\r\n /** Returns the unquantized point at the specified index in [[buffer]].\r\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\r\n * @param result If supplied, a [Point2d]($core-geometry) to initialize with the result and return.\r\n * @returns The unquantized point at the specified index in [[buffer]].\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n public unquantize(pointIndex: number, result?: Point2d): Point2d {\r\n return this.get(pointIndex, this._scratchQPoint2d).unquantize(this.params, result);\r\n }\r\n\r\n /** Obtain a [[QPoint2dBuffer]] containing all of the points that have been appended by this builder. */\r\n public finish(): QPoint2dBuffer {\r\n return {\r\n params: this.params,\r\n points: this.buffer.toTypedArray(),\r\n };\r\n }\r\n}\r\n\r\n/** Options used to construct a [[QPoint3dBufferBuilder]].\r\n * @public\r\n * @extensions\r\n */\r\ninterface QPoint3dBufferBuilderOptions {\r\n /** The range to which the points will be quantized. This must be large enough to contain all of the points that will be added to the buffer. */\r\n range: Range3d;\r\n /** The number of points for which to allocate space.\r\n * @see [TypedArrayBuilderOptions.initialCapacity]($bentley).\r\n */\r\n initialCapacity?: number;\r\n /** Multiplier used to compute new capacity when resizing the buffer.\r\n * @see [TypedArrayBuilderOptions.growthFactor]($bentley).\r\n */\r\n growthFactor?: number;\r\n}\r\n\r\n/** Constructs a [[QPoint3dBuffer]] using a [Uint16ArrayBuilder]($bentley).\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint3dBufferBuilder {\r\n private readonly _scratchQPoint3d = new QPoint3d();\r\n\r\n /** The parameters used to quantize the points in the [[buffer]]. */\r\n public readonly params: QParams3d;\r\n /** The buffer that holds the points. */\r\n public readonly buffer: Uint16ArrayBuilder;\r\n\r\n /** Construct a new buffer with a [[length]] of zero. */\r\n public constructor(options: QPoint3dBufferBuilderOptions) {\r\n this.params = QParams3d.fromRange(options.range);\r\n const initialCapacity = options.initialCapacity ?? 0;\r\n this.buffer = new Uint16ArrayBuilder({\r\n growthFactor: options.growthFactor,\r\n initialCapacity: 3 * initialCapacity,\r\n });\r\n }\r\n\r\n /** Append a point with the specified quantized coordinates. */\r\n public pushXYZ(x: number, y: number, z: number): void {\r\n this.buffer.push(x);\r\n this.buffer.push(y);\r\n this.buffer.push(z);\r\n }\r\n\r\n /** Append a point with the specified quantized coordinates. */\r\n public push(pt: XYAndZ): void {\r\n this.pushXYZ(pt.x, pt.y, pt.z);\r\n }\r\n\r\n /** The number of points currently in the [[buffer]]. */\r\n public get length(): number {\r\n const len = this.buffer.length;\r\n assert(len % 3 === 0);\r\n return len / 3;\r\n }\r\n\r\n /** Returns the quantized point at the specified index in [[buffer]].\r\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\r\n * @param result If supplied, a [[QPoint3d]] to initialize with the result and return.\r\n * @returns The quantized point at the specified index in [[buffer]].\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n public get(pointIndex: number, result?: QPoint3d): QPoint3d {\r\n return QPoint3dBuffer.getQPoint(this.buffer.toTypedArray(), pointIndex, result);\r\n }\r\n\r\n /** Returns the unquantized point at the specified index in [[buffer]].\r\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\r\n * @param result If supplied, a [Point3d]($core-geometry) to initialize with the result and return.\r\n * @returns The unquantized point at the specified index in [[buffer]].\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n public unquantize(pointIndex: number, result?: Point3d): Point3d {\r\n return this.get(pointIndex, this._scratchQPoint3d).unquantize(this.params, result);\r\n }\r\n\r\n /** Obtain a [[QPoint3dBuffer]] containing all of the points that have been appended by this builder. */\r\n public finish(): QPoint3dBuffer {\r\n return {\r\n params: this.params,\r\n points: this.buffer.toTypedArray(),\r\n };\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityDataAccessProps.js","sourceRoot":"","sources":["../../src/RealityDataAccessProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAO/F;;;GAGG;AACH,MAAM,CAAN,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,kEAAyC,CAAA;IACzC,oCAAW,CAAA;IACX,0DAAiC,CAAA;IACjC,oCAAW,CAAA;IACX,wDAA+B,CAAA,CAAC,kBAAkB;AACpD,CAAC,EANW,qBAAqB,KAArB,qBAAqB,QAMhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module RealityData\n */\nimport { AccessToken } from \"@itwin/core-bentley\";\n\n/**\n * All of the currently supported Reality Data types\n * @beta\n */\nexport enum DefaultSupportedTypes {\n RealityMesh3dTiles = \"RealityMesh3DTiles\", // Web Ready 3D Scalable Mesh\n OPC = \"OPC\", // Web Ready Orbit Point Cloud\n Terrain3dTiles = \"Terrain3DTiles\", // Web Ready Terrain Scalable Mesh\n OMR = \"OMR\", // Orbit Mapping Resource\n Cesium3dTiles = \"Cesium3DTiles\" // Cesium 3D Tiles\n}\n\n/** RealityData\n * This class implements a Reality Data stored in the Reality Data API\n * Data is accessed directly through methods of the reality data instance.\n * Access to the data required a properly entitled token though the access to the blob is controlled through\n * an Azure blob URL, the token may be required to obtain this Azure blob URL or refresh it.\n * The Azure blob URL is considered valid for an hour and is refreshed after 50 minutes.\n * In addition to the reality data properties, and Azure blob URL and internal states, a reality data also contains\n * the identification of the iTwin to identify the context(used for access permissions resolution)\n * @beta\n */\nexport interface RealityData {\n id?: string;\n rootDocument?: string;\n type?: string;\n\n getBlobUrl(accessToken: AccessToken, blobPath: string): Promise<URL>;\n}\n\n/**\n * Client wrapper to Reality Data Service.\n * An instance of this class is used to extract reality data from the Reality Data API\n * This class implements obtaining a specific reality data and extraction of the Azure blob address.\n * @beta\n */\nexport interface RealityDataAccess {\n getRealityData: (accessToken: AccessToken, iTwinId: string | undefined, realityDataId: string) => Promise<RealityData>;\n getRealityDataUrl: (iTwinId: string | undefined, realityDataId: string) => Promise<string>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RealityDataAccessProps.js","sourceRoot":"","sources":["../../src/RealityDataAccessProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAO/F;;;GAGG;AACH,MAAM,CAAN,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,kEAAyC,CAAA;IACzC,oCAAW,CAAA;IACX,0DAAiC,CAAA;IACjC,oCAAW,CAAA;IACX,wDAA+B,CAAA,CAAC,kBAAkB;AACpD,CAAC,EANW,qBAAqB,KAArB,qBAAqB,QAMhC","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\r\n/** @packageDocumentation\r\n * @module RealityData\r\n */\r\nimport { AccessToken } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * All of the currently supported Reality Data types\r\n * @beta\r\n */\r\nexport enum DefaultSupportedTypes {\r\n RealityMesh3dTiles = \"RealityMesh3DTiles\", // Web Ready 3D Scalable Mesh\r\n OPC = \"OPC\", // Web Ready Orbit Point Cloud\r\n Terrain3dTiles = \"Terrain3DTiles\", // Web Ready Terrain Scalable Mesh\r\n OMR = \"OMR\", // Orbit Mapping Resource\r\n Cesium3dTiles = \"Cesium3DTiles\" // Cesium 3D Tiles\r\n}\r\n\r\n/** RealityData\r\n * This class implements a Reality Data stored in the Reality Data API\r\n * Data is accessed directly through methods of the reality data instance.\r\n * Access to the data required a properly entitled token though the access to the blob is controlled through\r\n * an Azure blob URL, the token may be required to obtain this Azure blob URL or refresh it.\r\n * The Azure blob URL is considered valid for an hour and is refreshed after 50 minutes.\r\n * In addition to the reality data properties, and Azure blob URL and internal states, a reality data also contains\r\n * the identification of the iTwin to identify the context(used for access permissions resolution)\r\n * @beta\r\n */\r\nexport interface RealityData {\r\n id?: string;\r\n rootDocument?: string;\r\n type?: string;\r\n\r\n getBlobUrl(accessToken: AccessToken, blobPath: string): Promise<URL>;\r\n}\r\n\r\n/**\r\n * Client wrapper to Reality Data Service.\r\n * An instance of this class is used to extract reality data from the Reality Data API\r\n * This class implements obtaining a specific reality data and extraction of the Azure blob address.\r\n * @beta\r\n */\r\nexport interface RealityDataAccess {\r\n getRealityData: (accessToken: AccessToken, iTwinId: string | undefined, realityDataId: string) => Promise<RealityData>;\r\n getRealityDataUrl: (iTwinId: string | undefined, realityDataId: string) => Promise<string>;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityModelDisplaySettings.js","sourceRoot":"","sources":["../../src/RealityModelDisplaySettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAsEH;;;;;;;;GAQG;AACH,MAAM,OAAO,yBAAyB;IACpC;;OAEG;IACa,KAAK,CA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2BAA2B,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;QAErJ,IAAI,SAAS,KAAK,UAAU,IAAI,SAAS,KAAK,kBAAkB;YAC9D,OAAO,SAAS,CAAC;QAEnB,MAAM,KAAK,GAA6B,EAAG,CAAC;QAC5C,IAAI,SAAS,KAAK,UAAU;YAC1B,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;QAEhC,IAAI,SAAS,KAAK,kBAAkB;YAClC,KAAK,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAEhD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,+DAA+D;IACxD,MAAM,CAAC,KAAkC;QAC9C,IAAI,IAAI,KAAK,KAAK;YAChB,OAAO,IAAI,CAAC;QAEd,OAAO,IAAI,CAAC,kBAAkB,KAAK,KAAK,CAAC,kBAAkB,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC1G,CAAC;IAED,mHAAmH;IAC5G,KAAK,CAAC,YAAsC;QACjD,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;QAC9G,MAAM,UAAU,GAAG,YAAY,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;QACjI,OAAO,IAAI,2BAA2B,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACjE,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 DisplayStyles\n */\n\n/** Specifies how the sizes of the individual points within a point cloud are computed.\n * - \"pixel\": Each point is an exact number of pixels in diameter, as specified by [[PointCloudDisplaySettings.pixelSize]].\n * - \"voxel\": Each point is the size of a \"voxel\" in meters, as specified by the [Tile]($frontend) to which the point belongs.\n * @see [[PointCloudDisplaySettings.sizeMode]].\n * @beta\n */\nexport type PointCloudSizeMode = \"voxel\" | \"pixel\";\n\n/** Specifies the shape drawn for each individual point within a point cloud.\n * - \"round\": Each point is drawn as a circle.\n * - \"square\": Each point is drawn as a square.\n * @see [[PointCloudDisplaySettings.shape]].\n * @beta\n */\nexport type PointCloudShape = \"square\" | \"round\";\n\n/** Specifies the Eye-Dome Lighting mode used for a point cloud.\n * - \"off\": EDL is not calculated\n * - \"on\": EDL is calculated using a single pass.\n * - \"full\" EDL is calculated with full algorithm including optional filtering\n * @see [[PointCloudDisplaySettings.edlMode]].\n * @beta\n */\nexport type PointCloudEDLMode = \"off\" | \"on\" | \"full\";\n\n/** The JSON representation of [[PointCloudDisplaySettings]].\n * @beta\n */\nexport interface PointCloudDisplayProps {\n /** See [[PointCloudDisplaySettings.sizeMode]]. */\n sizeMode?: PointCloudSizeMode;\n /** See [[PointCloudDisplaySettings.voxelScale]]. */\n voxelScale?: number;\n /** See [[PointCloudDisplaySettings.minPixelsPerVoxel]]. */\n minPixelsPerVoxel?: number;\n /** See [[PointCloudDisplaySettings.maxPixelsPerVoxel]]. */\n maxPixelsPerVoxel?: number;\n /** See [[PointCloudDisplaySettings.pixelSize]]. */\n pixelSize?: number;\n /** See [[PointCloudDisplaySettings.shape]]. */\n shape?: PointCloudShape;\n /** See [[PointCloudDisplaySettings.edlMode]]. */\n edlMode?: PointCloudEDLMode;\n /** See [[PointCloudDisplaySettings.edlStrength]]. */\n edlStrength?: number;\n /** See [[PointCloudDisplaySettings.edlRadius]]. */\n edlRadius?: number;\n /** See [[PointCloudDisplaySettings.edlFilter]]. */\n edlFilter?: number;\n /** See [[PointCloudDisplaySettings.edlMixWts1]]. */\n edlMixWts1?: number;\n /** See [[PointCloudDisplaySettings.edlMixWts2]]. */\n edlMixWts2?: number;\n /** See [[PointCloudDisplaySettings.edlMixWts4]]. */\n edlMixWts4?: number;\n}\n\n/** The JSON representation of [[RealityModelDisplaySettings]].\n * @beta\n */\nexport interface RealityModelDisplayProps {\n /** See [[RealityModelDisplaySettings.pointCloud]]. */\n pointCloud?: PointCloudDisplayProps;\n /** See [[RealityModelDisplaySettings.overrideColorRatio]]. */\n overrideColorRatio?: number;\n // ###TODO when we need it: mesh?: RealityMeshDisplayProps;\n}\n\n/** Settings that control how a point cloud reality model is displayed within a [Viewport]($frontend).\n * @note This is an immutable type - to modify its properties, use [[clone]].\n * Eye-Dome Lighting (EDL) is a non-photorealistic, image-based shading technique that was designed to improve depth\n * perception in scientific visualization. It is particularly useful for visualizing monochrome point cloud data, but\n * also can be useful for point clouds with color information.\n * @note EDL mode is ignored (off) if the view is not perspective (camera is off)\n * @see [[RealityModelDisplaySettings.pointCloud]].\n * @beta\n */\nexport class PointCloudDisplaySettings {\n /** The shape drawn for each point in the cloud.\n * Default: \"round\".\n */\n public readonly shape: PointCloudShape;\n /** The method by which the size of each individual point is computed.\n * Default: \"voxel\".\n * @see [[pixelSize]] to configure the size for \"pixel\" mode.\n * @see [[voxelScale]], [[minPixelsPerVoxel]], and [[maxPixelsPerVoxel]] to configure the size for \"voxel\" mode.\n */\n public readonly sizeMode: PointCloudSizeMode;\n /** The radius of each point in pixels, when [[sizeMode]] is \"pixel\".\n * The size is expected to be a positive integer. The maximum size will vary based on the graphics hardware in use, but typically is limited to 32 or 64 pixels.\n * Default: 1\n */\n public readonly pixelSize: number;\n /** A scale factor applied to the size of each point, when [[sizeMode]] is \"voxel\".\n * The scale is expected to be a positive floating point number.\n * Default: 1.0\n */\n public readonly voxelScale: number;\n /** If [[sizeMode]] is \"voxel\", the minimum radius of each point in pixels. It is expected to be a positive integer no greater than [[maxPixelsPerVoxel]].\n * Default: 2\n */\n public readonly minPixelsPerVoxel: number;\n /** If [[sizeMode]] is \"voxel\", the maximum radius of each point in pixels. It is expected to be a positive integer no less than [[minPixelsPerVoxel]].\n * Default: 20.\n */\n public readonly maxPixelsPerVoxel: number;\n /** The mode for the Eye-Dome Lighting (EDL) effect.\n * Default: \"off\"\n * @note EDL mode is ignored (off) if the view is not perspective (camera is off)\n */\n public readonly edlMode: PointCloudEDLMode;\n /** A strength value for the Eye Dome Lighting (EDL) effect.\n * The strength is expected to be a positive floating point number.\n * Default: 5.0\n */\n public readonly edlStrength: number;\n /** A radius value for the Eye Dome Lighting (EDL) effect.\n * The radius is expected to be a positive floating point number\n * It is used to deterimine how far away in pixels to sample for depth change\n * Default: 2.0\n */\n public readonly edlRadius: number;\n /** A flag for whether or not to apply filtering pass in the Eye Dome Lighting (EDL) effect.\n * It only applies if edlMode is \"full\"\n * Default: 1.0\n */\n public readonly edlFilter?: number;\n /** A weighting value to apply to the full image when combining it with the half and quarter sized ones\n * It only applies if edlMode is \"full\"\n * The strength is expected to be a floating point number between 0 and 1 inclusive.\n * Default: 1.0\n */\n public readonly edlMixWts1?: number;\n /** A weighting value to apply to the half sized image when combining it with the full and quarter sized ones\n * It only applies if edlMode is \"full\"\n * The strength is expected to be a floating point number between 0 and 1 inclusive.\n * Default: 0.5\n */\n public readonly edlMixWts2?: number;\n /** A weighting value to apply to the quarter sized image when combining it with the full and half sized ones\n * It only applies if edlMode is \"full\"\n * The strength is expected to be a floating point number between 0 and 1 inclusive.\n * Default: 0.25\n */\n public readonly edlMixWts4?: number;\n\n /** Settings with all properties initialized to their default values. */\n public static defaults = new PointCloudDisplaySettings();\n\n private constructor(props?: PointCloudDisplayProps) {\n this.shape = props?.shape ?? \"round\";\n this.sizeMode = props?.sizeMode ?? \"voxel\";\n\n // No sanity checks here - e.g., min < max, pixelSize and voxelScale > 0, etc.\n this.pixelSize = props?.pixelSize ?? 1;\n this.voxelScale = props?.voxelScale ?? 1;\n this.minPixelsPerVoxel = props?.minPixelsPerVoxel ?? 2;\n this.maxPixelsPerVoxel = props?.maxPixelsPerVoxel ?? 20;\n this.edlMode = props?.edlMode ?? \"off\";\n this.edlStrength = props?.edlStrength ?? 5;\n this.edlRadius = props?.edlRadius ?? 2;\n this.edlFilter = props?.edlFilter ?? 1;\n this.edlMixWts1 = props?.edlMixWts1 ?? 1.0;\n this.edlMixWts2 = props?.edlMixWts2 ?? 0.5;\n this.edlMixWts4 = props?.edlMixWts4 ?? 0.25;\n }\n\n /** Create display settings from their JSON representation. If `props` is `undefined`, the default settings are returned. */\n public static fromJSON(props?: PointCloudDisplayProps): PointCloudDisplaySettings {\n return props ? new PointCloudDisplaySettings(props) : this.defaults;\n }\n\n /** Convert these settings to their JSON representation. */\n public toJSON(): PointCloudDisplayProps | undefined {\n const defs = PointCloudDisplaySettings.defaults;\n if (this.equals(defs))\n return undefined;\n\n const props: PointCloudDisplayProps = { };\n if (this.shape !== defs.shape)\n props.shape = this.shape;\n\n if (this.sizeMode !== defs.sizeMode)\n props.sizeMode = this.sizeMode;\n\n if (this.pixelSize !== defs.pixelSize)\n props.pixelSize = this.pixelSize;\n\n if (this.voxelScale !== defs.voxelScale)\n props.voxelScale = this.voxelScale;\n\n if (this.minPixelsPerVoxel !== defs.minPixelsPerVoxel)\n props.minPixelsPerVoxel = this.minPixelsPerVoxel;\n\n if (this.maxPixelsPerVoxel !== defs.maxPixelsPerVoxel)\n props.maxPixelsPerVoxel = this.maxPixelsPerVoxel;\n\n if (this.edlMode !== defs.edlMode)\n props.edlMode = this.edlMode;\n\n if (this.edlStrength !== defs.edlStrength)\n props.edlStrength = this.edlStrength;\n\n if (this.edlRadius !== defs.edlRadius)\n props.edlRadius = this.edlRadius;\n\n if (this.edlFilter !== defs.edlFilter)\n props.edlFilter = this.edlFilter;\n\n if (this.edlMixWts1 !== defs.edlMixWts1)\n props.edlMixWts1 = this.edlMixWts1;\n\n if (this.edlMixWts2 !== defs.edlMixWts2)\n props.edlMixWts2 = this.edlMixWts2;\n\n if (this.edlMixWts4 !== defs.edlMixWts4)\n props.edlMixWts4 = this.edlMixWts4;\n\n return props;\n }\n\n /** Create a copy of these settings, identical except for any properties explicitly specified by `changedProps`. */\n public clone(changedProps: PointCloudDisplayProps): PointCloudDisplaySettings {\n return PointCloudDisplaySettings.fromJSON({\n ...this.toJSON(),\n ...changedProps,\n });\n }\n\n /** Returns true if these settings are identical to `other`. */\n public equals(other: PointCloudDisplaySettings): boolean {\n if (this === other)\n return true;\n\n return this.shape === other.shape && this.sizeMode === other.sizeMode && this.pixelSize === other.pixelSize\n && this.voxelScale === other.voxelScale && this.minPixelsPerVoxel === other.minPixelsPerVoxel && this.maxPixelsPerVoxel === other.maxPixelsPerVoxel\n && this.edlMode === other.edlMode && this.edlStrength === other.edlStrength && this.edlRadius === other.edlRadius\n && this.edlFilter === other.edlFilter\n && this.edlMixWts1 === other.edlMixWts1 && this.edlMixWts2 === other.edlMixWts2 && this.edlMixWts4 === other.edlMixWts4\n ;\n }\n}\n\n/** Settings that control how a reality model - whether a [[ContextRealityModel]] or a persistent reality [Model]($backend) - is displayed within a [Viewport]($frontend).\n * @see [[ContextRealityModel.displaySettings]] to apply these settings to a context reality model.\n * @see [[DisplayStyleSettings.setRealityModelDisplaySettings]] to apply these settings to a persistent reality model.\n * @note This is an immutable type - to modify its properties, use [[clone]].\n * @beta\n */\nexport class RealityModelDisplaySettings {\n /** If the reality model's color is overridden with another color, a ratio in [0..1] with which to mix the two colors together.\n * A ratio of 0 uses only the reality model's color, a ratio of 1 uses only the override color, and a ratio of 0.5 mixes the two colors equally.\n * The color may be overridden using [[FeatureOverrides]] such as those supplied by a [FeatureOverrideProvider]($frontend), or by applying a [[SpatialClassifier]].\n * Default: 0.5\n */\n public readonly overrideColorRatio: number;\n /** Settings that apply specifically to point cloud reality models.\n * Default: [[PointCloudDisplaySettings.defaults]].\n */\n public readonly pointCloud: PointCloudDisplaySettings;\n\n /** Settings with all properties initialized to their default values. */\n public static defaults = new RealityModelDisplaySettings(undefined, PointCloudDisplaySettings.defaults);\n\n private constructor(overrideColorRatio: number | undefined, pointCloud: PointCloudDisplaySettings) {\n this.overrideColorRatio = overrideColorRatio ?? 0.5;\n this.pointCloud = pointCloud;\n }\n\n /** Create display settings from their JSON representation. If `props` is `undefined`, the default settings are returned. */\n public static fromJSON(props?: RealityModelDisplayProps): RealityModelDisplaySettings {\n if (!props)\n return this.defaults;\n\n return new RealityModelDisplaySettings(props.overrideColorRatio, PointCloudDisplaySettings.fromJSON(props.pointCloud));\n }\n\n /** Convert these settings to their JSON representation, which is `undefined` if all of their properties match the default settings. */\n public toJSON(): RealityModelDisplayProps | undefined {\n const pointCloud = this.pointCloud.toJSON();\n const overrideColorRatio = this.overrideColorRatio === RealityModelDisplaySettings.defaults.overrideColorRatio ? undefined : this.overrideColorRatio;\n\n if (undefined === pointCloud && undefined === overrideColorRatio)\n return undefined;\n\n const props: RealityModelDisplayProps = { };\n if (undefined !== pointCloud)\n props.pointCloud = pointCloud;\n\n if (undefined !== overrideColorRatio)\n props.overrideColorRatio = overrideColorRatio;\n\n return props;\n }\n\n /** Returns true if these settings are identical to `other`. */\n public equals(other: RealityModelDisplaySettings): boolean {\n if (this === other)\n return true;\n\n return this.overrideColorRatio === other.overrideColorRatio && this.pointCloud.equals(other.pointCloud);\n }\n\n /** Create a copy of these settings, identical except for any properties explicitly specified by `changedProps`. */\n public clone(changedProps: RealityModelDisplayProps): RealityModelDisplaySettings {\n const pointCloud = changedProps.pointCloud ? this.pointCloud.clone(changedProps.pointCloud) : this.pointCloud;\n const colorRatio = changedProps.hasOwnProperty(\"overrideColorRatio\") ? changedProps.overrideColorRatio : this.overrideColorRatio;\n return new RealityModelDisplaySettings(colorRatio, pointCloud);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RealityModelDisplaySettings.js","sourceRoot":"","sources":["../../src/RealityModelDisplaySettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAsEH;;;;;;;;GAQG;AACH,MAAM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,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,KAAK,2BAA2B,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;QAErJ,IAAI,SAAS,KAAK,UAAU,IAAI,SAAS,KAAK,kBAAkB;YAC9D,OAAO,SAAS,CAAC;QAEnB,MAAM,KAAK,GAA6B,EAAG,CAAC;QAC5C,IAAI,SAAS,KAAK,UAAU;YAC1B,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;QAEhC,IAAI,SAAS,KAAK,kBAAkB;YAClC,KAAK,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAEhD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,+DAA+D;IACxD,MAAM,CAAC,KAAkC;QAC9C,IAAI,IAAI,KAAK,KAAK;YAChB,OAAO,IAAI,CAAC;QAEd,OAAO,IAAI,CAAC,kBAAkB,KAAK,KAAK,CAAC,kBAAkB,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC1G,CAAC;IAED,mHAAmH;IAC5G,KAAK,CAAC,YAAsC;QACjD,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;QAC9G,MAAM,UAAU,GAAG,YAAY,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;QACjI,OAAO,IAAI,2BAA2B,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACjE,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 DisplayStyles\r\n */\r\n\r\n/** Specifies how the sizes of the individual points within a point cloud are computed.\r\n * - \"pixel\": Each point is an exact number of pixels in diameter, as specified by [[PointCloudDisplaySettings.pixelSize]].\r\n * - \"voxel\": Each point is the size of a \"voxel\" in meters, as specified by the [Tile]($frontend) to which the point belongs.\r\n * @see [[PointCloudDisplaySettings.sizeMode]].\r\n * @beta\r\n */\r\nexport type PointCloudSizeMode = \"voxel\" | \"pixel\";\r\n\r\n/** Specifies the shape drawn for each individual point within a point cloud.\r\n * - \"round\": Each point is drawn as a circle.\r\n * - \"square\": Each point is drawn as a square.\r\n * @see [[PointCloudDisplaySettings.shape]].\r\n * @beta\r\n */\r\nexport type PointCloudShape = \"square\" | \"round\";\r\n\r\n/** Specifies the Eye-Dome Lighting mode used for a point cloud.\r\n * - \"off\": EDL is not calculated\r\n * - \"on\": EDL is calculated using a single pass.\r\n * - \"full\" EDL is calculated with full algorithm including optional filtering\r\n * @see [[PointCloudDisplaySettings.edlMode]].\r\n * @beta\r\n */\r\nexport type PointCloudEDLMode = \"off\" | \"on\" | \"full\";\r\n\r\n/** The JSON representation of [[PointCloudDisplaySettings]].\r\n * @beta\r\n */\r\nexport interface PointCloudDisplayProps {\r\n /** See [[PointCloudDisplaySettings.sizeMode]]. */\r\n sizeMode?: PointCloudSizeMode;\r\n /** See [[PointCloudDisplaySettings.voxelScale]]. */\r\n voxelScale?: number;\r\n /** See [[PointCloudDisplaySettings.minPixelsPerVoxel]]. */\r\n minPixelsPerVoxel?: number;\r\n /** See [[PointCloudDisplaySettings.maxPixelsPerVoxel]]. */\r\n maxPixelsPerVoxel?: number;\r\n /** See [[PointCloudDisplaySettings.pixelSize]]. */\r\n pixelSize?: number;\r\n /** See [[PointCloudDisplaySettings.shape]]. */\r\n shape?: PointCloudShape;\r\n /** See [[PointCloudDisplaySettings.edlMode]]. */\r\n edlMode?: PointCloudEDLMode;\r\n /** See [[PointCloudDisplaySettings.edlStrength]]. */\r\n edlStrength?: number;\r\n /** See [[PointCloudDisplaySettings.edlRadius]]. */\r\n edlRadius?: number;\r\n /** See [[PointCloudDisplaySettings.edlFilter]]. */\r\n edlFilter?: number;\r\n /** See [[PointCloudDisplaySettings.edlMixWts1]]. */\r\n edlMixWts1?: number;\r\n /** See [[PointCloudDisplaySettings.edlMixWts2]]. */\r\n edlMixWts2?: number;\r\n /** See [[PointCloudDisplaySettings.edlMixWts4]]. */\r\n edlMixWts4?: number;\r\n}\r\n\r\n/** The JSON representation of [[RealityModelDisplaySettings]].\r\n * @beta\r\n */\r\nexport interface RealityModelDisplayProps {\r\n /** See [[RealityModelDisplaySettings.pointCloud]]. */\r\n pointCloud?: PointCloudDisplayProps;\r\n /** See [[RealityModelDisplaySettings.overrideColorRatio]]. */\r\n overrideColorRatio?: number;\r\n // ###TODO when we need it: mesh?: RealityMeshDisplayProps;\r\n}\r\n\r\n/** Settings that control how a point cloud reality model is displayed within a [Viewport]($frontend).\r\n * @note This is an immutable type - to modify its properties, use [[clone]].\r\n * Eye-Dome Lighting (EDL) is a non-photorealistic, image-based shading technique that was designed to improve depth\r\n * perception in scientific visualization. It is particularly useful for visualizing monochrome point cloud data, but\r\n * also can be useful for point clouds with color information.\r\n * @note EDL mode is ignored (off) if the view is not perspective (camera is off)\r\n * @see [[RealityModelDisplaySettings.pointCloud]].\r\n * @beta\r\n */\r\nexport class PointCloudDisplaySettings {\r\n /** The shape drawn for each point in the cloud.\r\n * Default: \"round\".\r\n */\r\n public readonly shape: PointCloudShape;\r\n /** The method by which the size of each individual point is computed.\r\n * Default: \"voxel\".\r\n * @see [[pixelSize]] to configure the size for \"pixel\" mode.\r\n * @see [[voxelScale]], [[minPixelsPerVoxel]], and [[maxPixelsPerVoxel]] to configure the size for \"voxel\" mode.\r\n */\r\n public readonly sizeMode: PointCloudSizeMode;\r\n /** The radius of each point in pixels, when [[sizeMode]] is \"pixel\".\r\n * The size is expected to be a positive integer. The maximum size will vary based on the graphics hardware in use, but typically is limited to 32 or 64 pixels.\r\n * Default: 1\r\n */\r\n public readonly pixelSize: number;\r\n /** A scale factor applied to the size of each point, when [[sizeMode]] is \"voxel\".\r\n * The scale is expected to be a positive floating point number.\r\n * Default: 1.0\r\n */\r\n public readonly voxelScale: number;\r\n /** If [[sizeMode]] is \"voxel\", the minimum radius of each point in pixels. It is expected to be a positive integer no greater than [[maxPixelsPerVoxel]].\r\n * Default: 2\r\n */\r\n public readonly minPixelsPerVoxel: number;\r\n /** If [[sizeMode]] is \"voxel\", the maximum radius of each point in pixels. It is expected to be a positive integer no less than [[minPixelsPerVoxel]].\r\n * Default: 20.\r\n */\r\n public readonly maxPixelsPerVoxel: number;\r\n /** The mode for the Eye-Dome Lighting (EDL) effect.\r\n * Default: \"off\"\r\n * @note EDL mode is ignored (off) if the view is not perspective (camera is off)\r\n */\r\n public readonly edlMode: PointCloudEDLMode;\r\n /** A strength value for the Eye Dome Lighting (EDL) effect.\r\n * The strength is expected to be a positive floating point number.\r\n * Default: 5.0\r\n */\r\n public readonly edlStrength: number;\r\n /** A radius value for the Eye Dome Lighting (EDL) effect.\r\n * The radius is expected to be a positive floating point number\r\n * It is used to deterimine how far away in pixels to sample for depth change\r\n * Default: 2.0\r\n */\r\n public readonly edlRadius: number;\r\n /** A flag for whether or not to apply filtering pass in the Eye Dome Lighting (EDL) effect.\r\n * It only applies if edlMode is \"full\"\r\n * Default: 1.0\r\n */\r\n public readonly edlFilter?: number;\r\n /** A weighting value to apply to the full image when combining it with the half and quarter sized ones\r\n * It only applies if edlMode is \"full\"\r\n * The strength is expected to be a floating point number between 0 and 1 inclusive.\r\n * Default: 1.0\r\n */\r\n public readonly edlMixWts1?: number;\r\n /** A weighting value to apply to the half sized image when combining it with the full and quarter sized ones\r\n * It only applies if edlMode is \"full\"\r\n * The strength is expected to be a floating point number between 0 and 1 inclusive.\r\n * Default: 0.5\r\n */\r\n public readonly edlMixWts2?: number;\r\n /** A weighting value to apply to the quarter sized image when combining it with the full and half sized ones\r\n * It only applies if edlMode is \"full\"\r\n * The strength is expected to be a floating point number between 0 and 1 inclusive.\r\n * Default: 0.25\r\n */\r\n public readonly edlMixWts4?: number;\r\n\r\n /** Settings with all properties initialized to their default values. */\r\n public static defaults = new PointCloudDisplaySettings();\r\n\r\n private constructor(props?: PointCloudDisplayProps) {\r\n this.shape = props?.shape ?? \"round\";\r\n this.sizeMode = props?.sizeMode ?? \"voxel\";\r\n\r\n // No sanity checks here - e.g., min < max, pixelSize and voxelScale > 0, etc.\r\n this.pixelSize = props?.pixelSize ?? 1;\r\n this.voxelScale = props?.voxelScale ?? 1;\r\n this.minPixelsPerVoxel = props?.minPixelsPerVoxel ?? 2;\r\n this.maxPixelsPerVoxel = props?.maxPixelsPerVoxel ?? 20;\r\n this.edlMode = props?.edlMode ?? \"off\";\r\n this.edlStrength = props?.edlStrength ?? 5;\r\n this.edlRadius = props?.edlRadius ?? 2;\r\n this.edlFilter = props?.edlFilter ?? 1;\r\n this.edlMixWts1 = props?.edlMixWts1 ?? 1.0;\r\n this.edlMixWts2 = props?.edlMixWts2 ?? 0.5;\r\n this.edlMixWts4 = props?.edlMixWts4 ?? 0.25;\r\n }\r\n\r\n /** Create display settings from their JSON representation. If `props` is `undefined`, the default settings are returned. */\r\n public static fromJSON(props?: PointCloudDisplayProps): PointCloudDisplaySettings {\r\n return props ? new PointCloudDisplaySettings(props) : this.defaults;\r\n }\r\n\r\n /** Convert these settings to their JSON representation. */\r\n public toJSON(): PointCloudDisplayProps | undefined {\r\n const defs = PointCloudDisplaySettings.defaults;\r\n if (this.equals(defs))\r\n return undefined;\r\n\r\n const props: PointCloudDisplayProps = { };\r\n if (this.shape !== defs.shape)\r\n props.shape = this.shape;\r\n\r\n if (this.sizeMode !== defs.sizeMode)\r\n props.sizeMode = this.sizeMode;\r\n\r\n if (this.pixelSize !== defs.pixelSize)\r\n props.pixelSize = this.pixelSize;\r\n\r\n if (this.voxelScale !== defs.voxelScale)\r\n props.voxelScale = this.voxelScale;\r\n\r\n if (this.minPixelsPerVoxel !== defs.minPixelsPerVoxel)\r\n props.minPixelsPerVoxel = this.minPixelsPerVoxel;\r\n\r\n if (this.maxPixelsPerVoxel !== defs.maxPixelsPerVoxel)\r\n props.maxPixelsPerVoxel = this.maxPixelsPerVoxel;\r\n\r\n if (this.edlMode !== defs.edlMode)\r\n props.edlMode = this.edlMode;\r\n\r\n if (this.edlStrength !== defs.edlStrength)\r\n props.edlStrength = this.edlStrength;\r\n\r\n if (this.edlRadius !== defs.edlRadius)\r\n props.edlRadius = this.edlRadius;\r\n\r\n if (this.edlFilter !== defs.edlFilter)\r\n props.edlFilter = this.edlFilter;\r\n\r\n if (this.edlMixWts1 !== defs.edlMixWts1)\r\n props.edlMixWts1 = this.edlMixWts1;\r\n\r\n if (this.edlMixWts2 !== defs.edlMixWts2)\r\n props.edlMixWts2 = this.edlMixWts2;\r\n\r\n if (this.edlMixWts4 !== defs.edlMixWts4)\r\n props.edlMixWts4 = this.edlMixWts4;\r\n\r\n return props;\r\n }\r\n\r\n /** Create a copy of these settings, identical except for any properties explicitly specified by `changedProps`. */\r\n public clone(changedProps: PointCloudDisplayProps): PointCloudDisplaySettings {\r\n return PointCloudDisplaySettings.fromJSON({\r\n ...this.toJSON(),\r\n ...changedProps,\r\n });\r\n }\r\n\r\n /** Returns true if these settings are identical to `other`. */\r\n public equals(other: PointCloudDisplaySettings): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return this.shape === other.shape && this.sizeMode === other.sizeMode && this.pixelSize === other.pixelSize\r\n && this.voxelScale === other.voxelScale && this.minPixelsPerVoxel === other.minPixelsPerVoxel && this.maxPixelsPerVoxel === other.maxPixelsPerVoxel\r\n && this.edlMode === other.edlMode && this.edlStrength === other.edlStrength && this.edlRadius === other.edlRadius\r\n && this.edlFilter === other.edlFilter\r\n && this.edlMixWts1 === other.edlMixWts1 && this.edlMixWts2 === other.edlMixWts2 && this.edlMixWts4 === other.edlMixWts4\r\n ;\r\n }\r\n}\r\n\r\n/** Settings that control how a reality model - whether a [[ContextRealityModel]] or a persistent reality [Model]($backend) - is displayed within a [Viewport]($frontend).\r\n * @see [[ContextRealityModel.displaySettings]] to apply these settings to a context reality model.\r\n * @see [[DisplayStyleSettings.setRealityModelDisplaySettings]] to apply these settings to a persistent reality model.\r\n * @note This is an immutable type - to modify its properties, use [[clone]].\r\n * @beta\r\n */\r\nexport class RealityModelDisplaySettings {\r\n /** If the reality model's color is overridden with another color, a ratio in [0..1] with which to mix the two colors together.\r\n * A ratio of 0 uses only the reality model's color, a ratio of 1 uses only the override color, and a ratio of 0.5 mixes the two colors equally.\r\n * The color may be overridden using [[FeatureOverrides]] such as those supplied by a [FeatureOverrideProvider]($frontend), or by applying a [[SpatialClassifier]].\r\n * Default: 0.5\r\n */\r\n public readonly overrideColorRatio: number;\r\n /** Settings that apply specifically to point cloud reality models.\r\n * Default: [[PointCloudDisplaySettings.defaults]].\r\n */\r\n public readonly pointCloud: PointCloudDisplaySettings;\r\n\r\n /** Settings with all properties initialized to their default values. */\r\n public static defaults = new RealityModelDisplaySettings(undefined, PointCloudDisplaySettings.defaults);\r\n\r\n private constructor(overrideColorRatio: number | undefined, pointCloud: PointCloudDisplaySettings) {\r\n this.overrideColorRatio = overrideColorRatio ?? 0.5;\r\n this.pointCloud = pointCloud;\r\n }\r\n\r\n /** Create display settings from their JSON representation. If `props` is `undefined`, the default settings are returned. */\r\n public static fromJSON(props?: RealityModelDisplayProps): RealityModelDisplaySettings {\r\n if (!props)\r\n return this.defaults;\r\n\r\n return new RealityModelDisplaySettings(props.overrideColorRatio, PointCloudDisplaySettings.fromJSON(props.pointCloud));\r\n }\r\n\r\n /** Convert these settings to their JSON representation, which is `undefined` if all of their properties match the default settings. */\r\n public toJSON(): RealityModelDisplayProps | undefined {\r\n const pointCloud = this.pointCloud.toJSON();\r\n const overrideColorRatio = this.overrideColorRatio === RealityModelDisplaySettings.defaults.overrideColorRatio ? undefined : this.overrideColorRatio;\r\n\r\n if (undefined === pointCloud && undefined === overrideColorRatio)\r\n return undefined;\r\n\r\n const props: RealityModelDisplayProps = { };\r\n if (undefined !== pointCloud)\r\n props.pointCloud = pointCloud;\r\n\r\n if (undefined !== overrideColorRatio)\r\n props.overrideColorRatio = overrideColorRatio;\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if these settings are identical to `other`. */\r\n public equals(other: RealityModelDisplaySettings): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return this.overrideColorRatio === other.overrideColorRatio && this.pointCloud.equals(other.pointCloud);\r\n }\r\n\r\n /** Create a copy of these settings, identical except for any properties explicitly specified by `changedProps`. */\r\n public clone(changedProps: RealityModelDisplayProps): RealityModelDisplaySettings {\r\n const pointCloud = changedProps.pointCloud ? this.pointCloud.clone(changedProps.pointCloud) : this.pointCloud;\r\n const colorRatio = changedProps.hasOwnProperty(\"overrideColorRatio\") ? changedProps.overrideColorRatio : this.overrideColorRatio;\r\n return new RealityModelDisplaySettings(colorRatio, pointCloud);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../src/RenderMaterial.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAGvE;;GAEG;AACH,MAAM,OAAgB,cAAc;IAClC,sGAAsG;IACtF,GAAG,CAAU;IAC7B,oFAAoF;IACpE,cAAc,CAAkB;IAChD,0EAA0E;IACzD,KAAK,CAAa;IAEnC,YAAsB,MAAyD;QAC7E,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED,IAAW,UAAU;QACnB,OAAO,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;IACpD,CAAC;IAED,oFAAoF;IAC7E,OAAO,CAAC,KAAqB;QAClC,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { compareStrings, Guid, GuidString } from \"@itwin/core-bentley\";\nimport { TextureMapping } from \"./TextureMapping\";\n\n/** Represents a material which can be applied to a surface to control aspects of its appearance such as color, reflectivity, texture, and so on.\n * @public\n */\nexport abstract class RenderMaterial {\n /** If the material originated from a Material element in the [[IModelDb]], the Id of that element. */\n public readonly key?: string;\n /** Describes how to map an image to a surface to which this material is applied. */\n public readonly textureMapping?: TextureMapping;\n /** Used for ordered comparisons, e.g. in DisplayParams.compareForMerge */\n private readonly _guid: GuidString;\n\n protected constructor(params: { key?: string, textureMapping?: TextureMapping }) {\n this.key = params.key;\n this.textureMapping = params.textureMapping;\n this._guid = Guid.createValue();\n }\n\n public get hasTexture(): boolean {\n return undefined !== this.textureMapping?.texture;\n }\n\n /** An [OrderedComparator]($bentley) that compares this material against `other`. */\n public compare(other: RenderMaterial): number {\n return compareStrings(this._guid, other._guid);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../src/RenderMaterial.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAGvE;;GAEG;AACH,MAAM,OAAgB,cAAc;IAClC,sGAAsG;IACtF,GAAG,CAAU;IAC7B,oFAAoF;IACpE,cAAc,CAAkB;IAChD,0EAA0E;IACzD,KAAK,CAAa;IAEnC,YAAsB,MAAyD;QAC7E,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED,IAAW,UAAU;QACnB,OAAO,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;IACpD,CAAC;IAED,oFAAoF;IAC7E,OAAO,CAAC,KAAqB;QAClC,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { compareStrings, Guid, GuidString } from \"@itwin/core-bentley\";\r\nimport { TextureMapping } from \"./TextureMapping\";\r\n\r\n/** Represents a material which can be applied to a surface to control aspects of its appearance such as color, reflectivity, texture, and so on.\r\n * @public\r\n */\r\nexport abstract class RenderMaterial {\r\n /** If the material originated from a Material element in the [[IModelDb]], the Id of that element. */\r\n public readonly key?: string;\r\n /** Describes how to map an image to a surface to which this material is applied. */\r\n public readonly textureMapping?: TextureMapping;\r\n /** Used for ordered comparisons, e.g. in DisplayParams.compareForMerge */\r\n private readonly _guid: GuidString;\r\n\r\n protected constructor(params: { key?: string, textureMapping?: TextureMapping }) {\r\n this.key = params.key;\r\n this.textureMapping = params.textureMapping;\r\n this._guid = Guid.createValue();\r\n }\r\n\r\n public get hasTexture(): boolean {\r\n return undefined !== this.textureMapping?.texture;\r\n }\r\n\r\n /** An [OrderedComparator]($bentley) that compares this material against `other`. */\r\n public compare(other: RenderMaterial): number {\r\n return compareStrings(this._guid, other._guid);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderPolyline.js","sourceRoot":"","sources":["../../src/RenderPolyline.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,qBAAqB;AAErB;;GAEG;AACH,MAAM,CAAN,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B,2DAA2D;IAC3D,6DAAU,CAAA;IACV,8DAA8D;IAC9D,yDAAa,CAAA;IACb;;OAEG;IACH,+DAAgB,CAAA;AAClB,CAAC,EATW,iBAAiB,KAAjB,iBAAiB,QAS5B","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 Rendering\n */\n\n// cSpell:ignore vals\n\n/** Describes the semantics of a [PolylineArgs]($frontend).\n * @public\n */\nexport enum PolylineTypeFlags {\n /** Just an ordinary polyline with no special semantics. */\n Normal = 0,\n /** A polyline used to define the edges of a planar region. */\n Edge = 1 << 0,\n /** Like [[Edge]], but the edges are only displayed in [[RenderMode.Wireframe]] when the surface's fill is not displayed.\n * [[FillFlags]] controls whether the fill is displayed.\n */\n Outline = 1 << 1,\n}\n\n/** Flags describing a [PolylineArgs]($frontend).\n * @public\n */\nexport interface PolylineFlags {\n /** If `true`, the polylines are to be drawn as individual disconnected point strings instead of as connected line strings. */\n isDisjoint?: boolean;\n /** If `true`, the polylines' positions are all coplanar. */\n isPlanar?: boolean;\n /** If `true`, the polylines' positions all have the same z coordinate. */\n is2d?: boolean;\n /** Default: Normal. */\n type?: PolylineTypeFlags;\n}\n\n/** Describes the vertex indices of a single line within a [PolylineArgs]($frontend).\n * The indices represent either a line string as a connected series of points, or a point string as a set of disconnected points, depending\n * on the [[PolylineFlags.isDisjoint]] value of [PolylineArgs.flags]($frontend).\n * @public\n */\nexport type PolylineIndices = number[];\n"]}
|
|
1
|
+
{"version":3,"file":"RenderPolyline.js","sourceRoot":"","sources":["../../src/RenderPolyline.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,qBAAqB;AAErB;;GAEG;AACH,MAAM,CAAN,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B,2DAA2D;IAC3D,6DAAU,CAAA;IACV,8DAA8D;IAC9D,yDAAa,CAAA;IACb;;OAEG;IACH,+DAAgB,CAAA;AAClB,CAAC,EATW,iBAAiB,KAAjB,iBAAiB,QAS5B","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 Rendering\r\n */\r\n\r\n// cSpell:ignore vals\r\n\r\n/** Describes the semantics of a [PolylineArgs]($frontend).\r\n * @public\r\n */\r\nexport enum PolylineTypeFlags {\r\n /** Just an ordinary polyline with no special semantics. */\r\n Normal = 0,\r\n /** A polyline used to define the edges of a planar region. */\r\n Edge = 1 << 0,\r\n /** Like [[Edge]], but the edges are only displayed in [[RenderMode.Wireframe]] when the surface's fill is not displayed.\r\n * [[FillFlags]] controls whether the fill is displayed.\r\n */\r\n Outline = 1 << 1,\r\n}\r\n\r\n/** Flags describing a [PolylineArgs]($frontend).\r\n * @public\r\n */\r\nexport interface PolylineFlags {\r\n /** If `true`, the polylines are to be drawn as individual disconnected point strings instead of as connected line strings. */\r\n isDisjoint?: boolean;\r\n /** If `true`, the polylines' positions are all coplanar. */\r\n isPlanar?: boolean;\r\n /** If `true`, the polylines' positions all have the same z coordinate. */\r\n is2d?: boolean;\r\n /** Default: Normal. */\r\n type?: PolylineTypeFlags;\r\n}\r\n\r\n/** Describes the vertex indices of a single line within a [PolylineArgs]($frontend).\r\n * The indices represent either a line string as a connected series of points, or a point string as a set of disconnected points, depending\r\n * on the [[PolylineFlags.isDisjoint]] value of [PolylineArgs.flags]($frontend).\r\n * @public\r\n */\r\nexport type PolylineIndices = number[];\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderTexture.js","sourceRoot":"","sources":["../../src/RenderTexture.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,IAAI,EAA0B,MAAM,qBAAqB,CAAC;AAUnF;;;;;GAKG;AACH,MAAM,OAAgB,aAAa;IACjC,qCAAqC;IACrB,IAAI,CAAqB;IACzC,0EAA0E;IACzD,KAAK,CAAa;IAEnC,IAAW,aAAa,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5F,IAAW,OAAO,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,IAAW,QAAQ,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAGlF,YAAsB,IAAwB;QAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACI,CAAC,MAAM,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,uDAAuD;IACzE,CAAC;IAKD,mFAAmF;IAC5E,OAAO,CAAC,KAAoB;QACjC,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACF;AAED,cAAc;AACd,WAAiB,aAAa;IAC5B,0FAA0F;IAC1F,IAAY,IAaX;IAbD,WAAY,IAAI;QACd,kFAAkF;QAClF,mCAAM,CAAA;QACN,yGAAyG;QACzG,iCAAK,CAAA;QACL,mFAAmF;QACnF,6CAAW,CAAA;QACX,+DAA+D;QAC/D,mCAAM,CAAA;QACN,oHAAoH;QACpH,6DAAmB,CAAA;QACnB,kDAAkD;QAClD,uDAAgB,CAAA;IAClB,CAAC,EAbW,IAAI,GAAJ,kBAAI,KAAJ,kBAAI,QAaf;AACH,CAAC,EAhBgB,aAAa,KAAb,aAAa,QAgB7B","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 Rendering\n */\n\nimport { compareStrings, Guid, GuidString, Id64String } from \"@itwin/core-bentley\";\n\n/** Identifies an image to be used to produce a [[RenderTexture]] for a given purpose - for example,\n * as part of a [[SkyBox]]. If the string is a valid `Id64String`, it refers to a persistent [Texture]($backend) element stored in an iModel.\n * Otherwise, it is interpreted as a Url resolving to an HTMLImageElement.\n * @see [[SkySphereImageProps.texture]] and [[SkyCubeImageProps]].\n * @public\n */\nexport type TextureImageSpec = Id64String | string;\n\n/** Represents a texture image applied to a surface during rendering.\n * A RenderTexture is typically - but not always - associated with a [[RenderMaterial]].\n * @see [RenderSystem.createTexture]($frontend) to obtain a texture.\n * @see [RenderSystem.createTextureFromElement]($frontend) to obtain a texture from a [Texture]($backend) element.\n * @public\n */\nexport abstract class RenderTexture implements Disposable {\n /** Indicates the type of texture. */\n public readonly type: RenderTexture.Type;\n /** Used for ordered comparisons, e.g. in DisplayParams.compareForMerge */\n private readonly _guid: GuidString;\n\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\n public abstract get bytesUsed(): number;\n\n protected constructor(type: RenderTexture.Type) {\n this.type = type;\n this._guid = Guid.createValue();\n }\n\n /** Releases any WebGL resources owned by this texture.\n * For a texture created by a [RenderSystem]($frontend) for which [CreateTextureArgs.ownership]($frontend) was specified as \"external\",\n * the caller is responsible for invoking this method when it is finished using the texture; otherwise, the [RenderSystem]($frontend) will handle\n * its disposal.\n */\n public [Symbol.dispose]() {\n this.dispose(); // eslint-disable-line @typescript-eslint/no-deprecated\n }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Will be made protected in a future release. Use [Symbol.dispose] instead. */\n public abstract dispose(): void; // eslint-disable-line @typescript-eslint/no-deprecated\n\n /** An [OrderedComparator]($bentley) that compares this texture against `other`. */\n public compare(other: RenderTexture): number {\n return compareStrings(this._guid, other._guid);\n }\n}\n\n/** @public */\nexport namespace RenderTexture {\n /** The types of [[RenderTexture]]s that can be created by a [RenderSystem]($frontend). */\n export enum Type {\n /** An image applied to a surface, with support for mip-mapping and repetition. */\n Normal,\n /** An image containing any number of text glyphs, used for efficiently rendering readable small text. */\n Glyph,\n /** A non-repeating image with no mip-maps, used for example for reality models. */\n TileSection,\n /** A three-dimensional texture used for rendering a skybox. */\n SkyBox,\n /** A non-repeating image with mip-maps and and anisotropic filtering, used for map tiles when draped on terrain. */\n FilteredTileSection,\n /** A gradient image used for thematic display. */\n ThematicGradient,\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RenderTexture.js","sourceRoot":"","sources":["../../src/RenderTexture.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,IAAI,EAA0B,MAAM,qBAAqB,CAAC;AAUnF;;;;;GAKG;AACH,MAAM,OAAgB,aAAa;IACjC,qCAAqC;IACrB,IAAI,CAAqB;IACzC,0EAA0E;IACzD,KAAK,CAAa;IAEnC,IAAW,aAAa,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5F,IAAW,OAAO,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,IAAW,QAAQ,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAGlF,YAAsB,IAAwB;QAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACI,CAAC,MAAM,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,uDAAuD;IACzE,CAAC;IAKD,mFAAmF;IAC5E,OAAO,CAAC,KAAoB;QACjC,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACF;AAED,cAAc;AACd,WAAiB,aAAa;IAC5B,0FAA0F;IAC1F,IAAY,IAaX;IAbD,WAAY,IAAI;QACd,kFAAkF;QAClF,mCAAM,CAAA;QACN,yGAAyG;QACzG,iCAAK,CAAA;QACL,mFAAmF;QACnF,6CAAW,CAAA;QACX,+DAA+D;QAC/D,mCAAM,CAAA;QACN,oHAAoH;QACpH,6DAAmB,CAAA;QACnB,kDAAkD;QAClD,uDAAgB,CAAA;IAClB,CAAC,EAbW,IAAI,GAAJ,kBAAI,KAAJ,kBAAI,QAaf;AACH,CAAC,EAhBgB,aAAa,KAAb,aAAa,QAgB7B","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 Rendering\r\n */\r\n\r\nimport { compareStrings, Guid, GuidString, Id64String } from \"@itwin/core-bentley\";\r\n\r\n/** Identifies an image to be used to produce a [[RenderTexture]] for a given purpose - for example,\r\n * as part of a [[SkyBox]]. If the string is a valid `Id64String`, it refers to a persistent [Texture]($backend) element stored in an iModel.\r\n * Otherwise, it is interpreted as a Url resolving to an HTMLImageElement.\r\n * @see [[SkySphereImageProps.texture]] and [[SkyCubeImageProps]].\r\n * @public\r\n */\r\nexport type TextureImageSpec = Id64String | string;\r\n\r\n/** Represents a texture image applied to a surface during rendering.\r\n * A RenderTexture is typically - but not always - associated with a [[RenderMaterial]].\r\n * @see [RenderSystem.createTexture]($frontend) to obtain a texture.\r\n * @see [RenderSystem.createTextureFromElement]($frontend) to obtain a texture from a [Texture]($backend) element.\r\n * @public\r\n */\r\nexport abstract class RenderTexture implements Disposable {\r\n /** Indicates the type of texture. */\r\n public readonly type: RenderTexture.Type;\r\n /** Used for ordered comparisons, e.g. in DisplayParams.compareForMerge */\r\n private readonly _guid: GuidString;\r\n\r\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\r\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\r\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\r\n public abstract get bytesUsed(): number;\r\n\r\n protected constructor(type: RenderTexture.Type) {\r\n this.type = type;\r\n this._guid = Guid.createValue();\r\n }\r\n\r\n /** Releases any WebGL resources owned by this texture.\r\n * For a texture created by a [RenderSystem]($frontend) for which [CreateTextureArgs.ownership]($frontend) was specified as \"external\",\r\n * the caller is responsible for invoking this method when it is finished using the texture; otherwise, the [RenderSystem]($frontend) will handle\r\n * its disposal.\r\n */\r\n public [Symbol.dispose]() {\r\n this.dispose(); // eslint-disable-line @typescript-eslint/no-deprecated\r\n }\r\n\r\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Will be made protected in a future release. Use [Symbol.dispose] instead. */\r\n public abstract dispose(): void; // eslint-disable-line @typescript-eslint/no-deprecated\r\n\r\n /** An [OrderedComparator]($bentley) that compares this texture against `other`. */\r\n public compare(other: RenderTexture): number {\r\n return compareStrings(this._guid, other._guid);\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderTexture {\r\n /** The types of [[RenderTexture]]s that can be created by a [RenderSystem]($frontend). */\r\n export enum Type {\r\n /** An image applied to a surface, with support for mip-mapping and repetition. */\r\n Normal,\r\n /** An image containing any number of text glyphs, used for efficiently rendering readable small text. */\r\n Glyph,\r\n /** A non-repeating image with no mip-maps, used for example for reality models. */\r\n TileSection,\r\n /** A three-dimensional texture used for rendering a skybox. */\r\n SkyBox,\r\n /** A non-repeating image with mip-maps and and anisotropic filtering, used for map tiles when draped on terrain. */\r\n FilteredTileSection,\r\n /** A gradient image used for thematic display. */\r\n ThematicGradient,\r\n }\r\n}\r\n"]}
|
package/lib/esm/RgbColor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RgbColor.js","sourceRoot":"","sources":["../../src/RgbColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAYtC;;GAEG;AACH,MAAM,OAAO,QAAQ;IAMgB;IAA2B;IAA2B;IALzF;;;;OAIG;IACH,YAAmC,CAAS,EAAkB,CAAS,EAAkB,CAAS;QAA/D,MAAC,GAAD,CAAC,CAAQ;QAAkB,MAAC,GAAD,CAAC,CAAQ;QAAkB,MAAC,GAAD,CAAC,CAAQ;QAChG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;QAC7C,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;QAC7C,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,gHAAg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,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,+FAA+F;IACxF,SAAS,CAAC,KAAe;QAC9B,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC/G,CAAC;IAED,mIAAmI;IAC5H,WAAW;QAChB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { compareNumbers } from \"@itwin/core-bentley\";\nimport { ColorDef } from \"./ColorDef\";\n\n/** JSON representation of an [[RgbColor]], with each component an integer in the range [0, 255].\n * @public\n * @extensions\n */\nexport interface RgbColorProps {\n r: number;\n g: number;\n b: number;\n}\n\n/** An immutable representation of a color with red, green, and blue components each in the integer range [0, 255].\n * @public\n */\nexport class RgbColor {\n /** Constructs from red, green, and blue components.\n * @param r Red\n * @param g Green\n * @param b Blue\n */\n public constructor(public readonly r: number, public readonly g: number, public readonly b: number) {\n this.r = Math.max(0, Math.min(this.r, 0xff));\n this.g = Math.max(0, Math.min(this.g, 0xff));\n this.b = Math.max(0, Math.min(this.b, 0xff));\n }\n\n /** Constructs from the red, green, and blue components of a ColorDef. The transparency component is ignored. */\n public static fromColorDef(colorDef: ColorDef): RgbColor {\n const colors = colorDef.colors;\n return new RgbColor(colors.r, colors.g, colors.b);\n }\n\n /** Converts this RgbColor to a ColorDef.\n * @param transparency Value to use for the transparency component of the ColorDef.\n * @param out If defined, this ColorDef will be modified in-place and returned; otherwise a new ColorDef will be allocated.\n * @returns A ColorDef with RGB components equivalent to those of this RgbColor and transparency component as specified.\n */\n public toColorDef(transparency = 0): ColorDef {\n return ColorDef.from(this.r, this.g, this.b, transparency);\n }\n\n /** Convert this color to its JSON representation. */\n public toJSON(): RgbColorProps {\n return { r: this.r, g: this.g, b: this.b };\n }\n\n /** Create an RgbColor from its JSON representation.\n * If `json` is `undefined`, the result is pure white.\n */\n public static fromJSON(json: RgbColorProps | undefined): RgbColor {\n let r = 0xff;\n let g = 0xff;\n let b = 0xff;\n if (undefined !== json) {\n if (typeof json.r === \"number\")\n r = json.r;\n if (typeof json.g === \"number\")\n g = json.g;\n if (typeof json.b === \"number\")\n b = json.b;\n }\n\n return new RgbColor(r, g, b);\n }\n\n /** Returns true if this color's red, green, and blue components are identical to those of `other`. */\n public equals(other: RgbColor): boolean {\n return this.r === other.r && this.g === other.g && this.b === other.b;\n }\n\n /** Compare this color to another color using the rules of an [OrderedComparator]($bentley). */\n public compareTo(other: RgbColor): number {\n return compareNumbers(this.r, other.r) || compareNumbers(this.g, other.g) || compareNumbers(this.b, other.b);\n }\n\n /** Convert this color to a string in the form \"#rrggbb\" where the values are the hex digits of the respective color components. */\n public toHexString(): string {\n return this.toColorDef().toHexString();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RgbColor.js","sourceRoot":"","sources":["../../src/RgbColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAYtC;;GAEG;AACH,MAAM,OAAO,QAAQ;IAMgB;IAA2B;IAA2B;IALzF;;;;OAIG;IACH,YAAmC,CAAS,EAAkB,CAAS,EAAkB,CAAS;QAA/D,MAAC,GAAD,CAAC,CAAQ;QAAkB,MAAC,GAAD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S,KAAK,IAAI,EAAE,CAAC;YACvB,IAAI,OAAO,IAAI,CAAC,CAAC,KAAK,QAAQ;gBAC5B,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACb,IAAI,OAAO,IAAI,CAAC,CAAC,KAAK,QAAQ;gBAC5B,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACb,IAAI,OAAO,IAAI,CAAC,CAAC,KAAK,QAAQ;gBAC5B,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QACf,CAAC;QAED,OAAO,IAAI,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC;IAED,sGAAsG;IAC/F,MAAM,CAAC,KAAe;QAC3B,OAAO,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,+FAA+F;IACxF,SAAS,CAAC,KAAe;QAC9B,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC/G,CAAC;IAED,mIAAmI;IAC5H,WAAW;QAChB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { compareNumbers } from \"@itwin/core-bentley\";\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/** JSON representation of an [[RgbColor]], with each component an integer in the range [0, 255].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RgbColorProps {\r\n r: number;\r\n g: number;\r\n b: number;\r\n}\r\n\r\n/** An immutable representation of a color with red, green, and blue components each in the integer range [0, 255].\r\n * @public\r\n */\r\nexport class RgbColor {\r\n /** Constructs from red, green, and blue components.\r\n * @param r Red\r\n * @param g Green\r\n * @param b Blue\r\n */\r\n public constructor(public readonly r: number, public readonly g: number, public readonly b: number) {\r\n this.r = Math.max(0, Math.min(this.r, 0xff));\r\n this.g = Math.max(0, Math.min(this.g, 0xff));\r\n this.b = Math.max(0, Math.min(this.b, 0xff));\r\n }\r\n\r\n /** Constructs from the red, green, and blue components of a ColorDef. The transparency component is ignored. */\r\n public static fromColorDef(colorDef: ColorDef): RgbColor {\r\n const colors = colorDef.colors;\r\n return new RgbColor(colors.r, colors.g, colors.b);\r\n }\r\n\r\n /** Converts this RgbColor to a ColorDef.\r\n * @param transparency Value to use for the transparency component of the ColorDef.\r\n * @param out If defined, this ColorDef will be modified in-place and returned; otherwise a new ColorDef will be allocated.\r\n * @returns A ColorDef with RGB components equivalent to those of this RgbColor and transparency component as specified.\r\n */\r\n public toColorDef(transparency = 0): ColorDef {\r\n return ColorDef.from(this.r, this.g, this.b, transparency);\r\n }\r\n\r\n /** Convert this color to its JSON representation. */\r\n public toJSON(): RgbColorProps {\r\n return { r: this.r, g: this.g, b: this.b };\r\n }\r\n\r\n /** Create an RgbColor from its JSON representation.\r\n * If `json` is `undefined`, the result is pure white.\r\n */\r\n public static fromJSON(json: RgbColorProps | undefined): RgbColor {\r\n let r = 0xff;\r\n let g = 0xff;\r\n let b = 0xff;\r\n if (undefined !== json) {\r\n if (typeof json.r === \"number\")\r\n r = json.r;\r\n if (typeof json.g === \"number\")\r\n g = json.g;\r\n if (typeof json.b === \"number\")\r\n b = json.b;\r\n }\r\n\r\n return new RgbColor(r, g, b);\r\n }\r\n\r\n /** Returns true if this color's red, green, and blue components are identical to those of `other`. */\r\n public equals(other: RgbColor): boolean {\r\n return this.r === other.r && this.g === other.g && this.b === other.b;\r\n }\r\n\r\n /** Compare this color to another color using the rules of an [OrderedComparator]($bentley). */\r\n public compareTo(other: RgbColor): number {\r\n return compareNumbers(this.r, other.r) || compareNumbers(this.g, other.g) || compareNumbers(this.b, other.b);\r\n }\r\n\r\n /** Convert this color to a string in the form \"#rrggbb\" where the values are the hex digits of the respective color components. */\r\n public toHexString(): string {\r\n return this.toColorDef().toHexString();\r\n }\r\n}\r\n"]}
|