@itwin/core-common 5.5.0-dev.2 → 5.5.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/AuthorizationClient.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/Base64EncodedString.js.map +1 -1
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/CatalogIModel.js.map +1 -1
- package/lib/cjs/CesiumIonAssets.js.map +1 -1
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ChangedEntities.js.map +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorByName.js.map +1 -1
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSchemaProps.js.map +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/EntityReference.js.map +1 -1
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GenericInstanceFilter.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryContainment.js.map +1 -1
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinCoreErrors.js.map +1 -1
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/LinePixels.js.map +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/ModelGeometryChanges.js.map +1 -1
- package/lib/cjs/ModelProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SessionProps.js.map +1 -1
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/TxnAction.js.map +1 -1
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/cjs/annotation/TextField.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
- package/lib/cjs/domains/GenericElementProps.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/internal/BackendTypes.js.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
- package/lib/cjs/internal/RenderMesh.js.map +1 -1
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
- package/lib/cjs/internal/Snapping.js.map +1 -1
- package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/AuthorizationClient.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/Base64EncodedString.js.map +1 -1
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/CatalogIModel.js.map +1 -1
- package/lib/esm/CesiumIonAssets.js.map +1 -1
- package/lib/esm/ChangedElements.js.map +1 -1
- package/lib/esm/ChangedEntities.js.map +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorByName.js.map +1 -1
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSchemaProps.js.map +1 -1
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EmphasizeElementsProps.js.map +1 -1
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/EntityReference.js.map +1 -1
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GenericInstanceFilter.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryContainment.js.map +1 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinCoreErrors.js.map +1 -1
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/LinePixels.js.map +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/MaterialProps.js.map +1 -1
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/ModelGeometryChanges.js.map +1 -1
- package/lib/esm/ModelProps.js.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SessionProps.js.map +1 -1
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarCalculate.js.map +1 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/TxnAction.js.map +1 -1
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/esm/annotation/TextField.js.map +1 -1
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
- package/lib/esm/domains/GenericElementProps.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/internal/BackendTypes.js.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
- package/lib/esm/internal/RenderMesh.js.map +1 -1
- package/lib/esm/internal/RenderTextureParams.js.map +1 -1
- package/lib/esm/internal/Snapping.js.map +1 -1
- package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureIndex.js","sourceRoot":"","sources":["../../src/FeatureIndex.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IAC1B,uFAAuF;IACvE,MAAM,CAAc;IACpC,qFAAqF;IACrE,OAAO,CAAc;IACrC;;OAEG;IACa,QAAQ,CAAU;IAElC;;;;OAIG;IACH,YAAmB,MAAmB,EAAE,OAAiB,EAAE,QAAiB;QAC1E,IAAI,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IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAyB,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,CAAC;IAED;;;;OAIG;IACI,cAAc,CAAC,MAAmB,EAAE,OAAiB,EAAE,QAAiB;QAC7E,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC/D,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,qDAAqD;IACrD,yDAAK,CAAA;IACL,6DAA6D;IAC7D,6DAAO,CAAA;IACP,+DAA+D;IAC/D,mEAAU,CAAA;AACZ,CAAC,EAPW,gBAAgB,KAAhB,gBAAgB,QAO3B;AAED;;;;GAIG;AACH,MAAM,OAAO,YAAY;IACvB,sFAAsF;IAC/E,IAAI,GAAqB,gBAAgB,CAAC,KAAK,CAAC;IAEvD,iFAAiF;IAC1E,SAAS,GAAW,CAAC,CAAC;IAC7B,oIAAoI;IAC7H,UAAU,CAAe;IAEhC,wDAAwD;IACxD,IAAW,SAAS,KAAc,OAAO,gBAAgB,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAElF,sDAAsD;IACtD,IAAW,OAAO,KAAc,OAAO,gBAAgB,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE9E,+BAA+B;IACxB,KAAK;QACV,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,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 { ColorDef } from \"./ColorDef\";\n\n/** As part of a [[ColorIndex]], describes per-vertex colors for a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * The [[colors]] array holds the set of unique colors. The [[indices]] array describes the color of each vertex as an index into [[colors]].\n * @note A `NonUniformColor` table cannot contain a mix of opaque and translucent colors. If any color in [[colors]] has a transparency greater\n * than zero, all of them must have a transparency greater than zero.\n * @public\n */\nexport class NonUniformColor {\n /** An array of 32-bit [[ColorDef]] values in `tbgr` format, indexed by [[indices]]. */\n public readonly colors: Uint32Array;\n /** For each vertex, an index into [[colors]] indicating the color of that vertex. */\n public readonly indices: Uint16Array;\n /** If `true`, indicates none of the [[colors]] have a transparency greater than zero; otherwise, all of\n * the colors have a transparency greater than zero.\n */\n public readonly isOpaque: boolean;\n\n /** Constructor.\n * @param colors See [[colors]].\n * @param indices See [[indices]]\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\n */\n public constructor(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\n this.colors = new Uint32Array(colors.buffer);\n this.indices = Uint16Array.from(indices);\n this.isOpaque = !hasAlpha;\n }\n}\n\n/** Describes the color(s) of the vertices of a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * This may be a uniform color to be applied to every vertex, or a table specifying individual per-vertex colors.\n * @public\n */\nexport class ColorIndex {\n private _color: ColorDef | NonUniformColor;\n\n /** Whether the color(s) in this index have transparency. */\n public get hasAlpha() { return !this._color.isOpaque; }\n /** Whether this index specifies a single uniform color for the entire mesh or polyline. */\n public get isUniform() { return this._color instanceof ColorDef; }\n // Note: this.nonUniform will always return a value if this.isUniform is false.\n /** The number of colors in this index. */\n public get numColors(): number { return this.isUniform ? 1 : this.nonUniform!.colors.length; } // eslint-disable-line @typescript-eslint/no-non-null-assertion\n\n /** Construct a default index specifying a uniform white color. */\n public constructor() { this._color = ColorDef.white; }\n\n /** Reset this index to specify a uniform white color. */\n public reset() { this._color = ColorDef.white; }\n\n /** Returns the single color to be applied to all vertices, if [[isUniform]] is `true`; or `undefined` otherwise. */\n public get uniform(): ColorDef | undefined {\n return this.isUniform ? this._color as ColorDef : undefined;\n }\n\n /** Set the specified color to be applied to all vertices. */\n public initUniform(color: ColorDef | number) {\n this._color = typeof color === \"number\" ? ColorDef.fromJSON(color) : color;\n }\n\n /** Returns the per-vertex colors, if [[isUniform]] is `false`; or `undefined` otherwise. */\n public get nonUniform(): NonUniformColor | undefined {\n return !this.isUniform ? this._color as NonUniformColor : undefined;\n }\n\n /** Set the per-vertex colors.\n * @param colors See [[NonUniformColor.colors]].\n * @param indices See [[NonUniformColor.indices]].\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\n */\n public initNonUniform(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\n this._color = new NonUniformColor(colors, indices, hasAlpha);\n }\n}\n\n/** Describes the type of a [[FeatureIndex]].\n * @public\n */\nexport enum FeatureIndexType {\n /** Indicates that the index contains no features. */\n Empty,\n /** Indicates that the index contains exactly one feature. */\n Uniform,\n /** Indicates that the index contains more than one feature. */\n NonUniform,\n}\n\n/** Describes the set of [[Feature]]s associated with a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * The mesh or polyline may have zero or one features; or, individual vertices may be associated with different features.\n * The features are expressed as unsigned 32-bit integer Ids of [[Feature]]s within a [[FeatureTable]].\n * @public\n */\nexport class FeatureIndex {\n /** Describes the quantity (zero, one, or more than one) of features in this index. */\n public type: FeatureIndexType = FeatureIndexType.Empty;\n\n /** If [[type]] is [[FeatureIndexType.Uniform]], the Id of the single feature. */\n public featureID: number = 0;\n /** If [[type]] is [[FeatureIndexType.NonUniform]], the per-vertex feature Ids, indexed by the mesh or polyline's vertex indices. */\n public featureIDs?: Uint32Array;\n\n /** True if [[type]] is [[FeatureIndexType.Uniform]]. */\n public get isUniform(): boolean { return FeatureIndexType.Uniform === this.type; }\n\n /** True if [[type]] is [[FeatureIndexType.Empty]]. */\n public get isEmpty(): boolean { return FeatureIndexType.Empty === this.type; }\n\n /** Reset to an empty index. */\n public reset(): void {\n this.type = FeatureIndexType.Empty;\n this.featureID = 0;\n this.featureIDs = undefined;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FeatureIndex.js","sourceRoot":"","sources":["../../src/FeatureIndex.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IAC1B,uFAAuF;IACvE,MAAM,CAAc;IACpC,qFAAqF;IACrE,OAAO,CAAc;IACrC;;OAEG;IACa,QAAQ,CAAU;IAElC;;;;OAIG;IACH,YAAmB,MAAmB,EAAE,OAAiB,EAAE,QAAiB;QAC1E,IAAI,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,CAAC,QAAQ,CAAC;IAC5B,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,UAAU;IACb,MAAM,CAA6B;IAE3C,4DAA4D;IAC5D,IAAW,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvD,2FAA2F;IAC3F,IAAW,SAAS,KAAK,OAAO,IAAI,CAAC,MAAM,YAAY,QAAQ,CAAC,CAAC,CAAC;IAClE,+EAA+E;IAC/E,0CAA0C;IAC1C,IAAW,SAAS,KAAa,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,+DAA+D;IAE9J,kEAAkE;IAClE,gBAAuB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,KAAK,C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O,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAElF,sDAAsD;IACtD,IAAW,OAAO,KAAc,OAAO,gBAAgB,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE9E,+BAA+B;IACxB,KAAK;QACV,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,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 { ColorDef } from \"./ColorDef\";\r\n\r\n/** As part of a [[ColorIndex]], describes per-vertex colors for a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\r\n * The [[colors]] array holds the set of unique colors. The [[indices]] array describes the color of each vertex as an index into [[colors]].\r\n * @note A `NonUniformColor` table cannot contain a mix of opaque and translucent colors. If any color in [[colors]] has a transparency greater\r\n * than zero, all of them must have a transparency greater than zero.\r\n * @public\r\n */\r\nexport class NonUniformColor {\r\n /** An array of 32-bit [[ColorDef]] values in `tbgr` format, indexed by [[indices]]. */\r\n public readonly colors: Uint32Array;\r\n /** For each vertex, an index into [[colors]] indicating the color of that vertex. */\r\n public readonly indices: Uint16Array;\r\n /** If `true`, indicates none of the [[colors]] have a transparency greater than zero; otherwise, all of\r\n * the colors have a transparency greater than zero.\r\n */\r\n public readonly isOpaque: boolean;\r\n\r\n /** Constructor.\r\n * @param colors See [[colors]].\r\n * @param indices See [[indices]]\r\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\r\n */\r\n public constructor(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\r\n this.colors = new Uint32Array(colors.buffer);\r\n this.indices = Uint16Array.from(indices);\r\n this.isOpaque = !hasAlpha;\r\n }\r\n}\r\n\r\n/** Describes the color(s) of the vertices of a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\r\n * This may be a uniform color to be applied to every vertex, or a table specifying individual per-vertex colors.\r\n * @public\r\n */\r\nexport class ColorIndex {\r\n private _color: ColorDef | NonUniformColor;\r\n\r\n /** Whether the color(s) in this index have transparency. */\r\n public get hasAlpha() { return !this._color.isOpaque; }\r\n /** Whether this index specifies a single uniform color for the entire mesh or polyline. */\r\n public get isUniform() { return this._color instanceof ColorDef; }\r\n // Note: this.nonUniform will always return a value if this.isUniform is false.\r\n /** The number of colors in this index. */\r\n public get numColors(): number { return this.isUniform ? 1 : this.nonUniform!.colors.length; } // eslint-disable-line @typescript-eslint/no-non-null-assertion\r\n\r\n /** Construct a default index specifying a uniform white color. */\r\n public constructor() { this._color = ColorDef.white; }\r\n\r\n /** Reset this index to specify a uniform white color. */\r\n public reset() { this._color = ColorDef.white; }\r\n\r\n /** Returns the single color to be applied to all vertices, if [[isUniform]] is `true`; or `undefined` otherwise. */\r\n public get uniform(): ColorDef | undefined {\r\n return this.isUniform ? this._color as ColorDef : undefined;\r\n }\r\n\r\n /** Set the specified color to be applied to all vertices. */\r\n public initUniform(color: ColorDef | number) {\r\n this._color = typeof color === \"number\" ? ColorDef.fromJSON(color) : color;\r\n }\r\n\r\n /** Returns the per-vertex colors, if [[isUniform]] is `false`; or `undefined` otherwise. */\r\n public get nonUniform(): NonUniformColor | undefined {\r\n return !this.isUniform ? this._color as NonUniformColor : undefined;\r\n }\r\n\r\n /** Set the per-vertex colors.\r\n * @param colors See [[NonUniformColor.colors]].\r\n * @param indices See [[NonUniformColor.indices]].\r\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\r\n */\r\n public initNonUniform(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\r\n this._color = new NonUniformColor(colors, indices, hasAlpha);\r\n }\r\n}\r\n\r\n/** Describes the type of a [[FeatureIndex]].\r\n * @public\r\n */\r\nexport enum FeatureIndexType {\r\n /** Indicates that the index contains no features. */\r\n Empty,\r\n /** Indicates that the index contains exactly one feature. */\r\n Uniform,\r\n /** Indicates that the index contains more than one feature. */\r\n NonUniform,\r\n}\r\n\r\n/** Describes the set of [[Feature]]s associated with a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\r\n * The mesh or polyline may have zero or one features; or, individual vertices may be associated with different features.\r\n * The features are expressed as unsigned 32-bit integer Ids of [[Feature]]s within a [[FeatureTable]].\r\n * @public\r\n */\r\nexport class FeatureIndex {\r\n /** Describes the quantity (zero, one, or more than one) of features in this index. */\r\n public type: FeatureIndexType = FeatureIndexType.Empty;\r\n\r\n /** If [[type]] is [[FeatureIndexType.Uniform]], the Id of the single feature. */\r\n public featureID: number = 0;\r\n /** If [[type]] is [[FeatureIndexType.NonUniform]], the per-vertex feature Ids, indexed by the mesh or polyline's vertex indices. */\r\n public featureIDs?: Uint32Array;\r\n\r\n /** True if [[type]] is [[FeatureIndexType.Uniform]]. */\r\n public get isUniform(): boolean { return FeatureIndexType.Uniform === this.type; }\r\n\r\n /** True if [[type]] is [[FeatureIndexType.Empty]]. */\r\n public get isEmpty(): boolean { return FeatureIndexType.Empty === this.type; }\r\n\r\n /** Reset to an empty index. */\r\n public reset(): void {\r\n this.type = FeatureIndexType.Empty;\r\n this.featureID = 0;\r\n this.featureIDs = undefined;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../src/FeatureSymbology.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAW,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,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------------\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 { assert, Id64, Id64String } from \"@itwin/core-bentley\";\nimport { BatchType, Feature } from \"./FeatureTable\";\nimport { ColorDef } from \"./ColorDef\";\nimport { GeometryClass } from \"./GeometryParams\";\nimport { LinePixels } from \"./LinePixels\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\nimport { SubCategoryOverride } from \"./SubCategoryOverride\";\n\nfunction copyIdSetToUint32Set(dst: Id64.Uint32Set, src: Iterable<string>): void {\n dst.clear();\n if (typeof src === \"string\") {\n dst.addId(src);\n } else {\n for (const id of src)\n dst.addId(id);\n }\n}\n\n// cspell:ignore subcat subcats\n\n/** JSON representation of a [[FeatureAppearance]].\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceProps {\n /** See [[FeatureAppearance.rgb]]. */\n rgb?: RgbColorProps;\n /** See [[FeatureAppearance.lineRgb]]. */\n lineRgb?: RgbColorProps | false;\n /** See [[FeatureAppearance.weight]]. */\n weight?: number;\n /** See [[FeatureAppearance.transparency]]. */\n transparency?: number;\n /** See [[FeatureAppearance.lineTransparency]]. */\n lineTransparency?: number | false;\n /** See [[FeatureAppearance.viewDependentTransparency]]. */\n viewDependentTransparency?: true;\n /** See [[FeatureAppearance.linePixels]]. */\n linePixels?: LinePixels;\n /** See [[FeatureAppearance.ignoresMaterial]]. */\n ignoresMaterial?: true;\n /** See [[FeatureAppearance.nonLocatable]]. */\n nonLocatable?: true;\n /** See [[FeatureAppearance.emphasized]]. */\n emphasized?: true;\n}\n\nfunction propsMatchDefaults(props: FeatureAppearanceProps): boolean {\n return !props.rgb && !props.lineRgb\n && undefined === props.weight && undefined === props.linePixels\n && undefined === props.transparency && undefined === props.lineTransparency\n && !props.ignoresMaterial && !props.nonLocatable && !props.emphasized;\n}\n\nfunction equalRgb(a: RgbColor | undefined, b: RgbColor | undefined): boolean {\n if (a === b) {\n return true;\n } else if (!a || !b) {\n return false;\n } else {\n return a.equals(b);\n }\n}\n\nfunction equalLineRgb(a: RgbColor | false | undefined, b: RgbColor | false | undefined): boolean {\n if (a === b) {\n return true;\n } else if (a instanceof RgbColor && b instanceof RgbColor) {\n return equalRgb(a, b);\n } else {\n return false;\n }\n}\n\nfunction equalTransparency(a: number | undefined, b: number | undefined): boolean {\n if (a === b) {\n return true;\n } else if (undefined === a || undefined === b) {\n return false;\n } else {\n return Math.floor(a * 0xff) === Math.floor(b * 0xff);\n }\n}\n\nfunction equalLineTransparency(a: number | false | undefined, b: number | false | undefined): boolean {\n if (a === b) {\n return true;\n } else if (typeof a === \"number\" && typeof b === \"number\") {\n return equalTransparency(a, b);\n } else {\n assert(a === undefined || a === false);\n assert(b === undefined || b === false);\n return false;\n }\n}\n\nfunction transparencyFromJSON(transp: number | undefined): number | undefined {\n if (undefined === transp) {\n return undefined;\n }\n\n transp = Math.max(0, Math.min(transp, 1));\n\n // Fix up rounding errors...\n const smallDelta = 0.0001;\n if (1.0 - transp < smallDelta) {\n transp = 1.0;\n } else if (transp < smallDelta) {\n transp = 0.0;\n }\n\n return transp;\n}\n\n/** Defines overrides for selected aspects of a [[Feature]]'s symbology.\n * Any member defined in the appearance overrides that aspect of symbology for all [[Feature]]s to which the appearance is applied.\n *\n * The [[rgb]] and [[transparency]] overrides, if defined, apply to all geometry by default.\n * However, the color and transparency of \"linear\" geometry can optionally be controlled independently from the rest of the geometry via [[lineRgb]] and [[lineTransparency]].\n * Linear geometry consists of any of the following:\n * - Curves and line strings;\n * - Points and point strings; and\n * - The outlines of planar regions.\n * The edges of 3d surfaces like spheres are not considered linear geometry.\n *\n * @see [[FeatureOverrides]] to customize the appearance of multiple features.\n * @public\n */\nexport class FeatureAppearance {\n /** Overrides the feature's color.\n * If [[lineRgb]] is `undefined`, this color also applies to linear geometry.\n */\n public readonly rgb?: RgbColor;\n /** If defined, overrides the color of linear geometry independently of [[rgb]].\n * If `false`, linear geometry draws using its normal color; otherwise, it uses the specified color.\n */\n public readonly lineRgb?: RgbColor | false;\n /** The width of lines and edges in pixels as an integer in [1, 31]. */\n public readonly weight?: number;\n /** The transparency in the range [0, 1] where 0 indicates fully opaque and 1 indicates fully transparent.\n * If [[lineTransparency]] is `undefined`, this transparency also applies to linear geometry.\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\n */\n public readonly transparency?: number;\n /** If defined, overrides the transparency of linear geometry independently of [[transparency]].\n * If `false`, linear geometry draws using its normal transparency; otherwise, it uses the specified transparency.\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\n */\n public readonly lineTransparency?: number | false;\n /** The pixel pattern applied to lines and edges. */\n public readonly linePixels?: LinePixels;\n /** If true, don't apply the [[RenderMaterial]] to the feature's surfaces. */\n public readonly ignoresMaterial?: true;\n /** If true, the feature will not be drawn when using [Viewport.readPixels]($frontend), meaning [Tool]($frontend)s will not be able to interact with it. */\n public readonly nonLocatable?: true;\n /** If true, the feature will be rendered using the [[Hilite.Settings]] defined by [Viewport.emphasisSettings]($frontend) to make it stand out. */\n public readonly emphasized?: true;\n /** If true, then [[transparency]] and/or [[lineTransparency]] will only be applied if [[ViewFlags.transparency]] is enabled and the current [[RenderMode]] supports transparency.\n * Default: false, meaning the transparency will be applied regardless of view flags or render mode.\n * This property has no effect if this appearance does not override transparency.\n */\n public readonly viewDependentTransparency?: true;\n\n /** An appearance that overrides nothing. */\n public static readonly defaults = new FeatureAppearance({});\n\n public static fromJSON(props?: FeatureAppearanceProps) {\n if (!props || propsMatchDefaults(props)) {\n return this.defaults;\n }\n\n return new FeatureAppearance(props);\n }\n\n /** Create a FeatureAppearance that overrides only the RGB color.\n * @note The transparency component of the ColorDef is ignored.\n */\n public static fromRgb(color: ColorDef): FeatureAppearance {\n return new FeatureAppearance({ rgb: RgbColor.fromColorDef(color) });\n }\n\n /** Create a FeatureAppearance that overrides the RGB and transparency.\n * The appearance's transparency is derived from the transparency component of the ColorDef.\n */\n public static fromRgba(color: ColorDef, viewDependentTransparency = false): FeatureAppearance {\n return new FeatureAppearance({\n rgb: RgbColor.fromColorDef(color),\n transparency: color.colors.t / 255,\n viewDependentTransparency: viewDependentTransparency ? true : undefined,\n });\n }\n /** Create a FeatureAppearance that overrides only the transparency */\n public static fromTransparency(transparencyValue: number, viewDependent = false): FeatureAppearance {\n return new FeatureAppearance({\n transparency: transparencyValue,\n viewDependentTransparency: viewDependent ? true : undefined,\n });\n }\n\n /** Create a FeatureAppearance with overrides corresponding to those defined by the supplied SubCategoryOverride.\n * @note Subcategory overrides set [[viewDependentTransparency]] to `true`.\n */\n public static fromSubCategoryOverride(ovr: SubCategoryOverride): FeatureAppearance {\n const rgb = undefined !== ovr.color ? RgbColor.fromColorDef(ovr.color) : undefined;\n const transparency = ovr.transparency;\n const weight = ovr.weight;\n const ignoresMaterial = undefined !== ovr.material && Id64.isValid(ovr.material) ? true : undefined;\n return this.fromJSON({ rgb, transparency, weight, ignoresMaterial, viewDependentTransparency: true });\n }\n\n /** Returns true if this appearance does not override any aspects of symbology. */\n public get matchesDefaults(): boolean {\n return this.equals(FeatureAppearance.defaults);\n }\n\n public get overridesRgb(): boolean { return undefined !== this.rgb; }\n public get overridesTransparency(): boolean { return undefined !== this.transparency; }\n public get overridesLinePixels(): boolean { return undefined !== this.linePixels; }\n public get overridesWeight(): boolean { return undefined !== this.weight; }\n\n /** Get the color that will be applied to linear geometry, or undefined if not overridden.\n * This is the same as [[rgb]] if [[lineRgb]] is `undefined`.\n */\n public getLineRgb(): RgbColor | undefined {\n return false !== this.lineRgb ? (this.lineRgb ?? this.rgb) : undefined;\n }\n\n /** Get the transparency that will be applied to linear geometry, or undefined if not overridden.\n * This is the same as [[transparency]] if [[lineTransparency]] is `undefined`.\n */\n public getLineTransparency(): number | undefined {\n return false !== this.lineTransparency ? (this.lineTransparency ?? this.transparency) : undefined;\n }\n\n public get overridesSymbology(): boolean {\n return this.overridesRgb || this.overridesTransparency || this.overridesWeight || this.overridesLinePixels || !!this.ignoresMaterial\n || this.emphasized || this.overridesNonLocatable\n || undefined !== this.getLineRgb() || undefined !== this.getLineTransparency();\n }\n\n public get overridesNonLocatable(): boolean { return undefined !== this.nonLocatable; }\n\n public get isFullyTransparent(): boolean {\n const surf = this.transparency ?? 0;\n const line = this.getLineTransparency() ?? 0;\n return surf >= 1 && line >= 1;\n }\n\n /** Returns true if any aspect of the appearance is overridden (i.e., if any member is not undefined). */\n public get anyOverridden(): boolean { return this.overridesSymbology || this.overridesNonLocatable; }\n\n public equals(other: FeatureAppearance): boolean {\n if (this === other)\n return true;\n\n return equalRgb(this.rgb, other.rgb)\n && this.weight === other.weight\n && equalTransparency(this.transparency, other.transparency)\n && this.linePixels === other.linePixels\n && this.ignoresMaterial === other.ignoresMaterial\n && this.nonLocatable === other.nonLocatable\n && this.emphasized === other.emphasized\n && this.viewDependentTransparency === other.viewDependentTransparency\n && equalLineTransparency(this.lineTransparency, other.lineTransparency)\n && equalLineRgb(this.lineRgb, other.lineRgb);\n }\n\n public toJSON(): FeatureAppearanceProps {\n const props: FeatureAppearanceProps = {};\n if (this.rgb)\n props.rgb = this.rgb.toJSON();\n\n if (undefined !== this.weight)\n props.weight = this.weight;\n\n if (undefined !== this.transparency) {\n props.transparency = this.transparency;\n if (this.viewDependentTransparency)\n props.viewDependentTransparency = true;\n }\n\n if (undefined !== this.linePixels)\n props.linePixels = this.linePixels;\n\n if (true === this.ignoresMaterial)\n props.ignoresMaterial = true;\n\n if (true === this.nonLocatable)\n props.nonLocatable = true;\n\n if (true === this.emphasized)\n props.emphasized = true;\n\n if (undefined !== this.lineTransparency)\n props.lineTransparency = this.lineTransparency;\n\n if (this.lineRgb) {\n props.lineRgb = this.lineRgb;\n if (this.viewDependentTransparency)\n props.viewDependentTransparency = true;\n }\n\n return props;\n }\n\n /** Convert this appearance to JSON, and override any properties explicitly specified by `changedProps` in the result.\n * Example:\n * ```ts\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\n * const clone = base.cloneProps({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\n * ```\n * @see [[FeatureAppearance.clone]].\n */\n public cloneProps(changedProps: FeatureAppearanceProps): FeatureAppearanceProps {\n return {\n ...this.toJSON(),\n ...changedProps,\n };\n }\n\n /** Create a copy of this appearance, overriding any properties explicitly specified by `changedProps`.\n * Example:\n * ```ts\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\n * const clone = base.clone({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\n * ```\n * @see [[FeatureAppearance.cloneProps]].\n */\n public clone(changedProps: FeatureAppearanceProps): FeatureAppearance {\n return FeatureAppearance.fromJSON(this.cloneProps(changedProps));\n }\n\n /** Produce a FeatureAppearance from the supplied appearance in which any aspect not defined by the base appearance is overridden by this appearance. */\n public extendAppearance(base: FeatureAppearance): FeatureAppearance {\n if (!this.overridesSymbology)\n return base;\n\n const props = base.toJSON();\n if (undefined === props.rgb)\n props.rgb = this.rgb;\n if (undefined === props.transparency)\n props.transparency = this.transparency;\n if (undefined === props.linePixels)\n props.linePixels = this.linePixels;\n if (undefined === props.weight)\n props.weight = this.weight;\n if (undefined === props.ignoresMaterial && this.ignoresMaterial)\n props.ignoresMaterial = true;\n if (undefined === props.nonLocatable && this.nonLocatable)\n props.nonLocatable = true;\n if (undefined === props.emphasized && this.emphasized)\n props.emphasized = true;\n if (!props.lineRgb)\n props.lineRgb = this.lineRgb;\n if (undefined === props.lineTransparency)\n props.lineTransparency = this.lineTransparency;\n\n if (this.viewDependentTransparency && (undefined !== props.transparency || undefined !== props.lineTransparency))\n props.viewDependentTransparency = true;\n\n return FeatureAppearance.fromJSON(props);\n }\n\n protected constructor(props: FeatureAppearanceProps) {\n this.rgb = undefined !== props.rgb ? RgbColor.fromJSON(props.rgb) : undefined;\n this.lineRgb = typeof props.lineRgb === \"object\" ? RgbColor.fromJSON(props.lineRgb) : (false === props.lineRgb ? false : undefined);\n\n this.transparency = transparencyFromJSON(props.transparency);\n this.lineTransparency = typeof props.lineTransparency === \"number\" ? transparencyFromJSON(props.lineTransparency) : (false === props.lineTransparency ? false : undefined);\n\n this.weight = props.weight;\n this.linePixels = props.linePixels;\n\n this.ignoresMaterial = props.ignoresMaterial;\n this.nonLocatable = props.nonLocatable;\n this.emphasized = props.emphasized;\n\n if (undefined !== this.weight) {\n this.weight = Math.max(1, Math.min(this.weight, 32));\n }\n\n if (props.viewDependentTransparency && (undefined !== this.transparency || undefined !== this.getLineTransparency())) {\n this.viewDependentTransparency = true;\n }\n }\n}\n\n/** Interface adopted by an object that can supply a [[FeatureAppearance]] given a low-level description of a [[Feature]].\n * @see [[FeatureOverrides]] for the commonly-used implementation.\n * @see [[FeatureAppearanceProvider]] to supplement the appearance supplied by this interface.\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceSource {\n /** Supplies the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\n * The feature is described by its components for efficiency reasons.\n * @param elemLo The lower 32 bits of the feature's element Id.\n * @param elemHi The upper 32 bits of the feature's element Id.\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\n * @param geomClass The geometry class of the feature.\n * @param modelLo The lower 32 bits of the feature's model Id.\n * @param modelHi The upper 32 bits of the feature's model Id.\n * @param type The type of batch to which the feature belongs.\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\n */\n getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\n}\n\n/** Common options for [[FeatureOverrides.override]].\n * @public\n */\nexport interface OverrideFeatureAppearanceOptions {\n /** Specifies the aspects of the [[Feature]]'s appearance to be overridden. */\n appearance: FeatureAppearance;\n /** Specifies what to do if a [[FeatureAppearance]] has already been configured for the specified element, model, or subcategory by a previous call to [[FeatureOverrides.override]].\n * - \"subsume\" (the default): Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by the existing appearance will be overwritten\n * if also overridden by [[appearance]].\n * - The resulting appearance is computed as `existingAppearance.extendAppearance(newAppearance)`.\n * - \"extend\": Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by [[appearance]] will only\n * apply if that aspect is not already overridden by a previous appearance.\n * - The resulting appearance is computed as `newAppearance.extendAppearance(existingAppearance)`.\n * - \"replace\": Completely replace the existing appearance with [[appearance]].\n * - \"skip\": Keep the existing appearance.\n */\n onConflict?: \"extend\" | \"subsume\" | \"replace\" | \"skip\";\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricModel]($backend).\n * @public\n */\nexport interface OverrideModelAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the model whose appearance is to be overridden. */\n modelId: Id64String;\n elementId?: never;\n subCategoryId?: never;\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricElement]($backend).\n * @public\n */\nexport interface OverrideElementAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the element whose appearance is to be overridden. */\n elementId: Id64String;\n modelId?: never;\n subCategoryId?: never;\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [SubCategory]($backend).\n * @public\n */\nexport interface OverrideSubCategoryAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the subcategory whose appearance is to be overridden. */\n subCategoryId: Id64String;\n modelId?: never;\n elementId?: never;\n}\n\n/** Arguments supplied to [[FeatureOverrides.override]].\n * @public\n */\nexport type OverrideFeatureAppearanceArgs = OverrideElementAppearanceOptions | OverrideModelAppearanceOptions | OverrideSubCategoryAppearanceOptions;\n\n/** Arguments provided to a function of type [[IgnoreAnimationOverrides]].\n * @see [[FeatureOverrides.ignoreAnimationOverrides]] to register such a function.\n * @public\n */\nexport interface IgnoreAnimationOverridesArgs {\n /** The Id of the element under consideration.\n * @see [Id64.fromUint32Pair]($bentley) to convert a Uint32Pair into an [Id64String]($bentley), if needed.\n */\n readonly elementId: Readonly<Id64.Uint32Pair>;\n /** The [[RenderSchedule.ElementTimeline.batchId]] identifying the [[RenderSchedule.ElementTimeline]] to which the element under consideration belongs. */\n readonly animationNodeId: number;\n}\n\n/** A function that can be supplied to [[FeatureOverrides.ignoreAnimationOverrides]] to indicate whether the color or transparency overrides defined\n * by the view's [[RenderSchedule.Script]] should be ignored. The arguments describe the element under consideration. The function should return true if that\n * element should not have its color or transparency modified by the schedule script.\n * @public\n */\nexport type IgnoreAnimationOverrides = (args: IgnoreAnimationOverridesArgs) => boolean;\n\nconst scratchIgnoreAnimationOverridesArgs = {\n elementId: { lower: 0, upper: 0 },\n animationNodeId: 0,\n};\n\n/** Specifies how to customize the appearance of individual [[Feature]]s, typically within the context of a [Viewport]($frontend).\n * Individual aspects of a feature's appearance - like visibility, color, and transparency - are overridden by supplying a [[FeatureAppearance]].\n * Those overrides can be specified on the basis of the feature's model, element, and/or subcategory. A default set of overrides can also be specified to\n * apply to the appearance of any feature not otherwise overridden.\n *\n * It is possible to override multiple aspects of a feature on different bases. For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red,\n * and that all features belonging to model \"B\" should be drawn 50% transparent. In this case, a feature belonging to both subcategory \"A\" and model \"B\" will be drawn as 50% transparent red -\n * the separate overrides are combined to produce the feature's overall appearance.\n *\n * In the case of conflicts, there is an order of precedence:\n * - Model overrides take highest precedence.\n * - Element overrides are of higher precedence than subcategory and animation overrides.\n * - Overrides applied by a [[RenderSchedule.Script]]'s [[RenderSchedule.ElementTimeline]] are of higher precedence than subcategory overrides, but can be suppressed on a per-element basis via [[ignoreAnimationOverrides]].\n * - Subcategory overrides have lowest precedence.\n *\n * For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red, and all those belonging to model \"B\" should be drawn in green.\n * Then a feature belonging to subcategory \"A\" and model \"B\" will be drawn in green, because the model overrides take precedence.\n *\n * Instances of this class are not typically instantiated by an application directly; instead, an application can implement a [FeatureOverrideProvider]($frontend)\n * that augments the overrides supplied by a viewport.\n *\n * @see [FeatureSymbology.Overrides]($frontend) to create overrides specific to a [Viewport]($frontend) or [ViewState]($frontend).\n * @see [FeatureOverrideProvider]($frontend) to customize the appearance of features within a [Viewport]($frontend).\n * @public\n */\nexport class FeatureOverrides implements FeatureAppearanceSource {\n /** @internal */\n private readonly _ignoreAnimationOverrides: IgnoreAnimationOverrides[] = [];\n /** Ids of elements that should never be drawn. This takes precedence over [[alwaysDrawn]]. @internal */\n private readonly _neverDrawn = new Id64.Uint32Set();\n /** Ids of elements that should always be drawn. [[neverDrawn]] takes precedence over this set. @internal */\n private readonly _alwaysDrawn = new Id64.Uint32Set();\n /** If true, no elements *except* those defined in the \"always drawn\" set will be drawn.\n * @see [[setAlwaysDrawn]]\n */\n public isAlwaysDrawnExclusive = false;\n /** If true, the always-drawn elements are drawn even if their subcategories are not visible.\n * @see [[setAlwaysDrawn]]\n */\n public alwaysDrawnIgnoresSubCategory = true;\n /** If true, all subcategories are considered visible. This is used for drawing sheets via section callouts in the absence of an actual sheet view.\n */\n public ignoreSubCategory = false;\n\n /** Overrides applied to any feature not explicitly overridden. @internal */\n private _defaultOverrides = FeatureAppearance.defaults;\n /** Whether construction geometry should be drawn. */\n protected _constructions = false;\n /** Whether dimensions should be drawn. */\n protected _dimensions = false;\n /** Whether area patterns should be drawn. */\n protected _patterns = false;\n /** Whether line weights should be applied. If false, all lines are rendered 1-pixel wide. */\n protected _lineWeights = true;\n\n /** Overrides applied to all elements belonging to each model. @internal */\n private readonly _modelOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** Overrides applied to specific elements. */\n protected readonly _elementOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** Overrides applied to geometry belonging to each subcategory. */\n protected readonly _subCategoryOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** The set of displayed subcategories. Geometry belonging to subcategories not included in this set will not be drawn. */\n protected readonly _visibleSubCategories = new Id64.Uint32Set();\n /** Display priorities assigned to subcategories, possibly overridden by display style. Only applicable for plan projection models. */\n protected readonly _subCategoryPriorities = new Id64.Uint32Map<number>();\n\n /** Per-model, a set of subcategories whose visibility should be inverted for elements within that model.\n * Populated by Viewport.\n */\n protected readonly _modelSubCategoryOverrides = new Id64.Uint32Map<Id64.Uint32Set>();\n\n /** Ids of animation nodes that should never be drawn. */\n public readonly neverDrawnAnimationNodes = new Set<number>();\n /** Mapping of animation node Ids to overrides applied to the corresponding animation nodes.\n * @internal\n */\n public readonly animationNodeOverrides = new Map<number, FeatureAppearance>();\n\n /** Accepts a criterion that determines whether color and transparency overrides originating from the view's [[RenderSchedule.Script]] should be ignored for a given element.\n * The function receives a description of the element in question and returns `true` if the script's overrides should be ignored.\n * Any number of such functions can be registered; if any one of them returns `true`, the script's overrides are not applied to the specified element.\n *\n * For example, applications commonly emphasize a set of elements by applying a [[FeatureAppearance.emphasized]] override to them, and specifying a highly-transparent\n * default appearance to de-emphasize the rest of the elements in the view. If some of the de-emphasized elements' appearances are also being overridden by the schedule script, then\n * they won't appear de-emphasized, making it difficult for the emphasized elements to stand out. In situations like this, [FeatureOverrideProvider]($frontend)s like [EmphasizeElements]($frontend) can register an [[IgnoreAnimationOverrides]] function that returns true if the element in question is not in the set of emphasized elements.\n */\n public ignoreAnimationOverrides(ignore: IgnoreAnimationOverrides): void {\n this._ignoreAnimationOverrides.push(ignore);\n }\n\n /** Overrides applied to features for which no other overrides are defined */\n public get defaultOverrides(): FeatureAppearance { return this._defaultOverrides; }\n /** Whether or not line weights are applied. If false, all lines are drawn with a weight of 1. */\n public get lineWeights(): boolean { return this._lineWeights; }\n\n /** A set of elements that are always invisible.\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\n */\n public get neverDrawn() { return this._neverDrawn; }\n /** A set of elements that are unconditionally displayed.\n * @see [[isAlwaysDrawnExclusive]] to specify that *only* elements in this set will be displayed.\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\n */\n public get alwaysDrawn() { return this._alwaysDrawn; }\n\n private isNeverDrawn(elemIdLo: number, elemIdHi: number, animationNodeId: number): boolean {\n if (this._neverDrawn.has(elemIdLo, elemIdHi))\n return true;\n else\n return this.neverDrawnAnimationNodes.has(animationNodeId);\n }\n\n private isAlwaysDrawn(idLo: number, idHi: number): boolean { return this._alwaysDrawn.has(idLo, idHi); }\n\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories. */\n public isSubCategoryVisible(idLo: number, idHi: number): boolean { return this._visibleSubCategories.has(idLo, idHi); }\n\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories in the context of the specified model. */\n public isSubCategoryVisibleInModel(subcatLo: number, subcatHi: number, modelLo: number, modelHi: number): boolean {\n if (this.ignoreSubCategory)\n return true;\n\n let vis = this.isSubCategoryVisible(subcatLo, subcatHi);\n const modelOvr = this._modelSubCategoryOverrides.get(modelLo, modelHi);\n if (undefined !== modelOvr && modelOvr.has(subcatLo, subcatHi))\n vis = !vis;\n\n return vis;\n }\n\n private getModelOverrides(idLo: number, idHi: number): FeatureAppearance | undefined {\n return this._modelOverrides.get(idLo, idHi);\n }\n\n private getElementAnimationOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\n if (this.animationNodeOverrides.size === 0)\n return undefined;\n\n // NB: An animation node Id of zero means \"not animated\". Some providers like EmphasizeElements may provide an appearance override for unanimated nodes.\n // That should be preserved.\n const app = this.animationNodeOverrides.get(animationNodeId);\n if (!app || 0 === animationNodeId || this._ignoreAnimationOverrides.length === 0)\n return app;\n\n const args = scratchIgnoreAnimationOverridesArgs;\n args.elementId.lower = idLo;\n args.elementId.upper = idHi;\n args.animationNodeId = animationNodeId;\n return this._ignoreAnimationOverrides.some((ignore) => ignore(args)) ? undefined : app;\n }\n\n private getElementOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\n const elemApp = this._elementOverrides.get(idLo, idHi);\n const nodeApp = this.getElementAnimationOverrides(idLo, idHi, animationNodeId);\n if (elemApp)\n return nodeApp ? nodeApp.extendAppearance(elemApp) : elemApp;\n\n return nodeApp;\n }\n\n private getSubCategoryOverrides(idLo: number, idHi: number): FeatureAppearance | undefined { return this._subCategoryOverrides.get(idLo, idHi); }\n\n /** Add a [SubCategory]($backend) to the set of visible subcategories. */\n public setVisibleSubCategory(id: Id64String): void { this._visibleSubCategories.addId(id); }\n /** Specify the Id of an element that should never be drawn. */\n public setNeverDrawn(id: Id64String): void { this._neverDrawn.addId(id); }\n /** Specify the Id of an element that should always be drawn. */\n public setAlwaysDrawn(id: Id64String): void { this._alwaysDrawn.addId(id); }\n /** Specify the Id of a animation node that should never be drawn. */\n public setAnimationNodeNeverDrawn(id: number): void { this.neverDrawnAnimationNodes.add(id); }\n /** Specify the Ids of elements that should never be drawn. */\n public setNeverDrawnSet(ids: Iterable<Id64String>) { copyIdSetToUint32Set(this._neverDrawn, ids); }\n /** Specify the Ids of elements that should always be drawn. */\n public setAlwaysDrawnSet(ids: Iterable<Id64String>, exclusive: boolean, ignoreSubCategory = true) {\n copyIdSetToUint32Set(this._alwaysDrawn, ids);\n this.isAlwaysDrawnExclusive = exclusive;\n this.alwaysDrawnIgnoresSubCategory = ignoreSubCategory;\n }\n\n /** Returns the feature's appearance overrides, or undefined if the feature is not visible. */\n public getFeatureAppearance(feature: Feature, modelId: Id64String, type: BatchType = BatchType.Primary, animationNodeId = 0): FeatureAppearance | undefined {\n return this.getAppearance(\n Id64.getLowerUint32(feature.elementId), Id64.getUpperUint32(feature.elementId),\n Id64.getLowerUint32(feature.subCategoryId), Id64.getUpperUint32(feature.subCategoryId),\n feature.geometryClass,\n Id64.getLowerUint32(modelId), Id64.getUpperUint32(modelId),\n type, animationNodeId);\n }\n\n private static readonly _weight1Appearance = FeatureAppearance.fromJSON({ weight: 1 });\n\n /** Returns a feature's appearance overrides, or undefined if the feature is not visible.\n * Takes Id64s as pairs of unsigned 32-bit integers for efficiency, because that is how they are stored by the PackedFeatureTable associated with each batch of graphics.\n * @see [[getFeatureAppearance]] for an equivalent function that accepts [Id64String]($core-bentley)s instead of integer pairs.\n */\n public getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined {\n if (BatchType.VolumeClassifier === type || BatchType.PlanarClassifier === type)\n return this.getClassifierAppearance(elemLo, elemHi, subcatLo, subcatHi, modelLo, modelHi, animationNodeId);\n\n let app = !this._lineWeights ? FeatureOverrides._weight1Appearance : FeatureAppearance.defaults;\n const modelApp = this.getModelOverrides(modelLo, modelHi);\n if (undefined !== modelApp)\n app = modelApp.extendAppearance(app);\n\n // Is the element visible?\n let elemApp, alwaysDrawn = false;\n\n if (Id64.isValidUint32Pair(elemLo, elemHi)) {\n if (this.isNeverDrawn(elemLo, elemHi, animationNodeId))\n return undefined;\n\n alwaysDrawn = this.isAlwaysDrawn(elemLo, elemHi);\n if (!alwaysDrawn && this.isAlwaysDrawnExclusive)\n return undefined;\n\n // Element overrides take precedence\n elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\n if (undefined !== elemApp)\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\n }\n\n let subCatApp;\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\n if ((!alwaysDrawn || !this.alwaysDrawnIgnoresSubCategory) && !this.isSubCategoryVisibleInModel(subcatLo, subcatHi, modelLo, modelHi))\n return undefined;\n\n subCatApp = this.getSubCategoryOverrides(subcatLo, subcatHi);\n if (undefined !== subCatApp)\n app = subCatApp.extendAppearance(app);\n }\n\n // Only apply default if *no* appearance was explicitly registered (doesn't matter if registered appearance does not actually override anything)\n if (undefined === elemApp && undefined === modelApp && undefined === subCatApp)\n app = this._defaultOverrides.extendAppearance(app);\n\n let visible = alwaysDrawn || this.isClassVisible(geomClass);\n if (visible && app.isFullyTransparent)\n visible = false; // don't bother rendering something with full transparency...\n\n return visible ? app : undefined;\n }\n\n /** Classifiers behave totally differently...in particular they are never invisible unless fully-transparent. */\n private getClassifierAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, modelLo: number, modelHi: number, animationNodeId: number): FeatureAppearance | undefined {\n let app = FeatureAppearance.defaults;\n const modelApp = this.getModelOverrides(modelLo, modelHi);\n if (undefined !== modelApp)\n app = modelApp.extendAppearance(app);\n\n const elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\n if (undefined !== elemApp)\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\n\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\n const subCat = this.getSubCategoryOverrides(subcatLo, subcatHi);\n if (undefined !== subCat)\n app = subCat.extendAppearance(app);\n }\n\n if (undefined === elemApp && undefined === modelApp)\n app = this._defaultOverrides.extendAppearance(app);\n\n // NB: A fully-transparent classifier means the classifier is a clip mask - classified pixels will be discarded.\n return app;\n }\n\n /** Return whether geometry of the specified class should be drawn.\n * @see [[ViewFlags.constructions]], [[ViewFlags.dimensions]], and [[ViewFlags.patterns]].\n */\n public isClassVisible(geomClass: GeometryClass): boolean {\n switch (geomClass) {\n case GeometryClass.Construction: return this._constructions;\n case GeometryClass.Dimension: return this._dimensions;\n case GeometryClass.Pattern: return this._patterns;\n default: return true;\n }\n }\n\n /** Specify overrides for all elements belonging to a specified [GeometricModel]($backend), or all geometry belonging to a specified [GeometricElement]($backend) or [SubCategory]($backend). */\n public override(args: OverrideFeatureAppearanceArgs): void {\n let id: Id64String;\n let map: Id64.Uint32Map<FeatureAppearance>;\n if (undefined !== args.elementId) {\n id = args.elementId;\n map = this._elementOverrides;\n } else if (undefined !== args.modelId) {\n id = args.modelId;\n map = this._modelOverrides;\n } else {\n id = args.subCategoryId;\n map = this._subCategoryOverrides;\n }\n\n let app = args.appearance;\n const idLo = Id64.getLowerUint32(id);\n const idHi = Id64.getUpperUint32(id);\n\n if (undefined !== args.elementId && this.isNeverDrawn(idLo, idHi, 0))\n return;\n\n const replace = \"replace\" === args.onConflict;\n const existing = replace ? undefined : map.get(idLo, idHi);\n if (existing) {\n assert(\"replace\" !== args.onConflict);\n switch (args.onConflict) {\n case \"skip\":\n return;\n case \"extend\":\n app = app.extendAppearance(existing);\n break;\n default:\n app = existing.extendAppearance(app);\n break;\n }\n }\n\n map.set(idLo, idHi, app);\n }\n\n /** Specify overrides for all geometry originating from the specified animation node.\n * @param id The Id of the animation node.\n * @param app The symbology overrides.\n * @note These overrides do not take precedence over element overrides.\n */\n public overrideAnimationNode(id: number, app: FeatureAppearance): void {\n this.animationNodeOverrides.set(id, app);\n }\n\n /** Defines a default appearance to be applied to any [[Feature]] *not* explicitly overridden.\n * @param appearance The symbology overrides.\n * @param replaceExisting Specifies whether to replace the current default overrides if they are already defined.\n */\n public setDefaultOverrides(appearance: FeatureAppearance, replaceExisting: boolean = true): void {\n if (replaceExisting || !appearance.overridesSymbology)\n this._defaultOverrides = appearance;\n }\n\n /** Get the display priority of a subcategory. This is only relevant when using [[PlanProjectionSettings]]. */\n public getSubCategoryPriority(idLo: number, idHi: number): number {\n return this._subCategoryPriorities.get(idLo, idHi) ?? 0;\n }\n\n /** Adds all fully transparent elements to the _neverDrawn set. This is used for BatchedModels planar masks. */\n public addInvisibleElementOverridesToNeverDrawn(): void {\n this._elementOverrides.forEach((lo, hi) => {\n const app = this.getElementOverrides(lo, hi, 0);\n if (app?.isFullyTransparent)\n this._neverDrawn.add(lo, hi);\n });\n }\n\n /** Construct a new Overrides that overrides nothing.\n * @see [FeatureSymbology.Overrides]($frontend) to construct overrides based on a [ViewState]($frontend) or [Viewport]($frontend).\n */\n public constructor() {\n //\n }\n\n /** Returns true if geometry belonging to the specified subcategory will be drawn. */\n public isSubCategoryIdVisible(id: Id64String): boolean { return this.isSubCategoryVisible(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n /** Returns the overrides applied to geometry belonging to the specified model, if any such are defined. */\n public getModelOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getModelOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n /** Returns the overrides applied to geometry belonging to the specified element, if any such are defined. */\n public getElementOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getElementOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id), 0); }\n /** Returns the overrides applied to geometry belonging to the specified subcategory, if any such are defined. */\n public getSubCategoryOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getSubCategoryOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n\n /** Returns true if the specified Feature will be drawn. */\n public isFeatureVisible(feature: Feature): boolean {\n const { elementId, subCategoryId, geometryClass } = feature;\n const isValidElemId = !Id64.isInvalid(elementId);\n const elemIdParts = isValidElemId ? Id64.getUint32Pair(elementId) : undefined;\n\n if (undefined !== elemIdParts && this.isNeverDrawn(elemIdParts.lower, elemIdParts.upper, 0))\n return false;\n\n const alwaysDrawn = undefined !== elemIdParts && this.isAlwaysDrawn(elemIdParts.lower, elemIdParts.upper);\n if (alwaysDrawn || this.isAlwaysDrawnExclusive)\n return alwaysDrawn;\n\n // NB: This ignores per-model subcategory visibility overrides, because caller did not specify a model.\n if (!this.isSubCategoryIdVisible(subCategoryId))\n return false;\n\n return this.isClassVisible(geometryClass);\n }\n}\n\n/** Interface adopted by an object that can supply the [[FeatureAppearance]] supplied by a [[FeatureAppearanceSource]].\n * This is useful for selectively overriding or agumenting a [Viewport]($frontend)'s symbology overrides.\n * A typical implementation will invoke [[FeatureAppearanceSource.getAppearance]] and customize the returned appearance.\n * @see [[FeatureAppearanceProvider.chain]] to chain two providers together.\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceProvider {\n /** Supply the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\n * The feature is described by its components for efficiency reasons.\n * @param source The base symbology overrides, e.g., typically defined by a [Viewport]($frontend).\n * @param elemLo The lower 32 bits of the feature's element Id.\n * @param elemHi The upper 32 bits of the feature's element Id.\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\n * @param geomClass The geometry class of the feature.\n * @param modelLo The lower 32 bits of the feature's model Id.\n * @param modelHi The upper 32 bits of the feature's model Id.\n * @param type The type of batch to which the feature belongs.\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\n * @see [[FeatureAppearanceSource.getAppearance]] to forward the request to the source.\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\n */\n getFeatureAppearance(source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\n}\n\n/** @public */\nexport namespace FeatureAppearanceProvider {\n /** Produce a FeatureAppearanceSource for which `getAppearance()` returns the appearance specified in `source`, potentially modified by `provider`. */\n function wrap(source: FeatureAppearanceSource, provider: FeatureAppearanceProvider): FeatureAppearanceSource {\n return {\n getAppearance: (elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n return provider.getFeatureAppearance(source, elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n },\n };\n }\n\n /** Create a provider that obtains each feature's appearance from the source, and if the feature is visible, modifies the appearance.\n * @param supplementAppearance A function accepting the feature's base appearance and returning a supplemental appearance.\n * @public\n */\n export function supplement(supplementAppearance: (appearance: FeatureAppearance) => FeatureAppearance): FeatureAppearanceProvider {\n return {\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n const app = source.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n return app ? supplementAppearance(app) : app;\n },\n };\n }\n\n /** Chain two FeatureAppearanceProviders together such that `first`'s `getFeatureAppearance` function is applied before `second`'s.\n * If `second` invokes `source.getAppearance()`, the returned appearance will include any modifications applied by `first`.\n * @public\n */\n export function chain(first: FeatureAppearanceProvider, second: FeatureAppearanceProvider): FeatureAppearanceProvider {\n if (first === second)\n return first;\n\n return {\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n return second.getFeatureAppearance(wrap(source, first), elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n },\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../src/FeatureSymbology.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAW,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAGrD,SAAS,oBAAoB,CAAC,GAAmB,EAAE,GAAqB;IACtE,GAAG,CAAC,KAAK,EAAE,CAAC;IACZ,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;SAAM,CAAC;QACN,KAAK,MAA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AAE,eAAuB,EAAE,EAAE;gBAClO,MAAM,GAAG,GAAG,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;gBACzH,OAAO,GAAG,CAAC,CAAC,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YAC/C,CAAC;SACF,CAAC;IACJ,CAAC;IAPe,oCAAU,aAOzB,CAAA;IAED;;;OAGG;IACH,SAAgB,KAAK,CAAC,KAAgC,EAAE,MAAiC;QACvF,IAAI,KAAK,KAAK,MAAM;YAClB,OAAO,KAAK,CAAC;QAEf,OAAO;YACL,oBAAoB,EAAE,CAAC,MAA+B,EAAE,MAAc,EAAE,MAAc,EAAE,QAAgB,EAAE,QAAgB,EAAE,SAAwB,EAAE,OAAe,EAAE,OAAe,EAAE,IAAe,EAAE,eAAuB,EAAE,EAAE;gBAClO,OAAO,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;YAClJ,CAAC;SACF,CAAC;IACJ,CAAC;IATe,+BAAK,QASpB,CAAA;AACH,CAAC,EArCgB,yBAAyB,KAAzB,yBAAyB,QAqCzC","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 { assert, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { BatchType, Feature } from \"./FeatureTable\";\r\nimport { ColorDef } from \"./ColorDef\";\r\nimport { GeometryClass } from \"./GeometryParams\";\r\nimport { LinePixels } from \"./LinePixels\";\r\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\r\nimport { SubCategoryOverride } from \"./SubCategoryOverride\";\r\n\r\nfunction copyIdSetToUint32Set(dst: Id64.Uint32Set, src: Iterable<string>): void {\r\n dst.clear();\r\n if (typeof src === \"string\") {\r\n dst.addId(src);\r\n } else {\r\n for (const id of src)\r\n dst.addId(id);\r\n }\r\n}\r\n\r\n// cspell:ignore subcat subcats\r\n\r\n/** JSON representation of a [[FeatureAppearance]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FeatureAppearanceProps {\r\n /** See [[FeatureAppearance.rgb]]. */\r\n rgb?: RgbColorProps;\r\n /** See [[FeatureAppearance.lineRgb]]. */\r\n lineRgb?: RgbColorProps | false;\r\n /** See [[FeatureAppearance.weight]]. */\r\n weight?: number;\r\n /** See [[FeatureAppearance.transparency]]. */\r\n transparency?: number;\r\n /** See [[FeatureAppearance.lineTransparency]]. */\r\n lineTransparency?: number | false;\r\n /** See [[FeatureAppearance.viewDependentTransparency]]. */\r\n viewDependentTransparency?: true;\r\n /** See [[FeatureAppearance.linePixels]]. */\r\n linePixels?: LinePixels;\r\n /** See [[FeatureAppearance.ignoresMaterial]]. */\r\n ignoresMaterial?: true;\r\n /** See [[FeatureAppearance.nonLocatable]]. */\r\n nonLocatable?: true;\r\n /** See [[FeatureAppearance.emphasized]]. */\r\n emphasized?: true;\r\n}\r\n\r\nfunction propsMatchDefaults(props: FeatureAppearanceProps): boolean {\r\n return !props.rgb && !props.lineRgb\r\n && undefined === props.weight && undefined === props.linePixels\r\n && undefined === props.transparency && undefined === props.lineTransparency\r\n && !props.ignoresMaterial && !props.nonLocatable && !props.emphasized;\r\n}\r\n\r\nfunction equalRgb(a: RgbColor | undefined, b: RgbColor | undefined): boolean {\r\n if (a === b) {\r\n return true;\r\n } else if (!a || !b) {\r\n return false;\r\n } else {\r\n return a.equals(b);\r\n }\r\n}\r\n\r\nfunction equalLineRgb(a: RgbColor | false | undefined, b: RgbColor | false | undefined): boolean {\r\n if (a === b) {\r\n return true;\r\n } else if (a instanceof RgbColor && b instanceof RgbColor) {\r\n return equalRgb(a, b);\r\n } else {\r\n return false;\r\n }\r\n}\r\n\r\nfunction equalTransparency(a: number | undefined, b: number | undefined): boolean {\r\n if (a === b) {\r\n return true;\r\n } else if (undefined === a || undefined === b) {\r\n return false;\r\n } else {\r\n return Math.floor(a * 0xff) === Math.floor(b * 0xff);\r\n }\r\n}\r\n\r\nfunction equalLineTransparency(a: number | false | undefined, b: number | false | undefined): boolean {\r\n if (a === b) {\r\n return true;\r\n } else if (typeof a === \"number\" && typeof b === \"number\") {\r\n return equalTransparency(a, b);\r\n } else {\r\n assert(a === undefined || a === false);\r\n assert(b === undefined || b === false);\r\n return false;\r\n }\r\n}\r\n\r\nfunction transparencyFromJSON(transp: number | undefined): number | undefined {\r\n if (undefined === transp) {\r\n return undefined;\r\n }\r\n\r\n transp = Math.max(0, Math.min(transp, 1));\r\n\r\n // Fix up rounding errors...\r\n const smallDelta = 0.0001;\r\n if (1.0 - transp < smallDelta) {\r\n transp = 1.0;\r\n } else if (transp < smallDelta) {\r\n transp = 0.0;\r\n }\r\n\r\n return transp;\r\n}\r\n\r\n/** Defines overrides for selected aspects of a [[Feature]]'s symbology.\r\n * Any member defined in the appearance overrides that aspect of symbology for all [[Feature]]s to which the appearance is applied.\r\n *\r\n * The [[rgb]] and [[transparency]] overrides, if defined, apply to all geometry by default.\r\n * However, the color and transparency of \"linear\" geometry can optionally be controlled independently from the rest of the geometry via [[lineRgb]] and [[lineTransparency]].\r\n * Linear geometry consists of any of the following:\r\n * - Curves and line strings;\r\n * - Points and point strings; and\r\n * - The outlines of planar regions.\r\n * The edges of 3d surfaces like spheres are not considered linear geometry.\r\n *\r\n * @see [[FeatureOverrides]] to customize the appearance of multiple features.\r\n * @public\r\n */\r\nexport class FeatureAppearance {\r\n /** Overrides the feature's color.\r\n * If [[lineRgb]] is `undefined`, this color also applies to linear geometry.\r\n */\r\n public readonly rgb?: RgbColor;\r\n /** If defined, overrides the color of linear geometry independently of [[rgb]].\r\n * If `false`, linear geometry draws using its normal color; otherwise, it uses the specified color.\r\n */\r\n public readonly lineRgb?: RgbColor | false;\r\n /** The width of lines and edges in pixels as an integer in [1, 31]. */\r\n public readonly weight?: number;\r\n /** The transparency in the range [0, 1] where 0 indicates fully opaque and 1 indicates fully transparent.\r\n * If [[lineTransparency]] is `undefined`, this transparency also applies to linear geometry.\r\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\r\n */\r\n public readonly transparency?: number;\r\n /** If defined, overrides the transparency of linear geometry independently of [[transparency]].\r\n * If `false`, linear geometry draws using its normal transparency; otherwise, it uses the specified transparency.\r\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\r\n */\r\n public readonly lineTransparency?: number | false;\r\n /** The pixel pattern applied to lines and edges. */\r\n public readonly linePixels?: LinePixels;\r\n /** If true, don't apply the [[RenderMaterial]] to the feature's surfaces. */\r\n public readonly ignoresMaterial?: true;\r\n /** If true, the feature will not be drawn when using [Viewport.readPixels]($frontend), meaning [Tool]($frontend)s will not be able to interact with it. */\r\n public readonly nonLocatable?: true;\r\n /** If true, the feature will be rendered using the [[Hilite.Settings]] defined by [Viewport.emphasisSettings]($frontend) to make it stand out. */\r\n public readonly emphasized?: true;\r\n /** If true, then [[transparency]] and/or [[lineTransparency]] will only be applied if [[ViewFlags.transparency]] is enabled and the current [[RenderMode]] supports transparency.\r\n * Default: false, meaning the transparency will be applied regardless of view flags or render mode.\r\n * This property has no effect if this appearance does not override transparency.\r\n */\r\n public readonly viewDependentTransparency?: true;\r\n\r\n /** An appearance that overrides nothing. */\r\n public static readonly defaults = new FeatureAppearance({});\r\n\r\n public static fromJSON(props?: FeatureAppearanceProps) {\r\n if (!props || propsMatchDefaults(props)) {\r\n return this.defaults;\r\n }\r\n\r\n return new FeatureAppearance(props);\r\n }\r\n\r\n /** Create a FeatureAppearance that overrides only the RGB color.\r\n * @note The transparency component of the ColorDef is ignored.\r\n */\r\n public static fromRgb(color: ColorDef): FeatureAppearance {\r\n return new FeatureAppearance({ rgb: RgbColor.fromColorDef(color) });\r\n }\r\n\r\n /** Create a FeatureAppearance that overrides the RGB and transparency.\r\n * The appearance's transparency is derived from the transparency component of the ColorDef.\r\n */\r\n public static fromRgba(color: ColorDef, viewDependentTransparency = false): FeatureAppearance {\r\n return new FeatureAppearance({\r\n rgb: RgbColor.fromColorDef(color),\r\n transparency: color.colors.t / 255,\r\n viewDependentTransparency: viewDependentTransparency ? true : undefined,\r\n });\r\n }\r\n /** Create a FeatureAppearance that overrides only the transparency */\r\n public static fromTransparency(transparencyValue: number, viewDependent = false): FeatureAppearance {\r\n return new FeatureAppearance({\r\n transparency: transparencyValue,\r\n viewDependentTransparency: viewDependent ? true : undefined,\r\n });\r\n }\r\n\r\n /** Create a FeatureAppearance with overrides corresponding to those defined by the supplied SubCategoryOverride.\r\n * @note Subcategory overrides set [[viewDependentTransparency]] to `true`.\r\n */\r\n public static fromSubCategoryOverride(ovr: SubCategoryOverride): FeatureAppearance {\r\n const rgb = undefined !== ovr.color ? RgbColor.fromColorDef(ovr.color) : undefined;\r\n const transparency = ovr.transparency;\r\n const weight = ovr.weight;\r\n const ignoresMaterial = undefined !== ovr.material && Id64.isValid(ovr.material) ? true : undefined;\r\n return this.fromJSON({ rgb, transparency, weight, ignoresMaterial, viewDependentTransparency: true });\r\n }\r\n\r\n /** Returns true if this appearance does not override any aspects of symbology. */\r\n public get matchesDefaults(): boolean {\r\n return this.equals(FeatureAppearance.defaults);\r\n }\r\n\r\n public get overridesRgb(): boolean { return undefined !== this.rgb; }\r\n public get overridesTransparency(): boolean { return undefined !== this.transparency; }\r\n public get overridesLinePixels(): boolean { return undefined !== this.linePixels; }\r\n public get overridesWeight(): boolean { return undefined !== this.weight; }\r\n\r\n /** Get the color that will be applied to linear geometry, or undefined if not overridden.\r\n * This is the same as [[rgb]] if [[lineRgb]] is `undefined`.\r\n */\r\n public getLineRgb(): RgbColor | undefined {\r\n return false !== this.lineRgb ? (this.lineRgb ?? this.rgb) : undefined;\r\n }\r\n\r\n /** Get the transparency that will be applied to linear geometry, or undefined if not overridden.\r\n * This is the same as [[transparency]] if [[lineTransparency]] is `undefined`.\r\n */\r\n public getLineTransparency(): number | undefined {\r\n return false !== this.lineTransparency ? (this.lineTransparency ?? this.transparency) : undefined;\r\n }\r\n\r\n public get overridesSymbology(): boolean {\r\n return this.overridesRgb || this.overridesTransparency || this.overridesWeight || this.overridesLinePixels || !!this.ignoresMaterial\r\n || this.emphasized || this.overridesNonLocatable\r\n || undefined !== this.getLineRgb() || undefined !== this.getLineTransparency();\r\n }\r\n\r\n public get overridesNonLocatable(): boolean { return undefined !== this.nonLocatable; }\r\n\r\n public get isFullyTransparent(): boolean {\r\n const surf = this.transparency ?? 0;\r\n const line = this.getLineTransparency() ?? 0;\r\n return surf >= 1 && line >= 1;\r\n }\r\n\r\n /** Returns true if any aspect of the appearance is overridden (i.e., if any member is not undefined). */\r\n public get anyOverridden(): boolean { return this.overridesSymbology || this.overridesNonLocatable; }\r\n\r\n public equals(other: FeatureAppearance): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return equalRgb(this.rgb, other.rgb)\r\n && this.weight === other.weight\r\n && equalTransparency(this.transparency, other.transparency)\r\n && this.linePixels === other.linePixels\r\n && this.ignoresMaterial === other.ignoresMaterial\r\n && this.nonLocatable === other.nonLocatable\r\n && this.emphasized === other.emphasized\r\n && this.viewDependentTransparency === other.viewDependentTransparency\r\n && equalLineTransparency(this.lineTransparency, other.lineTransparency)\r\n && equalLineRgb(this.lineRgb, other.lineRgb);\r\n }\r\n\r\n public toJSON(): FeatureAppearanceProps {\r\n const props: FeatureAppearanceProps = {};\r\n if (this.rgb)\r\n props.rgb = this.rgb.toJSON();\r\n\r\n if (undefined !== this.weight)\r\n props.weight = this.weight;\r\n\r\n if (undefined !== this.transparency) {\r\n props.transparency = this.transparency;\r\n if (this.viewDependentTransparency)\r\n props.viewDependentTransparency = true;\r\n }\r\n\r\n if (undefined !== this.linePixels)\r\n props.linePixels = this.linePixels;\r\n\r\n if (true === this.ignoresMaterial)\r\n props.ignoresMaterial = true;\r\n\r\n if (true === this.nonLocatable)\r\n props.nonLocatable = true;\r\n\r\n if (true === this.emphasized)\r\n props.emphasized = true;\r\n\r\n if (undefined !== this.lineTransparency)\r\n props.lineTransparency = this.lineTransparency;\r\n\r\n if (this.lineRgb) {\r\n props.lineRgb = this.lineRgb;\r\n if (this.viewDependentTransparency)\r\n props.viewDependentTransparency = true;\r\n }\r\n\r\n return props;\r\n }\r\n\r\n /** Convert this appearance to JSON, and override any properties explicitly specified by `changedProps` in the result.\r\n * Example:\r\n * ```ts\r\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\r\n * const clone = base.cloneProps({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\r\n * ```\r\n * @see [[FeatureAppearance.clone]].\r\n */\r\n public cloneProps(changedProps: FeatureAppearanceProps): FeatureAppearanceProps {\r\n return {\r\n ...this.toJSON(),\r\n ...changedProps,\r\n };\r\n }\r\n\r\n /** Create a copy of this appearance, overriding any properties explicitly specified by `changedProps`.\r\n * Example:\r\n * ```ts\r\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\r\n * const clone = base.clone({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\r\n * ```\r\n * @see [[FeatureAppearance.cloneProps]].\r\n */\r\n public clone(changedProps: FeatureAppearanceProps): FeatureAppearance {\r\n return FeatureAppearance.fromJSON(this.cloneProps(changedProps));\r\n }\r\n\r\n /** Produce a FeatureAppearance from the supplied appearance in which any aspect not defined by the base appearance is overridden by this appearance. */\r\n public extendAppearance(base: FeatureAppearance): FeatureAppearance {\r\n if (!this.overridesSymbology)\r\n return base;\r\n\r\n const props = base.toJSON();\r\n if (undefined === props.rgb)\r\n props.rgb = this.rgb;\r\n if (undefined === props.transparency)\r\n props.transparency = this.transparency;\r\n if (undefined === props.linePixels)\r\n props.linePixels = this.linePixels;\r\n if (undefined === props.weight)\r\n props.weight = this.weight;\r\n if (undefined === props.ignoresMaterial && this.ignoresMaterial)\r\n props.ignoresMaterial = true;\r\n if (undefined === props.nonLocatable && this.nonLocatable)\r\n props.nonLocatable = true;\r\n if (undefined === props.emphasized && this.emphasized)\r\n props.emphasized = true;\r\n if (!props.lineRgb)\r\n props.lineRgb = this.lineRgb;\r\n if (undefined === props.lineTransparency)\r\n props.lineTransparency = this.lineTransparency;\r\n\r\n if (this.viewDependentTransparency && (undefined !== props.transparency || undefined !== props.lineTransparency))\r\n props.viewDependentTransparency = true;\r\n\r\n return FeatureAppearance.fromJSON(props);\r\n }\r\n\r\n protected constructor(props: FeatureAppearanceProps) {\r\n this.rgb = undefined !== props.rgb ? RgbColor.fromJSON(props.rgb) : undefined;\r\n this.lineRgb = typeof props.lineRgb === \"object\" ? RgbColor.fromJSON(props.lineRgb) : (false === props.lineRgb ? false : undefined);\r\n\r\n this.transparency = transparencyFromJSON(props.transparency);\r\n this.lineTransparency = typeof props.lineTransparency === \"number\" ? transparencyFromJSON(props.lineTransparency) : (false === props.lineTransparency ? false : undefined);\r\n\r\n this.weight = props.weight;\r\n this.linePixels = props.linePixels;\r\n\r\n this.ignoresMaterial = props.ignoresMaterial;\r\n this.nonLocatable = props.nonLocatable;\r\n this.emphasized = props.emphasized;\r\n\r\n if (undefined !== this.weight) {\r\n this.weight = Math.max(1, Math.min(this.weight, 32));\r\n }\r\n\r\n if (props.viewDependentTransparency && (undefined !== this.transparency || undefined !== this.getLineTransparency())) {\r\n this.viewDependentTransparency = true;\r\n }\r\n }\r\n}\r\n\r\n/** Interface adopted by an object that can supply a [[FeatureAppearance]] given a low-level description of a [[Feature]].\r\n * @see [[FeatureOverrides]] for the commonly-used implementation.\r\n * @see [[FeatureAppearanceProvider]] to supplement the appearance supplied by this interface.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FeatureAppearanceSource {\r\n /** Supplies the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\r\n * The feature is described by its components for efficiency reasons.\r\n * @param elemLo The lower 32 bits of the feature's element Id.\r\n * @param elemHi The upper 32 bits of the feature's element Id.\r\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\r\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\r\n * @param geomClass The geometry class of the feature.\r\n * @param modelLo The lower 32 bits of the feature's model Id.\r\n * @param modelHi The upper 32 bits of the feature's model Id.\r\n * @param type The type of batch to which the feature belongs.\r\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\r\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\r\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\r\n */\r\n getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\r\n}\r\n\r\n/** Common options for [[FeatureOverrides.override]].\r\n * @public\r\n */\r\nexport interface OverrideFeatureAppearanceOptions {\r\n /** Specifies the aspects of the [[Feature]]'s appearance to be overridden. */\r\n appearance: FeatureAppearance;\r\n /** Specifies what to do if a [[FeatureAppearance]] has already been configured for the specified element, model, or subcategory by a previous call to [[FeatureOverrides.override]].\r\n * - \"subsume\" (the default): Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by the existing appearance will be overwritten\r\n * if also overridden by [[appearance]].\r\n * - The resulting appearance is computed as `existingAppearance.extendAppearance(newAppearance)`.\r\n * - \"extend\": Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by [[appearance]] will only\r\n * apply if that aspect is not already overridden by a previous appearance.\r\n * - The resulting appearance is computed as `newAppearance.extendAppearance(existingAppearance)`.\r\n * - \"replace\": Completely replace the existing appearance with [[appearance]].\r\n * - \"skip\": Keep the existing appearance.\r\n */\r\n onConflict?: \"extend\" | \"subsume\" | \"replace\" | \"skip\";\r\n}\r\n\r\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricModel]($backend).\r\n * @public\r\n */\r\nexport interface OverrideModelAppearanceOptions extends OverrideFeatureAppearanceOptions {\r\n /** The Id of the model whose appearance is to be overridden. */\r\n modelId: Id64String;\r\n elementId?: never;\r\n subCategoryId?: never;\r\n}\r\n\r\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricElement]($backend).\r\n * @public\r\n */\r\nexport interface OverrideElementAppearanceOptions extends OverrideFeatureAppearanceOptions {\r\n /** The Id of the element whose appearance is to be overridden. */\r\n elementId: Id64String;\r\n modelId?: never;\r\n subCategoryId?: never;\r\n}\r\n\r\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [SubCategory]($backend).\r\n * @public\r\n */\r\nexport interface OverrideSubCategoryAppearanceOptions extends OverrideFeatureAppearanceOptions {\r\n /** The Id of the subcategory whose appearance is to be overridden. */\r\n subCategoryId: Id64String;\r\n modelId?: never;\r\n elementId?: never;\r\n}\r\n\r\n/** Arguments supplied to [[FeatureOverrides.override]].\r\n * @public\r\n */\r\nexport type OverrideFeatureAppearanceArgs = OverrideElementAppearanceOptions | OverrideModelAppearanceOptions | OverrideSubCategoryAppearanceOptions;\r\n\r\n/** Arguments provided to a function of type [[IgnoreAnimationOverrides]].\r\n * @see [[FeatureOverrides.ignoreAnimationOverrides]] to register such a function.\r\n * @public\r\n */\r\nexport interface IgnoreAnimationOverridesArgs {\r\n /** The Id of the element under consideration.\r\n * @see [Id64.fromUint32Pair]($bentley) to convert a Uint32Pair into an [Id64String]($bentley), if needed.\r\n */\r\n readonly elementId: Readonly<Id64.Uint32Pair>;\r\n /** The [[RenderSchedule.ElementTimeline.batchId]] identifying the [[RenderSchedule.ElementTimeline]] to which the element under consideration belongs. */\r\n readonly animationNodeId: number;\r\n}\r\n\r\n/** A function that can be supplied to [[FeatureOverrides.ignoreAnimationOverrides]] to indicate whether the color or transparency overrides defined\r\n * by the view's [[RenderSchedule.Script]] should be ignored. The arguments describe the element under consideration. The function should return true if that\r\n * element should not have its color or transparency modified by the schedule script.\r\n * @public\r\n */\r\nexport type IgnoreAnimationOverrides = (args: IgnoreAnimationOverridesArgs) => boolean;\r\n\r\nconst scratchIgnoreAnimationOverridesArgs = {\r\n elementId: { lower: 0, upper: 0 },\r\n animationNodeId: 0,\r\n};\r\n\r\n/** Specifies how to customize the appearance of individual [[Feature]]s, typically within the context of a [Viewport]($frontend).\r\n * Individual aspects of a feature's appearance - like visibility, color, and transparency - are overridden by supplying a [[FeatureAppearance]].\r\n * Those overrides can be specified on the basis of the feature's model, element, and/or subcategory. A default set of overrides can also be specified to\r\n * apply to the appearance of any feature not otherwise overridden.\r\n *\r\n * It is possible to override multiple aspects of a feature on different bases. For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red,\r\n * and that all features belonging to model \"B\" should be drawn 50% transparent. In this case, a feature belonging to both subcategory \"A\" and model \"B\" will be drawn as 50% transparent red -\r\n * the separate overrides are combined to produce the feature's overall appearance.\r\n *\r\n * In the case of conflicts, there is an order of precedence:\r\n * - Model overrides take highest precedence.\r\n * - Element overrides are of higher precedence than subcategory and animation overrides.\r\n * - Overrides applied by a [[RenderSchedule.Script]]'s [[RenderSchedule.ElementTimeline]] are of higher precedence than subcategory overrides, but can be suppressed on a per-element basis via [[ignoreAnimationOverrides]].\r\n * - Subcategory overrides have lowest precedence.\r\n *\r\n * For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red, and all those belonging to model \"B\" should be drawn in green.\r\n * Then a feature belonging to subcategory \"A\" and model \"B\" will be drawn in green, because the model overrides take precedence.\r\n *\r\n * Instances of this class are not typically instantiated by an application directly; instead, an application can implement a [FeatureOverrideProvider]($frontend)\r\n * that augments the overrides supplied by a viewport.\r\n *\r\n * @see [FeatureSymbology.Overrides]($frontend) to create overrides specific to a [Viewport]($frontend) or [ViewState]($frontend).\r\n * @see [FeatureOverrideProvider]($frontend) to customize the appearance of features within a [Viewport]($frontend).\r\n * @public\r\n */\r\nexport class FeatureOverrides implements FeatureAppearanceSource {\r\n /** @internal */\r\n private readonly _ignoreAnimationOverrides: IgnoreAnimationOverrides[] = [];\r\n /** Ids of elements that should never be drawn. This takes precedence over [[alwaysDrawn]]. @internal */\r\n private readonly _neverDrawn = new Id64.Uint32Set();\r\n /** Ids of elements that should always be drawn. [[neverDrawn]] takes precedence over this set. @internal */\r\n private readonly _alwaysDrawn = new Id64.Uint32Set();\r\n /** If true, no elements *except* those defined in the \"always drawn\" set will be drawn.\r\n * @see [[setAlwaysDrawn]]\r\n */\r\n public isAlwaysDrawnExclusive = false;\r\n /** If true, the always-drawn elements are drawn even if their subcategories are not visible.\r\n * @see [[setAlwaysDrawn]]\r\n */\r\n public alwaysDrawnIgnoresSubCategory = true;\r\n /** If true, all subcategories are considered visible. This is used for drawing sheets via section callouts in the absence of an actual sheet view.\r\n */\r\n public ignoreSubCategory = false;\r\n\r\n /** Overrides applied to any feature not explicitly overridden. @internal */\r\n private _defaultOverrides = FeatureAppearance.defaults;\r\n /** Whether construction geometry should be drawn. */\r\n protected _constructions = false;\r\n /** Whether dimensions should be drawn. */\r\n protected _dimensions = false;\r\n /** Whether area patterns should be drawn. */\r\n protected _patterns = false;\r\n /** Whether line weights should be applied. If false, all lines are rendered 1-pixel wide. */\r\n protected _lineWeights = true;\r\n\r\n /** Overrides applied to all elements belonging to each model. @internal */\r\n private readonly _modelOverrides = new Id64.Uint32Map<FeatureAppearance>();\r\n /** Overrides applied to specific elements. */\r\n protected readonly _elementOverrides = new Id64.Uint32Map<FeatureAppearance>();\r\n /** Overrides applied to geometry belonging to each subcategory. */\r\n protected readonly _subCategoryOverrides = new Id64.Uint32Map<FeatureAppearance>();\r\n /** The set of displayed subcategories. Geometry belonging to subcategories not included in this set will not be drawn. */\r\n protected readonly _visibleSubCategories = new Id64.Uint32Set();\r\n /** Display priorities assigned to subcategories, possibly overridden by display style. Only applicable for plan projection models. */\r\n protected readonly _subCategoryPriorities = new Id64.Uint32Map<number>();\r\n\r\n /** Per-model, a set of subcategories whose visibility should be inverted for elements within that model.\r\n * Populated by Viewport.\r\n */\r\n protected readonly _modelSubCategoryOverrides = new Id64.Uint32Map<Id64.Uint32Set>();\r\n\r\n /** Ids of animation nodes that should never be drawn. */\r\n public readonly neverDrawnAnimationNodes = new Set<number>();\r\n /** Mapping of animation node Ids to overrides applied to the corresponding animation nodes.\r\n * @internal\r\n */\r\n public readonly animationNodeOverrides = new Map<number, FeatureAppearance>();\r\n\r\n /** Accepts a criterion that determines whether color and transparency overrides originating from the view's [[RenderSchedule.Script]] should be ignored for a given element.\r\n * The function receives a description of the element in question and returns `true` if the script's overrides should be ignored.\r\n * Any number of such functions can be registered; if any one of them returns `true`, the script's overrides are not applied to the specified element.\r\n *\r\n * For example, applications commonly emphasize a set of elements by applying a [[FeatureAppearance.emphasized]] override to them, and specifying a highly-transparent\r\n * default appearance to de-emphasize the rest of the elements in the view. If some of the de-emphasized elements' appearances are also being overridden by the schedule script, then\r\n * they won't appear de-emphasized, making it difficult for the emphasized elements to stand out. In situations like this, [FeatureOverrideProvider]($frontend)s like [EmphasizeElements]($frontend) can register an [[IgnoreAnimationOverrides]] function that returns true if the element in question is not in the set of emphasized elements.\r\n */\r\n public ignoreAnimationOverrides(ignore: IgnoreAnimationOverrides): void {\r\n this._ignoreAnimationOverrides.push(ignore);\r\n }\r\n\r\n /** Overrides applied to features for which no other overrides are defined */\r\n public get defaultOverrides(): FeatureAppearance { return this._defaultOverrides; }\r\n /** Whether or not line weights are applied. If false, all lines are drawn with a weight of 1. */\r\n public get lineWeights(): boolean { return this._lineWeights; }\r\n\r\n /** A set of elements that are always invisible.\r\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\r\n */\r\n public get neverDrawn() { return this._neverDrawn; }\r\n /** A set of elements that are unconditionally displayed.\r\n * @see [[isAlwaysDrawnExclusive]] to specify that *only* elements in this set will be displayed.\r\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\r\n */\r\n public get alwaysDrawn() { return this._alwaysDrawn; }\r\n\r\n private isNeverDrawn(elemIdLo: number, elemIdHi: number, animationNodeId: number): boolean {\r\n if (this._neverDrawn.has(elemIdLo, elemIdHi))\r\n return true;\r\n else\r\n return this.neverDrawnAnimationNodes.has(animationNodeId);\r\n }\r\n\r\n private isAlwaysDrawn(idLo: number, idHi: number): boolean { return this._alwaysDrawn.has(idLo, idHi); }\r\n\r\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories. */\r\n public isSubCategoryVisible(idLo: number, idHi: number): boolean { return this._visibleSubCategories.has(idLo, idHi); }\r\n\r\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories in the context of the specified model. */\r\n public isSubCategoryVisibleInModel(subcatLo: number, subcatHi: number, modelLo: number, modelHi: number): boolean {\r\n if (this.ignoreSubCategory)\r\n return true;\r\n\r\n let vis = this.isSubCategoryVisible(subcatLo, subcatHi);\r\n const modelOvr = this._modelSubCategoryOverrides.get(modelLo, modelHi);\r\n if (undefined !== modelOvr && modelOvr.has(subcatLo, subcatHi))\r\n vis = !vis;\r\n\r\n return vis;\r\n }\r\n\r\n private getModelOverrides(idLo: number, idHi: number): FeatureAppearance | undefined {\r\n return this._modelOverrides.get(idLo, idHi);\r\n }\r\n\r\n private getElementAnimationOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\r\n if (this.animationNodeOverrides.size === 0)\r\n return undefined;\r\n\r\n // NB: An animation node Id of zero means \"not animated\". Some providers like EmphasizeElements may provide an appearance override for unanimated nodes.\r\n // That should be preserved.\r\n const app = this.animationNodeOverrides.get(animationNodeId);\r\n if (!app || 0 === animationNodeId || this._ignoreAnimationOverrides.length === 0)\r\n return app;\r\n\r\n const args = scratchIgnoreAnimationOverridesArgs;\r\n args.elementId.lower = idLo;\r\n args.elementId.upper = idHi;\r\n args.animationNodeId = animationNodeId;\r\n return this._ignoreAnimationOverrides.some((ignore) => ignore(args)) ? undefined : app;\r\n }\r\n\r\n private getElementOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\r\n const elemApp = this._elementOverrides.get(idLo, idHi);\r\n const nodeApp = this.getElementAnimationOverrides(idLo, idHi, animationNodeId);\r\n if (elemApp)\r\n return nodeApp ? nodeApp.extendAppearance(elemApp) : elemApp;\r\n\r\n return nodeApp;\r\n }\r\n\r\n private getSubCategoryOverrides(idLo: number, idHi: number): FeatureAppearance | undefined { return this._subCategoryOverrides.get(idLo, idHi); }\r\n\r\n /** Add a [SubCategory]($backend) to the set of visible subcategories. */\r\n public setVisibleSubCategory(id: Id64String): void { this._visibleSubCategories.addId(id); }\r\n /** Specify the Id of an element that should never be drawn. */\r\n public setNeverDrawn(id: Id64String): void { this._neverDrawn.addId(id); }\r\n /** Specify the Id of an element that should always be drawn. */\r\n public setAlwaysDrawn(id: Id64String): void { this._alwaysDrawn.addId(id); }\r\n /** Specify the Id of a animation node that should never be drawn. */\r\n public setAnimationNodeNeverDrawn(id: number): void { this.neverDrawnAnimationNodes.add(id); }\r\n /** Specify the Ids of elements that should never be drawn. */\r\n public setNeverDrawnSet(ids: Iterable<Id64String>) { copyIdSetToUint32Set(this._neverDrawn, ids); }\r\n /** Specify the Ids of elements that should always be drawn. */\r\n public setAlwaysDrawnSet(ids: Iterable<Id64String>, exclusive: boolean, ignoreSubCategory = true) {\r\n copyIdSetToUint32Set(this._alwaysDrawn, ids);\r\n this.isAlwaysDrawnExclusive = exclusive;\r\n this.alwaysDrawnIgnoresSubCategory = ignoreSubCategory;\r\n }\r\n\r\n /** Returns the feature's appearance overrides, or undefined if the feature is not visible. */\r\n public getFeatureAppearance(feature: Feature, modelId: Id64String, type: BatchType = BatchType.Primary, animationNodeId = 0): FeatureAppearance | undefined {\r\n return this.getAppearance(\r\n Id64.getLowerUint32(feature.elementId), Id64.getUpperUint32(feature.elementId),\r\n Id64.getLowerUint32(feature.subCategoryId), Id64.getUpperUint32(feature.subCategoryId),\r\n feature.geometryClass,\r\n Id64.getLowerUint32(modelId), Id64.getUpperUint32(modelId),\r\n type, animationNodeId);\r\n }\r\n\r\n private static readonly _weight1Appearance = FeatureAppearance.fromJSON({ weight: 1 });\r\n\r\n /** Returns a feature's appearance overrides, or undefined if the feature is not visible.\r\n * Takes Id64s as pairs of unsigned 32-bit integers for efficiency, because that is how they are stored by the PackedFeatureTable associated with each batch of graphics.\r\n * @see [[getFeatureAppearance]] for an equivalent function that accepts [Id64String]($core-bentley)s instead of integer pairs.\r\n */\r\n public getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined {\r\n if (BatchType.VolumeClassifier === type || BatchType.PlanarClassifier === type)\r\n return this.getClassifierAppearance(elemLo, elemHi, subcatLo, subcatHi, modelLo, modelHi, animationNodeId);\r\n\r\n let app = !this._lineWeights ? FeatureOverrides._weight1Appearance : FeatureAppearance.defaults;\r\n const modelApp = this.getModelOverrides(modelLo, modelHi);\r\n if (undefined !== modelApp)\r\n app = modelApp.extendAppearance(app);\r\n\r\n // Is the element visible?\r\n let elemApp, alwaysDrawn = false;\r\n\r\n if (Id64.isValidUint32Pair(elemLo, elemHi)) {\r\n if (this.isNeverDrawn(elemLo, elemHi, animationNodeId))\r\n return undefined;\r\n\r\n alwaysDrawn = this.isAlwaysDrawn(elemLo, elemHi);\r\n if (!alwaysDrawn && this.isAlwaysDrawnExclusive)\r\n return undefined;\r\n\r\n // Element overrides take precedence\r\n elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\r\n if (undefined !== elemApp)\r\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\r\n }\r\n\r\n let subCatApp;\r\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\r\n if ((!alwaysDrawn || !this.alwaysDrawnIgnoresSubCategory) && !this.isSubCategoryVisibleInModel(subcatLo, subcatHi, modelLo, modelHi))\r\n return undefined;\r\n\r\n subCatApp = this.getSubCategoryOverrides(subcatLo, subcatHi);\r\n if (undefined !== subCatApp)\r\n app = subCatApp.extendAppearance(app);\r\n }\r\n\r\n // Only apply default if *no* appearance was explicitly registered (doesn't matter if registered appearance does not actually override anything)\r\n if (undefined === elemApp && undefined === modelApp && undefined === subCatApp)\r\n app = this._defaultOverrides.extendAppearance(app);\r\n\r\n let visible = alwaysDrawn || this.isClassVisible(geomClass);\r\n if (visible && app.isFullyTransparent)\r\n visible = false; // don't bother rendering something with full transparency...\r\n\r\n return visible ? app : undefined;\r\n }\r\n\r\n /** Classifiers behave totally differently...in particular they are never invisible unless fully-transparent. */\r\n private getClassifierAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, modelLo: number, modelHi: number, animationNodeId: number): FeatureAppearance | undefined {\r\n let app = FeatureAppearance.defaults;\r\n const modelApp = this.getModelOverrides(modelLo, modelHi);\r\n if (undefined !== modelApp)\r\n app = modelApp.extendAppearance(app);\r\n\r\n const elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\r\n if (undefined !== elemApp)\r\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\r\n\r\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\r\n const subCat = this.getSubCategoryOverrides(subcatLo, subcatHi);\r\n if (undefined !== subCat)\r\n app = subCat.extendAppearance(app);\r\n }\r\n\r\n if (undefined === elemApp && undefined === modelApp)\r\n app = this._defaultOverrides.extendAppearance(app);\r\n\r\n // NB: A fully-transparent classifier means the classifier is a clip mask - classified pixels will be discarded.\r\n return app;\r\n }\r\n\r\n /** Return whether geometry of the specified class should be drawn.\r\n * @see [[ViewFlags.constructions]], [[ViewFlags.dimensions]], and [[ViewFlags.patterns]].\r\n */\r\n public isClassVisible(geomClass: GeometryClass): boolean {\r\n switch (geomClass) {\r\n case GeometryClass.Construction: return this._constructions;\r\n case GeometryClass.Dimension: return this._dimensions;\r\n case GeometryClass.Pattern: return this._patterns;\r\n default: return true;\r\n }\r\n }\r\n\r\n /** Specify overrides for all elements belonging to a specified [GeometricModel]($backend), or all geometry belonging to a specified [GeometricElement]($backend) or [SubCategory]($backend). */\r\n public override(args: OverrideFeatureAppearanceArgs): void {\r\n let id: Id64String;\r\n let map: Id64.Uint32Map<FeatureAppearance>;\r\n if (undefined !== args.elementId) {\r\n id = args.elementId;\r\n map = this._elementOverrides;\r\n } else if (undefined !== args.modelId) {\r\n id = args.modelId;\r\n map = this._modelOverrides;\r\n } else {\r\n id = args.subCategoryId;\r\n map = this._subCategoryOverrides;\r\n }\r\n\r\n let app = args.appearance;\r\n const idLo = Id64.getLowerUint32(id);\r\n const idHi = Id64.getUpperUint32(id);\r\n\r\n if (undefined !== args.elementId && this.isNeverDrawn(idLo, idHi, 0))\r\n return;\r\n\r\n const replace = \"replace\" === args.onConflict;\r\n const existing = replace ? undefined : map.get(idLo, idHi);\r\n if (existing) {\r\n assert(\"replace\" !== args.onConflict);\r\n switch (args.onConflict) {\r\n case \"skip\":\r\n return;\r\n case \"extend\":\r\n app = app.extendAppearance(existing);\r\n break;\r\n default:\r\n app = existing.extendAppearance(app);\r\n break;\r\n }\r\n }\r\n\r\n map.set(idLo, idHi, app);\r\n }\r\n\r\n /** Specify overrides for all geometry originating from the specified animation node.\r\n * @param id The Id of the animation node.\r\n * @param app The symbology overrides.\r\n * @note These overrides do not take precedence over element overrides.\r\n */\r\n public overrideAnimationNode(id: number, app: FeatureAppearance): void {\r\n this.animationNodeOverrides.set(id, app);\r\n }\r\n\r\n /** Defines a default appearance to be applied to any [[Feature]] *not* explicitly overridden.\r\n * @param appearance The symbology overrides.\r\n * @param replaceExisting Specifies whether to replace the current default overrides if they are already defined.\r\n */\r\n public setDefaultOverrides(appearance: FeatureAppearance, replaceExisting: boolean = true): void {\r\n if (replaceExisting || !appearance.overridesSymbology)\r\n this._defaultOverrides = appearance;\r\n }\r\n\r\n /** Get the display priority of a subcategory. This is only relevant when using [[PlanProjectionSettings]]. */\r\n public getSubCategoryPriority(idLo: number, idHi: number): number {\r\n return this._subCategoryPriorities.get(idLo, idHi) ?? 0;\r\n }\r\n\r\n /** Adds all fully transparent elements to the _neverDrawn set. This is used for BatchedModels planar masks. */\r\n public addInvisibleElementOverridesToNeverDrawn(): void {\r\n this._elementOverrides.forEach((lo, hi) => {\r\n const app = this.getElementOverrides(lo, hi, 0);\r\n if (app?.isFullyTransparent)\r\n this._neverDrawn.add(lo, hi);\r\n });\r\n }\r\n\r\n /** Construct a new Overrides that overrides nothing.\r\n * @see [FeatureSymbology.Overrides]($frontend) to construct overrides based on a [ViewState]($frontend) or [Viewport]($frontend).\r\n */\r\n public constructor() {\r\n //\r\n }\r\n\r\n /** Returns true if geometry belonging to the specified subcategory will be drawn. */\r\n public isSubCategoryIdVisible(id: Id64String): boolean { return this.isSubCategoryVisible(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\r\n /** Returns the overrides applied to geometry belonging to the specified model, if any such are defined. */\r\n public getModelOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getModelOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\r\n /** Returns the overrides applied to geometry belonging to the specified element, if any such are defined. */\r\n public getElementOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getElementOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id), 0); }\r\n /** Returns the overrides applied to geometry belonging to the specified subcategory, if any such are defined. */\r\n public getSubCategoryOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getSubCategoryOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\r\n\r\n /** Returns true if the specified Feature will be drawn. */\r\n public isFeatureVisible(feature: Feature): boolean {\r\n const { elementId, subCategoryId, geometryClass } = feature;\r\n const isValidElemId = !Id64.isInvalid(elementId);\r\n const elemIdParts = isValidElemId ? Id64.getUint32Pair(elementId) : undefined;\r\n\r\n if (undefined !== elemIdParts && this.isNeverDrawn(elemIdParts.lower, elemIdParts.upper, 0))\r\n return false;\r\n\r\n const alwaysDrawn = undefined !== elemIdParts && this.isAlwaysDrawn(elemIdParts.lower, elemIdParts.upper);\r\n if (alwaysDrawn || this.isAlwaysDrawnExclusive)\r\n return alwaysDrawn;\r\n\r\n // NB: This ignores per-model subcategory visibility overrides, because caller did not specify a model.\r\n if (!this.isSubCategoryIdVisible(subCategoryId))\r\n return false;\r\n\r\n return this.isClassVisible(geometryClass);\r\n }\r\n}\r\n\r\n/** Interface adopted by an object that can supply the [[FeatureAppearance]] supplied by a [[FeatureAppearanceSource]].\r\n * This is useful for selectively overriding or agumenting a [Viewport]($frontend)'s symbology overrides.\r\n * A typical implementation will invoke [[FeatureAppearanceSource.getAppearance]] and customize the returned appearance.\r\n * @see [[FeatureAppearanceProvider.chain]] to chain two providers together.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FeatureAppearanceProvider {\r\n /** Supply the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\r\n * The feature is described by its components for efficiency reasons.\r\n * @param source The base symbology overrides, e.g., typically defined by a [Viewport]($frontend).\r\n * @param elemLo The lower 32 bits of the feature's element Id.\r\n * @param elemHi The upper 32 bits of the feature's element Id.\r\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\r\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\r\n * @param geomClass The geometry class of the feature.\r\n * @param modelLo The lower 32 bits of the feature's model Id.\r\n * @param modelHi The upper 32 bits of the feature's model Id.\r\n * @param type The type of batch to which the feature belongs.\r\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\r\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\r\n * @see [[FeatureAppearanceSource.getAppearance]] to forward the request to the source.\r\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\r\n */\r\n getFeatureAppearance(source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\r\n}\r\n\r\n/** @public */\r\nexport namespace FeatureAppearanceProvider {\r\n /** Produce a FeatureAppearanceSource for which `getAppearance()` returns the appearance specified in `source`, potentially modified by `provider`. */\r\n function wrap(source: FeatureAppearanceSource, provider: FeatureAppearanceProvider): FeatureAppearanceSource {\r\n return {\r\n getAppearance: (elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\r\n return provider.getFeatureAppearance(source, elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\r\n },\r\n };\r\n }\r\n\r\n /** Create a provider that obtains each feature's appearance from the source, and if the feature is visible, modifies the appearance.\r\n * @param supplementAppearance A function accepting the feature's base appearance and returning a supplemental appearance.\r\n * @public\r\n */\r\n export function supplement(supplementAppearance: (appearance: FeatureAppearance) => FeatureAppearance): FeatureAppearanceProvider {\r\n return {\r\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\r\n const app = source.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\r\n return app ? supplementAppearance(app) : app;\r\n },\r\n };\r\n }\r\n\r\n /** Chain two FeatureAppearanceProviders together such that `first`'s `getFeatureAppearance` function is applied before `second`'s.\r\n * If `second` invokes `source.getAppearance()`, the returned appearance will include any modifications applied by `first`.\r\n * @public\r\n */\r\n export function chain(first: FeatureAppearanceProvider, second: FeatureAppearanceProvider): FeatureAppearanceProvider {\r\n if (first === second)\r\n return first;\r\n\r\n return {\r\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\r\n return second.getFeatureAppearance(wrap(source, first), elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\r\n },\r\n };\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureTable.js","sourceRoot":"","sources":["../../src/FeatureTable.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACL,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAc,YAAY,EAAE,QAAQ,GACjF,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;;;;;;GAQG;AACH,MAAM,OAAO,OAAO;IACF,SAAS,CAAa;IACtB,aAAa,CAAa;IAC1B,aAAa,CAAgB;IAE7C,YAAmB,YAAwB,IAAI,CAAC,OAAO,EAAE,gBAA4B,IAAI,CAAC,OAAO,EAAE,gBAA+B,aAAa,CAAC,OAAO;QACrJ,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,IAAW,SAAS,KAAc,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,aAAa,KAAK,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IAClK,IAAW,WAAW,KAAc,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAE7D,0EAA0E;IACn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;IACpG,IAAW,kBAAkB,KAAc,OAAO,SAAS,CAAC,gBAAgB,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE7F,0GAA0G;IACnG,WAAW,CAAC,KAAa;QAC9B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM;YAC7B,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK;gBACvB,OAAO,KAAK,CAAC,KAAK,CAAC;QAEvB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,eAAe,CAAC,OAAgB,EAAE,KAAa;QACpD,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACvC,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,YAAY,CAAU,OAAO,EAAE,KAAK,CAAC,CAAC;QACxD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,2EAA2E;IACpE,QAAQ,KAA2C,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/E,oHAAoH;IAC7G,IAAI;QACT,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,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 {\n assert, compareNumbers, compareStrings, Id64, Id64String, IndexedValue, IndexMap, UintArray,\n} from \"@itwin/core-bentley\";\nimport { GeometryClass } from \"./GeometryParams\";\nimport { PackedFeatureTable } from \"./internal/PackedFeatureTable\";\n\n/** Describes a discrete entity within a batched [RenderGraphic]($frontend) that can be\n * grouped with other such entities in a [[FeatureTable]].\n * Features roughly correlate to elements: a [Tile]($frontend)'s graphics combines geometry from every\n * [GeometricElement]($backend) that intersects the tile's volume, so each element produces at least one feature.\n * However, an element's geometry stream can contain geometry belonging to multiple different combinations of [SubCategory]($backend) and\n * [[GeometryClass]], so an individual element may produce more than one feature.\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\n * @public\n */\nexport class Feature {\n public readonly elementId: Id64String;\n public readonly subCategoryId: Id64String;\n public readonly geometryClass: GeometryClass;\n\n public constructor(elementId: Id64String = Id64.invalid, subCategoryId: Id64String = Id64.invalid, geometryClass: GeometryClass = GeometryClass.Primary) {\n this.elementId = elementId;\n this.subCategoryId = subCategoryId;\n this.geometryClass = geometryClass;\n }\n\n public get isDefined(): boolean { return !Id64.isInvalid(this.elementId) || !Id64.isInvalid(this.subCategoryId) || this.geometryClass !== GeometryClass.Primary; }\n public get isUndefined(): boolean { return !this.isDefined; }\n\n /** Returns true if this feature is equivalent to the supplied feature. */\n public equals(other: Feature): boolean { return 0 === this.compare(other); }\n\n /** Performs ordinal comparison of this feature with another.\n * @param rhs The feature to compare with.\n * @returns zero if the features are equivalent, a negative value if this feature compares as \"less than\" `rhs`, or a positive value if this feature compares \"greater than\" `rhs`.\n */\n public compare(rhs: Feature): number {\n if (this === rhs)\n return 0;\n\n let cmp = compareNumbers(this.geometryClass, rhs.geometryClass);\n if (0 === cmp) {\n cmp = compareStrings(this.elementId, rhs.elementId);\n if (0 === cmp) {\n cmp = compareStrings(this.subCategoryId, rhs.subCategoryId);\n }\n }\n\n return cmp;\n }\n}\n\n/** A [[Feature]] with a modelId identifying the model containing the feature, obtained from a [[RenderFeatureTable]].\n * @public\n */\nexport interface ModelFeature {\n modelId: Id64String;\n elementId: Id64String;\n subCategoryId: Id64String;\n geometryClass: GeometryClass;\n}\n\n/** @public */\nexport namespace ModelFeature {\n /** Create a ModelFeature of [[GeometryClass.Primary]] with all invalid Ids.\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.findFeature]] and [[RenderFeatureTable.getFeature]].\n */\n export function create(): ModelFeature {\n return {\n modelId: Id64.invalid,\n elementId: Id64.invalid,\n subCategoryId: Id64.invalid,\n geometryClass: GeometryClass.Primary,\n };\n }\n\n /** Returns `true` if any of `feature`'s properties differ from the defaults (invalid Ids and [[GeometryClass.Primary]]). */\n export function isDefined(feature: ModelFeature): boolean {\n return !Id64.isInvalid(feature.modelId) || !Id64.isInvalid(feature.elementId) || !Id64.isInvalid(feature.subCategoryId) || feature.geometryClass !== GeometryClass.Primary;\n }\n\n /** @alpha */\n export function unpack(packed: PackedFeature, result: ModelFeature, unpackedModelId?: Id64String): ModelFeature {\n result.modelId = unpackedModelId ?? Id64.fromUint32PairObject(packed.modelId);\n result.elementId = Id64.fromUint32PairObject(packed.elementId);\n result.subCategoryId = Id64.fromUint32PairObject(packed.subCategoryId);\n result.geometryClass = packed.geometryClass;\n return result;\n }\n}\n\n/** Represents a [[Feature]] within a [[RenderFeatureTable]]. This representation is optimized for use on the GPU.\n * @public\n */\nexport interface PackedFeature {\n modelId: Id64.Uint32Pair;\n elementId: Id64.Uint32Pair;\n subCategoryId: Id64.Uint32Pair;\n geometryClass: GeometryClass;\n /** @alpha */\n animationNodeId: number;\n}\n\n/** Represents a [[PackedFeature]] obtained from a [[RenderFeatureTable]], including the index of that feature within the table.\n * @public\n */\nexport interface PackedFeatureWithIndex extends PackedFeature {\n index: number;\n}\n\n/** @public */\nexport namespace PackedFeature {\n /** Create a PackedFeature of [[GeometryClass.Primary]] with all invalid Ids.\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.getPackedFeature]].\n */\n export function create(): PackedFeature {\n const pair = { upper: 0, lower: 0 };\n return {\n modelId: { ...pair },\n elementId: { ...pair },\n subCategoryId: { ...pair },\n geometryClass: GeometryClass.Primary,\n animationNodeId: 0,\n };\n }\n\n /** Create a PackedFeatureWithIndex of [[GeometryClass.Primary]] with all invalid Ids and an index of zero.\n * This is primarily useful for creating a reusable `output` argument for [[RenderFeatureTable.iterable]].\n */\n export function createWithIndex(): PackedFeatureWithIndex {\n const result = create() as PackedFeatureWithIndex;\n result.index = 0;\n return result;\n }\n}\n\n/** Describes the type of a 'batch' of graphics representing multiple [[Feature]]s.\n * The most commonly-encountered batches are Tiles, which can be of either Primary or\n * Classifier type.\n * @public\n * @extensions\n */\nexport enum BatchType {\n /** This batch contains graphics derived from a model's visible geometry. */\n Primary,\n /**\n * This batch contains color volumes which are used to classify a model's visible geometry.\n * The graphics themselves are not rendered to the screen; instead they are rendered to the stencil buffer\n * to resymbolize the primary geometry.\n */\n VolumeClassifier,\n /**\n * This batch contains planar graphics which are used to classify a model's visible geometry.\n * The graphics themselves are not rendered to the screen; instead they are rendered to a texture buffer\n * to resymbolize the primary geometry.\n */\n PlanarClassifier,\n}\n\n/** Defines a look-up table for [[Feature]]s within a batched [RenderGraphic]($frontend). Consecutive 32-bit\n * indices are assigned to each unique Feature. Primitives within the RenderGraphic can\n * use per-vertex indices to specify the distribution of Features within the primitive. The appearance of individual\n * features can be customized using [[FeatureOverrides]]. Typically a [Tile]($frontend) will contain a feature table\n * identifying the elements whose geometry appears within that tile.\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\n * @public\n */\nexport class FeatureTable extends IndexMap<Feature> {\n public readonly modelId: Id64String;\n public readonly type: BatchType;\n\n /** Construct an empty FeatureTable. */\n public constructor(maxFeatures: number, modelId: Id64String = Id64.invalid, type: BatchType = BatchType.Primary) {\n super((lhs, rhs) => lhs.compare(rhs), maxFeatures);\n this.modelId = modelId;\n this.type = type;\n }\n\n /** Returns the maximum number of [[Feature]]s this FeatureTable can contain. */\n public get maxFeatures(): number { return this._maximumSize; }\n /** Returns true if this table contains at least one [[Feature]] with a valid element and/or subcategory Id. */\n public get anyDefined(): boolean { return this.length > 1 || (1 === this.length && this._array[0].value.isDefined); }\n /** Returns true if this FeatureTable contains exactly one [[Feature]]. */\n public get isUniform(): boolean { return 1 === this.length; }\n /** If this FeatureTable contains exactly one [[Feature]], returns that Feature; otherwise returns undefined. */\n public get uniform(): Feature | undefined { return 1 === this.length ? this._array[0].value : undefined; }\n /** Returns true if this FeatureTable is associated with [[BatchType.VolumeClassifier]] geometry. */\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\n /** Returns true if this FeatureTable is associated with [[BatchType.PlanarClassifier]] geometry. */\n public get isPlanarClassifier(): boolean { return BatchType.PlanarClassifier === this.type; }\n\n /** Returns the Feature corresponding to the specified index, or undefined if the index is not present. */\n public findFeature(index: number): Feature | undefined {\n for (const entry of this._array)\n if (entry.index === index)\n return entry.value;\n\n return undefined;\n }\n\n /** Inserts the specified [[Feature]] at the specified index. This is really only useful when reconstructing a previously-create feature table\n * for which you know the index assigned to each feature.\n */\n public insertWithIndex(feature: Feature, index: number): void {\n const bound = this.lowerBound(feature);\n assert(!bound.equal);\n assert(!this.isFull);\n const entry = new IndexedValue<Feature>(feature, index);\n this._array.splice(bound.index, 0, entry);\n }\n\n /** Access the underlying array containing the table's current contents. */\n public getArray(): ReadonlyArray<IndexedValue<Feature>> { return this._array; }\n\n /** Convert this feature table to a representation that can be supplied to [RenderSystem.createBatch]($frontend). */\n public pack(): RenderFeatureTable {\n return PackedFeatureTable.pack(this);\n }\n}\n\n/** @alpha */\nexport type ComputeNodeId = (feature: PackedFeatureWithIndex) => number;\n\n/** Representation of a [[FeatureTable]] suitable for use with [RenderSystem.createBatch]($frontend).\n * The [[Feature]]s are represented as [[PackedFeature]]s. The feature table may contain features from multiple [Model]($backend)s.\n * @see [[FeatureTable.pack]] to produce a RenderFeatureTable.\n * @public\n */\nexport interface RenderFeatureTable {\n /** The \"model Id\" of the tile tree containing the tile from which this feature table originated.\n * It may be a transient Id if, for example, the tile tree represents a reality model or represents the geometry of multiple\n * persistent models batched together.\n */\n readonly batchModelId: Id64String;\n /** A split representation of [[batchModelId]], to avoid having to constantly having to parse the string. */\n readonly batchModelIdPair: Id64.Uint32Pair;\n /** The number of features in the table; equivalently, one more than the largest feature index. */\n readonly numFeatures: number;\n /** The number of bytes consumed by the feature table, strictly for diagnostic purposes. */\n readonly byteLength: number;\n readonly type: BatchType;\n /** @alpha */\n animationNodeIds?: UintArray;\n\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\n getFeature(featureIndex: number, result: ModelFeature): ModelFeature;\n\n /** Find the feature at the specified index. Returns undefined if featureIndex >= [[numFeatures]]. */\n findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined;\n\n /** Find the Id of the element associated with the feature at the specified index. */\n findElementId(featureIndex: number): Id64String | undefined;\n\n /** Get the Id of the element associated with the feature at the specified index as a pair of 32-bit integers.\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\n */\n getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\n\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\n getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature;\n\n /** Get an object that provides ordered iteration over all features.\n * @note The `output` object is reused (mutated in place) as the current value on each iteration.\n */\n iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex>;\n\n /** @alpha */\n populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void;\n\n /** @alpha */\n getAnimationNodeId(featureIndex: number): number;\n\n /** Get the Id of the model associated with the feature at the specified index.\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\n * This is more efficient than [[getFeature]] for callers who are only interested in the model Id.\n */\n getModelIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FeatureTable.js","sourceRoot":"","sources":["../../src/FeatureTable.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACL,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAc,YAAY,EAAE,QAAQ,GACjF,MAAM,qBAAqB,CAAC;AAC7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AC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,YAAY,CAAU,OAAO,EAAE,KAAK,CAAC,CAAC;QACxD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,2EAA2E;IACpE,QAAQ,KAA2C,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/E,oHAAoH;IAC7G,IAAI;QACT,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,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 {\r\n assert, compareNumbers, compareStrings, Id64, Id64String, IndexedValue, IndexMap, UintArray,\r\n} from \"@itwin/core-bentley\";\r\nimport { GeometryClass } from \"./GeometryParams\";\r\nimport { PackedFeatureTable } from \"./internal/PackedFeatureTable\";\r\n\r\n/** Describes a discrete entity within a batched [RenderGraphic]($frontend) that can be\r\n * grouped with other such entities in a [[FeatureTable]].\r\n * Features roughly correlate to elements: a [Tile]($frontend)'s graphics combines geometry from every\r\n * [GeometricElement]($backend) that intersects the tile's volume, so each element produces at least one feature.\r\n * However, an element's geometry stream can contain geometry belonging to multiple different combinations of [SubCategory]($backend) and\r\n * [[GeometryClass]], so an individual element may produce more than one feature.\r\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\r\n * @public\r\n */\r\nexport class Feature {\r\n public readonly elementId: Id64String;\r\n public readonly subCategoryId: Id64String;\r\n public readonly geometryClass: GeometryClass;\r\n\r\n public constructor(elementId: Id64String = Id64.invalid, subCategoryId: Id64String = Id64.invalid, geometryClass: GeometryClass = GeometryClass.Primary) {\r\n this.elementId = elementId;\r\n this.subCategoryId = subCategoryId;\r\n this.geometryClass = geometryClass;\r\n }\r\n\r\n public get isDefined(): boolean { return !Id64.isInvalid(this.elementId) || !Id64.isInvalid(this.subCategoryId) || this.geometryClass !== GeometryClass.Primary; }\r\n public get isUndefined(): boolean { return !this.isDefined; }\r\n\r\n /** Returns true if this feature is equivalent to the supplied feature. */\r\n public equals(other: Feature): boolean { return 0 === this.compare(other); }\r\n\r\n /** Performs ordinal comparison of this feature with another.\r\n * @param rhs The feature to compare with.\r\n * @returns zero if the features are equivalent, a negative value if this feature compares as \"less than\" `rhs`, or a positive value if this feature compares \"greater than\" `rhs`.\r\n */\r\n public compare(rhs: Feature): number {\r\n if (this === rhs)\r\n return 0;\r\n\r\n let cmp = compareNumbers(this.geometryClass, rhs.geometryClass);\r\n if (0 === cmp) {\r\n cmp = compareStrings(this.elementId, rhs.elementId);\r\n if (0 === cmp) {\r\n cmp = compareStrings(this.subCategoryId, rhs.subCategoryId);\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n}\r\n\r\n/** A [[Feature]] with a modelId identifying the model containing the feature, obtained from a [[RenderFeatureTable]].\r\n * @public\r\n */\r\nexport interface ModelFeature {\r\n modelId: Id64String;\r\n elementId: Id64String;\r\n subCategoryId: Id64String;\r\n geometryClass: GeometryClass;\r\n}\r\n\r\n/** @public */\r\nexport namespace ModelFeature {\r\n /** Create a ModelFeature of [[GeometryClass.Primary]] with all invalid Ids.\r\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.findFeature]] and [[RenderFeatureTable.getFeature]].\r\n */\r\n export function create(): ModelFeature {\r\n return {\r\n modelId: Id64.invalid,\r\n elementId: Id64.invalid,\r\n subCategoryId: Id64.invalid,\r\n geometryClass: GeometryClass.Primary,\r\n };\r\n }\r\n\r\n /** Returns `true` if any of `feature`'s properties differ from the defaults (invalid Ids and [[GeometryClass.Primary]]). */\r\n export function isDefined(feature: ModelFeature): boolean {\r\n return !Id64.isInvalid(feature.modelId) || !Id64.isInvalid(feature.elementId) || !Id64.isInvalid(feature.subCategoryId) || feature.geometryClass !== GeometryClass.Primary;\r\n }\r\n\r\n /** @alpha */\r\n export function unpack(packed: PackedFeature, result: ModelFeature, unpackedModelId?: Id64String): ModelFeature {\r\n result.modelId = unpackedModelId ?? Id64.fromUint32PairObject(packed.modelId);\r\n result.elementId = Id64.fromUint32PairObject(packed.elementId);\r\n result.subCategoryId = Id64.fromUint32PairObject(packed.subCategoryId);\r\n result.geometryClass = packed.geometryClass;\r\n return result;\r\n }\r\n}\r\n\r\n/** Represents a [[Feature]] within a [[RenderFeatureTable]]. This representation is optimized for use on the GPU.\r\n * @public\r\n */\r\nexport interface PackedFeature {\r\n modelId: Id64.Uint32Pair;\r\n elementId: Id64.Uint32Pair;\r\n subCategoryId: Id64.Uint32Pair;\r\n geometryClass: GeometryClass;\r\n /** @alpha */\r\n animationNodeId: number;\r\n}\r\n\r\n/** Represents a [[PackedFeature]] obtained from a [[RenderFeatureTable]], including the index of that feature within the table.\r\n * @public\r\n */\r\nexport interface PackedFeatureWithIndex extends PackedFeature {\r\n index: number;\r\n}\r\n\r\n/** @public */\r\nexport namespace PackedFeature {\r\n /** Create a PackedFeature of [[GeometryClass.Primary]] with all invalid Ids.\r\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.getPackedFeature]].\r\n */\r\n export function create(): PackedFeature {\r\n const pair = { upper: 0, lower: 0 };\r\n return {\r\n modelId: { ...pair },\r\n elementId: { ...pair },\r\n subCategoryId: { ...pair },\r\n geometryClass: GeometryClass.Primary,\r\n animationNodeId: 0,\r\n };\r\n }\r\n\r\n /** Create a PackedFeatureWithIndex of [[GeometryClass.Primary]] with all invalid Ids and an index of zero.\r\n * This is primarily useful for creating a reusable `output` argument for [[RenderFeatureTable.iterable]].\r\n */\r\n export function createWithIndex(): PackedFeatureWithIndex {\r\n const result = create() as PackedFeatureWithIndex;\r\n result.index = 0;\r\n return result;\r\n }\r\n}\r\n\r\n/** Describes the type of a 'batch' of graphics representing multiple [[Feature]]s.\r\n * The most commonly-encountered batches are Tiles, which can be of either Primary or\r\n * Classifier type.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum BatchType {\r\n /** This batch contains graphics derived from a model's visible geometry. */\r\n Primary,\r\n /**\r\n * This batch contains color volumes which are used to classify a model's visible geometry.\r\n * The graphics themselves are not rendered to the screen; instead they are rendered to the stencil buffer\r\n * to resymbolize the primary geometry.\r\n */\r\n VolumeClassifier,\r\n /**\r\n * This batch contains planar graphics which are used to classify a model's visible geometry.\r\n * The graphics themselves are not rendered to the screen; instead they are rendered to a texture buffer\r\n * to resymbolize the primary geometry.\r\n */\r\n PlanarClassifier,\r\n}\r\n\r\n/** Defines a look-up table for [[Feature]]s within a batched [RenderGraphic]($frontend). Consecutive 32-bit\r\n * indices are assigned to each unique Feature. Primitives within the RenderGraphic can\r\n * use per-vertex indices to specify the distribution of Features within the primitive. The appearance of individual\r\n * features can be customized using [[FeatureOverrides]]. Typically a [Tile]($frontend) will contain a feature table\r\n * identifying the elements whose geometry appears within that tile.\r\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\r\n * @public\r\n */\r\nexport class FeatureTable extends IndexMap<Feature> {\r\n public readonly modelId: Id64String;\r\n public readonly type: BatchType;\r\n\r\n /** Construct an empty FeatureTable. */\r\n public constructor(maxFeatures: number, modelId: Id64String = Id64.invalid, type: BatchType = BatchType.Primary) {\r\n super((lhs, rhs) => lhs.compare(rhs), maxFeatures);\r\n this.modelId = modelId;\r\n this.type = type;\r\n }\r\n\r\n /** Returns the maximum number of [[Feature]]s this FeatureTable can contain. */\r\n public get maxFeatures(): number { return this._maximumSize; }\r\n /** Returns true if this table contains at least one [[Feature]] with a valid element and/or subcategory Id. */\r\n public get anyDefined(): boolean { return this.length > 1 || (1 === this.length && this._array[0].value.isDefined); }\r\n /** Returns true if this FeatureTable contains exactly one [[Feature]]. */\r\n public get isUniform(): boolean { return 1 === this.length; }\r\n /** If this FeatureTable contains exactly one [[Feature]], returns that Feature; otherwise returns undefined. */\r\n public get uniform(): Feature | undefined { return 1 === this.length ? this._array[0].value : undefined; }\r\n /** Returns true if this FeatureTable is associated with [[BatchType.VolumeClassifier]] geometry. */\r\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n /** Returns true if this FeatureTable is associated with [[BatchType.PlanarClassifier]] geometry. */\r\n public get isPlanarClassifier(): boolean { return BatchType.PlanarClassifier === this.type; }\r\n\r\n /** Returns the Feature corresponding to the specified index, or undefined if the index is not present. */\r\n public findFeature(index: number): Feature | undefined {\r\n for (const entry of this._array)\r\n if (entry.index === index)\r\n return entry.value;\r\n\r\n return undefined;\r\n }\r\n\r\n /** Inserts the specified [[Feature]] at the specified index. This is really only useful when reconstructing a previously-create feature table\r\n * for which you know the index assigned to each feature.\r\n */\r\n public insertWithIndex(feature: Feature, index: number): void {\r\n const bound = this.lowerBound(feature);\r\n assert(!bound.equal);\r\n assert(!this.isFull);\r\n const entry = new IndexedValue<Feature>(feature, index);\r\n this._array.splice(bound.index, 0, entry);\r\n }\r\n\r\n /** Access the underlying array containing the table's current contents. */\r\n public getArray(): ReadonlyArray<IndexedValue<Feature>> { return this._array; }\r\n\r\n /** Convert this feature table to a representation that can be supplied to [RenderSystem.createBatch]($frontend). */\r\n public pack(): RenderFeatureTable {\r\n return PackedFeatureTable.pack(this);\r\n }\r\n}\r\n\r\n/** @alpha */\r\nexport type ComputeNodeId = (feature: PackedFeatureWithIndex) => number;\r\n\r\n/** Representation of a [[FeatureTable]] suitable for use with [RenderSystem.createBatch]($frontend).\r\n * The [[Feature]]s are represented as [[PackedFeature]]s. The feature table may contain features from multiple [Model]($backend)s.\r\n * @see [[FeatureTable.pack]] to produce a RenderFeatureTable.\r\n * @public\r\n */\r\nexport interface RenderFeatureTable {\r\n /** The \"model Id\" of the tile tree containing the tile from which this feature table originated.\r\n * It may be a transient Id if, for example, the tile tree represents a reality model or represents the geometry of multiple\r\n * persistent models batched together.\r\n */\r\n readonly batchModelId: Id64String;\r\n /** A split representation of [[batchModelId]], to avoid having to constantly having to parse the string. */\r\n readonly batchModelIdPair: Id64.Uint32Pair;\r\n /** The number of features in the table; equivalently, one more than the largest feature index. */\r\n readonly numFeatures: number;\r\n /** The number of bytes consumed by the feature table, strictly for diagnostic purposes. */\r\n readonly byteLength: number;\r\n readonly type: BatchType;\r\n /** @alpha */\r\n animationNodeIds?: UintArray;\r\n\r\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\r\n getFeature(featureIndex: number, result: ModelFeature): ModelFeature;\r\n\r\n /** Find the feature at the specified index. Returns undefined if featureIndex >= [[numFeatures]]. */\r\n findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined;\r\n\r\n /** Find the Id of the element associated with the feature at the specified index. */\r\n findElementId(featureIndex: number): Id64String | undefined;\r\n\r\n /** Get the Id of the element associated with the feature at the specified index as a pair of 32-bit integers.\r\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\r\n */\r\n getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\r\n\r\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\r\n getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature;\r\n\r\n /** Get an object that provides ordered iteration over all features.\r\n * @note The `output` object is reused (mutated in place) as the current value on each iteration.\r\n */\r\n iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex>;\r\n\r\n /** @alpha */\r\n populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void;\r\n\r\n /** @alpha */\r\n getAnimationNodeId(featureIndex: number): number;\r\n\r\n /** Get the Id of the model associated with the feature at the specified index.\r\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\r\n * This is more efficient than [[getFeature]] for callers who are only interested in the model Id.\r\n */\r\n getModelIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\r\n}\r\n"]}
|
package/lib/esm/Fonts.js.map
CHAN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W,EAAE;gBAC/C,OAAO,IAAI,CAAC;QAEhB,OAAO,SAAS,CAAC;IACnB,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\n/** The [FontFile]($backend) encodings understood by iTwin.js.\n * @see [this article]($docs/learning/backend/Fonts.md) to learn more about fonts in iModels.\n * @public\n * @extensions\n */\nexport enum FontType {\n /** [OpenType](https://en.wikipedia.org/wiki/OpenType) format, derived from and compatible with the earlier [TrueType](https://en.wikipedia.org/wiki/TrueType) format.\n * The vast majority of modern, scalable, aesthetically-pleasing fonts are delivered in this format.\n * OpenType files typically use one of the following suffixes: .ttf, .ttc, .otf, and .otc.\n * @see [FontFile.createFromTrueTypeFileName]($backend) to work with font files in this format.\n */\n TrueType = 1,\n /** [RSC](https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v27/en/GUID-FC78484C-E42F-30BF-BF68-2B2C025AE040.html) is a simple font format\n * originating in [MicroStation](https://en.wikipedia.org/wiki/MicroStation). In MicroStation, they are defined in \"resource files\" with a \".rsc\" suffix.\n * In iModels, they are encoded in a binary format. Currently, no APIs exist to convert to this binary format, but some [connectors]($docs/learning/imodel-connectors.md) can\n * perform the conversion.\n */\n Rsc = 2,\n /** [SHX](https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-DE941DB5-7044-433C-AA68-2A9AE98A5713) is a simple font format originating in\n * [AutoCAD](https://en.wikipedia.org/wiki/AutoCAD). SHX fonts are generally distributed as files with a \".shx\" suffix.\n * @see [FontFile.createFromShxFontBlob]($backend) to work with font files in this format.\n */\n Shx = 3,\n}\n\n/** An unsigned integer uniquely identifying a [font family]($docs/learning/backend/Fonts.md) in the context of an [[IModel]].\n * The iModel stores a mapping between `FontId`s and [[FontFamilyDescriptor]]s.\n * [[TextString]]s refer to fonts by the their `FontId`s.\n * A font Id of zero represents an invalid/non-existent font.\n * @see [IModelDbFonts]($backend) to work with font Ids.\n * @public\n * @extensions\n */\nexport type FontId = number;\n\n/** Uniquely describes one or more [[FontFace]]s sharing the same name and type comprising a single [font family]($docs/learning/backend/Fonts.md).\n * @public\n */\nexport interface FontFamilyDescriptor {\n /** The encoding in which the font family's faces are stored. */\n type: FontType;\n /** The name of the family. */\n name: string;\n}\n\n/** A [[FontFamilyDescriptor]] in which the [[FontType]] is optional, used when querying [[FontId]]s via [IModelDbFonts.findId]($backend).\n * If a font type is provided, this selector exactly identifies a unique font family, just like [[FontFamilyDescriptor]] does.\n * If the type is omitted, then the selector refers to the first font family that matches the specified [[name]]. If multiple families\n * with the same name exist, then a TrueType font will be preferred over a RSC font, and a RSC font preferred over an SHX font.\n * @beta\n */\nexport interface FontFamilySelector {\n /** The encoding in which the font family's faces are stored. */\n type?: FontType;\n /** The name of the family. */\n name: string;\n}\n\n/** Represents a [[FontFamilyDescriptor]] stored in an iModel with a unique numeric Id.\n * @public\n */\nexport interface FontProps extends FontFamilyDescriptor {\n /** An integer that uniquely identifies this font family in the context of the iModel in which it is stored. */\n id: FontId;\n}\n\n/** A specific variation of the glyphs defined by a [font family]($docs/learning/backend/Fonts.md).\n * Each face can be italicized, bolded, both, or neither.\n * Font faces are stored in [FontFile]($backend)s.\n * @beta\n */\nexport interface FontFace {\n /** The name of the font family to which this face belongs. */\n familyName: string;\n isBold: boolean;\n isItalic: boolean;\n}\n\n/** Information about the encoding of a [[FontType.Rsc]] [FontFile]($backend), used when embedding such a font into an iModel.\n * Currently, no public APIs exist to create such fonts.\n * @alpha\n */\nexport interface RscFontEncodingProps {\n codePage?: number;\n degree?: number;\n plusMinus?: number;\n diameter?: number;\n}\n\n/** The properties of a FontMap\n * @public\n * @extensions\n * @deprecated in 5.0.0 - will not be removed until after 2026-06-13. Use [IModelDb.fonts]($backend)\n */\nexport interface FontMapProps { fonts: FontProps[] }\n\n/**\n * A FontMap holds the set of font names available in an iModel.\n * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.\n * This class maps FontIds to FontProps.\n * @note This API has never worked properly. Don't use it. Use [IModelDb.fonts]($backend) instead.\n * @public\n * @deprecated in 5.0.0 - will not be removed until after 2026-06-13. Use [IModelDb.fonts]($backend) instead.\n */\nexport class FontMap {\n public readonly fonts = new Map<FontId, FontProps>();\n constructor(props?: FontMapProps) { // eslint-disable-line @typescript-eslint/no-deprecated\n if (undefined !== props)\n this.addFonts(props.fonts);\n }\n public addFonts(fonts: FontProps[]) {\n fonts.forEach((font) => this.fonts.set(font.id, font));\n }\n public toJSON(): FontMapProps { // eslint-disable-line @typescript-eslint/no-deprecated\n const fonts: FontProps[] = [];\n this.fonts.forEach((font) => fonts.push(font));\n return { fonts };\n }\n /** look up a font by case insensitive name or number and return its FontProps */\n public getFont(arg: string | FontId): FontProps | undefined {\n if (typeof arg === \"number\")\n return this.fonts.get(arg);\n\n for (const font of this.fonts.values())\n if (font.name.toLowerCase() === arg.toLowerCase())\n return font;\n\n return undefined;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Fonts.js","sourceRoot":"","sources":["../../src/Fonts.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;;GAIG;AACH,MAAM,CAAN,IAAY,QAkBX;AAlBD,WAAY,QAAQ;IAClB;;;;OAIG;IACH,+CAAY,CAAA;IACZ;;;;OAIG;IACH,qCAAO,CAAA;IACP;;;OAGG;IACH,qCAAO,CAAA;AACT,CAAC,EAlBW,QAAQ,KAAR,QAAQ,QAkBnB;AAyED;;;;;;;GAOG;AACH,MAAM,OAAO,OAAO;IACF,KAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;IACrD,YAAY,KAAoB;QAC9B,IAAI,SAAS,KAAK,KAAK;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACM,QAAQ,CAAC,KAAkB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IACM,MAAM;QACX,MAAM,KAAK,GAAgB,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IACD,iFAAiF;IAC1E,OAAO,CAAC,GAAoB;QACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;YACzB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAE7B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpC,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,WAAW,EAAE;gBAC/C,OAAO,IAAI,CAAC;QAEhB,OAAO,SAAS,CAAC;IACnB,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\n/** The [FontFile]($backend) encodings understood by iTwin.js.\r\n * @see [this article]($docs/learning/backend/Fonts.md) to learn more about fonts in iModels.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum FontType {\r\n /** [OpenType](https://en.wikipedia.org/wiki/OpenType) format, derived from and compatible with the earlier [TrueType](https://en.wikipedia.org/wiki/TrueType) format.\r\n * The vast majority of modern, scalable, aesthetically-pleasing fonts are delivered in this format.\r\n * OpenType files typically use one of the following suffixes: .ttf, .ttc, .otf, and .otc.\r\n * @see [FontFile.createFromTrueTypeFileName]($backend) to work with font files in this format.\r\n */\r\n TrueType = 1,\r\n /** [RSC](https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v27/en/GUID-FC78484C-E42F-30BF-BF68-2B2C025AE040.html) is a simple font format\r\n * originating in [MicroStation](https://en.wikipedia.org/wiki/MicroStation). In MicroStation, they are defined in \"resource files\" with a \".rsc\" suffix.\r\n * In iModels, they are encoded in a binary format. Currently, no APIs exist to convert to this binary format, but some [connectors]($docs/learning/imodel-connectors.md) can\r\n * perform the conversion.\r\n */\r\n Rsc = 2,\r\n /** [SHX](https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-DE941DB5-7044-433C-AA68-2A9AE98A5713) is a simple font format originating in\r\n * [AutoCAD](https://en.wikipedia.org/wiki/AutoCAD). SHX fonts are generally distributed as files with a \".shx\" suffix.\r\n * @see [FontFile.createFromShxFontBlob]($backend) to work with font files in this format.\r\n */\r\n Shx = 3,\r\n}\r\n\r\n/** An unsigned integer uniquely identifying a [font family]($docs/learning/backend/Fonts.md) in the context of an [[IModel]].\r\n * The iModel stores a mapping between `FontId`s and [[FontFamilyDescriptor]]s.\r\n * [[TextString]]s refer to fonts by the their `FontId`s.\r\n * A font Id of zero represents an invalid/non-existent font.\r\n * @see [IModelDbFonts]($backend) to work with font Ids.\r\n * @public\r\n * @extensions\r\n */\r\nexport type FontId = number;\r\n\r\n/** Uniquely describes one or more [[FontFace]]s sharing the same name and type comprising a single [font family]($docs/learning/backend/Fonts.md).\r\n * @public\r\n */\r\nexport interface FontFamilyDescriptor {\r\n /** The encoding in which the font family's faces are stored. */\r\n type: FontType;\r\n /** The name of the family. */\r\n name: string;\r\n}\r\n\r\n/** A [[FontFamilyDescriptor]] in which the [[FontType]] is optional, used when querying [[FontId]]s via [IModelDbFonts.findId]($backend).\r\n * If a font type is provided, this selector exactly identifies a unique font family, just like [[FontFamilyDescriptor]] does.\r\n * If the type is omitted, then the selector refers to the first font family that matches the specified [[name]]. If multiple families\r\n * with the same name exist, then a TrueType font will be preferred over a RSC font, and a RSC font preferred over an SHX font.\r\n * @beta\r\n */\r\nexport interface FontFamilySelector {\r\n /** The encoding in which the font family's faces are stored. */\r\n type?: FontType;\r\n /** The name of the family. */\r\n name: string;\r\n}\r\n\r\n/** Represents a [[FontFamilyDescriptor]] stored in an iModel with a unique numeric Id.\r\n * @public\r\n */\r\nexport interface FontProps extends FontFamilyDescriptor {\r\n /** An integer that uniquely identifies this font family in the context of the iModel in which it is stored. */\r\n id: FontId;\r\n}\r\n\r\n/** A specific variation of the glyphs defined by a [font family]($docs/learning/backend/Fonts.md).\r\n * Each face can be italicized, bolded, both, or neither.\r\n * Font faces are stored in [FontFile]($backend)s.\r\n * @beta\r\n */\r\nexport interface FontFace {\r\n /** The name of the font family to which this face belongs. */\r\n familyName: string;\r\n isBold: boolean;\r\n isItalic: boolean;\r\n}\r\n\r\n/** Information about the encoding of a [[FontType.Rsc]] [FontFile]($backend), used when embedding such a font into an iModel.\r\n * Currently, no public APIs exist to create such fonts.\r\n * @alpha\r\n */\r\nexport interface RscFontEncodingProps {\r\n codePage?: number;\r\n degree?: number;\r\n plusMinus?: number;\r\n diameter?: number;\r\n}\r\n\r\n/** The properties of a FontMap\r\n * @public\r\n * @extensions\r\n * @deprecated in 5.0.0 - will not be removed until after 2026-06-13. Use [IModelDb.fonts]($backend)\r\n */\r\nexport interface FontMapProps { fonts: FontProps[] }\r\n\r\n/**\r\n * A FontMap holds the set of font names available in an iModel.\r\n * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.\r\n * This class maps FontIds to FontProps.\r\n * @note This API has never worked properly. Don't use it. Use [IModelDb.fonts]($backend) instead.\r\n * @public\r\n * @deprecated in 5.0.0 - will not be removed until after 2026-06-13. Use [IModelDb.fonts]($backend) instead.\r\n */\r\nexport class FontMap {\r\n public readonly fonts = new Map<FontId, FontProps>();\r\n constructor(props?: FontMapProps) { // eslint-disable-line @typescript-eslint/no-deprecated\r\n if (undefined !== props)\r\n this.addFonts(props.fonts);\r\n }\r\n public addFonts(fonts: FontProps[]) {\r\n fonts.forEach((font) => this.fonts.set(font.id, font));\r\n }\r\n public toJSON(): FontMapProps { // eslint-disable-line @typescript-eslint/no-deprecated\r\n const fonts: FontProps[] = [];\r\n this.fonts.forEach((font) => fonts.push(font));\r\n return { fonts };\r\n }\r\n /** look up a font by case insensitive name or number and return its FontProps */\r\n public getFont(arg: string | FontId): FontProps | undefined {\r\n if (typeof arg === \"number\")\r\n return this.fonts.get(arg);\r\n\r\n for (const font of this.fonts.values())\r\n if (font.name.toLowerCase() === arg.toLowerCase())\r\n return font;\r\n\r\n return undefined;\r\n }\r\n}\r\n"]}
|