@itwin/core-common 4.0.0-dev.93 → 4.0.0-dev.95

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.
@@ -5,7 +5,7 @@
5
5
  /** @packageDocumentation
6
6
  * @module Rendering
7
7
  */
8
- import { assert, compareNumbers, compareStrings, Id64, IndexedValue, IndexMap } from "@itwin/core-bentley";
8
+ import { assert, compareNumbers, compareStrings, Id64, IndexedValue, IndexMap, } from "@itwin/core-bentley";
9
9
  import { GeometryClass } from "./GeometryParams";
10
10
  /** Describes a discrete entity within a batched [RenderGraphic]($frontend) that can be
11
11
  * grouped with other such entities in a [[FeatureTable]].
@@ -158,6 +158,23 @@ export class FeatureTable extends IndexMap {
158
158
  getArray() { return this._array; }
159
159
  }
160
160
  const scratchPackedFeature = PackedFeature.create();
161
+ function populateAnimationNodeIds(table, computeNodeId, maxNodeId) {
162
+ assert(maxNodeId > 0);
163
+ let nodeIds;
164
+ const outputFeature = PackedFeature.createWithIndex();
165
+ for (const feature of table.iterable(outputFeature)) {
166
+ const nodeId = computeNodeId(feature);
167
+ assert(nodeId <= maxNodeId);
168
+ if (0 !== nodeId) {
169
+ if (!nodeIds) {
170
+ const size = table.numFeatures;
171
+ nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));
172
+ }
173
+ nodeIds[feature.index] = nodeId;
174
+ }
175
+ }
176
+ return nodeIds;
177
+ }
161
178
  /**
162
179
  * An immutable, packed representation of a [[FeatureTable]]. The features are packed into a single array of 32-bit integer values,
163
180
  * wherein each feature occupies 3 32-bit integers.
@@ -166,6 +183,11 @@ const scratchPackedFeature = PackedFeature.create();
166
183
  export class PackedFeatureTable {
167
184
  get byteLength() { return this._data.byteLength; }
168
185
  get animationNodeIds() { return this._animationNodeIds; }
186
+ /** @internal for use by MultiModelPackedFeatureTable */
187
+ setAnimationNodeIds(nodeIds) {
188
+ assert(undefined === this._animationNodeIds);
189
+ this._animationNodeIds = nodeIds;
190
+ }
169
191
  /** Construct a PackedFeatureTable from the packed binary data.
170
192
  * This is used internally when deserializing Tiles in iMdl format.
171
193
  * @internal
@@ -299,22 +321,7 @@ export class PackedFeatureTable {
299
321
  }
300
322
  populateAnimationNodeIds(computeNodeId, maxNodeId) {
301
323
  assert(undefined === this._animationNodeIds);
302
- assert(maxNodeId > 0);
303
- const pair = { lower: 0, upper: 0 };
304
- let haveNodes = false;
305
- const size = this.numFeatures;
306
- const nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));
307
- for (let i = 0; i < this.numFeatures; i++) {
308
- this.getElementIdPair(i, pair);
309
- const nodeId = computeNodeId(pair, i);
310
- assert(nodeId <= maxNodeId);
311
- if (0 !== nodeId) {
312
- nodeIds[i] = nodeId;
313
- haveNodes = true;
314
- }
315
- }
316
- if (haveNodes)
317
- this._animationNodeIds = nodeIds;
324
+ this._animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);
318
325
  }
319
326
  *iterator(output) {
320
327
  for (let i = 0; i < this.numFeatures; i++) {
@@ -419,6 +426,7 @@ export class MultiModelPackedFeatureTable {
419
426
  get batchModelIdPair() { return this._features.batchModelIdPair; }
420
427
  get numFeatures() { return this._features.numFeatures; }
421
428
  get type() { return this._features.type; }
429
+ get animationNodeIds() { return this._features.animationNodeIds; }
422
430
  get byteLength() {
423
431
  return this._features.byteLength + this._models.byteLength;
424
432
  }
@@ -459,5 +467,11 @@ export class MultiModelPackedFeatureTable {
459
467
  [Symbol.iterator]: () => this.iterator(output),
460
468
  };
461
469
  }
470
+ getAnimationNodeId(featureIndex) {
471
+ return this._features.getAnimationNodeId(featureIndex);
472
+ }
473
+ populateAnimationNodeIds(computeNodeId, maxNodeId) {
474
+ this._features.setAnimationNodeIds(populateAnimationNodeIds(this, computeNodeId, maxNodeId));
475
+ }
462
476
  }
463
477
  //# sourceMappingURL=F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E,YAAY,EAAE,EAAE;YAC1E,IAAI,YAAY,GAAG,UAAU,CAAC,gBAAgB;gBAC5C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;YAElD,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACtD,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;YAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;YAC1C,MAAM,CAAC,KAAK,GAAG,YAAY,CAAC;YAC5B,MAAM,MAAM,CAAC;SACd;IACH,CAAC;IAEM,QAAQ,CAAC,MAA8B;QAC5C,OAAO;YACL,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { assert, compareNumbers, compareStrings, Id64, Id64String, IndexedValue, IndexMap } from \"@itwin/core-bentley\";\r\nimport { GeometryClass } from \"./GeometryParams\";\r\n\r\n/** Describes a discrete entity within a batched [RenderGraphic]($frontend) that can be\r\n * grouped with other such entities in a [[FeatureTable]].\r\n * Features roughly correlate to elements: a [Tile]($frontend)'s graphics combines geometry from every\r\n * [GeometricElement]($backend) that intersects the tile's volume, so each element produces at least one feature.\r\n * However, an element's geometry stream can contain geometry belonging to multiple different combinations of [SubCategory]($backend) and\r\n * [[GeometryClass]], so an individual element may produce more than one feature.\r\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\r\n * @public\r\n */\r\nexport class Feature {\r\n public readonly elementId: Id64String;\r\n public readonly subCategoryId: Id64String;\r\n public readonly geometryClass: GeometryClass;\r\n\r\n public constructor(elementId: Id64String = Id64.invalid, subCategoryId: Id64String = Id64.invalid, geometryClass: GeometryClass = GeometryClass.Primary) {\r\n this.elementId = elementId;\r\n this.subCategoryId = subCategoryId;\r\n this.geometryClass = geometryClass;\r\n }\r\n\r\n public get isDefined(): boolean { return !Id64.isInvalid(this.elementId) || !Id64.isInvalid(this.subCategoryId) || this.geometryClass !== GeometryClass.Primary; }\r\n public get isUndefined(): boolean { return !this.isDefined; }\r\n\r\n /** Returns true if this feature is equivalent to the supplied feature. */\r\n public equals(other: Feature): boolean { return 0 === this.compare(other); }\r\n\r\n /** Performs ordinal comparison of this feature with another.\r\n * @param rhs The feature to compare with.\r\n * @returns zero if the features are equivalent, a negative value if this feature compares as \"less than\" `rhs`, or a positive value if this feature compares \"greater than\" `rhs`.\r\n */\r\n public compare(rhs: Feature): number {\r\n if (this === rhs)\r\n return 0;\r\n\r\n let cmp = compareNumbers(this.geometryClass, rhs.geometryClass);\r\n if (0 === cmp) {\r\n cmp = compareStrings(this.elementId, rhs.elementId);\r\n if (0 === cmp) {\r\n cmp = compareStrings(this.subCategoryId, rhs.subCategoryId);\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n}\r\n\r\n/** A [[Feature]] with a modelId identifying the model containing the feature.\r\n * Typically produced from a PackedFeature.\r\n * Prior to the introduction of MultiModelPackedFeatureTable, every (Packed)FeatureTable was associated with exactly one model.\r\n * Now, each feature in a table may be associated with a different model.\r\n * @internal\r\n */\r\nexport interface ModelFeature {\r\n modelId: Id64String;\r\n elementId: Id64String;\r\n subCategoryId: Id64String;\r\n geometryClass: GeometryClass;\r\n}\r\n\r\n/** @internal */\r\nexport namespace ModelFeature {\r\n export function create(): ModelFeature {\r\n return {\r\n modelId: Id64.invalid,\r\n elementId: Id64.invalid,\r\n subCategoryId: Id64.invalid,\r\n geometryClass: GeometryClass.Primary,\r\n };\r\n }\r\n\r\n export function isDefined(feature: ModelFeature): boolean {\r\n return !Id64.isInvalid(feature.modelId) || !Id64.isInvalid(feature.elementId) || !Id64.isInvalid(feature.subCategoryId) || feature.geometryClass !== GeometryClass.Primary;\r\n }\r\n\r\n export function unpack(packed: PackedFeature, result: ModelFeature, unpackedModelId?: Id64String): ModelFeature {\r\n result.modelId = unpackedModelId ?? Id64.fromUint32PairObject(packed.modelId);\r\n result.elementId = Id64.fromUint32PairObject(packed.elementId);\r\n result.subCategoryId = Id64.fromUint32PairObject(packed.subCategoryId);\r\n result.geometryClass = packed.geometryClass;\r\n return result;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface PackedFeature {\r\n modelId: Id64.Uint32Pair;\r\n elementId: Id64.Uint32Pair;\r\n subCategoryId: Id64.Uint32Pair;\r\n geometryClass: GeometryClass;\r\n animationNodeId: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface PackedFeatureWithIndex extends PackedFeature {\r\n index: number;\r\n}\r\n\r\n/** @internal */\r\nexport namespace PackedFeature {\r\n export function create(): PackedFeature {\r\n const pair = { upper: 0, lower: 0 };\r\n return {\r\n modelId: { ...pair },\r\n elementId: { ...pair },\r\n subCategoryId: { ...pair },\r\n geometryClass: GeometryClass.Primary,\r\n animationNodeId: 0,\r\n };\r\n }\r\n\r\n export function createWithIndex(): PackedFeatureWithIndex {\r\n const result = create() as PackedFeatureWithIndex;\r\n result.index = 0;\r\n return result;\r\n }\r\n}\r\n\r\n/** Describes the type of a 'batch' of graphics representing multiple [[Feature]]s.\r\n * The most commonly-encountered batches are Tiles, which can be of either Primary or\r\n * Classifier type.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum BatchType {\r\n /** This batch contains graphics derived from a model's visible geometry. */\r\n Primary,\r\n /**\r\n * This batch contains color volumes which are used to classify a model's visible geometry.\r\n * The graphics themselves are not rendered to the screen; instead they are rendered to the stencil buffer\r\n * to resymbolize the primary geometry.\r\n */\r\n VolumeClassifier,\r\n /**\r\n * This batch contains planar graphics which are used to classify a model's visible geometry.\r\n * The graphics themselves are not rendered to the screen; instead they are rendered to a texture buffer\r\n * to resymbolize the primary geometry.\r\n */\r\n PlanarClassifier,\r\n}\r\n\r\n/** Defines a look-up table for [[Feature]]s within a batched [RenderGraphic]($frontend). Consecutive 32-bit\r\n * indices are assigned to each unique Feature. Primitives within the RenderGraphic can\r\n * use per-vertex indices to specify the distribution of Features within the primitive. The appearance of individual\r\n * features can be customized using [[FeatureOverrides]]. Typically a [Tile]($frontend) will contain a feature table\r\n * identifying the elements whose geometry appears within that tile.\r\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\r\n * @public\r\n */\r\nexport class FeatureTable extends IndexMap<Feature> {\r\n public readonly modelId: Id64String;\r\n public readonly type: BatchType;\r\n\r\n /** Construct an empty FeatureTable. */\r\n public constructor(maxFeatures: number, modelId: Id64String = Id64.invalid, type: BatchType = BatchType.Primary) {\r\n super((lhs, rhs) => lhs.compare(rhs), maxFeatures);\r\n this.modelId = modelId;\r\n this.type = type;\r\n }\r\n\r\n /** Returns the maximum number of [[Feature]]s this FeatureTable can contain. */\r\n public get maxFeatures(): number { return this._maximumSize; }\r\n /** @internal */\r\n public get anyDefined(): boolean { return this.length > 1 || (1 === this.length && this._array[0].value.isDefined); }\r\n /** Returns true if this FeatureTable contains exactly one [[Feature]]. */\r\n public get isUniform(): boolean { return 1 === this.length; }\r\n /** If this FeatureTable contains exactly one [[Feature]], returns that Feature; otherwise returns undefined. */\r\n public get uniform(): Feature | undefined { return 1 === this.length ? this._array[0].value : undefined; }\r\n /** Returns true if this FeatureTable is associated with [[BatchType.VolumeClassifier]] geometry. */\r\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n /** Returns true if this FeatureTable is associated with [[BatchType.PlanarClassifier]] geometry. */\r\n public get isPlanarClassifier(): boolean { return BatchType.PlanarClassifier === this.type; }\r\n\r\n /** Returns the Feature corresponding to the specified index, or undefined if the index is not present. */\r\n public findFeature(index: number): Feature | undefined {\r\n for (const entry of this._array)\r\n if (entry.index === index)\r\n return entry.value;\r\n\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n public insertWithIndex(feature: Feature, index: number): void {\r\n const bound = this.lowerBound(feature);\r\n assert(!bound.equal);\r\n assert(!this.isFull);\r\n const entry = new IndexedValue<Feature>(feature, index);\r\n this._array.splice(bound.index, 0, entry);\r\n }\r\n\r\n /** @internal */\r\n public getArray(): Array<IndexedValue<Feature>> { return this._array; }\r\n}\r\n\r\n/** @alpha */\r\nexport type ComputeNodeId = (elementId: Id64.Uint32Pair, featureIndex: number) => number;\r\n\r\n/** Interface common to PackedFeatureTable and MultiModelPackedFeatureTable.\r\n * @internal\r\n */\r\nexport interface RenderFeatureTable {\r\n /** The \"model Id\" of the tile tree containing the tile from which this feature table originated.\r\n * It may be a transient Id if, for example, the tile tree represents a reality model or represents the geometry of multiple\r\n * persistent models batched together.\r\n */\r\n readonly batchModelId: Id64String;\r\n /** Split representation of batchModelId, so we're not constantly having to parse the string. */\r\n readonly batchModelIdPair: Id64.Uint32Pair;\r\n /** The number of features in the table; equivalently, one more than the largest feature index. */\r\n readonly numFeatures: number;\r\n /** Strictly for reporting memory usage. */\r\n readonly byteLength: number;\r\n readonly type: BatchType;\r\n\r\n /** Get the feature at the specified index. Caller is responsible for validating featureIndex less than numFeatures. */\r\n getFeature(featureIndex: number, result: ModelFeature): ModelFeature;\r\n /** Find the specified feature. Returns undefined if featureIndex >= numFeatures. */\r\n findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined;\r\n /** Find the Id of the element of the specified feature. */\r\n findElementId(featureIndex: number): Id64String | undefined;\r\n /** Get the Id of the element of the specified feature as a pair of 32-bit integers, asserting that feature index < numFeatures. */\r\n getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\r\n /** Get the feature at the specified index. Caller is responsible for validating featureIndex less than numFeatures. */\r\n getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature;\r\n /** Get an object that provides iteration over all features, in order. `output` is reused as the current value on each iteration. */\r\n iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex>;\r\n}\r\n\r\nconst scratchPackedFeature = PackedFeature.create();\r\n\r\n/**\r\n * An immutable, packed representation of a [[FeatureTable]]. The features are packed into a single array of 32-bit integer values,\r\n * wherein each feature occupies 3 32-bit integers.\r\n * @internal\r\n */\r\nexport class PackedFeatureTable implements RenderFeatureTable {\r\n private readonly _data: Uint32Array;\r\n public readonly batchModelId: Id64String;\r\n public readonly batchModelIdPair: Id64.Uint32Pair;\r\n public readonly numFeatures: number;\r\n public readonly anyDefined: boolean;\r\n public readonly type: BatchType;\r\n private _animationNodeIds?: Uint8Array | Uint16Array | Uint32Array;\r\n\r\n public get byteLength(): number { return this._data.byteLength; }\r\n public get animationNodeIds(): Readonly<Uint8Array | Uint16Array | Uint32Array> | undefined { return this._animationNodeIds; }\r\n\r\n /** Construct a PackedFeatureTable from the packed binary data.\r\n * This is used internally when deserializing Tiles in iMdl format.\r\n * @internal\r\n */\r\n public constructor(data: Uint32Array, modelId: Id64String, numFeatures: number, type: BatchType, animationNodeIds?: Uint8Array | Uint16Array | Uint32Array) {\r\n this._data = data;\r\n this.batchModelId = modelId;\r\n this.batchModelIdPair = Id64.getUint32Pair(modelId);\r\n this.numFeatures = numFeatures;\r\n this.type = type;\r\n this._animationNodeIds = animationNodeIds;\r\n\r\n switch (this.numFeatures) {\r\n case 0:\r\n this.anyDefined = false;\r\n break;\r\n case 1:\r\n this.anyDefined = ModelFeature.isDefined(this.getFeature(0, ModelFeature.create()));\r\n break;\r\n default:\r\n this.anyDefined = true;\r\n break;\r\n }\r\n\r\n assert(this._data.length >= this._subCategoriesOffset);\r\n assert(undefined === this._animationNodeIds || this._animationNodeIds.length === this.numFeatures);\r\n }\r\n\r\n /** Create a packed feature table from a [[FeatureTable]]. */\r\n public static pack(featureTable: FeatureTable): PackedFeatureTable {\r\n // We must determine how many subcategories we have ahead of time to compute the size of the Uint32Array, as\r\n // the array cannot be resized after it is created.\r\n // We are not too worried about this as FeatureTables created on the front-end will contain few if any features; those obtained from the\r\n // back-end arrive within tiles already in the packed format.\r\n const subcategories = new Map<string, number>();\r\n for (const iv of featureTable.getArray()) {\r\n const found = subcategories.get(iv.value.subCategoryId.toString());\r\n if (undefined === found)\r\n subcategories.set(iv.value.subCategoryId, subcategories.size);\r\n }\r\n\r\n // We need 3 32-bit integers per feature, plus 2 32-bit integers per subcategory.\r\n const subCategoriesOffset = 3 * featureTable.length;\r\n const nUint32s = subCategoriesOffset + 2 * subcategories.size;\r\n const uint32s = new Uint32Array(nUint32s);\r\n\r\n for (const iv of featureTable.getArray()) {\r\n const feature = iv.value;\r\n const index = iv.index * 3;\r\n\r\n let subCategoryIndex = subcategories.get(feature.subCategoryId)!;\r\n assert(undefined !== subCategoryIndex); // we inserted it above...\r\n subCategoryIndex |= (feature.geometryClass << 24);\r\n\r\n uint32s[index + 0] = Id64.getLowerUint32(feature.elementId);\r\n uint32s[index + 1] = Id64.getUpperUint32(feature.elementId);\r\n uint32s[index + 2] = subCategoryIndex;\r\n }\r\n\r\n subcategories.forEach((index: number, id: string, _map) => {\r\n const index32 = subCategoriesOffset + 2 * index;\r\n uint32s[index32 + 0] = Id64.getLowerUint32(id);\r\n uint32s[index32 + 1] = Id64.getUpperUint32(id);\r\n });\r\n\r\n return new PackedFeatureTable(uint32s, featureTable.modelId, featureTable.length, featureTable.type);\r\n }\r\n\r\n /** Retrieve the Feature associated with the specified index. */\r\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\r\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\r\n return ModelFeature.unpack(packed, result, this.batchModelId);\r\n }\r\n\r\n /** Returns the Feature associated with the specified index, or undefined if the index is out of range. */\r\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\r\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\r\n }\r\n\r\n /** @internal */\r\n public getElementIdPair(featureIndex: number, out?: Id64.Uint32Pair): Id64.Uint32Pair {\r\n out = out ?? { lower: 0, upper: 0 };\r\n assert(featureIndex < this.numFeatures);\r\n const offset = 3 * featureIndex;\r\n out.lower = this._data[offset];\r\n out.upper = this._data[offset + 1];\r\n return out;\r\n }\r\n\r\n /** @internal */\r\n public getSubCategoryIdPair(featureIndex: number): Id64.Uint32Pair {\r\n const index = 3 * featureIndex;\r\n let subCatIndex = this._data[index + 2];\r\n subCatIndex = (subCatIndex & 0x00ffffff) >>> 0;\r\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\r\n return { lower: this._data[subCatIndex], upper: this._data[subCatIndex + 1] };\r\n }\r\n\r\n /** @internal */\r\n public getAnimationNodeId(featureIndex: number): number {\r\n return undefined !== this._animationNodeIds && featureIndex < this.numFeatures ? this._animationNodeIds[featureIndex] : 0;\r\n }\r\n\r\n /** @internal */\r\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\r\n assert(featureIndex < this.numFeatures);\r\n\r\n const index32 = 3 * featureIndex;\r\n result.elementId.lower = this._data[index32];\r\n result.elementId.upper = this._data[index32 + 1];\r\n\r\n const subCatIndexAndClass = this._data[index32 + 2];\r\n result.geometryClass = (subCatIndexAndClass >>> 24) & 0xff;\r\n\r\n let subCatIndex = (subCatIndexAndClass & 0x00ffffff) >>> 0;\r\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\r\n result.subCategoryId.lower = this._data[subCatIndex];\r\n result.subCategoryId.upper = this._data[subCatIndex + 1];\r\n\r\n result.animationNodeId = this.getAnimationNodeId(featureIndex);\r\n result.modelId.lower = this.batchModelIdPair.lower;\r\n result.modelId.upper = this.batchModelIdPair.upper;\r\n\r\n return result;\r\n }\r\n\r\n /** Returns the element ID of the Feature associated with the specified index, or undefined if the index is out of range. */\r\n public findElementId(featureIndex: number): Id64String | undefined {\r\n if (featureIndex >= this.numFeatures)\r\n return undefined;\r\n else\r\n return this.readId(3 * featureIndex);\r\n }\r\n\r\n /** Return true if this table contains exactly 1 feature. */\r\n public get isUniform(): boolean { return 1 === this.numFeatures; }\r\n\r\n /** If this table contains exactly 1 feature, return it. */\r\n public getUniform(result: ModelFeature): ModelFeature | undefined {\r\n return this.isUniform ? this.getFeature(0, result) : undefined;\r\n }\r\n\r\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n public get isPlanarClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n public get isClassifier(): boolean { return this.isVolumeClassifier || this.isPlanarClassifier; }\r\n\r\n /** Unpack the features into a [[FeatureTable]]. */\r\n public unpack(): FeatureTable {\r\n const table = new FeatureTable(this.numFeatures, this.batchModelId);\r\n const feature = ModelFeature.create();\r\n for (let i = 0; i < this.numFeatures; i++) {\r\n this.getFeature(i, feature);\r\n table.insertWithIndex(new Feature(feature.elementId, feature.subCategoryId, feature.geometryClass), i);\r\n }\r\n\r\n return table;\r\n }\r\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\r\n assert(undefined === this._animationNodeIds);\r\n assert(maxNodeId > 0);\r\n\r\n const pair = { lower: 0, upper: 0 };\r\n let haveNodes = false;\r\n const size = this.numFeatures;\r\n const nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));\r\n for (let i = 0; i < this.numFeatures; i++) {\r\n this.getElementIdPair(i, pair);\r\n const nodeId = computeNodeId(pair, i);\r\n assert(nodeId <= maxNodeId);\r\n if (0 !== nodeId) {\r\n nodeIds[i] = nodeId;\r\n haveNodes = true;\r\n }\r\n }\r\n\r\n if (haveNodes)\r\n this._animationNodeIds = nodeIds;\r\n }\r\n\r\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\r\n for (let i = 0; i < this.numFeatures; i++) {\r\n this.getPackedFeature(i, output);\r\n output.index = i;\r\n yield output;\r\n }\r\n }\r\n\r\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\r\n return {\r\n [Symbol.iterator]: () => this.iterator(output),\r\n };\r\n }\r\n\r\n private get _subCategoriesOffset(): number { return this.numFeatures * 3; }\r\n\r\n private readId(offset32: number): Id64String {\r\n return Id64.fromUint32Pair(this._data[offset32], this._data[offset32 + 1]);\r\n }\r\n}\r\n\r\ninterface PackedFeatureModelEntry {\r\n lastFeatureIndex: number;\r\n idLower: number;\r\n idUpper: number;\r\n}\r\n\r\nconst scratchPackedFeatureModelEntry = { lastFeatureIndex: -1, idLower: -1, idUpper: -1 };\r\n\r\n/** A table of model Ids associated with a [[MultiModelPackedFeatureTable]].\r\n * The feature indices in the packed feature table are grouped together by model, such that the first N features belong to model 1, the next M features to model 2, and so on.\r\n * The model table itself consists of one entry per model, where each entry looks like:\r\n * indexOfLastFeatureInModel: u32\r\n * modelId: u64\r\n * The modelId associated with a feature can therefore be derived by finding the entry in the model table with the highest indexOfLastFeatureInModel no greater than the feature index.\r\n * This lookup can be optimized using binary search.\r\n * Moreover, while iterating the feature table in sequence, the model table can be iterated in parallel so that no per-feature lookup of model Id is required.\r\n * @internal\r\n */\r\nexport class PackedFeatureModelTable {\r\n private readonly _data: Uint32Array;\r\n\r\n public constructor(data: Uint32Array) {\r\n this._data = data;\r\n assert(this._data.length % 3 === 0);\r\n }\r\n\r\n /** The number of models in the table. */\r\n public get length(): number {\r\n return this._data.length / 3;\r\n }\r\n\r\n public get byteLength(): number {\r\n return this._data.byteLength;\r\n }\r\n\r\n private getLastFeatureIndex(modelIndex: number): number {\r\n return this._data[modelIndex * 3];\r\n }\r\n\r\n public getEntry(modelIndex: number, result: PackedFeatureModelEntry): PackedFeatureModelEntry {\r\n if (modelIndex >= this.length) {\r\n result.idLower = result.idUpper = 0;\r\n result.lastFeatureIndex = Number.MAX_SAFE_INTEGER;\r\n return result;\r\n }\r\n\r\n const index = modelIndex * 3;\r\n result.lastFeatureIndex = this._data[index + 0];\r\n result.idLower = this._data[index + 1];\r\n result.idUpper = this._data[index + 2];\r\n return result;\r\n }\r\n\r\n /** Get the Id of the model associated with the specified feature, or an invalid Id if the feature is not associated with any model. */\r\n public getModelIdPair(featureIndex: number, result?: Id64.Uint32Pair): Id64.Uint32Pair {\r\n if (!result)\r\n result = { lower: 0, upper: 0 };\r\n else\r\n result.lower = result.upper = 0;\r\n\r\n let first = 0;\r\n const last = this.length;\r\n let count = last;\r\n while (count > 0) {\r\n const step = Math.floor(count / 2);\r\n const mid = first + step;\r\n const lastFeatureIndex = this.getLastFeatureIndex(mid);\r\n if (featureIndex > lastFeatureIndex) {\r\n first = mid + 1;\r\n count -= step + 1;\r\n } else {\r\n count = step;\r\n }\r\n }\r\n\r\n if (first < last) {\r\n result.lower = this._data[first * 3 + 1];\r\n result.upper = this._data[first * 3 + 2];\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\n/** A PackedFeatureTable with a PackedFeatureModelTable appended to it, capable of storing features belonging to more than one model.\r\n * @internal\r\n */\r\nexport class MultiModelPackedFeatureTable implements RenderFeatureTable {\r\n private readonly _features: PackedFeatureTable;\r\n private readonly _models: PackedFeatureModelTable;\r\n\r\n public constructor(features: PackedFeatureTable, models: PackedFeatureModelTable) {\r\n this._features = features;\r\n this._models = models;\r\n }\r\n\r\n public static create(data: Uint32Array, batchModelId: Id64String, numFeatures: number, type: BatchType, numSubCategories: number): MultiModelPackedFeatureTable {\r\n const modelTableOffset = 3 * numFeatures + 2 * numSubCategories;\r\n const featureData = data.subarray(0, modelTableOffset);\r\n const features = new PackedFeatureTable(featureData, batchModelId, numFeatures, type);\r\n\r\n const modelData = data.subarray(modelTableOffset);\r\n const models = new PackedFeatureModelTable(modelData);\r\n\r\n return new MultiModelPackedFeatureTable(features, models);\r\n }\r\n\r\n public get batchModelId() { return this._features.batchModelId; }\r\n public get batchModelIdPair() { return this._features.batchModelIdPair; }\r\n public get numFeatures() { return this._features.numFeatures; }\r\n public get type() { return this._features.type; }\r\n\r\n public get byteLength() {\r\n return this._features.byteLength + this._models.byteLength;\r\n }\r\n\r\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\r\n this._features.getPackedFeature(featureIndex, result);\r\n this._models.getModelIdPair(featureIndex, result.modelId);\r\n return result;\r\n }\r\n\r\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\r\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\r\n return ModelFeature.unpack(packed, result);\r\n }\r\n\r\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\r\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\r\n }\r\n\r\n public getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\r\n return this._features.getElementIdPair(featureIndex, out);\r\n }\r\n\r\n public findElementId(featureIndex: number): Id64String | undefined {\r\n return this._features.findElementId(featureIndex);\r\n }\r\n\r\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\r\n // Rather than perform a binary search on the model table to find each feature's model Id, traverse the model table in parallel with the feature table.\r\n let modelIndex = 0;\r\n const modelEntry = this._models.getEntry(modelIndex, scratchPackedFeatureModelEntry);\r\n\r\n for (let featureIndex = 0; featureIndex < this.numFeatures; featureIndex++) {\r\n if (featureIndex > modelEntry.lastFeatureIndex)\r\n this._models.getEntry(++modelIndex, modelEntry);\r\n\r\n this._features.getPackedFeature(featureIndex, output);\r\n output.modelId.lower = modelEntry.idLower;\r\n output.modelId.upper = modelEntry.idUpper;\r\n output.index = featureIndex;\r\n yield output;\r\n }\r\n }\r\n\r\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\r\n return {\r\n [Symbol.iterator]: () => this.iterator(output),\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"FeatureTable.js","sourceRoot":"","sources":["../../src/FeatureTable.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACL,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAc,YAAY,EA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AE,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,EAAE;YAC1E,IAAI,YAAY,GAAG,UAAU,CAAC,gBAAgB;gBAC5C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;YAElD,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACtD,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;YAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;YAC1C,MAAM,CAAC,KAAK,GAAG,YAAY,CAAC;YAC5B,MAAM,MAAM,CAAC;SACd;IACH,CAAC;IAEM,QAAQ,CAAC,MAA8B;QAC5C,OAAO;YACL,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;SAC/C,CAAC;IACJ,CAAC;IAEM,kBAAkB,CAAC,YAAoB;QAC5C,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;IACzD,CAAC;IAEM,wBAAwB,CAAC,aAA4B,EAAE,SAAiB;QAC7E,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,wBAAwB,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC;IAC/F,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport {\r\n assert, compareNumbers, compareStrings, Id64, Id64String, IndexedValue, IndexMap, UintArray,\r\n} from \"@itwin/core-bentley\";\r\nimport { GeometryClass } from \"./GeometryParams\";\r\n\r\n/** Describes a discrete entity within a batched [RenderGraphic]($frontend) that can be\r\n * grouped with other such entities in a [[FeatureTable]].\r\n * Features roughly correlate to elements: a [Tile]($frontend)'s graphics combines geometry from every\r\n * [GeometricElement]($backend) that intersects the tile's volume, so each element produces at least one feature.\r\n * However, an element's geometry stream can contain geometry belonging to multiple different combinations of [SubCategory]($backend) and\r\n * [[GeometryClass]], so an individual element may produce more than one feature.\r\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\r\n * @public\r\n */\r\nexport class Feature {\r\n public readonly elementId: Id64String;\r\n public readonly subCategoryId: Id64String;\r\n public readonly geometryClass: GeometryClass;\r\n\r\n public constructor(elementId: Id64String = Id64.invalid, subCategoryId: Id64String = Id64.invalid, geometryClass: GeometryClass = GeometryClass.Primary) {\r\n this.elementId = elementId;\r\n this.subCategoryId = subCategoryId;\r\n this.geometryClass = geometryClass;\r\n }\r\n\r\n public get isDefined(): boolean { return !Id64.isInvalid(this.elementId) || !Id64.isInvalid(this.subCategoryId) || this.geometryClass !== GeometryClass.Primary; }\r\n public get isUndefined(): boolean { return !this.isDefined; }\r\n\r\n /** Returns true if this feature is equivalent to the supplied feature. */\r\n public equals(other: Feature): boolean { return 0 === this.compare(other); }\r\n\r\n /** Performs ordinal comparison of this feature with another.\r\n * @param rhs The feature to compare with.\r\n * @returns zero if the features are equivalent, a negative value if this feature compares as \"less than\" `rhs`, or a positive value if this feature compares \"greater than\" `rhs`.\r\n */\r\n public compare(rhs: Feature): number {\r\n if (this === rhs)\r\n return 0;\r\n\r\n let cmp = compareNumbers(this.geometryClass, rhs.geometryClass);\r\n if (0 === cmp) {\r\n cmp = compareStrings(this.elementId, rhs.elementId);\r\n if (0 === cmp) {\r\n cmp = compareStrings(this.subCategoryId, rhs.subCategoryId);\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n}\r\n\r\n/** A [[Feature]] with a modelId identifying the model containing the feature.\r\n * Typically produced from a PackedFeature.\r\n * Prior to the introduction of MultiModelPackedFeatureTable, every (Packed)FeatureTable was associated with exactly one model.\r\n * Now, each feature in a table may be associated with a different model.\r\n * @internal\r\n */\r\nexport interface ModelFeature {\r\n modelId: Id64String;\r\n elementId: Id64String;\r\n subCategoryId: Id64String;\r\n geometryClass: GeometryClass;\r\n}\r\n\r\n/** @internal */\r\nexport namespace ModelFeature {\r\n export function create(): ModelFeature {\r\n return {\r\n modelId: Id64.invalid,\r\n elementId: Id64.invalid,\r\n subCategoryId: Id64.invalid,\r\n geometryClass: GeometryClass.Primary,\r\n };\r\n }\r\n\r\n export function isDefined(feature: ModelFeature): boolean {\r\n return !Id64.isInvalid(feature.modelId) || !Id64.isInvalid(feature.elementId) || !Id64.isInvalid(feature.subCategoryId) || feature.geometryClass !== GeometryClass.Primary;\r\n }\r\n\r\n export function unpack(packed: PackedFeature, result: ModelFeature, unpackedModelId?: Id64String): ModelFeature {\r\n result.modelId = unpackedModelId ?? Id64.fromUint32PairObject(packed.modelId);\r\n result.elementId = Id64.fromUint32PairObject(packed.elementId);\r\n result.subCategoryId = Id64.fromUint32PairObject(packed.subCategoryId);\r\n result.geometryClass = packed.geometryClass;\r\n return result;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface PackedFeature {\r\n modelId: Id64.Uint32Pair;\r\n elementId: Id64.Uint32Pair;\r\n subCategoryId: Id64.Uint32Pair;\r\n geometryClass: GeometryClass;\r\n animationNodeId: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface PackedFeatureWithIndex extends PackedFeature {\r\n index: number;\r\n}\r\n\r\n/** @internal */\r\nexport namespace PackedFeature {\r\n export function create(): PackedFeature {\r\n const pair = { upper: 0, lower: 0 };\r\n return {\r\n modelId: { ...pair },\r\n elementId: { ...pair },\r\n subCategoryId: { ...pair },\r\n geometryClass: GeometryClass.Primary,\r\n animationNodeId: 0,\r\n };\r\n }\r\n\r\n export function createWithIndex(): PackedFeatureWithIndex {\r\n const result = create() as PackedFeatureWithIndex;\r\n result.index = 0;\r\n return result;\r\n }\r\n}\r\n\r\n/** Describes the type of a 'batch' of graphics representing multiple [[Feature]]s.\r\n * The most commonly-encountered batches are Tiles, which can be of either Primary or\r\n * Classifier type.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum BatchType {\r\n /** This batch contains graphics derived from a model's visible geometry. */\r\n Primary,\r\n /**\r\n * This batch contains color volumes which are used to classify a model's visible geometry.\r\n * The graphics themselves are not rendered to the screen; instead they are rendered to the stencil buffer\r\n * to resymbolize the primary geometry.\r\n */\r\n VolumeClassifier,\r\n /**\r\n * This batch contains planar graphics which are used to classify a model's visible geometry.\r\n * The graphics themselves are not rendered to the screen; instead they are rendered to a texture buffer\r\n * to resymbolize the primary geometry.\r\n */\r\n PlanarClassifier,\r\n}\r\n\r\n/** Defines a look-up table for [[Feature]]s within a batched [RenderGraphic]($frontend). Consecutive 32-bit\r\n * indices are assigned to each unique Feature. Primitives within the RenderGraphic can\r\n * use per-vertex indices to specify the distribution of Features within the primitive. The appearance of individual\r\n * features can be customized using [[FeatureOverrides]]. Typically a [Tile]($frontend) will contain a feature table\r\n * identifying the elements whose geometry appears within that tile.\r\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\r\n * @public\r\n */\r\nexport class FeatureTable extends IndexMap<Feature> {\r\n public readonly modelId: Id64String;\r\n public readonly type: BatchType;\r\n\r\n /** Construct an empty FeatureTable. */\r\n public constructor(maxFeatures: number, modelId: Id64String = Id64.invalid, type: BatchType = BatchType.Primary) {\r\n super((lhs, rhs) => lhs.compare(rhs), maxFeatures);\r\n this.modelId = modelId;\r\n this.type = type;\r\n }\r\n\r\n /** Returns the maximum number of [[Feature]]s this FeatureTable can contain. */\r\n public get maxFeatures(): number { return this._maximumSize; }\r\n /** @internal */\r\n public get anyDefined(): boolean { return this.length > 1 || (1 === this.length && this._array[0].value.isDefined); }\r\n /** Returns true if this FeatureTable contains exactly one [[Feature]]. */\r\n public get isUniform(): boolean { return 1 === this.length; }\r\n /** If this FeatureTable contains exactly one [[Feature]], returns that Feature; otherwise returns undefined. */\r\n public get uniform(): Feature | undefined { return 1 === this.length ? this._array[0].value : undefined; }\r\n /** Returns true if this FeatureTable is associated with [[BatchType.VolumeClassifier]] geometry. */\r\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n /** Returns true if this FeatureTable is associated with [[BatchType.PlanarClassifier]] geometry. */\r\n public get isPlanarClassifier(): boolean { return BatchType.PlanarClassifier === this.type; }\r\n\r\n /** Returns the Feature corresponding to the specified index, or undefined if the index is not present. */\r\n public findFeature(index: number): Feature | undefined {\r\n for (const entry of this._array)\r\n if (entry.index === index)\r\n return entry.value;\r\n\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n public insertWithIndex(feature: Feature, index: number): void {\r\n const bound = this.lowerBound(feature);\r\n assert(!bound.equal);\r\n assert(!this.isFull);\r\n const entry = new IndexedValue<Feature>(feature, index);\r\n this._array.splice(bound.index, 0, entry);\r\n }\r\n\r\n /** @internal */\r\n public getArray(): Array<IndexedValue<Feature>> { return this._array; }\r\n}\r\n\r\n/** @internal */\r\nexport type ComputeNodeId = (feature: PackedFeatureWithIndex) => number;\r\n\r\n/** Interface common to PackedFeatureTable and MultiModelPackedFeatureTable.\r\n * @internal\r\n */\r\nexport interface RenderFeatureTable {\r\n /** The \"model Id\" of the tile tree containing the tile from which this feature table originated.\r\n * It may be a transient Id if, for example, the tile tree represents a reality model or represents the geometry of multiple\r\n * persistent models batched together.\r\n */\r\n readonly batchModelId: Id64String;\r\n /** Split representation of batchModelId, so we're not constantly having to parse the string. */\r\n readonly batchModelIdPair: Id64.Uint32Pair;\r\n /** The number of features in the table; equivalently, one more than the largest feature index. */\r\n readonly numFeatures: number;\r\n /** Strictly for reporting memory usage. */\r\n readonly byteLength: number;\r\n readonly type: BatchType;\r\n\r\n /** Get the feature at the specified index. Caller is responsible for validating featureIndex less than numFeatures. */\r\n getFeature(featureIndex: number, result: ModelFeature): ModelFeature;\r\n /** Find the specified feature. Returns undefined if featureIndex >= numFeatures. */\r\n findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined;\r\n /** Find the Id of the element of the specified feature. */\r\n findElementId(featureIndex: number): Id64String | undefined;\r\n /** Get the Id of the element of the specified feature as a pair of 32-bit integers, asserting that feature index < numFeatures. */\r\n getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\r\n /** Get the feature at the specified index. Caller is responsible for validating featureIndex less than numFeatures. */\r\n getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature;\r\n /** Get an object that provides iteration over all features, in order. `output` is reused as the current value on each iteration. */\r\n iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex>;\r\n populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void;\r\n getAnimationNodeId(featureIndex: number): number;\r\n}\r\n\r\nconst scratchPackedFeature = PackedFeature.create();\r\n\r\nfunction populateAnimationNodeIds(table: RenderFeatureTable, computeNodeId: ComputeNodeId, maxNodeId: number): UintArray | undefined {\r\n assert(maxNodeId > 0);\r\n\r\n let nodeIds;\r\n const outputFeature = PackedFeature.createWithIndex();\r\n for (const feature of table.iterable(outputFeature)) {\r\n const nodeId = computeNodeId(feature);\r\n assert(nodeId <= maxNodeId);\r\n if (0 !== nodeId) {\r\n if (!nodeIds) {\r\n const size = table.numFeatures;\r\n nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));\r\n }\r\n\r\n nodeIds[feature.index] = nodeId;\r\n }\r\n }\r\n\r\n return nodeIds;\r\n}\r\n\r\n/**\r\n * An immutable, packed representation of a [[FeatureTable]]. The features are packed into a single array of 32-bit integer values,\r\n * wherein each feature occupies 3 32-bit integers.\r\n * @internal\r\n */\r\nexport class PackedFeatureTable implements RenderFeatureTable {\r\n private readonly _data: Uint32Array;\r\n public readonly batchModelId: Id64String;\r\n public readonly batchModelIdPair: Id64.Uint32Pair;\r\n public readonly numFeatures: number;\r\n public readonly anyDefined: boolean;\r\n public readonly type: BatchType;\r\n private _animationNodeIds?: UintArray;\r\n\r\n public get byteLength(): number { return this._data.byteLength; }\r\n public get animationNodeIds(): Readonly<UintArray> | undefined { return this._animationNodeIds; }\r\n\r\n /** @internal for use by MultiModelPackedFeatureTable */\r\n public setAnimationNodeIds(nodeIds: UintArray | undefined): void {\r\n assert(undefined === this._animationNodeIds);\r\n this._animationNodeIds = nodeIds;\r\n }\r\n\r\n /** Construct a PackedFeatureTable from the packed binary data.\r\n * This is used internally when deserializing Tiles in iMdl format.\r\n * @internal\r\n */\r\n public constructor(data: Uint32Array, modelId: Id64String, numFeatures: number, type: BatchType, animationNodeIds?: UintArray) {\r\n this._data = data;\r\n this.batchModelId = modelId;\r\n this.batchModelIdPair = Id64.getUint32Pair(modelId);\r\n this.numFeatures = numFeatures;\r\n this.type = type;\r\n this._animationNodeIds = animationNodeIds;\r\n\r\n switch (this.numFeatures) {\r\n case 0:\r\n this.anyDefined = false;\r\n break;\r\n case 1:\r\n this.anyDefined = ModelFeature.isDefined(this.getFeature(0, ModelFeature.create()));\r\n break;\r\n default:\r\n this.anyDefined = true;\r\n break;\r\n }\r\n\r\n assert(this._data.length >= this._subCategoriesOffset);\r\n assert(undefined === this._animationNodeIds || this._animationNodeIds.length === this.numFeatures);\r\n }\r\n\r\n /** Create a packed feature table from a [[FeatureTable]]. */\r\n public static pack(featureTable: FeatureTable): PackedFeatureTable {\r\n // We must determine how many subcategories we have ahead of time to compute the size of the Uint32Array, as\r\n // the array cannot be resized after it is created.\r\n // We are not too worried about this as FeatureTables created on the front-end will contain few if any features; those obtained from the\r\n // back-end arrive within tiles already in the packed format.\r\n const subcategories = new Map<string, number>();\r\n for (const iv of featureTable.getArray()) {\r\n const found = subcategories.get(iv.value.subCategoryId.toString());\r\n if (undefined === found)\r\n subcategories.set(iv.value.subCategoryId, subcategories.size);\r\n }\r\n\r\n // We need 3 32-bit integers per feature, plus 2 32-bit integers per subcategory.\r\n const subCategoriesOffset = 3 * featureTable.length;\r\n const nUint32s = subCategoriesOffset + 2 * subcategories.size;\r\n const uint32s = new Uint32Array(nUint32s);\r\n\r\n for (const iv of featureTable.getArray()) {\r\n const feature = iv.value;\r\n const index = iv.index * 3;\r\n\r\n let subCategoryIndex = subcategories.get(feature.subCategoryId)!;\r\n assert(undefined !== subCategoryIndex); // we inserted it above...\r\n subCategoryIndex |= (feature.geometryClass << 24);\r\n\r\n uint32s[index + 0] = Id64.getLowerUint32(feature.elementId);\r\n uint32s[index + 1] = Id64.getUpperUint32(feature.elementId);\r\n uint32s[index + 2] = subCategoryIndex;\r\n }\r\n\r\n subcategories.forEach((index: number, id: string, _map) => {\r\n const index32 = subCategoriesOffset + 2 * index;\r\n uint32s[index32 + 0] = Id64.getLowerUint32(id);\r\n uint32s[index32 + 1] = Id64.getUpperUint32(id);\r\n });\r\n\r\n return new PackedFeatureTable(uint32s, featureTable.modelId, featureTable.length, featureTable.type);\r\n }\r\n\r\n /** Retrieve the Feature associated with the specified index. */\r\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\r\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\r\n return ModelFeature.unpack(packed, result, this.batchModelId);\r\n }\r\n\r\n /** Returns the Feature associated with the specified index, or undefined if the index is out of range. */\r\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\r\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\r\n }\r\n\r\n /** @internal */\r\n public getElementIdPair(featureIndex: number, out?: Id64.Uint32Pair): Id64.Uint32Pair {\r\n out = out ?? { lower: 0, upper: 0 };\r\n assert(featureIndex < this.numFeatures);\r\n const offset = 3 * featureIndex;\r\n out.lower = this._data[offset];\r\n out.upper = this._data[offset + 1];\r\n return out;\r\n }\r\n\r\n /** @internal */\r\n public getSubCategoryIdPair(featureIndex: number): Id64.Uint32Pair {\r\n const index = 3 * featureIndex;\r\n let subCatIndex = this._data[index + 2];\r\n subCatIndex = (subCatIndex & 0x00ffffff) >>> 0;\r\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\r\n return { lower: this._data[subCatIndex], upper: this._data[subCatIndex + 1] };\r\n }\r\n\r\n /** @internal */\r\n public getAnimationNodeId(featureIndex: number): number {\r\n return undefined !== this._animationNodeIds && featureIndex < this.numFeatures ? this._animationNodeIds[featureIndex] : 0;\r\n }\r\n\r\n /** @internal */\r\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\r\n assert(featureIndex < this.numFeatures);\r\n\r\n const index32 = 3 * featureIndex;\r\n result.elementId.lower = this._data[index32];\r\n result.elementId.upper = this._data[index32 + 1];\r\n\r\n const subCatIndexAndClass = this._data[index32 + 2];\r\n result.geometryClass = (subCatIndexAndClass >>> 24) & 0xff;\r\n\r\n let subCatIndex = (subCatIndexAndClass & 0x00ffffff) >>> 0;\r\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\r\n result.subCategoryId.lower = this._data[subCatIndex];\r\n result.subCategoryId.upper = this._data[subCatIndex + 1];\r\n\r\n result.animationNodeId = this.getAnimationNodeId(featureIndex);\r\n result.modelId.lower = this.batchModelIdPair.lower;\r\n result.modelId.upper = this.batchModelIdPair.upper;\r\n\r\n return result;\r\n }\r\n\r\n /** Returns the element ID of the Feature associated with the specified index, or undefined if the index is out of range. */\r\n public findElementId(featureIndex: number): Id64String | undefined {\r\n if (featureIndex >= this.numFeatures)\r\n return undefined;\r\n else\r\n return this.readId(3 * featureIndex);\r\n }\r\n\r\n /** Return true if this table contains exactly 1 feature. */\r\n public get isUniform(): boolean { return 1 === this.numFeatures; }\r\n\r\n /** If this table contains exactly 1 feature, return it. */\r\n public getUniform(result: ModelFeature): ModelFeature | undefined {\r\n return this.isUniform ? this.getFeature(0, result) : undefined;\r\n }\r\n\r\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n public get isPlanarClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n public get isClassifier(): boolean { return this.isVolumeClassifier || this.isPlanarClassifier; }\r\n\r\n /** Unpack the features into a [[FeatureTable]]. */\r\n public unpack(): FeatureTable {\r\n const table = new FeatureTable(this.numFeatures, this.batchModelId);\r\n const feature = ModelFeature.create();\r\n for (let i = 0; i < this.numFeatures; i++) {\r\n this.getFeature(i, feature);\r\n table.insertWithIndex(new Feature(feature.elementId, feature.subCategoryId, feature.geometryClass), i);\r\n }\r\n\r\n return table;\r\n }\r\n\r\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\r\n assert(undefined === this._animationNodeIds);\r\n this._animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);\r\n }\r\n\r\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\r\n for (let i = 0; i < this.numFeatures; i++) {\r\n this.getPackedFeature(i, output);\r\n output.index = i;\r\n yield output;\r\n }\r\n }\r\n\r\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\r\n return {\r\n [Symbol.iterator]: () => this.iterator(output),\r\n };\r\n }\r\n\r\n private get _subCategoriesOffset(): number { return this.numFeatures * 3; }\r\n\r\n private readId(offset32: number): Id64String {\r\n return Id64.fromUint32Pair(this._data[offset32], this._data[offset32 + 1]);\r\n }\r\n}\r\n\r\ninterface PackedFeatureModelEntry {\r\n lastFeatureIndex: number;\r\n idLower: number;\r\n idUpper: number;\r\n}\r\n\r\nconst scratchPackedFeatureModelEntry = { lastFeatureIndex: -1, idLower: -1, idUpper: -1 };\r\n\r\n/** A table of model Ids associated with a [[MultiModelPackedFeatureTable]].\r\n * The feature indices in the packed feature table are grouped together by model, such that the first N features belong to model 1, the next M features to model 2, and so on.\r\n * The model table itself consists of one entry per model, where each entry looks like:\r\n * indexOfLastFeatureInModel: u32\r\n * modelId: u64\r\n * The modelId associated with a feature can therefore be derived by finding the entry in the model table with the highest indexOfLastFeatureInModel no greater than the feature index.\r\n * This lookup can be optimized using binary search.\r\n * Moreover, while iterating the feature table in sequence, the model table can be iterated in parallel so that no per-feature lookup of model Id is required.\r\n * @internal\r\n */\r\nexport class PackedFeatureModelTable {\r\n private readonly _data: Uint32Array;\r\n\r\n public constructor(data: Uint32Array) {\r\n this._data = data;\r\n assert(this._data.length % 3 === 0);\r\n }\r\n\r\n /** The number of models in the table. */\r\n public get length(): number {\r\n return this._data.length / 3;\r\n }\r\n\r\n public get byteLength(): number {\r\n return this._data.byteLength;\r\n }\r\n\r\n private getLastFeatureIndex(modelIndex: number): number {\r\n return this._data[modelIndex * 3];\r\n }\r\n\r\n public getEntry(modelIndex: number, result: PackedFeatureModelEntry): PackedFeatureModelEntry {\r\n if (modelIndex >= this.length) {\r\n result.idLower = result.idUpper = 0;\r\n result.lastFeatureIndex = Number.MAX_SAFE_INTEGER;\r\n return result;\r\n }\r\n\r\n const index = modelIndex * 3;\r\n result.lastFeatureIndex = this._data[index + 0];\r\n result.idLower = this._data[index + 1];\r\n result.idUpper = this._data[index + 2];\r\n return result;\r\n }\r\n\r\n /** Get the Id of the model associated with the specified feature, or an invalid Id if the feature is not associated with any model. */\r\n public getModelIdPair(featureIndex: number, result?: Id64.Uint32Pair): Id64.Uint32Pair {\r\n if (!result)\r\n result = { lower: 0, upper: 0 };\r\n else\r\n result.lower = result.upper = 0;\r\n\r\n let first = 0;\r\n const last = this.length;\r\n let count = last;\r\n while (count > 0) {\r\n const step = Math.floor(count / 2);\r\n const mid = first + step;\r\n const lastFeatureIndex = this.getLastFeatureIndex(mid);\r\n if (featureIndex > lastFeatureIndex) {\r\n first = mid + 1;\r\n count -= step + 1;\r\n } else {\r\n count = step;\r\n }\r\n }\r\n\r\n if (first < last) {\r\n result.lower = this._data[first * 3 + 1];\r\n result.upper = this._data[first * 3 + 2];\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\n/** A PackedFeatureTable with a PackedFeatureModelTable appended to it, capable of storing features belonging to more than one model.\r\n * @internal\r\n */\r\nexport class MultiModelPackedFeatureTable implements RenderFeatureTable {\r\n private readonly _features: PackedFeatureTable;\r\n private readonly _models: PackedFeatureModelTable;\r\n\r\n public constructor(features: PackedFeatureTable, models: PackedFeatureModelTable) {\r\n this._features = features;\r\n this._models = models;\r\n }\r\n\r\n public static create(data: Uint32Array, batchModelId: Id64String, numFeatures: number, type: BatchType, numSubCategories: number): MultiModelPackedFeatureTable {\r\n const modelTableOffset = 3 * numFeatures + 2 * numSubCategories;\r\n const featureData = data.subarray(0, modelTableOffset);\r\n const features = new PackedFeatureTable(featureData, batchModelId, numFeatures, type);\r\n\r\n const modelData = data.subarray(modelTableOffset);\r\n const models = new PackedFeatureModelTable(modelData);\r\n\r\n return new MultiModelPackedFeatureTable(features, models);\r\n }\r\n\r\n public get batchModelId() { return this._features.batchModelId; }\r\n public get batchModelIdPair() { return this._features.batchModelIdPair; }\r\n public get numFeatures() { return this._features.numFeatures; }\r\n public get type() { return this._features.type; }\r\n public get animationNodeIds(): Readonly<UintArray> | undefined { return this._features.animationNodeIds; }\r\n\r\n public get byteLength() {\r\n return this._features.byteLength + this._models.byteLength;\r\n }\r\n\r\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\r\n this._features.getPackedFeature(featureIndex, result);\r\n this._models.getModelIdPair(featureIndex, result.modelId);\r\n return result;\r\n }\r\n\r\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\r\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\r\n return ModelFeature.unpack(packed, result);\r\n }\r\n\r\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\r\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\r\n }\r\n\r\n public getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\r\n return this._features.getElementIdPair(featureIndex, out);\r\n }\r\n\r\n public findElementId(featureIndex: number): Id64String | undefined {\r\n return this._features.findElementId(featureIndex);\r\n }\r\n\r\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\r\n // Rather than perform a binary search on the model table to find each feature's model Id, traverse the model table in parallel with the feature table.\r\n let modelIndex = 0;\r\n const modelEntry = this._models.getEntry(modelIndex, scratchPackedFeatureModelEntry);\r\n\r\n for (let featureIndex = 0; featureIndex < this.numFeatures; featureIndex++) {\r\n if (featureIndex > modelEntry.lastFeatureIndex)\r\n this._models.getEntry(++modelIndex, modelEntry);\r\n\r\n this._features.getPackedFeature(featureIndex, output);\r\n output.modelId.lower = modelEntry.idLower;\r\n output.modelId.upper = modelEntry.idUpper;\r\n output.index = featureIndex;\r\n yield output;\r\n }\r\n }\r\n\r\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\r\n return {\r\n [Symbol.iterator]: () => this.iterator(output),\r\n };\r\n }\r\n\r\n public getAnimationNodeId(featureIndex: number): number {\r\n return this._features.getAnimationNodeId(featureIndex);\r\n }\r\n\r\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\r\n this._features.setAnimationNodeIds(populateAnimationNodeIds(this, computeNodeId, maxNodeId));\r\n }\r\n}\r\n"]}
@@ -6,6 +6,7 @@ import { EntityReferenceSet } from "./EntityReference";
6
6
  import { ClipVector, Plane3dByOriginAndUnitNormal, Point4d, Range1d, Transform, Vector3d, XYAndZ } from "@itwin/core-geometry";
7
7
  import { RgbColor } from "./RgbColor";
8
8
  import { FeatureAppearance, FeatureOverrides } from "./FeatureSymbology";
9
+ import { PackedFeatureWithIndex } from "./FeatureTable";
9
10
  /** Namespace containing types that collectively define a script that animates the contents of a view by adjusting the visibility, position,
10
11
  * and/or symbology of groups of elements over time. A [[RenderSchedule.Script]] is hosted by a [RenderTimeline]($backend) element. The script
11
12
  * can be associated with a [DisplayStyleState]($frontend) by way of its [[DisplayStyleSettings.renderTimeline]] property.
@@ -364,6 +365,8 @@ export declare namespace RenderSchedule {
364
365
  * @alpha
365
366
  */
366
367
  get discreteBatchIds(): Set<number>;
368
+ /** @internal see ImdlReader.readAnimationBranches */
369
+ getBatchIdForFeature(feature: PackedFeatureWithIndex): number;
367
370
  }
368
371
  /** Specifies how to animate the contents of a [ViewState]($frontend) over time. The script contains any number of [[RenderSchedule.ModelTimeline]]s, each describing how
369
372
  * to animate one of the models in the view.
@@ -393,6 +396,9 @@ export declare namespace RenderSchedule {
393
396
  readonly transformBatchIds: ReadonlySet<number>;
394
397
  /** Tile tree references perform **very** frequent ordered comparisons of Scripts. They need to be fast. */
395
398
  private readonly _cachedComparisons;
399
+ private _discreteBatchIds?;
400
+ private _lastFeatureModelTimeline?;
401
+ private _maxBatchId?;
396
402
  compareTo(other: Script): number;
397
403
  equals(other: Script): boolean;
398
404
  protected constructor(props: Readonly<ScriptProps>);
@@ -412,6 +418,14 @@ export declare namespace RenderSchedule {
412
418
  discloseIds(ids: EntityReferenceSet): void;
413
419
  /** @internal */
414
420
  modelRequiresBatching(modelId: Id64String): boolean;
421
+ /** The batch Ids of the subset of [[elementTimelines]] that apply a transform and/or cutting plane.
422
+ * @alpha
423
+ */
424
+ get discreteBatchIds(): Set<number>;
425
+ /** @internal see ImdlReader.readAnimationBranches. */
426
+ getBatchIdForFeature(feature: PackedFeatureWithIndex): number;
427
+ /** @alpha */
428
+ get maxBatchId(): number;
415
429
  }
416
430
  /** A reference to a [[RenderSchedule.Script]], optionally identifying the source of the script.
417
431
  * @see [DisplayStyle.loadScheduleScript]($backend) and [DisplayStyleState.scheduleScript]($frontend) to obtain the script reference for a display style on the frontend
@@ -1 +1 @@
1
- {"version":3,"file":"RenderSchedule.d.ts","sourceRoot":"","sources":["../../src/RenderSchedule.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAEL,iBAAiB,EAAE,WAAW,EAAQ,UAAU,EACjD,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACqB,UAAU,EAAgC,4BAA4B,EAAW,OAAO,EAAE,OAAO,EAAE,SAAS,EAA8B,QAAQ,EAAE,MAAM,EACrL,MAAM,sBAAsB,CAAC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.readAnimationBranches */
702
+ getBatchIdForFeature(feature) {
703
+ assert(Id64.fromUint32PairObject(feature.modelId) === this.modelId);
704
+ const elementTimeline = this.getTimelineForElement(feature.elementId.lower, feature.elementId.upper);
705
+ return elementTimeline?.batchId ?? 0;
706
+ }
701
707
  }
702
708
  RenderSchedule.ModelTimeline = ModelTimeline;
703
709
  /** Specifies how to animate the contents of a [ViewState]($frontend) over time. The script contains any number of [[RenderSchedule.ModelTimeline]]s, each describing how
@@ -798,6 +804,36 @@ export var RenderSchedule;
798
804
  // Only if the script contains animation (cutting plane, transform or visibility by node ID) do we require separate tilesets for animations.
799
805
  return this.requiresBatching && this.modelTimelines.some((x) => x.modelId === modelId && x.requiresBatching);
800
806
  }
807
+ /** The batch Ids of the subset of [[elementTimelines]] that apply a transform and/or cutting plane.
808
+ * @alpha
809
+ */
810
+ get discreteBatchIds() {
811
+ if (this._discreteBatchIds)
812
+ return this._discreteBatchIds;
813
+ this._discreteBatchIds = new Set();
814
+ for (const timeline of this.modelTimelines)
815
+ for (const batchId of timeline.discreteBatchIds)
816
+ this._discreteBatchIds.add(batchId);
817
+ return this._discreteBatchIds;
818
+ }
819
+ /** @internal see ImdlReader.readAnimationBranches. */
820
+ getBatchIdForFeature(feature) {
821
+ let timeline;
822
+ const prev = this._lastFeatureModelTimeline;
823
+ if (prev && prev.idLower === feature.modelId.lower && prev.idUpper === feature.modelId.upper) {
824
+ timeline = prev.timeline;
825
+ }
826
+ else {
827
+ const modelId = Id64.fromUint32PairObject(feature.modelId);
828
+ timeline = this.find(modelId);
829
+ this._lastFeatureModelTimeline = { timeline, idLower: feature.modelId.lower, idUpper: feature.modelId.upper };
830
+ }
831
+ return timeline?.getBatchIdForFeature(feature) ?? 0;
832
+ }
833
+ /** @alpha */
834
+ get maxBatchId() {
835
+ return this._maxBatchId ?? (this._maxBatchId = this.modelTimelines.reduce((accum, timeline) => Math.max(accum, timeline.maxBatchId), 0));
836
+ }
801
837
  }
802
838
  RenderSchedule.Script = Script;
803
839
  /** A reference to a [[RenderSchedule.Script]], optionally identifying the source of the script.