@itwin/core-common 4.8.0-dev.4 → 4.8.0-dev.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Change Log - @itwin/core-common
2
2
 
3
- This log was last generated on Sat, 08 Jun 2024 00:53:21 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 12 Jun 2024 18:03:49 GMT and should not be manually modified.
4
+
5
+ ## 4.7.0
6
+ Wed, 12 Jun 2024 18:02:16 GMT
7
+
8
+ ### Updates
9
+
10
+ - Add SchemaSync as new changeset type.
11
+ - Fix failed HTTP RPC request not being rejected if `X-Protocol-Version` is not available.
12
+ - Added TextAnnotation.offset.
13
+ - Promote QPoint2dBufferBuilderOptions and QPoint3dBufferBuilderOptions from beta to public
4
14
 
5
15
  ## 4.6.2
6
16
  Sat, 08 Jun 2024 00:50:25 GMT
@@ -393,6 +393,10 @@ export declare class FeatureOverrides implements FeatureAppearanceSource {
393
393
  * @internal
394
394
  */
395
395
  getSubCategoryPriority(idLo: number, idHi: number): number;
396
+ /** Adds all fully transparent elements to the _neverDrawn set. This is used for BatchedModels planar masks.
397
+ * @internal
398
+ */
399
+ addInvisibleElementOverridesToNeverDrawn(): void;
396
400
  /** Construct a new Overrides that overrides nothing.
397
401
  * @see [FeatureSymbology.Overrides]($frontend) to construct overrides based on a [ViewState]($frontend) or [Viewport]($frontend).
398
402
  */
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureSymbology.d.ts","sourceRoot":"","sources":["../../src/FeatureSymbology.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,IAAI,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAA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AG,MAAM;IAIjE;;OAEG;IACI,wCAAwC,IAAI,IAAI;IAQvD;;OAEG;;IAKH,qFAAqF;IAC9E,sBAAsB,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO;IACtD,2GAA2G;IACpG,qBAAqB,CAAC,EAAE,EAAE,UAAU,GAAG,iBAAiB,GAAG,SAAS;IAC3E,6GAA6G;IACtG,uBAAuB,CAAC,EAAE,EAAE,UAAU,GAAG,iBAAiB,GAAG,SAAS;IAC7E,iHAAiH;IAC1G,2BAA2B,CAAC,EAAE,EAAE,UAAU,GAAG,iBAAiB,GAAG,SAAS;IAEjF,2DAA2D;IACpD,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;CAkBnD;AAED;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;;;;;;;;;;;OAeG;IACH,oBAAoB,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAAC;CAChQ;AAED,cAAc;AACd,yBAAiB,yBAAyB,CAAC;IAUzC;;;OAGG;IACH,SAAgB,UAAU,CAAC,oBAAoB,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,iBAAiB,GAAG,yBAAyB,CAOhI;IAED;;;OAGG;IACH,SAAgB,KAAK,CAAC,KAAK,EAAE,yBAAyB,EAAE,MAAM,EAAE,yBAAyB,GAAG,yBAAyB,CASpH;CACF"}
@@ -494,6 +494,16 @@ class FeatureOverrides {
494
494
  getSubCategoryPriority(idLo, idHi) {
495
495
  return this._subCategoryPriorities.get(idLo, idHi) ?? 0;
496
496
  }
497
+ /** Adds all fully transparent elements to the _neverDrawn set. This is used for BatchedModels planar masks.
498
+ * @internal
499
+ */
500
+ addInvisibleElementOverridesToNeverDrawn() {
501
+ this._elementOverrides.forEach((lo, hi) => {
502
+ const app = this.getElementOverrides(lo, hi, 0);
503
+ if (app?.isFullyTransparent)
504
+ this._neverDrawn.add(lo, hi);
505
+ });
506
+ }
497
507
  /** Construct a new Overrides that overrides nothing.
498
508
  * @see [FeatureSymbology.Overrides]($frontend) to construct overrides based on a [ViewState]($frontend) or [Viewport]($frontend).
499
509
  */
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../src/FeatureSymbology.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA+D;AAC/D,iDAAoD;AAEpD,qDAAiD;AAEjD,yCAAqD;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,MAAM,EAAE,IAAI,GAAG;YAClB,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AA2BD;;;;GAIG;AACH,MAAa,iBAAiB;IA0BrB,MAAM,CAAC,QAAQ,CAAC,KAA8B;QACnD,IAAI,SAAS,KAAK,KAAK,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,GAAG,IAAI,SAAS,KAAK,KAAK,CAAC,MAAM,IAAI,SAAS,KAAK,KAAK,CAAC,YAAY,IAAI,SAAS,KAAK,KAAK,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,eAAe,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;YAC5N,OAAO,IAAI,CAAC,QAAQ,CAAC;;YAErB,OAAO,IAAI,iBAAiB,CA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,QASpB,CAAA;AACH,CAAC,EArCgB,yBAAyB,yCAAzB,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.weight]]. */\r\n weight?: number;\r\n /** See [[FeatureAppearance.transparency]]. */\r\n transparency?: number;\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\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 * @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 public readonly rgb?: RgbColor;\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 * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\r\n */\r\n public readonly transparency?: number;\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]] 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 [[transparency]] is `undefined`.\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 (undefined === props || (undefined === props.rgb && undefined === props.weight && undefined === props.transparency && undefined === props.linePixels && !props.ignoresMaterial && !props.nonLocatable && !props.emphasized))\r\n return this.defaults;\r\n else\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 this.fromJSON({ 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 this.fromJSON({\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 this.fromJSON({\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 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 }\r\n public get overridesNonLocatable(): boolean { return undefined !== this.nonLocatable; }\r\n public get isFullyTransparent(): boolean { return undefined !== this.transparency && this.transparency >= 1.0; }\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 this.rgbIsEqual(other.rgb)\r\n && this.weight === other.weight\r\n && this.transparencyIsEqual(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 }\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 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\r\n if (undefined !== props.transparency && this.viewDependentTransparency)\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.weight = props.weight;\r\n this.transparency = props.transparency;\r\n this.linePixels = props.linePixels;\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 if (undefined !== this.transparency) {\r\n if (props.viewDependentTransparency)\r\n this.viewDependentTransparency = true;\r\n\r\n this.transparency = Math.max(0, Math.min(this.transparency, 1));\r\n\r\n // Fix up rounding errors...\r\n const smallDelta = 0.0001;\r\n if (1.0 - this.transparency < smallDelta)\r\n this.transparency = 1.0;\r\n else if (this.transparency < smallDelta)\r\n this.transparency = 0.0;\r\n }\r\n }\r\n\r\n private rgbIsEqual(rgb?: RgbColor): boolean {\r\n if (undefined === this.rgb)\r\n return undefined === rgb;\r\n else if (undefined === rgb)\r\n return false;\r\n else\r\n return this.rgb.equals(rgb);\r\n }\r\n\r\n private transparencyIsEqual(transp?: number): boolean {\r\n if (undefined === this.transparency)\r\n return undefined === transp;\r\n else if (undefined === transp)\r\n return false;\r\n else\r\n return Math.floor(this.transparency * 0xff) === Math.floor(transp * 0xff);\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 /** @internal */\r\n elementId?: never;\r\n /** @internal */\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 /** @internal */\r\n modelId?: never;\r\n /** @internal */\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 /** @internal */\r\n modelId?: never;\r\n /** @internal */\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 protected readonly _ignoreAnimationOverrides: IgnoreAnimationOverrides[] = [];\r\n /** Ids of elements that should never be drawn. This takes precedence over [[alwaysDrawn]]. @internal */\r\n protected readonly _neverDrawn = new Id64.Uint32Set();\r\n /** Ids of elements that should always be drawn. [[neverDrawn]] takes precedence over this set. @internal */\r\n protected 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 * @internal\r\n */\r\n public ignoreSubCategory = false;\r\n\r\n /** Overrides applied to any feature not explicitly overridden. @internal */\r\n protected _defaultOverrides = FeatureAppearance.defaults;\r\n /** Whether construction geometry should be drawn. @internal */\r\n protected _constructions = false;\r\n /** Whether dimensions should be drawn. @internal */\r\n protected _dimensions = false;\r\n /** Whether area patterns should be drawn. @internal */\r\n protected _patterns = false;\r\n /** Whether line weights should be applied. If false, all lines are rendered 1-pixel wide. @internal */\r\n protected _lineWeights = true;\r\n\r\n /** Overrides applied to all elements belonging to each model. @internal */\r\n protected readonly _modelOverrides = new Id64.Uint32Map<FeatureAppearance>();\r\n /** Overrides applied to specific elements. @internal */\r\n protected readonly _elementOverrides = new Id64.Uint32Map<FeatureAppearance>();\r\n /** Overrides applied to geometry belonging to each subcategory. @internal */\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. @internal */\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. @internal */\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 * @internal\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 * @internal\r\n */\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 /** @internal */\r\n protected 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 /** @internal */\r\n protected isAlwaysDrawn(idLo: number, idHi: number): boolean { return this._alwaysDrawn.has(idLo, idHi); }\r\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories. @internal */\r\n public isSubCategoryVisible(idLo: number, idHi: number): boolean { return this._visibleSubCategories.has(idLo, idHi); }\r\n /** @internal */\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 /** @internal */\r\n protected 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 /** @internal */\r\n protected 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 /** @internal */\r\n protected 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 * @internal\r\n */\r\n protected 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 elements within the specified model.\r\n * @param id The Id of the model.\r\n * @param app The symbology overrides.\r\n * @param replaceExisting Specifies whether to replace a pre-existing override for the same model.\r\n * @note These overrides take priority over all other overrides.\r\n * @note If [[defaultOverrides]] are defined, they will not apply to any element within this model, even if the supplied appearance overrides nothing.\r\n * @deprecated in 3.x. Use [[FeatureOverrides.override]].\r\n */\r\n public overrideModel(id: Id64String, app: FeatureAppearance, replaceExisting: boolean = true): void {\r\n this.override({ modelId: id, appearance: app, onConflict: replaceExisting ? \"replace\" : \"skip\" });\r\n }\r\n\r\n /** Specify overrides for all geometry belonging to the specified [SubCategory]($backend).\r\n * @param id The Id of the subcategory.\r\n * @param app The symbology overrides.\r\n * @param replaceExisting Specifies whether to replace a pre-existing override for the same subcategory.\r\n * @note These overrides have lower priority than element and model overrides.\r\n * @note If [[defaultOverrides]] are defined, they will not apply to any geometry within this subcategory, even if the supplied appearance overrides nothing.\r\n * @deprecated in 3.x. Use [[FeatureOverrides.override]].\r\n */\r\n public overrideSubCategory(id: Id64String, app: FeatureAppearance, replaceExisting: boolean = true): void {\r\n this.override({ subCategoryId: id, appearance: app, onConflict: replaceExisting ? \"replace\" : \"skip\" });\r\n }\r\n\r\n /** Specify overrides for all geometry originating from the specified element.\r\n * @param id The Id of the element.\r\n * @param app The symbology overrides.\r\n * @param replaceExisting Specifies whether to replace a pre-existing override for the same element.\r\n * @note These overrides take precedence over subcategory overrides, but not over model overrides.\r\n * @note If [[defaultOverrides]] are defined, they will not apply to this element, even if the supplied appearance overrides nothing.\r\n * @deprecated in 3.x. Use [[FeatureOverrides.override]].\r\n */\r\n public overrideElement(id: Id64String, app: FeatureAppearance, replaceExisting: boolean = true): void {\r\n this.override({ elementId: id, appearance: app, onConflict: replaceExisting ? \"replace\" : \"skip\" });\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 * @internal\r\n */\r\n public getSubCategoryPriority(idLo: number, idHi: number): number {\r\n return this._subCategoryPriorities.get(idLo, idHi) ?? 0;\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
+ {"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../src/FeatureSymbology.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA+D;AAC/D,iDAAoD;AAEpD,qDAAiD;AAEjD,yCAAqD;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,MAAM,EAAE,IAAI,GAAG;YAClB,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AA2BD;;;;GAIG;AACH,MAAa,iBAAiB;IA0BrB,MAAM,CAAC,QAAQ,CAAC,KAA8B;QACnD,IAAI,SAAS,KAAK,KAAK,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,GAAG,IAAI,SAAS,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,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,yCAAzB,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.weight]]. */\r\n weight?: number;\r\n /** See [[FeatureAppearance.transparency]]. */\r\n transparency?: number;\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\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 * @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 public readonly rgb?: RgbColor;\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 * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\r\n */\r\n public readonly transparency?: number;\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]] 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 [[transparency]] is `undefined`.\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 (undefined === props || (undefined === props.rgb && undefined === props.weight && undefined === props.transparency && undefined === props.linePixels && !props.ignoresMaterial && !props.nonLocatable && !props.emphasized))\r\n return this.defaults;\r\n else\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 this.fromJSON({ 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 this.fromJSON({\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 this.fromJSON({\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 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 }\r\n public get overridesNonLocatable(): boolean { return undefined !== this.nonLocatable; }\r\n public get isFullyTransparent(): boolean { return undefined !== this.transparency && this.transparency >= 1.0; }\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 this.rgbIsEqual(other.rgb)\r\n && this.weight === other.weight\r\n && this.transparencyIsEqual(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 }\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 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\r\n if (undefined !== props.transparency && this.viewDependentTransparency)\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.weight = props.weight;\r\n this.transparency = props.transparency;\r\n this.linePixels = props.linePixels;\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 if (undefined !== this.transparency) {\r\n if (props.viewDependentTransparency)\r\n this.viewDependentTransparency = true;\r\n\r\n this.transparency = Math.max(0, Math.min(this.transparency, 1));\r\n\r\n // Fix up rounding errors...\r\n const smallDelta = 0.0001;\r\n if (1.0 - this.transparency < smallDelta)\r\n this.transparency = 1.0;\r\n else if (this.transparency < smallDelta)\r\n this.transparency = 0.0;\r\n }\r\n }\r\n\r\n private rgbIsEqual(rgb?: RgbColor): boolean {\r\n if (undefined === this.rgb)\r\n return undefined === rgb;\r\n else if (undefined === rgb)\r\n return false;\r\n else\r\n return this.rgb.equals(rgb);\r\n }\r\n\r\n private transparencyIsEqual(transp?: number): boolean {\r\n if (undefined === this.transparency)\r\n return undefined === transp;\r\n else if (undefined === transp)\r\n return false;\r\n else\r\n return Math.floor(this.transparency * 0xff) === Math.floor(transp * 0xff);\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 /** @internal */\r\n elementId?: never;\r\n /** @internal */\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 /** @internal */\r\n modelId?: never;\r\n /** @internal */\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 /** @internal */\r\n modelId?: never;\r\n /** @internal */\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 protected readonly _ignoreAnimationOverrides: IgnoreAnimationOverrides[] = [];\r\n /** Ids of elements that should never be drawn. This takes precedence over [[alwaysDrawn]]. @internal */\r\n protected readonly _neverDrawn = new Id64.Uint32Set();\r\n /** Ids of elements that should always be drawn. [[neverDrawn]] takes precedence over this set. @internal */\r\n protected 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 * @internal\r\n */\r\n public ignoreSubCategory = false;\r\n\r\n /** Overrides applied to any feature not explicitly overridden. @internal */\r\n protected _defaultOverrides = FeatureAppearance.defaults;\r\n /** Whether construction geometry should be drawn. @internal */\r\n protected _constructions = false;\r\n /** Whether dimensions should be drawn. @internal */\r\n protected _dimensions = false;\r\n /** Whether area patterns should be drawn. @internal */\r\n protected _patterns = false;\r\n /** Whether line weights should be applied. If false, all lines are rendered 1-pixel wide. @internal */\r\n protected _lineWeights = true;\r\n\r\n /** Overrides applied to all elements belonging to each model. @internal */\r\n protected readonly _modelOverrides = new Id64.Uint32Map<FeatureAppearance>();\r\n /** Overrides applied to specific elements. @internal */\r\n protected readonly _elementOverrides = new Id64.Uint32Map<FeatureAppearance>();\r\n /** Overrides applied to geometry belonging to each subcategory. @internal */\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. @internal */\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. @internal */\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 * @internal\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 * @internal\r\n */\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 /** @internal */\r\n protected 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 /** @internal */\r\n protected isAlwaysDrawn(idLo: number, idHi: number): boolean { return this._alwaysDrawn.has(idLo, idHi); }\r\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories. @internal */\r\n public isSubCategoryVisible(idLo: number, idHi: number): boolean { return this._visibleSubCategories.has(idLo, idHi); }\r\n /** @internal */\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 /** @internal */\r\n protected 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 /** @internal */\r\n protected 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 /** @internal */\r\n protected 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 * @internal\r\n */\r\n protected 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 elements within the specified model.\r\n * @param id The Id of the model.\r\n * @param app The symbology overrides.\r\n * @param replaceExisting Specifies whether to replace a pre-existing override for the same model.\r\n * @note These overrides take priority over all other overrides.\r\n * @note If [[defaultOverrides]] are defined, they will not apply to any element within this model, even if the supplied appearance overrides nothing.\r\n * @deprecated in 3.x. Use [[FeatureOverrides.override]].\r\n */\r\n public overrideModel(id: Id64String, app: FeatureAppearance, replaceExisting: boolean = true): void {\r\n this.override({ modelId: id, appearance: app, onConflict: replaceExisting ? \"replace\" : \"skip\" });\r\n }\r\n\r\n /** Specify overrides for all geometry belonging to the specified [SubCategory]($backend).\r\n * @param id The Id of the subcategory.\r\n * @param app The symbology overrides.\r\n * @param replaceExisting Specifies whether to replace a pre-existing override for the same subcategory.\r\n * @note These overrides have lower priority than element and model overrides.\r\n * @note If [[defaultOverrides]] are defined, they will not apply to any geometry within this subcategory, even if the supplied appearance overrides nothing.\r\n * @deprecated in 3.x. Use [[FeatureOverrides.override]].\r\n */\r\n public overrideSubCategory(id: Id64String, app: FeatureAppearance, replaceExisting: boolean = true): void {\r\n this.override({ subCategoryId: id, appearance: app, onConflict: replaceExisting ? \"replace\" : \"skip\" });\r\n }\r\n\r\n /** Specify overrides for all geometry originating from the specified element.\r\n * @param id The Id of the element.\r\n * @param app The symbology overrides.\r\n * @param replaceExisting Specifies whether to replace a pre-existing override for the same element.\r\n * @note These overrides take precedence over subcategory overrides, but not over model overrides.\r\n * @note If [[defaultOverrides]] are defined, they will not apply to this element, even if the supplied appearance overrides nothing.\r\n * @deprecated in 3.x. Use [[FeatureOverrides.override]].\r\n */\r\n public overrideElement(id: Id64String, app: FeatureAppearance, replaceExisting: boolean = true): void {\r\n this.override({ elementId: id, appearance: app, onConflict: replaceExisting ? \"replace\" : \"skip\" });\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 * @internal\r\n */\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 * @internal\r\n */\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"]}
@@ -12,15 +12,24 @@ export declare enum PlanarClipMaskMode {
12
12
  /** Mask based on priority. Different types of models have different default priorities as enumerated by [[PlanarClipMaskPriority]].
13
13
  * For example, background maps have the lowest priority, so they are masked by all other types, while design models have the highest priority and are therefore never masked.
14
14
  * The priority of a reality model can be overridden by [[PlanarClipMaskSettings.priority]]. This is useful to allow one reality model to mask another overlapping one.
15
+ * Everything visible in the view creates the mask, so turning off models, categories, or elements (via fully transparent overrides) will make things not be in the mask.
15
16
  */
16
17
  Priority = 1,
17
- /** Indicates that masks should be produced from the geometry in a set of [GeometricModel]($backend)s. */
18
+ /** Indicates that masks should be produced from the geometry in a set of [GeometricModel]($backend)s, regardless of what model is on or off in the view.
19
+ * However, things that are off from category settings or element feature overrides in the view will not be in the mask for these models.
20
+ */
18
21
  Models = 2,
19
- /** Indicates that masks should be produced from geometry belonging to a set of subcategories. */
22
+ /** Indicates that masks should be produced from geometry belonging to a set of subcategories.
23
+ * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.
24
+ */
20
25
  IncludeSubCategories = 3,
21
- /** Indicates that masks should be produced from the geometry of a set of [GeometricElement]($backend)s. */
26
+ /** Indicates that masks should be produced from the geometry of a set of [GeometricElement]($backend)s.
27
+ * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.
28
+ */
22
29
  IncludeElements = 4,
23
- /** Indicates that masks should be produced from the geometry of all [GeometricElement]($backend)s in a view, **except** for a specified set of excluded elements. */
30
+ /** Indicates that masks should be produced from the geometry of all [GeometricElement]($backend)s in a view, **except** for a specified set of excluded elements.
31
+ * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.
32
+ */
24
33
  ExcludeElements = 5
25
34
  }
26
35
  /** The default priority values for a [[PlanarClipMaskSettings]], based on model type. Models with a lower priority are masked by models with a higher priority.
@@ -136,13 +145,14 @@ export interface PriorityPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {
136
145
  export declare class PlanarClipMaskSettings {
137
146
  /** Specifies how the mask geometry is produced. */
138
147
  readonly mode: PlanarClipMaskMode;
139
- /** For any mode other than [[PlanarClipMaskMode.Priority]], the Ids of the [GeometricModel]($backend)s containing the geometry used to produce the mask.
140
- * If `undefined`, the set of all models in the view's [ModelSelector]($backend) is used.
148
+ /** For any mode other than [[PlanarClipMaskMode.Priority]], the Ids of the [GeometricModel]($backend)s containing the geometry used to produce the mask,
149
+ * and if `undefined`, no mask geometry will be created.
141
150
  * The mask geometry can be filtered by [[subCategoryOrElementIds]].
142
151
  */
143
152
  readonly modelIds?: OrderedId64Iterable;
144
153
  /** For [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludedElements]], the Ids of the [GeometricElement]($backend)s to include or exclude from masking;
145
154
  * for [[PlanarClipMaskMode.IncludeSubCategories]], the Ids of the subcategories whose geometry contributes to the mask.
155
+ * If undefined, Modes IncludeSubCategories, IncludeElements, and ExcludeElements behave like Models mode.
146
156
  */
147
157
  readonly subCategoryOrElementIds?: OrderedId64Iterable;
148
158
  /** For [[PlanarClipMaskMode.Priority]], the priority value. */
@@ -1 +1 @@
1
- {"version":3,"file":"PlanarClipMask.d.ts","sourceRoot":"","sources":["../../src/PlanarClipMask.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEzF;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,kBAAkB;IAClB,IAAI,IAAI;IACR;;;OAGG;IACH,QAAQ,I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sBAAsB;IAO1E,2CAA2C;WAC7B,MAAM,CAAC,IAAI,EAAE,uBAAuB,GAAG,yBAAyB,GAAG,6BAA6B,GAAG,0BAA0B,GAAG,sBAAsB;IAYpK,sEAAsE;IAC/D,MAAM,IAAI,mBAAmB;IAoBpC,0CAA0C;IAC1C,IAAW,OAAO,IAAI,OAAO,CAE5B;IAEM,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO;IASrD;;;OAGG;IACI,KAAK,CAAC,YAAY,CAAC,EAAE,mBAAmB,GAAG,sBAAsB;IAUxE,OAAO;IAeP,oDAAoD;IACpD,OAAc,QAAQ,yBAAuD;CAC9E"}
@@ -20,15 +20,24 @@ var PlanarClipMaskMode;
20
20
  /** Mask based on priority. Different types of models have different default priorities as enumerated by [[PlanarClipMaskPriority]].
21
21
  * For example, background maps have the lowest priority, so they are masked by all other types, while design models have the highest priority and are therefore never masked.
22
22
  * The priority of a reality model can be overridden by [[PlanarClipMaskSettings.priority]]. This is useful to allow one reality model to mask another overlapping one.
23
+ * Everything visible in the view creates the mask, so turning off models, categories, or elements (via fully transparent overrides) will make things not be in the mask.
23
24
  */
24
25
  PlanarClipMaskMode[PlanarClipMaskMode["Priority"] = 1] = "Priority";
25
- /** Indicates that masks should be produced from the geometry in a set of [GeometricModel]($backend)s. */
26
+ /** Indicates that masks should be produced from the geometry in a set of [GeometricModel]($backend)s, regardless of what model is on or off in the view.
27
+ * However, things that are off from category settings or element feature overrides in the view will not be in the mask for these models.
28
+ */
26
29
  PlanarClipMaskMode[PlanarClipMaskMode["Models"] = 2] = "Models";
27
- /** Indicates that masks should be produced from geometry belonging to a set of subcategories. */
30
+ /** Indicates that masks should be produced from geometry belonging to a set of subcategories.
31
+ * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.
32
+ */
28
33
  PlanarClipMaskMode[PlanarClipMaskMode["IncludeSubCategories"] = 3] = "IncludeSubCategories";
29
- /** Indicates that masks should be produced from the geometry of a set of [GeometricElement]($backend)s. */
34
+ /** Indicates that masks should be produced from the geometry of a set of [GeometricElement]($backend)s.
35
+ * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.
36
+ */
30
37
  PlanarClipMaskMode[PlanarClipMaskMode["IncludeElements"] = 4] = "IncludeElements";
31
- /** Indicates that masks should be produced from the geometry of all [GeometricElement]($backend)s in a view, **except** for a specified set of excluded elements. */
38
+ /** Indicates that masks should be produced from the geometry of all [GeometricElement]($backend)s in a view, **except** for a specified set of excluded elements.
39
+ * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.
40
+ */
32
41
  PlanarClipMaskMode[PlanarClipMaskMode["ExcludeElements"] = 5] = "ExcludeElements";
33
42
  })(PlanarClipMaskMode || (exports.PlanarClipMaskMode = PlanarClipMaskMode = {}));
34
43
  /** The default priority values for a [[PlanarClipMaskSettings]], based on model type. Models with a lower priority are masked by models with a higher priority.
@@ -1 +1 @@
1
- {"version":3,"file":"PlanarClipMask.js","sourceRoot":"","sources":["../../src/PlanarClipMask.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyF;AAEzF;;;GAGG;AACH,IAAY,kBAgBX;AAhBD,WAAY,kBAAkB;IAC5B,kBAAkB;IAClB,2DAAQ,CAAA;IACR;;;OAGG;IACH,mEAAY,CAAA;IACZ,yGAAyG;IACzG,+DAAU,CAAA;IACV,iGAAiG;IACjG,2FAAwB,CAAA;IACxB,2GAA2G;IAC3G,iFAAmB,CAAA;IACnB,qKAAqK;IACrK,iFAAmB,CAAA;AACrB,CAAC,EAhBW,kBAAkB,kCAAlB,kBAAkB,QAgB7B;AAED;;;;GAIG;AACH,IAAY,sBASX;AATD,WAAY,sBAAsB;IAChC,sBAAsB;IACtB,yFAAqB,CAAA;IACrB,6EAA6E;IAC7E,mGAA0B,CAA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AuB,CAAC,CAAC;IACvF,CAAC;;AA/GH,wDAmHC;AAFC,oDAAoD;AACtC,+BAAQ,GAAG,IAAI,sBAAsB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { CompressedId64Set, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\r\n\r\n/** The different modes by which a [[PlanarClipMaskSettings]] collects the geometry used to mask a model.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum PlanarClipMaskMode {\r\n /** No masking. */\r\n None = 0,\r\n /** Mask based on priority. Different types of models have different default priorities as enumerated by [[PlanarClipMaskPriority]].\r\n * For example, background maps have the lowest priority, so they are masked by all other types, while design models have the highest priority and are therefore never masked.\r\n * The priority of a reality model can be overridden by [[PlanarClipMaskSettings.priority]]. This is useful to allow one reality model to mask another overlapping one.\r\n */\r\n Priority = 1,\r\n /** Indicates that masks should be produced from the geometry in a set of [GeometricModel]($backend)s. */\r\n Models = 2,\r\n /** Indicates that masks should be produced from geometry belonging to a set of subcategories. */\r\n IncludeSubCategories = 3,\r\n /** Indicates that masks should be produced from the geometry of a set of [GeometricElement]($backend)s. */\r\n IncludeElements = 4,\r\n /** Indicates that masks should be produced from the geometry of all [GeometricElement]($backend)s in a view, **except** for a specified set of excluded elements. */\r\n ExcludeElements = 5,\r\n}\r\n\r\n/** The default priority values for a [[PlanarClipMaskSettings]], based on model type. Models with a lower priority are masked by models with a higher priority.\r\n * The default can be overridden by [[PlanarClipMaskSettings.priority]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum PlanarClipMaskPriority {\r\n /** Background map. */\r\n BackgroundMap = -2048,\r\n /** A reality model that spans the globe - e.g., OpenStreetMaps Buildings. */\r\n GlobalRealityModel = -1024,\r\n /** A reality model with a bounded range. */\r\n RealityModel = 0,\r\n /** A design model stored in the [IModelDb]($backend). */\r\n DesignModel = 2048,\r\n}\r\n\r\n/** JSON representation of a [[PlanarClipMaskSettings]].\r\n * @see [[DisplayStyleSettingsProps.planarClipOvr]] and [[ContextRealityModelProps.planarClipMask]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PlanarClipMaskProps {\r\n /** Controls how the mask geometry is collected */\r\n mode: PlanarClipMaskMode;\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: CompressedId64Set;\r\n /** See [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n subCategoryOrElementIds?: CompressedId64Set;\r\n /** See [[PlanarClipMaskSettings.priority]]. */\r\n priority?: number;\r\n /** See [[PlanarClipMaskSettings.transparency]]. */\r\n transparency?: number;\r\n /** See PlanarClipMaskSettings.invert */\r\n invert?: boolean;\r\n}\r\n\r\n/** Basic arguments supplied to [[PlanarClipMaskSettings.create]].\r\n * @public\r\n */\r\nexport interface BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.transparency]]. */\r\n transparency?: number;\r\n /** See [[PlanarClipMaskSettings.invert]]. */\r\n invert?: boolean;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Models]].\r\n * @public\r\n */\r\nexport interface ModelPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n /** @internal */\r\n exclude?: never;\r\n /** @internal */\r\n elementIds?: never;\r\n /** @internal */\r\n subCategoryIds?: never;\r\n /** @internal */\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludeElements]].\r\n * @public\r\n */\r\nexport interface ElementPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n /** The elements used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n elementIds: Iterable<Id64String>;\r\n /** If true, creates a mask of [[PlanarClipMaskMode.ExcludeElements]]; otherwise, [[PlanarClipMaskMode.IncludeElements]]. */\r\n exclude?: boolean;\r\n /** @internal */\r\n subCategoryIds?: never;\r\n /** @internal */\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeSubCategories]].\r\n * @public\r\n */\r\nexport interface SubCategoryPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n /** The subcategories used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n subCategoryIds: Iterable<Id64String>;\r\n /** @internal */\r\n exclude?: never;\r\n /** @internal */\r\n elementIds?: never;\r\n /** @internal */\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Priority]].\r\n * @public\r\n */\r\nexport interface PriorityPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.priority]]. */\r\n priority: number;\r\n /** @internal */\r\n exclude?: never;\r\n /** @internal */\r\n elementIds?: never;\r\n /** @internal */\r\n modelIds?: never;\r\n}\r\n\r\n/** Describes how to mask the geometry of one [GeometricModel]($backend) for display. The mask is produced by projecting geometry from any number of other models -\r\n * optionally filtered by [SubCategory]($backend) or by a set of specific [GeometricElement]($backend)s - onto a plane. Regions of the masked model that intersect the\r\n * mask are rendered partially or completely transparent. This is useful for, e.g., making subsurface geometry visible below the background map, or clipping out portions\r\n * of a reality model that intersect a design model.\r\n * @note Currently reality models (including background maps and terrain) can be masked, but design models can only produce masks.\r\n * @see [[DisplayStyleSettings.planarClipMasks]] to define clip masks for a [DisplayStyle]($backend).\r\n * @see [[ContextRealityModel.planarClipMaskSettings]] to apply a clip mask to a context reality model.\r\n * @public\r\n */\r\nexport class PlanarClipMaskSettings {\r\n /** Specifies how the mask geometry is produced. */\r\n public readonly mode: PlanarClipMaskMode;\r\n /** For any mode other than [[PlanarClipMaskMode.Priority]], the Ids of the [GeometricModel]($backend)s containing the geometry used to produce the mask.\r\n * If `undefined`, the set of all models in the view's [ModelSelector]($backend) is used.\r\n * The mask geometry can be filtered by [[subCategoryOrElementIds]].\r\n */\r\n public readonly modelIds?: OrderedId64Iterable;\r\n /** For [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludedElements]], the Ids of the [GeometricElement]($backend)s to include or exclude from masking;\r\n * for [[PlanarClipMaskMode.IncludeSubCategories]], the Ids of the subcategories whose geometry contributes to the mask.\r\n */\r\n public readonly subCategoryOrElementIds?: OrderedId64Iterable;\r\n /** For [[PlanarClipMaskMode.Priority]], the priority value. */\r\n public readonly priority?: number;\r\n /** A value between 0 and 1 indicating an override for mask transparency. A transparency of 0 indicates complete masking. 1 is completely transparent (no masking).\r\n If no transparency is defined then the transparencies of the mask elements are used.\r\n */\r\n public readonly transparency?: number;\r\n /** A value of true indicates that the mask should be inverted and only content within the mask should be displayed, in other words the area inside the mask is displayed rather than outside. */\r\n public readonly invert: boolean;\r\n private readonly _modelIds?: CompressedId64Set;\r\n private readonly _subCategoryOrElementIds?: CompressedId64Set;\r\n\r\n /** The compressed representation of [[modelIds]]. */\r\n public get compressedModelIds(): CompressedId64Set | undefined {\r\n return this._modelIds;\r\n }\r\n\r\n /** Create a new [[PlanarClipMaskSettings]] object from its JSON representation. */\r\n public static fromJSON(json?: PlanarClipMaskProps): PlanarClipMaskSettings {\r\n if (!json || undefined === json.mode)\r\n return this.defaults;\r\n\r\n return new PlanarClipMaskSettings(json.mode, json.transparency, json.modelIds, json.subCategoryOrElementIds, json.priority, json.invert);\r\n }\r\n\r\n /** Create a new PlanarClipMaskSettings. */\r\n public static create(args: ModelPlanarClipMaskArgs | ElementPlanarClipMaskArgs | SubCategoryPlanarClipMaskArgs | PriorityPlanarClipMaskArgs): PlanarClipMaskSettings {\r\n const modelIds = args.modelIds ? CompressedId64Set.sortAndCompress(args.modelIds) : undefined;\r\n if (undefined !== args.priority)\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Priority, args.transparency, undefined, undefined, args.priority, args.invert);\r\n else if (undefined !== args.subCategoryIds)\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.IncludeSubCategories, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.subCategoryIds), undefined, args.invert);\r\n else if (undefined !== args.elementIds)\r\n return new PlanarClipMaskSettings(args.exclude ? PlanarClipMaskMode.ExcludeElements : PlanarClipMaskMode.IncludeElements, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.elementIds), undefined, args.invert);\r\n else\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Models, args.transparency, modelIds, undefined, undefined, args.invert);\r\n }\r\n\r\n /** Create JSON object representing this [[PlanarClipMaskSettings]] */\r\n public toJSON(): PlanarClipMaskProps {\r\n const props: PlanarClipMaskProps = { mode: this.mode };\r\n if (undefined !== this._modelIds)\r\n props.modelIds = this._modelIds;\r\n\r\n if (undefined !== this._subCategoryOrElementIds)\r\n props.subCategoryOrElementIds = this._subCategoryOrElementIds;\r\n\r\n if (undefined !== this.priority)\r\n props.priority = this.priority;\r\n\r\n if (undefined !== this.transparency)\r\n props.transparency = this.transparency;\r\n\r\n if (this.invert)\r\n props.invert = true;\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if masking is enabled. */\r\n public get isValid(): boolean {\r\n return this.mode !== PlanarClipMaskMode.None;\r\n }\r\n\r\n public equals(other: PlanarClipMaskSettings): boolean {\r\n return this.mode === other.mode &&\r\n this.priority === other.priority &&\r\n this.transparency === other.transparency &&\r\n this.invert === other.invert &&\r\n this._modelIds === other._modelIds &&\r\n this._subCategoryOrElementIds === other._subCategoryOrElementIds;\r\n }\r\n\r\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A PlanarClipMaskSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps?: PlanarClipMaskProps): PlanarClipMaskSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n return PlanarClipMaskSettings.fromJSON({\r\n ...this.toJSON(),\r\n ...changedProps,\r\n });\r\n }\r\n\r\n private constructor(mode: PlanarClipMaskMode, transparency?: number, modelIds?: CompressedId64Set, subCategoryOrElementIds?: CompressedId64Set, priority?: number, invert?: boolean) {\r\n this.mode = mode;\r\n this._modelIds = modelIds;\r\n this._subCategoryOrElementIds = subCategoryOrElementIds;\r\n this.priority = priority;\r\n this.invert = true === invert;\r\n this.transparency = undefined !== transparency ? Math.max(0, Math.min(1, transparency)) : undefined;\r\n\r\n if (modelIds)\r\n this.modelIds = CompressedId64Set.iterable(modelIds);\r\n\r\n if (subCategoryOrElementIds)\r\n this.subCategoryOrElementIds = CompressedId64Set.iterable(subCategoryOrElementIds);\r\n }\r\n\r\n /** A default PlanarClipMask which masks nothing. */\r\n public static defaults = new PlanarClipMaskSettings(PlanarClipMaskMode.None);\r\n}\r\n"]}
1
+ {"version":3,"file":"PlanarClipMask.js","sourceRoot":"","sources":["../../src/PlanarClipMask.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyF;AAEzF;;;GAGG;AACH,IAAY,kBAyBX;AAzBD,WAAY,kBAAkB;IAC5B,kBAAkB;IAClB,2DAAQ,CAAA;IACR;;;;OAIG;IACH,mEAAY,CAAA;IACZ;;OAEG;IACH,+DAAU,CAAA;IACV;;OAEG;IACH,2FAAwB,CAAA;IACxB;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,iFAAmB,CAAA;AACrB,CAAC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ACV,IAAI,CAAC,QAAQ,GAAG,gCAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEvD,IAAI,uBAAuB;YACzB,IAAI,CAAC,uBAAuB,GAAG,gCAAiB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IACvF,CAAC;;AAhHH,wDAoHC;AAFC,oDAAoD;AACtC,+BAAQ,GAAG,IAAI,sBAAsB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { CompressedId64Set, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\r\n\r\n/** The different modes by which a [[PlanarClipMaskSettings]] collects the geometry used to mask a model.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum PlanarClipMaskMode {\r\n /** No masking. */\r\n None = 0,\r\n /** Mask based on priority. Different types of models have different default priorities as enumerated by [[PlanarClipMaskPriority]].\r\n * For example, background maps have the lowest priority, so they are masked by all other types, while design models have the highest priority and are therefore never masked.\r\n * The priority of a reality model can be overridden by [[PlanarClipMaskSettings.priority]]. This is useful to allow one reality model to mask another overlapping one.\r\n * Everything visible in the view creates the mask, so turning off models, categories, or elements (via fully transparent overrides) will make things not be in the mask.\r\n */\r\n Priority = 1,\r\n /** Indicates that masks should be produced from the geometry in a set of [GeometricModel]($backend)s, regardless of what model is on or off in the view.\r\n * However, things that are off from category settings or element feature overrides in the view will not be in the mask for these models.\r\n */\r\n Models = 2,\r\n /** Indicates that masks should be produced from geometry belonging to a set of subcategories.\r\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\r\n */\r\n IncludeSubCategories = 3,\r\n /** Indicates that masks should be produced from the geometry of a set of [GeometricElement]($backend)s.\r\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\r\n */\r\n IncludeElements = 4,\r\n /** Indicates that masks should be produced from the geometry of all [GeometricElement]($backend)s in a view, **except** for a specified set of excluded elements.\r\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\r\n */\r\n ExcludeElements = 5,\r\n}\r\n\r\n/** The default priority values for a [[PlanarClipMaskSettings]], based on model type. Models with a lower priority are masked by models with a higher priority.\r\n * The default can be overridden by [[PlanarClipMaskSettings.priority]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum PlanarClipMaskPriority {\r\n /** Background map. */\r\n BackgroundMap = -2048,\r\n /** A reality model that spans the globe - e.g., OpenStreetMaps Buildings. */\r\n GlobalRealityModel = -1024,\r\n /** A reality model with a bounded range. */\r\n RealityModel = 0,\r\n /** A design model stored in the [IModelDb]($backend). */\r\n DesignModel = 2048,\r\n}\r\n\r\n/** JSON representation of a [[PlanarClipMaskSettings]].\r\n * @see [[DisplayStyleSettingsProps.planarClipOvr]] and [[ContextRealityModelProps.planarClipMask]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PlanarClipMaskProps {\r\n /** Controls how the mask geometry is collected */\r\n mode: PlanarClipMaskMode;\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: CompressedId64Set;\r\n /** See [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n subCategoryOrElementIds?: CompressedId64Set;\r\n /** See [[PlanarClipMaskSettings.priority]]. */\r\n priority?: number;\r\n /** See [[PlanarClipMaskSettings.transparency]]. */\r\n transparency?: number;\r\n /** See PlanarClipMaskSettings.invert */\r\n invert?: boolean;\r\n}\r\n\r\n/** Basic arguments supplied to [[PlanarClipMaskSettings.create]].\r\n * @public\r\n */\r\nexport interface BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.transparency]]. */\r\n transparency?: number;\r\n /** See [[PlanarClipMaskSettings.invert]]. */\r\n invert?: boolean;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Models]].\r\n * @public\r\n */\r\nexport interface ModelPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n /** @internal */\r\n exclude?: never;\r\n /** @internal */\r\n elementIds?: never;\r\n /** @internal */\r\n subCategoryIds?: never;\r\n /** @internal */\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludeElements]].\r\n * @public\r\n */\r\nexport interface ElementPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n /** The elements used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n elementIds: Iterable<Id64String>;\r\n /** If true, creates a mask of [[PlanarClipMaskMode.ExcludeElements]]; otherwise, [[PlanarClipMaskMode.IncludeElements]]. */\r\n exclude?: boolean;\r\n /** @internal */\r\n subCategoryIds?: never;\r\n /** @internal */\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeSubCategories]].\r\n * @public\r\n */\r\nexport interface SubCategoryPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n /** The subcategories used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n subCategoryIds: Iterable<Id64String>;\r\n /** @internal */\r\n exclude?: never;\r\n /** @internal */\r\n elementIds?: never;\r\n /** @internal */\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Priority]].\r\n * @public\r\n */\r\nexport interface PriorityPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.priority]]. */\r\n priority: number;\r\n /** @internal */\r\n exclude?: never;\r\n /** @internal */\r\n elementIds?: never;\r\n /** @internal */\r\n modelIds?: never;\r\n}\r\n\r\n/** Describes how to mask the geometry of one [GeometricModel]($backend) for display. The mask is produced by projecting geometry from any number of other models -\r\n * optionally filtered by [SubCategory]($backend) or by a set of specific [GeometricElement]($backend)s - onto a plane. Regions of the masked model that intersect the\r\n * mask are rendered partially or completely transparent. This is useful for, e.g., making subsurface geometry visible below the background map, or clipping out portions\r\n * of a reality model that intersect a design model.\r\n * @note Currently reality models (including background maps and terrain) can be masked, but design models can only produce masks.\r\n * @see [[DisplayStyleSettings.planarClipMasks]] to define clip masks for a [DisplayStyle]($backend).\r\n * @see [[ContextRealityModel.planarClipMaskSettings]] to apply a clip mask to a context reality model.\r\n * @public\r\n */\r\nexport class PlanarClipMaskSettings {\r\n /** Specifies how the mask geometry is produced. */\r\n public readonly mode: PlanarClipMaskMode;\r\n /** For any mode other than [[PlanarClipMaskMode.Priority]], the Ids of the [GeometricModel]($backend)s containing the geometry used to produce the mask,\r\n * and if `undefined`, no mask geometry will be created.\r\n * The mask geometry can be filtered by [[subCategoryOrElementIds]].\r\n */\r\n public readonly modelIds?: OrderedId64Iterable;\r\n /** For [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludedElements]], the Ids of the [GeometricElement]($backend)s to include or exclude from masking;\r\n * for [[PlanarClipMaskMode.IncludeSubCategories]], the Ids of the subcategories whose geometry contributes to the mask.\r\n * If undefined, Modes IncludeSubCategories, IncludeElements, and ExcludeElements behave like Models mode.\r\n */\r\n public readonly subCategoryOrElementIds?: OrderedId64Iterable;\r\n /** For [[PlanarClipMaskMode.Priority]], the priority value. */\r\n public readonly priority?: number;\r\n /** A value between 0 and 1 indicating an override for mask transparency. A transparency of 0 indicates complete masking. 1 is completely transparent (no masking).\r\n If no transparency is defined then the transparencies of the mask elements are used.\r\n */\r\n public readonly transparency?: number;\r\n /** A value of true indicates that the mask should be inverted and only content within the mask should be displayed, in other words the area inside the mask is displayed rather than outside. */\r\n public readonly invert: boolean;\r\n private readonly _modelIds?: CompressedId64Set;\r\n private readonly _subCategoryOrElementIds?: CompressedId64Set;\r\n\r\n /** The compressed representation of [[modelIds]]. */\r\n public get compressedModelIds(): CompressedId64Set | undefined {\r\n return this._modelIds;\r\n }\r\n\r\n /** Create a new [[PlanarClipMaskSettings]] object from its JSON representation. */\r\n public static fromJSON(json?: PlanarClipMaskProps): PlanarClipMaskSettings {\r\n if (!json || undefined === json.mode)\r\n return this.defaults;\r\n\r\n return new PlanarClipMaskSettings(json.mode, json.transparency, json.modelIds, json.subCategoryOrElementIds, json.priority, json.invert);\r\n }\r\n\r\n /** Create a new PlanarClipMaskSettings. */\r\n public static create(args: ModelPlanarClipMaskArgs | ElementPlanarClipMaskArgs | SubCategoryPlanarClipMaskArgs | PriorityPlanarClipMaskArgs): PlanarClipMaskSettings {\r\n const modelIds = args.modelIds ? CompressedId64Set.sortAndCompress(args.modelIds) : undefined;\r\n if (undefined !== args.priority)\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Priority, args.transparency, undefined, undefined, args.priority, args.invert);\r\n else if (undefined !== args.subCategoryIds)\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.IncludeSubCategories, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.subCategoryIds), undefined, args.invert);\r\n else if (undefined !== args.elementIds)\r\n return new PlanarClipMaskSettings(args.exclude ? PlanarClipMaskMode.ExcludeElements : PlanarClipMaskMode.IncludeElements, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.elementIds), undefined, args.invert);\r\n else\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Models, args.transparency, modelIds, undefined, undefined, args.invert);\r\n }\r\n\r\n /** Create JSON object representing this [[PlanarClipMaskSettings]] */\r\n public toJSON(): PlanarClipMaskProps {\r\n const props: PlanarClipMaskProps = { mode: this.mode };\r\n if (undefined !== this._modelIds)\r\n props.modelIds = this._modelIds;\r\n\r\n if (undefined !== this._subCategoryOrElementIds)\r\n props.subCategoryOrElementIds = this._subCategoryOrElementIds;\r\n\r\n if (undefined !== this.priority)\r\n props.priority = this.priority;\r\n\r\n if (undefined !== this.transparency)\r\n props.transparency = this.transparency;\r\n\r\n if (this.invert)\r\n props.invert = true;\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if masking is enabled. */\r\n public get isValid(): boolean {\r\n return this.mode !== PlanarClipMaskMode.None;\r\n }\r\n\r\n public equals(other: PlanarClipMaskSettings): boolean {\r\n return this.mode === other.mode &&\r\n this.priority === other.priority &&\r\n this.transparency === other.transparency &&\r\n this.invert === other.invert &&\r\n this._modelIds === other._modelIds &&\r\n this._subCategoryOrElementIds === other._subCategoryOrElementIds;\r\n }\r\n\r\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A PlanarClipMaskSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps?: PlanarClipMaskProps): PlanarClipMaskSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n return PlanarClipMaskSettings.fromJSON({\r\n ...this.toJSON(),\r\n ...changedProps,\r\n });\r\n }\r\n\r\n private constructor(mode: PlanarClipMaskMode, transparency?: number, modelIds?: CompressedId64Set, subCategoryOrElementIds?: CompressedId64Set, priority?: number, invert?: boolean) {\r\n this.mode = mode;\r\n this._modelIds = modelIds;\r\n this._subCategoryOrElementIds = subCategoryOrElementIds;\r\n this.priority = priority;\r\n this.invert = true === invert;\r\n this.transparency = undefined !== transparency ? Math.max(0, Math.min(1, transparency)) : undefined;\r\n\r\n if (modelIds)\r\n this.modelIds = CompressedId64Set.iterable(modelIds);\r\n\r\n if (subCategoryOrElementIds)\r\n this.subCategoryOrElementIds = CompressedId64Set.iterable(subCategoryOrElementIds);\r\n }\r\n\r\n /** A default PlanarClipMask which masks nothing. */\r\n public static defaults = new PlanarClipMaskSettings(PlanarClipMaskMode.None);\r\n}\r\n"]}