@itwin/rpcinterface-full-stack-tests 4.0.0-dev.46 → 4.0.0-dev.50

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.
@@ -25050,9 +25050,9 @@ module.exports = {
25050
25050
 
25051
25051
  /***/ }),
25052
25052
 
25053
- /***/ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.js":
25053
+ /***/ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/formats.js":
25054
25054
  /*!*************************************************************************************!*\
25055
- !*** ../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.js ***!
25055
+ !*** ../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/formats.js ***!
25056
25056
  \*************************************************************************************/
25057
25057
  /***/ ((module) => {
25058
25058
 
@@ -25084,18 +25084,18 @@ module.exports = {
25084
25084
 
25085
25085
  /***/ }),
25086
25086
 
25087
- /***/ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.js":
25087
+ /***/ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/index.js":
25088
25088
  /*!***********************************************************************************!*\
25089
- !*** ../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.js ***!
25089
+ !*** ../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/index.js ***!
25090
25090
  \***********************************************************************************/
25091
25091
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
25092
25092
 
25093
25093
  "use strict";
25094
25094
 
25095
25095
 
25096
- var stringify = __webpack_require__(/*! ./stringify */ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.js");
25097
- var parse = __webpack_require__(/*! ./parse */ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/parse.js");
25098
- var formats = __webpack_require__(/*! ./formats */ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.js");
25096
+ var stringify = __webpack_require__(/*! ./stringify */ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/stringify.js");
25097
+ var parse = __webpack_require__(/*! ./parse */ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/parse.js");
25098
+ var formats = __webpack_require__(/*! ./formats */ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/formats.js");
25099
25099
 
25100
25100
  module.exports = {
25101
25101
  formats: formats,
@@ -25106,16 +25106,16 @@ module.exports = {
25106
25106
 
25107
25107
  /***/ }),
25108
25108
 
25109
- /***/ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/parse.js":
25109
+ /***/ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/parse.js":
25110
25110
  /*!***********************************************************************************!*\
25111
- !*** ../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/parse.js ***!
25111
+ !*** ../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/parse.js ***!
25112
25112
  \***********************************************************************************/
25113
25113
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
25114
25114
 
25115
25115
  "use strict";
25116
25116
 
25117
25117
 
25118
- var utils = __webpack_require__(/*! ./utils */ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.js");
25118
+ var utils = __webpack_require__(/*! ./utils */ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/utils.js");
25119
25119
 
25120
25120
  var has = Object.prototype.hasOwnProperty;
25121
25121
  var isArray = Array.isArray;
@@ -25380,9 +25380,9 @@ module.exports = function (str, opts) {
25380
25380
 
25381
25381
  /***/ }),
25382
25382
 
25383
- /***/ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.js":
25383
+ /***/ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/stringify.js":
25384
25384
  /*!***************************************************************************************!*\
25385
- !*** ../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.js ***!
25385
+ !*** ../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/stringify.js ***!
25386
25386
  \***************************************************************************************/
25387
25387
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
25388
25388
 
@@ -25390,8 +25390,8 @@ module.exports = function (str, opts) {
25390
25390
 
25391
25391
 
25392
25392
  var getSideChannel = __webpack_require__(/*! side-channel */ "../../common/temp/node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js");
25393
- var utils = __webpack_require__(/*! ./utils */ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.js");
25394
- var formats = __webpack_require__(/*! ./formats */ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.js");
25393
+ var utils = __webpack_require__(/*! ./utils */ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/utils.js");
25394
+ var formats = __webpack_require__(/*! ./formats */ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/formats.js");
25395
25395
  var has = Object.prototype.hasOwnProperty;
25396
25396
 
25397
25397
  var arrayPrefixGenerators = {
@@ -25408,7 +25408,6 @@ var arrayPrefixGenerators = {
25408
25408
  };
25409
25409
 
25410
25410
  var isArray = Array.isArray;
25411
- var split = String.prototype.split;
25412
25411
  var push = Array.prototype.push;
25413
25412
  var pushToArray = function (arr, valueOrArray) {
25414
25413
  push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
@@ -25510,14 +25509,6 @@ var stringify = function stringify(
25510
25509
  if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
25511
25510
  if (encoder) {
25512
25511
  var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
25513
- if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
25514
- var valuesArray = split.call(String(obj), ',');
25515
- var valuesJoined = '';
25516
- for (var i = 0; i < valuesArray.length; ++i) {
25517
- valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
25518
- }
25519
- return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
25520
- }
25521
25512
  return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
25522
25513
  }
25523
25514
  return [formatter(prefix) + '=' + formatter(String(obj))];
@@ -25532,6 +25523,9 @@ var stringify = function stringify(
25532
25523
  var objKeys;
25533
25524
  if (generateArrayPrefix === 'comma' && isArray(obj)) {
25534
25525
  // we need to join elements in
25526
+ if (encodeValuesOnly && encoder) {
25527
+ obj = utils.maybeMap(obj, encoder);
25528
+ }
25535
25529
  objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
25536
25530
  } else if (isArray(filter)) {
25537
25531
  objKeys = filter;
@@ -25564,7 +25558,7 @@ var stringify = function stringify(
25564
25558
  commaRoundTrip,
25565
25559
  strictNullHandling,
25566
25560
  skipNulls,
25567
- encoder,
25561
+ generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,
25568
25562
  filter,
25569
25563
  sort,
25570
25564
  allowDots,
@@ -25717,16 +25711,16 @@ module.exports = function (object, opts) {
25717
25711
 
25718
25712
  /***/ }),
25719
25713
 
25720
- /***/ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.js":
25714
+ /***/ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/utils.js":
25721
25715
  /*!***********************************************************************************!*\
25722
- !*** ../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.js ***!
25716
+ !*** ../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/utils.js ***!
25723
25717
  \***********************************************************************************/
25724
25718
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
25725
25719
 
25726
25720
  "use strict";
25727
25721
 
25728
25722
 
25729
- var formats = __webpack_require__(/*! ./formats */ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.js");
25723
+ var formats = __webpack_require__(/*! ./formats */ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/formats.js");
25730
25724
 
25731
25725
  var has = Object.prototype.hasOwnProperty;
25732
25726
  var isArray = Array.isArray;
@@ -28710,7 +28704,7 @@ var Emitter = __webpack_require__(/*! component-emitter */ "../../common/temp/no
28710
28704
 
28711
28705
  var safeStringify = __webpack_require__(/*! fast-safe-stringify */ "../../common/temp/node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js");
28712
28706
 
28713
- var qs = __webpack_require__(/*! qs */ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.js");
28707
+ var qs = __webpack_require__(/*! qs */ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/index.js");
28714
28708
 
28715
28709
  var RequestBase = __webpack_require__(/*! ./request-base */ "../../common/temp/node_modules/.pnpm/superagent@7.1.5/node_modules/superagent/lib/request-base.js");
28716
28710
 
@@ -44326,6 +44320,10 @@ __webpack_require__.r(__webpack_exports__);
44326
44320
  /* harmony export */ "BatchType": () => (/* binding */ BatchType),
44327
44321
  /* harmony export */ "Feature": () => (/* binding */ Feature),
44328
44322
  /* harmony export */ "FeatureTable": () => (/* binding */ FeatureTable),
44323
+ /* harmony export */ "ModelFeature": () => (/* binding */ ModelFeature),
44324
+ /* harmony export */ "MultiModelPackedFeatureTable": () => (/* binding */ MultiModelPackedFeatureTable),
44325
+ /* harmony export */ "PackedFeature": () => (/* binding */ PackedFeature),
44326
+ /* harmony export */ "PackedFeatureModelTable": () => (/* binding */ PackedFeatureModelTable),
44329
44327
  /* harmony export */ "PackedFeatureTable": () => (/* binding */ PackedFeatureTable)
44330
44328
  /* harmony export */ });
44331
44329
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
@@ -44375,6 +44373,52 @@ class Feature {
44375
44373
  return cmp;
44376
44374
  }
44377
44375
  }
44376
+ /** @internal */
44377
+ var ModelFeature;
44378
+ (function (ModelFeature) {
44379
+ function create() {
44380
+ return {
44381
+ modelId: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.invalid,
44382
+ elementId: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.invalid,
44383
+ subCategoryId: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.invalid,
44384
+ geometryClass: _GeometryParams__WEBPACK_IMPORTED_MODULE_1__.GeometryClass.Primary,
44385
+ };
44386
+ }
44387
+ ModelFeature.create = create;
44388
+ function isDefined(feature) {
44389
+ return !_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isInvalid(feature.modelId) || !_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isInvalid(feature.elementId) || !_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isInvalid(feature.subCategoryId) || feature.geometryClass !== _GeometryParams__WEBPACK_IMPORTED_MODULE_1__.GeometryClass.Primary;
44390
+ }
44391
+ ModelFeature.isDefined = isDefined;
44392
+ function unpack(packed, result, unpackedModelId) {
44393
+ result.modelId = unpackedModelId ?? _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32PairObject(packed.modelId);
44394
+ result.elementId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32PairObject(packed.elementId);
44395
+ result.subCategoryId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32PairObject(packed.subCategoryId);
44396
+ result.geometryClass = packed.geometryClass;
44397
+ return result;
44398
+ }
44399
+ ModelFeature.unpack = unpack;
44400
+ })(ModelFeature || (ModelFeature = {}));
44401
+ /** @internal */
44402
+ var PackedFeature;
44403
+ (function (PackedFeature) {
44404
+ function create() {
44405
+ const pair = { upper: 0, lower: 0 };
44406
+ return {
44407
+ modelId: { ...pair },
44408
+ elementId: { ...pair },
44409
+ subCategoryId: { ...pair },
44410
+ geometryClass: _GeometryParams__WEBPACK_IMPORTED_MODULE_1__.GeometryClass.Primary,
44411
+ animationNodeId: 0,
44412
+ };
44413
+ }
44414
+ PackedFeature.create = create;
44415
+ function createWithIndex() {
44416
+ const result = create();
44417
+ result.index = 0;
44418
+ return result;
44419
+ }
44420
+ PackedFeature.createWithIndex = createWithIndex;
44421
+ })(PackedFeature || (PackedFeature = {}));
44378
44422
  /** Describes the type of a 'batch' of graphics representing multiple [[Feature]]s.
44379
44423
  * The most commonly-encountered batches are Tiles, which can be of either Primary or
44380
44424
  * Classifier type.
@@ -44443,6 +44487,7 @@ class FeatureTable extends _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Inde
44443
44487
  /** @internal */
44444
44488
  getArray() { return this._array; }
44445
44489
  }
44490
+ const scratchPackedFeature = PackedFeature.create();
44446
44491
  /**
44447
44492
  * An immutable, packed representation of a [[FeatureTable]]. The features are packed into a single array of 32-bit integer values,
44448
44493
  * wherein each feature occupies 3 32-bit integers.
@@ -44453,10 +44498,10 @@ class PackedFeatureTable {
44453
44498
  * This is used internally when deserializing Tiles in iMdl format.
44454
44499
  * @internal
44455
44500
  */
44456
- constructor(data, modelId, numFeatures, maxFeatures, type, animationNodeIds) {
44501
+ constructor(data, modelId, numFeatures, type, animationNodeIds) {
44457
44502
  this._data = data;
44458
- this.modelId = modelId;
44459
- this.maxFeatures = maxFeatures;
44503
+ this.batchModelId = modelId;
44504
+ this.batchModelIdPair = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.getUint32Pair(modelId);
44460
44505
  this.numFeatures = numFeatures;
44461
44506
  this.type = type;
44462
44507
  this._animationNodeIds = animationNodeIds;
@@ -44465,14 +44510,13 @@ class PackedFeatureTable {
44465
44510
  this.anyDefined = false;
44466
44511
  break;
44467
44512
  case 1:
44468
- this.anyDefined = this.getFeature(0).isDefined;
44513
+ this.anyDefined = ModelFeature.isDefined(this.getFeature(0, ModelFeature.create()));
44469
44514
  break;
44470
44515
  default:
44471
44516
  this.anyDefined = true;
44472
44517
  break;
44473
44518
  }
44474
44519
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(this._data.length >= this._subCategoriesOffset);
44475
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(this.maxFeatures >= this.numFeatures);
44476
44520
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined === this._animationNodeIds || this._animationNodeIds.length === this.numFeatures);
44477
44521
  }
44478
44522
  get byteLength() { return this._data.byteLength; }
@@ -44508,18 +44552,16 @@ class PackedFeatureTable {
44508
44552
  uint32s[index32 + 0] = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.getLowerUint32(id);
44509
44553
  uint32s[index32 + 1] = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.getUpperUint32(id);
44510
44554
  });
44511
- return new PackedFeatureTable(uint32s, featureTable.modelId, featureTable.length, featureTable.maxFeatures, featureTable.type);
44555
+ return new PackedFeatureTable(uint32s, featureTable.modelId, featureTable.length, featureTable.type);
44512
44556
  }
44513
44557
  /** Retrieve the Feature associated with the specified index. */
44514
- getFeature(featureIndex) {
44515
- const packed = this.getPackedFeature(featureIndex);
44516
- const elemId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32Pair(packed.elementId.lower, packed.elementId.upper);
44517
- const subcatId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32Pair(packed.subCategoryId.lower, packed.subCategoryId.upper);
44518
- return new Feature(elemId, subcatId, packed.geometryClass);
44558
+ getFeature(featureIndex, result) {
44559
+ const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);
44560
+ return ModelFeature.unpack(packed, result, this.batchModelId);
44519
44561
  }
44520
44562
  /** Returns the Feature associated with the specified index, or undefined if the index is out of range. */
44521
- findFeature(featureIndex) {
44522
- return featureIndex < this.numFeatures ? this.getFeature(featureIndex) : undefined;
44563
+ findFeature(featureIndex, result) {
44564
+ return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;
44523
44565
  }
44524
44566
  /** @internal */
44525
44567
  getElementIdPair(featureIndex, out) {
@@ -44543,17 +44585,21 @@ class PackedFeatureTable {
44543
44585
  return undefined !== this._animationNodeIds && featureIndex < this.numFeatures ? this._animationNodeIds[featureIndex] : 0;
44544
44586
  }
44545
44587
  /** @internal */
44546
- getPackedFeature(featureIndex) {
44588
+ getPackedFeature(featureIndex, result) {
44547
44589
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(featureIndex < this.numFeatures);
44548
44590
  const index32 = 3 * featureIndex;
44549
- const elementId = { lower: this._data[index32], upper: this._data[index32 + 1] };
44591
+ result.elementId.lower = this._data[index32];
44592
+ result.elementId.upper = this._data[index32 + 1];
44550
44593
  const subCatIndexAndClass = this._data[index32 + 2];
44551
- const geometryClass = (subCatIndexAndClass >>> 24) & 0xff;
44594
+ result.geometryClass = (subCatIndexAndClass >>> 24) & 0xff;
44552
44595
  let subCatIndex = (subCatIndexAndClass & 0x00ffffff) >>> 0;
44553
44596
  subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;
44554
- const subCategoryId = { lower: this._data[subCatIndex], upper: this._data[subCatIndex + 1] };
44555
- const animationNodeId = this.getAnimationNodeId(featureIndex);
44556
- return { elementId, subCategoryId, geometryClass, animationNodeId };
44597
+ result.subCategoryId.lower = this._data[subCatIndex];
44598
+ result.subCategoryId.upper = this._data[subCatIndex + 1];
44599
+ result.animationNodeId = this.getAnimationNodeId(featureIndex);
44600
+ result.modelId.lower = this.batchModelIdPair.lower;
44601
+ result.modelId.upper = this.batchModelIdPair.upper;
44602
+ return result;
44557
44603
  }
44558
44604
  /** Returns the element ID of the Feature associated with the specified index, or undefined if the index is out of range. */
44559
44605
  findElementId(featureIndex) {
@@ -44565,16 +44611,19 @@ class PackedFeatureTable {
44565
44611
  /** Return true if this table contains exactly 1 feature. */
44566
44612
  get isUniform() { return 1 === this.numFeatures; }
44567
44613
  /** If this table contains exactly 1 feature, return it. */
44568
- get uniform() { return this.isUniform ? this.getFeature(0) : undefined; }
44614
+ getUniform(result) {
44615
+ return this.isUniform ? this.getFeature(0, result) : undefined;
44616
+ }
44569
44617
  get isVolumeClassifier() { return BatchType.VolumeClassifier === this.type; }
44570
44618
  get isPlanarClassifier() { return BatchType.VolumeClassifier === this.type; }
44571
44619
  get isClassifier() { return this.isVolumeClassifier || this.isPlanarClassifier; }
44572
44620
  /** Unpack the features into a [[FeatureTable]]. */
44573
44621
  unpack() {
44574
- const table = new FeatureTable(this.maxFeatures, this.modelId);
44622
+ const table = new FeatureTable(this.numFeatures, this.batchModelId);
44623
+ const feature = ModelFeature.create();
44575
44624
  for (let i = 0; i < this.numFeatures; i++) {
44576
- const feature = this.getFeature(i);
44577
- table.insertWithIndex(feature, i);
44625
+ this.getFeature(i, feature);
44626
+ table.insertWithIndex(new Feature(feature.elementId, feature.subCategoryId, feature.geometryClass), i);
44578
44627
  }
44579
44628
  return table;
44580
44629
  }
@@ -44597,11 +44646,150 @@ class PackedFeatureTable {
44597
44646
  if (haveNodes)
44598
44647
  this._animationNodeIds = nodeIds;
44599
44648
  }
44649
+ *iterator(output) {
44650
+ for (let i = 0; i < this.numFeatures; i++) {
44651
+ this.getPackedFeature(i, output);
44652
+ output.index = i;
44653
+ yield output;
44654
+ }
44655
+ }
44656
+ iterable(output) {
44657
+ return {
44658
+ [Symbol.iterator]: () => this.iterator(output),
44659
+ };
44660
+ }
44600
44661
  get _subCategoriesOffset() { return this.numFeatures * 3; }
44601
44662
  readId(offset32) {
44602
44663
  return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32Pair(this._data[offset32], this._data[offset32 + 1]);
44603
44664
  }
44604
44665
  }
44666
+ const scratchPackedFeatureModelEntry = { lastFeatureIndex: -1, idLower: -1, idUpper: -1 };
44667
+ /** A table of model Ids associated with a [[MultiModelPackedFeatureTable]].
44668
+ * 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.
44669
+ * The model table itself consists of one entry per model, where each entry looks like:
44670
+ * indexOfLastFeatureInModel: u32
44671
+ * modelId: u64
44672
+ * 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.
44673
+ * This lookup can be optimized using binary search.
44674
+ * 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.
44675
+ * @internal
44676
+ */
44677
+ class PackedFeatureModelTable {
44678
+ constructor(data) {
44679
+ this._data = data;
44680
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(this._data.length % 3 === 0);
44681
+ }
44682
+ /** The number of models in the table. */
44683
+ get length() {
44684
+ return this._data.length / 3;
44685
+ }
44686
+ get byteLength() {
44687
+ return this._data.byteLength;
44688
+ }
44689
+ getLastFeatureIndex(modelIndex) {
44690
+ return this._data[modelIndex * 3];
44691
+ }
44692
+ getEntry(modelIndex, result) {
44693
+ if (modelIndex >= this.length) {
44694
+ result.idLower = result.idUpper = 0;
44695
+ result.lastFeatureIndex = Number.MAX_SAFE_INTEGER;
44696
+ return result;
44697
+ }
44698
+ const index = modelIndex * 3;
44699
+ result.lastFeatureIndex = this._data[index + 0];
44700
+ result.idLower = this._data[index + 1];
44701
+ result.idUpper = this._data[index + 2];
44702
+ return result;
44703
+ }
44704
+ /** Get the Id of the model associated with the specified feature, or an invalid Id if the feature is not associated with any model. */
44705
+ getModelIdPair(featureIndex, result) {
44706
+ if (!result)
44707
+ result = { lower: 0, upper: 0 };
44708
+ else
44709
+ result.lower = result.upper = 0;
44710
+ let first = 0;
44711
+ const last = this.length;
44712
+ let count = last;
44713
+ while (count > 0) {
44714
+ const step = Math.floor(count / 2);
44715
+ const mid = first + step;
44716
+ const lastFeatureIndex = this.getLastFeatureIndex(mid);
44717
+ if (featureIndex > lastFeatureIndex) {
44718
+ first = mid + 1;
44719
+ count -= step + 1;
44720
+ }
44721
+ else {
44722
+ count = step;
44723
+ }
44724
+ }
44725
+ if (first < last) {
44726
+ result.lower = this._data[first * 3 + 1];
44727
+ result.upper = this._data[first * 3 + 2];
44728
+ }
44729
+ return result;
44730
+ }
44731
+ }
44732
+ /** A PackedFeatureTable with a PackedFeatureModelTable appended to it, capable of storing features belonging to more than one model.
44733
+ * @internal
44734
+ */
44735
+ class MultiModelPackedFeatureTable {
44736
+ constructor(features, models) {
44737
+ this._features = features;
44738
+ this._models = models;
44739
+ }
44740
+ static create(data, batchModelId, numFeatures, type, numSubCategories) {
44741
+ const modelTableOffset = 3 * numFeatures + 2 * numSubCategories;
44742
+ const featureData = data.subarray(0, modelTableOffset);
44743
+ const features = new PackedFeatureTable(featureData, batchModelId, numFeatures, type);
44744
+ const modelData = data.subarray(modelTableOffset);
44745
+ const models = new PackedFeatureModelTable(modelData);
44746
+ return new MultiModelPackedFeatureTable(features, models);
44747
+ }
44748
+ get batchModelId() { return this._features.batchModelId; }
44749
+ get batchModelIdPair() { return this._features.batchModelIdPair; }
44750
+ get numFeatures() { return this._features.numFeatures; }
44751
+ get type() { return this._features.type; }
44752
+ get byteLength() {
44753
+ return this._features.byteLength + this._models.byteLength;
44754
+ }
44755
+ getPackedFeature(featureIndex, result) {
44756
+ this._features.getPackedFeature(featureIndex, result);
44757
+ this._models.getModelIdPair(featureIndex, result.modelId);
44758
+ return result;
44759
+ }
44760
+ getFeature(featureIndex, result) {
44761
+ const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);
44762
+ return ModelFeature.unpack(packed, result);
44763
+ }
44764
+ findFeature(featureIndex, result) {
44765
+ return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;
44766
+ }
44767
+ getElementIdPair(featureIndex, out) {
44768
+ return this._features.getElementIdPair(featureIndex, out);
44769
+ }
44770
+ findElementId(featureIndex) {
44771
+ return this._features.findElementId(featureIndex);
44772
+ }
44773
+ *iterator(output) {
44774
+ // 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.
44775
+ let modelIndex = 0;
44776
+ const modelEntry = this._models.getEntry(modelIndex, scratchPackedFeatureModelEntry);
44777
+ for (let featureIndex = 0; featureIndex < this.numFeatures; featureIndex++) {
44778
+ if (featureIndex > modelEntry.lastFeatureIndex)
44779
+ this._models.getEntry(++modelIndex, modelEntry);
44780
+ this._features.getPackedFeature(featureIndex, output);
44781
+ output.modelId.lower = modelEntry.idLower;
44782
+ output.modelId.upper = modelEntry.idUpper;
44783
+ output.index = featureIndex;
44784
+ yield output;
44785
+ }
44786
+ }
44787
+ iterable(output) {
44788
+ return {
44789
+ [Symbol.iterator]: () => this.iterator(output),
44790
+ };
44791
+ }
44792
+ }
44605
44793
 
44606
44794
 
44607
44795
  /***/ }),
@@ -54695,9 +54883,11 @@ __webpack_require__.r(__webpack_exports__);
54695
54883
  /* harmony export */ "MeshPolylineList": () => (/* reexport safe */ _Render__WEBPACK_IMPORTED_MODULE_90__.MeshPolylineList),
54696
54884
  /* harmony export */ "ModelClipGroup": () => (/* reexport safe */ _ModelClipGroup__WEBPACK_IMPORTED_MODULE_77__.ModelClipGroup),
54697
54885
  /* harmony export */ "ModelClipGroups": () => (/* reexport safe */ _ModelClipGroup__WEBPACK_IMPORTED_MODULE_77__.ModelClipGroups),
54886
+ /* harmony export */ "ModelFeature": () => (/* reexport safe */ _FeatureTable__WEBPACK_IMPORTED_MODULE_32__.ModelFeature),
54698
54887
  /* harmony export */ "ModelGeometryChanges": () => (/* reexport safe */ _ModelGeometryChanges__WEBPACK_IMPORTED_MODULE_84__.ModelGeometryChanges),
54699
54888
  /* harmony export */ "ModelMapLayerSettings": () => (/* reexport safe */ _MapLayerSettings__WEBPACK_IMPORTED_MODULE_74__.ModelMapLayerSettings),
54700
54889
  /* harmony export */ "MonochromeMode": () => (/* reexport safe */ _DisplayStyleSettings__WEBPACK_IMPORTED_MODULE_19__.MonochromeMode),
54890
+ /* harmony export */ "MultiModelPackedFeatureTable": () => (/* reexport safe */ _FeatureTable__WEBPACK_IMPORTED_MODULE_32__.MultiModelPackedFeatureTable),
54701
54891
  /* harmony export */ "NoContentError": () => (/* reexport safe */ _IModelError__WEBPACK_IMPORTED_MODULE_63__.NoContentError),
54702
54892
  /* harmony export */ "NonUniformColor": () => (/* reexport safe */ _FeatureIndex__WEBPACK_IMPORTED_MODULE_30__.NonUniformColor),
54703
54893
  /* harmony export */ "NormalMapFlags": () => (/* reexport safe */ _MaterialProps__WEBPACK_IMPORTED_MODULE_76__.NormalMapFlags),
@@ -54709,6 +54899,8 @@ __webpack_require__.r(__webpack_exports__);
54709
54899
  /* harmony export */ "OctEncodedNormalPair": () => (/* reexport safe */ _OctEncodedNormal__WEBPACK_IMPORTED_MODULE_80__.OctEncodedNormalPair),
54710
54900
  /* harmony export */ "OverriddenBy": () => (/* reexport safe */ _NativeAppProps__WEBPACK_IMPORTED_MODULE_79__.OverriddenBy),
54711
54901
  /* harmony export */ "POLICY": () => (/* reexport safe */ _rpc_core_RpcRegistry__WEBPACK_IMPORTED_MODULE_131__.POLICY),
54902
+ /* harmony export */ "PackedFeature": () => (/* reexport safe */ _FeatureTable__WEBPACK_IMPORTED_MODULE_32__.PackedFeature),
54903
+ /* harmony export */ "PackedFeatureModelTable": () => (/* reexport safe */ _FeatureTable__WEBPACK_IMPORTED_MODULE_32__.PackedFeatureModelTable),
54712
54904
  /* harmony export */ "PackedFeatureTable": () => (/* reexport safe */ _FeatureTable__WEBPACK_IMPORTED_MODULE_32__.PackedFeatureTable),
54713
54905
  /* harmony export */ "Placement2d": () => (/* reexport safe */ _geometry_Placement__WEBPACK_IMPORTED_MODULE_48__.Placement2d),
54714
54906
  /* harmony export */ "Placement3d": () => (/* reexport safe */ _geometry_Placement__WEBPACK_IMPORTED_MODULE_48__.Placement3d),
@@ -68672,6 +68864,8 @@ var ImdlFlags;
68672
68864
  ImdlFlags[ImdlFlags["Incomplete"] = 4] = "Incomplete";
68673
68865
  /** The tile must be refined by sub-division, not magnification. */
68674
68866
  ImdlFlags[ImdlFlags["DisallowMagnification"] = 8] = "DisallowMagnification";
68867
+ /** The tile's feature table contains features from multiple models. */
68868
+ ImdlFlags[ImdlFlags["MultiModelFeatureTable"] = 16] = "MultiModelFeatureTable";
68675
68869
  })(ImdlFlags || (ImdlFlags = {}));
68676
68870
  /** Describes the maximum major and minor version of the iMdl tile format supported by this version of this package.
68677
68871
  * @internal
@@ -68726,9 +68920,9 @@ class ImdlHeader extends _TileIO__WEBPACK_IMPORTED_MODULE_2__.TileHeader {
68726
68920
  * @internal
68727
68921
  */
68728
68922
  class FeatureTableHeader {
68729
- constructor(length, maxFeatures, count) {
68923
+ constructor(length, numSubCategories, count) {
68730
68924
  this.length = length;
68731
- this.maxFeatures = maxFeatures;
68925
+ this.numSubCategories = numSubCategories;
68732
68926
  this.count = count;
68733
68927
  }
68734
68928
  static readFrom(stream) {
@@ -86831,7 +87025,7 @@ class ElementPicker {
86831
87025
  });
86832
87026
  if (!hitPointWorld)
86833
87027
  continue;
86834
- const modelId = undefined !== pixel.featureTable ? pixel.featureTable.modelId : undefined;
87028
+ const modelId = pixel.modelId;
86835
87029
  const hit = new _HitDetail__WEBPACK_IMPORTED_MODULE_2__.HitDetail(pickPointWorld, vp, options.hitSource, hitPointWorld, pixel.elementId, this.getPixelPriority(pixel), testPointView.distance(elmPoint), pixel.distanceFraction, pixel.subCategoryId, pixel.geometryClass, modelId, pixel.iModel, pixel.tileId, pixel.isClassifier);
86836
87030
  this.hitList.addHit(hit);
86837
87031
  if (this.hitList.hits.length > options.maxHits)
@@ -96038,10 +96232,12 @@ class SpatialViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_6__.ViewState
96038
96232
  attachToViewport(args) {
96039
96233
  super.attachToViewport(args);
96040
96234
  this.registerModelSelectorListeners();
96235
+ this._treeRefs.attachToViewport(args);
96041
96236
  }
96042
96237
  /** @internal */
96043
96238
  detachFromViewport() {
96044
96239
  super.detachFromViewport();
96240
+ this._treeRefs.detachFromViewport();
96045
96241
  this.unregisterModelSelectorListeners();
96046
96242
  }
96047
96243
  /** Chiefly for debugging: change the "deactivated" state of one or more tile tree references. Deactivated references are
@@ -102462,6 +102658,10 @@ class Viewport {
102462
102658
  this._changeFlags.setFeatureOverrideProvider();
102463
102659
  this.maybeInvalidateScene();
102464
102660
  }
102661
+ /** @internal */
102662
+ invalidateSymbologyOverrides() {
102663
+ this.setFeatureOverrideProviderChanged();
102664
+ }
102465
102665
  /** The [[TiledGraphicsProvider]]s currently registered with this viewport.
102466
102666
  * @see [[addTiledGraphicsProvider]].
102467
102667
  */
@@ -103361,11 +103561,11 @@ class Viewport {
103361
103561
  }
103362
103562
  /** @internal */
103363
103563
  isPixelSelectable(pixel) {
103364
- if (undefined === pixel.featureTable || undefined === pixel.elementId)
103564
+ if (undefined === pixel.modelId || undefined === pixel.elementId)
103365
103565
  return false;
103366
- if (pixel.featureTable.modelId === pixel.elementId)
103566
+ if (pixel.modelId === pixel.elementId)
103367
103567
  return false; // Reality Models not selectable
103368
- return undefined === this.mapLayerFromIds(pixel.featureTable.modelId, pixel.elementId); // Maps no selectable.
103568
+ return undefined === this.mapLayerFromIds(pixel.modelId, pixel.elementId); // Maps no selectable.
103369
103569
  }
103370
103570
  /** Read the current image from this viewport from the rendering system. If a "null" rectangle is supplied (@see [[ViewRect.isNull]]), the entire view is captured.
103371
103571
  * @param rect The area of the view to read. The origin of a viewRect must specify the upper left corner.
@@ -103474,7 +103674,7 @@ class Viewport {
103474
103674
  // Likewise, if it is a hit on a model with a display transform, reverse the display transform.
103475
103675
  if (!preserveModelDisplayTransforms) {
103476
103676
  const pixel = pixels.getPixel(x, y);
103477
- const modelId = pixel.featureTable?.modelId;
103677
+ const modelId = pixel.modelId;
103478
103678
  if (undefined !== modelId) {
103479
103679
  const transform = this.view.computeDisplayTransform({ modelId, elementId: pixel.feature?.elementId });
103480
103680
  transform?.multiplyInversePoint3d(npc, npc);
@@ -105007,6 +105207,7 @@ __webpack_require__.r(__webpack_exports__);
105007
105207
  /* harmony export */ "queryVisibleFeatures": () => (/* reexport safe */ _render_VisibleFeature__WEBPACK_IMPORTED_MODULE_101__.queryVisibleFeatures),
105008
105208
  /* harmony export */ "rangeToCartographicArea": () => (/* reexport safe */ _ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_58__.rangeToCartographicArea),
105009
105209
  /* harmony export */ "readElementGraphics": () => (/* reexport safe */ _tile_internal__WEBPACK_IMPORTED_MODULE_105__.readElementGraphics),
105210
+ /* harmony export */ "readGltf": () => (/* reexport safe */ _tile_internal__WEBPACK_IMPORTED_MODULE_105__.readGltf),
105010
105211
  /* harmony export */ "readGltfGraphics": () => (/* reexport safe */ _tile_internal__WEBPACK_IMPORTED_MODULE_105__.readGltfGraphics),
105011
105212
  /* harmony export */ "readPointCloudTileContent": () => (/* reexport safe */ _tile_internal__WEBPACK_IMPORTED_MODULE_105__.readPointCloudTileContent),
105012
105213
  /* harmony export */ "synchronizeViewportFrusta": () => (/* reexport safe */ _ViewportSync__WEBPACK_IMPORTED_MODULE_62__.synchronizeViewportFrusta),
@@ -109246,28 +109447,31 @@ var Pixel;
109246
109447
  /** Describes a single pixel within a [[Pixel.Buffer]]. */
109247
109448
  class Data {
109248
109449
  /** @internal */
109249
- constructor(feature, distanceFraction = -1.0, type = GeometryType.Unknown, planarity = Planarity.Unknown, featureTable, iModel, tileId) {
109250
- this.feature = feature;
109251
- this.distanceFraction = distanceFraction;
109252
- this.type = type;
109253
- this.planarity = planarity;
109254
- this.featureTable = featureTable;
109255
- this.iModel = iModel;
109256
- this.tileId = tileId;
109450
+ constructor(args) {
109451
+ if (args?.feature)
109452
+ this.feature = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.Feature(args.feature.elementId, args.feature.subCategoryId, args.feature.geometryClass);
109453
+ this.modelId = args?.feature?.modelId;
109454
+ this.distanceFraction = args?.distanceFraction ?? -1;
109455
+ this.type = args?.type ?? GeometryType.Unknown;
109456
+ this.planarity = args?.planarity ?? Planarity.Unknown;
109457
+ this.iModel = args?.iModel;
109458
+ this.tileId = args?.tileId;
109257
109459
  }
109258
109460
  /** @internal */
109259
- get isClassifier() { return undefined !== this.featureTable && _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.BatchType.Primary !== this.featureTable.type; }
109461
+ get isClassifier() {
109462
+ return undefined !== this.batchType && _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.BatchType.Primary !== this.batchType;
109463
+ }
109260
109464
  /** The Id of the element that produced the pixel. */
109261
109465
  get elementId() {
109262
- return undefined !== this.feature ? this.feature.elementId : undefined;
109466
+ return this.feature?.elementId;
109263
109467
  }
109264
109468
  /** The Id of the [SubCategory]($backend) that produced the pixel. */
109265
109469
  get subCategoryId() {
109266
- return undefined !== this.feature ? this.feature.subCategoryId : undefined;
109470
+ return this.feature?.subCategoryId;
109267
109471
  }
109268
109472
  /** The class of geometry that produced the pixel. */
109269
109473
  get geometryClass() {
109270
- return undefined !== this.feature ? this.feature.geometryClass : undefined;
109474
+ return this.feature?.geometryClass;
109271
109475
  }
109272
109476
  }
109273
109477
  Pixel.Data = Data;
@@ -109306,7 +109510,7 @@ var Pixel;
109306
109510
  let Selector;
109307
109511
  (function (Selector) {
109308
109512
  Selector[Selector["None"] = 0] = "None";
109309
- /** Select the [[Feature]] which produced each pixel, as well as the [[PackedFeatureTable]] from which the feature originated. */
109513
+ /** Select the [[Feature]] which produced each pixel. */
109310
109514
  Selector[Selector["Feature"] = 1] = "Feature";
109311
109515
  /** Select the type and planarity of geometry which produced each pixel as well as the fraction of its distance between the near and far planes. */
109312
109516
  Selector[Selector["GeometryAndDistance"] = 4] = "GeometryAndDistance";
@@ -110962,12 +111166,12 @@ class ScreenFeatures {
110962
111166
  for (let x = rect.left; x < rect.right; x++) {
110963
111167
  for (let y = rect.top; y < rect.bottom; y++) {
110964
111168
  const pixel = pixels.getPixel(x, y);
110965
- if (pixel.feature && pixel.featureTable) {
111169
+ if (pixel.feature && pixel.modelId) {
110966
111170
  yield {
110967
111171
  elementId: pixel.feature.elementId,
110968
111172
  subCategoryId: pixel.feature.subCategoryId,
110969
111173
  geometryClass: pixel.feature.geometryClass,
110970
- modelId: pixel.featureTable.modelId,
111174
+ modelId: pixel.modelId,
110971
111175
  iModel: pixel.iModel ?? iModel,
110972
111176
  };
110973
111177
  }
@@ -115840,16 +116044,16 @@ class BatchState {
115840
116044
  return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.invalid;
115841
116045
  const featureIndex = featureId - batch.batchId;
115842
116046
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(featureIndex >= 0);
115843
- const parts = batch.featureTable.getElementIdPair(featureIndex);
116047
+ const parts = batch.featureTable.getElementIdPair(featureIndex, BatchState._scratchElementIdPair);
115844
116048
  return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32Pair(parts.lower, parts.upper);
115845
116049
  }
115846
- getFeature(featureId) {
116050
+ getFeature(featureId, result) {
115847
116051
  const batch = this.find(featureId);
115848
116052
  if (undefined === batch)
115849
116053
  return undefined;
115850
116054
  const featureIndex = featureId - batch.batchId;
115851
116055
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(featureIndex >= 0);
115852
- return batch.featureTable.findFeature(featureIndex);
116056
+ return batch.featureTable.findFeature(featureIndex, result);
115853
116057
  }
115854
116058
  get numFeatureIds() { return this.nextBatchId; }
115855
116059
  get numBatches() { return this._batches.length; }
@@ -115892,6 +116096,7 @@ class BatchState {
115892
116096
  return -1 !== index ? this._batches[index] : undefined;
115893
116097
  }
115894
116098
  }
116099
+ BatchState._scratchElementIdPair = { lower: 0, upper: 0 };
115895
116100
 
115896
116101
 
115897
116102
  /***/ }),
@@ -118029,9 +118234,10 @@ __webpack_require__.r(__webpack_exports__);
118029
118234
  /* harmony export */ "extractHilitedVolumeClassifierCommands": () => (/* binding */ extractHilitedVolumeClassifierCommands)
118030
118235
  /* harmony export */ });
118031
118236
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
118032
- /* harmony import */ var _FeatureOverrides__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FeatureOverrides */ "../../core/frontend/lib/esm/render/webgl/FeatureOverrides.js");
118033
- /* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./System */ "../../core/frontend/lib/esm/render/webgl/System.js");
118034
- /* harmony import */ var _TechniqueFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./TechniqueFlags */ "../../core/frontend/lib/esm/render/webgl/TechniqueFlags.js");
118237
+ /* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
118238
+ /* harmony import */ var _FeatureOverrides__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FeatureOverrides */ "../../core/frontend/lib/esm/render/webgl/FeatureOverrides.js");
118239
+ /* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./System */ "../../core/frontend/lib/esm/render/webgl/System.js");
118240
+ /* harmony import */ var _TechniqueFlags__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TechniqueFlags */ "../../core/frontend/lib/esm/render/webgl/TechniqueFlags.js");
118035
118241
  /*---------------------------------------------------------------------------------------------
118036
118242
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
118037
118243
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -118043,6 +118249,7 @@ __webpack_require__.r(__webpack_exports__);
118043
118249
 
118044
118250
 
118045
118251
 
118252
+
118046
118253
  /* eslint-disable no-restricted-syntax */
118047
118254
  /** @internal */
118048
118255
  class ShaderProgramParams {
@@ -118058,7 +118265,7 @@ class ShaderProgramParams {
118058
118265
  bindProjectionMatrix(uniform) { this.target.uniforms.bindProjectionMatrix(uniform, this.isViewCoords); }
118059
118266
  get isViewCoords() { return 13 /* ViewOverlay */ === this.renderPass || 0 /* Background */ === this.renderPass; }
118060
118267
  get isOverlayPass() { return 12 /* WorldOverlay */ === this.renderPass || 13 /* ViewOverlay */ === this.renderPass; }
118061
- get context() { return _System__WEBPACK_IMPORTED_MODULE_2__.System.instance.context; }
118268
+ get context() { return _System__WEBPACK_IMPORTED_MODULE_3__.System.instance.context; }
118062
118269
  init(target, pass = 5 /* OpaqueGeneral */) {
118063
118270
  this._renderPass = pass;
118064
118271
  this._target = target;
@@ -118212,7 +118419,7 @@ class PrimitiveCommand {
118212
118419
  return this.primitive.getPass(target);
118213
118420
  }
118214
118421
  }
118215
- PrimitiveCommand._scratchTechniqueFlags = new _TechniqueFlags__WEBPACK_IMPORTED_MODULE_3__.TechniqueFlags();
118422
+ PrimitiveCommand._scratchTechniqueFlags = new _TechniqueFlags__WEBPACK_IMPORTED_MODULE_4__.TechniqueFlags();
118216
118423
  /** Extracts the commands for rendering the flashed classifier (if any) from the by-index set of volume classifier commands.
118217
118424
  * NB: Cmds will be sets of some pushes, a primitive, and then some pops (equal to number of pushes).
118218
118425
  * The primitive should be right in the middle of a set. We need to find the set which matches the flashID.
@@ -118241,6 +118448,7 @@ function extractFlashedVolumeClassifierCommands(flashedId, cmds, numCmdsPerClass
118241
118448
  }
118242
118449
  return undefined;
118243
118450
  }
118451
+ const scratchFeature = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.PackedFeature.create();
118244
118452
  /** @internal */
118245
118453
  function extractHilitedVolumeClassifierCommands(hilites, cmds) {
118246
118454
  // TODO: This could really be done at the time the HiliteClassification render pass commands are being generated
@@ -118271,8 +118479,8 @@ function extractHilitedVolumeClassifierCommands(hilites, cmds) {
118271
118479
  const surface = cmd.primitive.cachedGeometry.asSurface;
118272
118480
  if (undefined === surface || undefined === surface.mesh.uniformFeatureId)
118273
118481
  continue;
118274
- const feature = batch.featureTable.getPackedFeature(surface.mesh.uniformFeatureId);
118275
- if (undefined === feature || !(0,_FeatureOverrides__WEBPACK_IMPORTED_MODULE_1__.isFeatureHilited)(feature, hilites, hilites.models.hasId(batch.featureTable.modelId)))
118482
+ const feature = batch.featureTable.getPackedFeature(surface.mesh.uniformFeatureId, scratchFeature);
118483
+ if (undefined === feature || !(0,_FeatureOverrides__WEBPACK_IMPORTED_MODULE_2__.isFeatureHilited)(feature, hilites, hilites.models.hasId(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32PairObject(feature.modelId))))
118276
118484
  continue;
118277
118485
  break;
118278
118486
  }
@@ -118857,13 +119065,14 @@ __webpack_require__.r(__webpack_exports__);
118857
119065
  /* harmony export */ "isFeatureHilited": () => (/* binding */ isFeatureHilited)
118858
119066
  /* harmony export */ });
118859
119067
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
118860
- /* harmony import */ var _primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../primitives/DisplayParams */ "../../core/frontend/lib/esm/render/primitives/DisplayParams.js");
118861
- /* harmony import */ var _LineCode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LineCode */ "../../core/frontend/lib/esm/render/webgl/LineCode.js");
118862
- /* harmony import */ var _GL__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GL */ "../../core/frontend/lib/esm/render/webgl/GL.js");
118863
- /* harmony import */ var _RenderFlags__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RenderFlags */ "../../core/frontend/lib/esm/render/webgl/RenderFlags.js");
118864
- /* harmony import */ var _Sync__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Sync */ "../../core/frontend/lib/esm/render/webgl/Sync.js");
118865
- /* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./System */ "../../core/frontend/lib/esm/render/webgl/System.js");
118866
- /* harmony import */ var _Texture__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Texture */ "../../core/frontend/lib/esm/render/webgl/Texture.js");
119068
+ /* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
119069
+ /* harmony import */ var _primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../primitives/DisplayParams */ "../../core/frontend/lib/esm/render/primitives/DisplayParams.js");
119070
+ /* harmony import */ var _LineCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./LineCode */ "../../core/frontend/lib/esm/render/webgl/LineCode.js");
119071
+ /* harmony import */ var _GL__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./GL */ "../../core/frontend/lib/esm/render/webgl/GL.js");
119072
+ /* harmony import */ var _RenderFlags__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./RenderFlags */ "../../core/frontend/lib/esm/render/webgl/RenderFlags.js");
119073
+ /* harmony import */ var _Sync__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Sync */ "../../core/frontend/lib/esm/render/webgl/Sync.js");
119074
+ /* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./System */ "../../core/frontend/lib/esm/render/webgl/System.js");
119075
+ /* harmony import */ var _Texture__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Texture */ "../../core/frontend/lib/esm/render/webgl/Texture.js");
118867
119076
  /*---------------------------------------------------------------------------------------------
118868
119077
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
118869
119078
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -118879,8 +119088,9 @@ __webpack_require__.r(__webpack_exports__);
118879
119088
 
118880
119089
 
118881
119090
 
119091
+
118882
119092
  function computeWidthAndHeight(nEntries, nRgbaPerEntry, nExtraRgba = 0, nTables = 1) {
118883
- const maxSize = _System__WEBPACK_IMPORTED_MODULE_6__.System.instance.maxTextureSize;
119093
+ const maxSize = _System__WEBPACK_IMPORTED_MODULE_7__.System.instance.maxTextureSize;
118884
119094
  const nRgba = nEntries * nRgbaPerEntry * nTables + nExtraRgba;
118885
119095
  if (nRgba < maxSize)
118886
119096
  return { width: nRgba, height: 1 };
@@ -118909,6 +119119,7 @@ function isFeatureHilited(feature, hilites, isModelHilited) {
118909
119119
  return isModelHilited || hilites.elements.hasPair(feature.elementId) || hilites.subcategories.hasPair(feature.subCategoryId);
118910
119120
  return hilites.elements.hasPair(feature.elementId) || (isModelHilited && hilites.subcategories.hasPair(feature.subCategoryId));
118911
119121
  }
119122
+ const scratchPackedFeature = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.PackedFeature.createWithIndex();
118912
119123
  /** @internal */
118913
119124
  class FeatureOverrides {
118914
119125
  constructor(target, options, cleanup) {
@@ -118968,12 +119179,12 @@ class FeatureOverrides {
118968
119179
  this._lutParams[0] = width;
118969
119180
  this._lutParams[1] = height;
118970
119181
  const data = new Uint8Array(width * height * 4);
118971
- const creator = new _Texture__WEBPACK_IMPORTED_MODULE_7__.Texture2DDataUpdater(data);
119182
+ const creator = new _Texture__WEBPACK_IMPORTED_MODULE_8__.Texture2DDataUpdater(data);
118972
119183
  this.buildLookupTable(creator, map, ovrs, flashed, hilite);
118973
- return _Texture__WEBPACK_IMPORTED_MODULE_7__.TextureHandle.createForData(width, height, data, true, _GL__WEBPACK_IMPORTED_MODULE_3__.GL.Texture.WrapMode.ClampToEdge);
119184
+ return _Texture__WEBPACK_IMPORTED_MODULE_8__.TextureHandle.createForData(width, height, data, true, _GL__WEBPACK_IMPORTED_MODULE_4__.GL.Texture.WrapMode.ClampToEdge);
118974
119185
  }
118975
119186
  _update(map, lut, flashed, hilites, ovrs) {
118976
- const updater = new _Texture__WEBPACK_IMPORTED_MODULE_7__.Texture2DDataUpdater(lut.dataBytes);
119187
+ const updater = new _Texture__WEBPACK_IMPORTED_MODULE_8__.Texture2DDataUpdater(lut.dataBytes);
118977
119188
  if (undefined === ovrs) {
118978
119189
  this.updateFlashedAndHilited(updater, map, flashed, hilites);
118979
119190
  }
@@ -118987,8 +119198,8 @@ class FeatureOverrides {
118987
119198
  const allowHilite = true !== this._options.noHilite;
118988
119199
  const allowFlash = true !== this._options.noFlash;
118989
119200
  const allowEmphasis = true !== this._options.noEmphasis;
118990
- const modelIdParts = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.getUint32Pair(map.modelId);
118991
- const isModelHilited = allowHilite && hilites.models.hasPair(modelIdParts);
119201
+ let isModelHilited = false;
119202
+ const prevModelId = { lower: -1, upper: -1 };
118992
119203
  this._anyOpaque = this._anyTranslucent = this._anyViewIndependentTranslucent = this._anyHilited = false;
118993
119204
  let nHidden = 0;
118994
119205
  let nOverridden = 0;
@@ -119000,10 +119211,15 @@ class FeatureOverrides {
119000
119211
  // [1]
119001
119212
  // RGB = rgb
119002
119213
  // A = alpha
119003
- for (let i = 0; i < map.numFeatures; i++) {
119004
- const feature = map.getPackedFeature(i);
119214
+ for (const feature of map.iterable(scratchPackedFeature)) {
119215
+ const i = feature.index;
119005
119216
  const dataIndex = i * 4 * 2;
119006
- const app = this.target.currentBranch.getFeatureAppearance(ovr, feature.elementId.lower, feature.elementId.upper, feature.subCategoryId.lower, feature.subCategoryId.upper, feature.geometryClass, modelIdParts.lower, modelIdParts.upper, map.type, feature.animationNodeId);
119217
+ if (prevModelId.lower !== feature.modelId.lower || prevModelId.upper !== feature.modelId.upper) {
119218
+ prevModelId.lower = feature.modelId.lower;
119219
+ prevModelId.upper = feature.modelId.upper;
119220
+ isModelHilited = allowHilite && hilites.models.hasPair(feature.modelId);
119221
+ }
119222
+ const app = this.target.currentBranch.getFeatureAppearance(ovr, feature.elementId.lower, feature.elementId.upper, feature.subCategoryId.lower, feature.subCategoryId.upper, feature.geometryClass, feature.modelId.lower, feature.modelId.upper, map.type, feature.animationNodeId);
119007
119223
  // NB: If the appearance is fully transparent, then:
119008
119224
  // - For normal ("primary") models, getAppearance() returns undefined.
119009
119225
  // - For classifier models, getAppearance() returns the appearance, and classification shader will discard fully-transparent classified pixels.
@@ -119036,7 +119252,7 @@ class FeatureOverrides {
119036
119252
  flags |= 4 /* Alpha */;
119037
119253
  let alpha = 1.0 - app.transparency;
119038
119254
  alpha = Math.floor(0xff * alpha + 0.5);
119039
- if ((0xff - alpha) < _primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_1__.DisplayParams.minTransparency)
119255
+ if ((0xff - alpha) < _primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_2__.DisplayParams.minTransparency)
119040
119256
  alpha = 0xff;
119041
119257
  data.setByteAtIndex(dataIndex + 7, alpha);
119042
119258
  if (0xff === alpha) {
@@ -119059,7 +119275,7 @@ class FeatureOverrides {
119059
119275
  }
119060
119276
  if (app.overridesLinePixels && app.linePixels) {
119061
119277
  flags |= 64 /* LineCode */;
119062
- const lineCode = _LineCode__WEBPACK_IMPORTED_MODULE_2__.LineCode.valueFromLinePixels(app.linePixels);
119278
+ const lineCode = _LineCode__WEBPACK_IMPORTED_MODULE_3__.LineCode.valueFromLinePixels(app.linePixels);
119063
119279
  data.setByteAtIndex(dataIndex + 2, lineCode);
119064
119280
  }
119065
119281
  if (app.ignoresMaterial)
@@ -119082,37 +119298,25 @@ class FeatureOverrides {
119082
119298
  }
119083
119299
  const allowFlash = true !== this._options.noFlash;
119084
119300
  const intersect = "intersection" === hilites.modelSubCategoryMode;
119085
- let isModelHilited = false;
119086
- if (!hilites.models.isEmpty) {
119087
- const modelId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.getUint32Pair(map.modelId);
119088
- isModelHilited = hilites.models.hasPair(modelId);
119089
- }
119090
119301
  this._anyOverridden = this._anyHilited = false;
119091
- for (let i = 0; i < map.numFeatures; i++) {
119092
- const dataIndex = i * 4 * 2;
119302
+ for (const feature of map.iterable(scratchPackedFeature)) {
119303
+ const dataIndex = feature.index * 4 * 2;
119093
119304
  const oldFlags = data.getOvrFlagsAtIndex(dataIndex);
119094
119305
  if (0 /* None */ !== (oldFlags & 1 /* Visibility */)) {
119095
119306
  // If it's invisible, none of the other flags matter. We can't flash it and don't want to hilite it.
119096
119307
  this._anyOverridden = true;
119097
119308
  continue;
119098
119309
  }
119099
- let elemId;
119310
+ const isModelHilited = hilites.models.hasPair(feature.modelId);
119100
119311
  let isHilited = isModelHilited && !intersect;
119101
- if (!isHilited && !hilites.elements.isEmpty) {
119102
- elemId = map.getElementIdPair(i);
119103
- isHilited = hilites.elements.hasPair(elemId);
119104
- }
119105
- if (!isHilited && !hilites.subcategories.isEmpty) {
119106
- if (isModelHilited || !intersect) {
119107
- const subcat = map.getSubCategoryIdPair(i);
119108
- isHilited = hilites.subcategories.hasPair(subcat);
119109
- }
119110
- }
119312
+ if (!isHilited)
119313
+ isHilited = hilites.elements.hasPair(feature.elementId);
119314
+ if (!isHilited)
119315
+ if (isModelHilited || !intersect)
119316
+ isHilited = hilites.subcategories.hasPair(feature.subCategoryId);
119111
119317
  let isFlashed = false;
119112
- if (flashed && allowFlash) {
119113
- elemId = elemId ?? map.getElementIdPair(i);
119114
- isFlashed = elemId.lower === flashed.lower && elemId.upper === flashed.upper;
119115
- }
119318
+ if (flashed && allowFlash)
119319
+ isFlashed = feature.elementId.lower === flashed.lower && feature.elementId.upper === flashed.upper;
119116
119320
  let newFlags = isFlashed ? (oldFlags | 16 /* Flashed */) : (oldFlags & ~16 /* Flashed */);
119117
119321
  newFlags = isHilited ? (newFlags | 256 /* Hilited */) : (newFlags & ~256 /* Hilited */);
119118
119322
  data.setOvrFlagsAtIndex(dataIndex, newFlags);
@@ -119127,6 +119331,7 @@ class FeatureOverrides {
119127
119331
  if (true === this._options.noFlash)
119128
119332
  return;
119129
119333
  this._anyOverridden = false;
119334
+ const elemId = { lower: 0, upper: 0 };
119130
119335
  for (let i = 0; i < map.numFeatures; i++) {
119131
119336
  const dataIndex = i * 4 * 2;
119132
119337
  const oldFlags = data.getOvrFlagsAtIndex(dataIndex);
@@ -119137,7 +119342,7 @@ class FeatureOverrides {
119137
119342
  }
119138
119343
  let isFlashed = false;
119139
119344
  if (flashed) {
119140
- const elemId = map.getElementIdPair(i);
119345
+ map.getElementIdPair(i, elemId);
119141
119346
  isFlashed = elemId.lower === flashed.lower && elemId.upper === flashed.upper;
119142
119347
  }
119143
119348
  const newFlags = isFlashed ? (oldFlags | 16 /* Flashed */) : (oldFlags & ~16 /* Flashed */);
@@ -119178,7 +119383,7 @@ class FeatureOverrides {
119178
119383
  ovrs = undefined;
119179
119384
  const flashedId = this.target.flashedId;
119180
119385
  const hiliteSyncTarget = this.target.hiliteSyncTarget;
119181
- const hiliteUpdated = !(0,_Sync__WEBPACK_IMPORTED_MODULE_5__.sync)(hiliteSyncTarget, this._hiliteSyncObserver);
119386
+ const hiliteUpdated = !(0,_Sync__WEBPACK_IMPORTED_MODULE_6__.sync)(hiliteSyncTarget, this._hiliteSyncObserver);
119182
119387
  const hilite = this.target.hilites;
119183
119388
  if (ovrsUpdated || hiliteUpdated || flashedId !== this._lastFlashId) {
119184
119389
  // _lut can be undefined if context was lost, (gl.createTexture returns null)
@@ -119192,7 +119397,7 @@ class FeatureOverrides {
119192
119397
  }
119193
119398
  bindLUT(uniform) {
119194
119399
  if (this._lut)
119195
- this._lut.bindSampler(uniform, _RenderFlags__WEBPACK_IMPORTED_MODULE_4__.TextureUnit.FeatureSymbology);
119400
+ this._lut.bindSampler(uniform, _RenderFlags__WEBPACK_IMPORTED_MODULE_5__.TextureUnit.FeatureSymbology);
119196
119401
  }
119197
119402
  bindUniformSymbologyFlags(uniform) {
119198
119403
  uniform.setUniform1f(this._uniformSymbologyFlags);
@@ -125033,7 +125238,7 @@ class RenderCommands {
125033
125238
  }
125034
125239
  // If we have an active volume classifier then force all batches for the reality data being classified into a special render pass.
125035
125240
  let savedForcedRenderPass = 255 /* None */;
125036
- if (undefined !== this.target.activeVolumeClassifierModelId && batch.featureTable.modelId === this.target.activeVolumeClassifierModelId) {
125241
+ if (undefined !== this.target.activeVolumeClassifierModelId && batch.featureTable.batchModelId === this.target.activeVolumeClassifierModelId) {
125037
125242
  savedForcedRenderPass = this._forcedRenderPass;
125038
125243
  this._forcedRenderPass = 20 /* VolumeClassifiedRealityData */;
125039
125244
  }
@@ -126111,6 +126316,7 @@ class Geometry {
126111
126316
  // Represents a view of data read from a region of the frame buffer.
126112
126317
  class PixelBuffer {
126113
126318
  constructor(rect, selector, compositor) {
126319
+ this._scratchModelFeature = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ModelFeature.create();
126114
126320
  this._scratchUint32Array = new Uint32Array(1);
126115
126321
  this._scratchUint8Array = new Uint8Array(this._scratchUint32Array.buffer);
126116
126322
  this._scratchVector3d = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d();
@@ -126149,9 +126355,9 @@ class PixelBuffer {
126149
126355
  getPixel32(data, pixelIndex) {
126150
126356
  return pixelIndex < data.length ? data[pixelIndex] : undefined;
126151
126357
  }
126152
- getFeature(pixelIndex) {
126358
+ getFeature(pixelIndex, result) {
126153
126359
  const featureId = this.getFeatureId(pixelIndex);
126154
- return undefined !== featureId ? this._batchState.getFeature(featureId) : undefined;
126360
+ return undefined !== featureId ? this._batchState.getFeature(featureId, result) : undefined;
126155
126361
  }
126156
126362
  getFeatureId(pixelIndex) {
126157
126363
  return undefined !== this._featureId ? this.getPixel32(this._featureId, pixelIndex) : undefined;
@@ -126193,7 +126399,7 @@ class PixelBuffer {
126193
126399
  let geometryType = px.type;
126194
126400
  let planarity = px.planarity;
126195
126401
  const haveFeatureIds = _Pixel__WEBPACK_IMPORTED_MODULE_4__.Pixel.Selector.None !== (this._selector & _Pixel__WEBPACK_IMPORTED_MODULE_4__.Pixel.Selector.Feature);
126196
- const feature = haveFeatureIds ? this.getFeature(index) : undefined;
126402
+ const feature = haveFeatureIds ? this.getFeature(index, this._scratchModelFeature) : undefined;
126197
126403
  const batchInfo = haveFeatureIds ? this.getBatchInfo(index) : undefined;
126198
126404
  if (_Pixel__WEBPACK_IMPORTED_MODULE_4__.Pixel.Selector.None !== (this._selector & _Pixel__WEBPACK_IMPORTED_MODULE_4__.Pixel.Selector.GeometryAndDistance) && undefined !== this._depthAndOrder) {
126199
126405
  const depthAndOrder = this.getPixel32(this._depthAndOrder, index);
@@ -126237,7 +126443,15 @@ class PixelBuffer {
126237
126443
  iModel = batchInfo.iModel;
126238
126444
  tileId = batchInfo.tileId;
126239
126445
  }
126240
- return new _Pixel__WEBPACK_IMPORTED_MODULE_4__.Pixel.Data(feature, distanceFraction, geometryType, planarity, featureTable, iModel, tileId);
126446
+ return new _Pixel__WEBPACK_IMPORTED_MODULE_4__.Pixel.Data({
126447
+ feature,
126448
+ distanceFraction,
126449
+ type: geometryType,
126450
+ planarity,
126451
+ batchType: featureTable?.type,
126452
+ iModel,
126453
+ tileId,
126454
+ });
126241
126455
  }
126242
126456
  get isEmpty() { return _Pixel__WEBPACK_IMPORTED_MODULE_4__.Pixel.Selector.None === this._selector; }
126243
126457
  static create(rect, selector, compositor) {
@@ -134950,11 +135164,11 @@ const clippedPasses = [
134950
135164
  8 /* Translucent */,
134951
135165
  11 /* OverlayLayers */,
134952
135166
  ];
134953
- function isFeatureVisible(feature, target, modelIdParts, includeNonLocatable) {
135167
+ function isFeatureVisible(feature, target, includeNonLocatable) {
134954
135168
  const ovrs = target.currentFeatureSymbologyOverrides;
134955
135169
  if (!ovrs)
134956
135170
  return true;
134957
- const app = target.currentBranch.getFeatureAppearance(ovrs, feature.elementId.lower, feature.elementId.upper, feature.subCategoryId.lower, feature.subCategoryId.upper, feature.geometryClass, modelIdParts.lower, modelIdParts.upper, _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.BatchType.Primary, feature.animationNodeId);
135171
+ const app = target.currentBranch.getFeatureAppearance(ovrs, feature.elementId.lower, feature.elementId.upper, feature.subCategoryId.lower, feature.subCategoryId.upper, feature.geometryClass, feature.modelId.lower, feature.modelId.upper, _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.BatchType.Primary, feature.animationNodeId);
134958
135172
  return undefined !== app && (includeNonLocatable || !app.nonLocatable);
134959
135173
  }
134960
135174
  function* commandIterator(features, pass) {
@@ -134969,16 +135183,15 @@ function* commandIterator(features, pass) {
134969
135183
  const ovrs = command.batch.getOverrides(features.target);
134970
135184
  if (ovrs.allHidden)
134971
135185
  continue;
135186
+ const scratchFeature = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.PackedFeature.createWithIndex();
134972
135187
  const table = command.batch.featureTable;
134973
- const modelIdParts = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.getUint32Pair(table.modelId);
134974
- for (let i = 0; i < table.numFeatures; i++) {
134975
- const feature = table.getPackedFeature(i);
134976
- if (!ovrs.anyOverridden || isFeatureVisible(feature, features.target, modelIdParts, features.includeNonLocatable)) {
135188
+ for (const feature of table.iterable(scratchFeature)) {
135189
+ if (!ovrs.anyOverridden || isFeatureVisible(feature, features.target, features.includeNonLocatable)) {
134977
135190
  yield {
134978
135191
  elementId: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32PairObject(feature.elementId),
134979
135192
  subCategoryId: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32PairObject(feature.subCategoryId),
134980
135193
  geometryClass: feature.geometryClass,
134981
- modelId: table.modelId,
135194
+ modelId: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32PairObject(feature.modelId),
134982
135195
  iModel: command.batch.batchIModel ?? features.iModel,
134983
135196
  };
134984
135197
  }
@@ -142520,7 +142733,7 @@ __webpack_require__.r(__webpack_exports__);
142520
142733
  /* harmony export */ });
142521
142734
  /* harmony import */ var deep_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! deep-assign */ "../../common/temp/node_modules/.pnpm/deep-assign@2.0.0/node_modules/deep-assign/index.js");
142522
142735
  /* harmony import */ var deep_assign__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(deep_assign__WEBPACK_IMPORTED_MODULE_0__);
142523
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! qs */ "../../common/temp/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.js");
142736
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! qs */ "../../common/temp/node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/index.js");
142524
142737
  /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
142525
142738
  /* harmony import */ var superagent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! superagent */ "../../common/temp/node_modules/.pnpm/superagent@7.1.5/node_modules/superagent/lib/client.js");
142526
142739
  /* harmony import */ var superagent__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(superagent__WEBPACK_IMPORTED_MODULE_2__);
@@ -143822,6 +144035,7 @@ __webpack_require__.r(__webpack_exports__);
143822
144035
  /* harmony export */ "GltfMeshData": () => (/* binding */ GltfMeshData),
143823
144036
  /* harmony export */ "GltfReader": () => (/* binding */ GltfReader),
143824
144037
  /* harmony export */ "GltfReaderProps": () => (/* binding */ GltfReaderProps),
144038
+ /* harmony export */ "readGltf": () => (/* binding */ readGltf),
143825
144039
  /* harmony export */ "readGltfGraphics": () => (/* binding */ readGltfGraphics)
143826
144040
  /* harmony export */ });
143827
144041
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
@@ -144232,6 +144446,7 @@ class GltfReader {
144232
144446
  readStatus,
144233
144447
  isLeaf,
144234
144448
  contentRange,
144449
+ range,
144235
144450
  graphic: renderGraphic,
144236
144451
  };
144237
144452
  }
@@ -145147,16 +145362,38 @@ class GltfReader {
145147
145362
  * If a particular glTF asset fails to load and/or display properly, please
145148
145363
  * [submit an issue](https://github.com/iTwin/itwinjs-core/issues).
145149
145364
  * @see [Example decorator]($docs/learning/frontend/ViewDecorations#gltf-decorations) for an example of a decorator that reads and displays a glTF asset.
145365
+ * @see [[readGltf]] to obtain more information about the glTF model.
145150
145366
  * @public
145151
145367
  */
145152
145368
  async function readGltfGraphics(args) {
145369
+ const result = await readGltf(args);
145370
+ return result?.graphic;
145371
+ }
145372
+ /** Produce a [[RenderGraphic]] from a [glTF](https://www.khronos.org/gltf/) asset suitable for use in [view decorations]($docs/learning/frontend/ViewDecorations).
145373
+ * @returns a graphic produced from the glTF asset's default scene, or `undefined` if a graphic could not be produced from the asset.
145374
+ * The returned graphic also includes the bounding boxes of the glTF model in world and local coordiantes.
145375
+ * @note Support for the full [glTF 2.0 specification](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html) is currently a work in progress.
145376
+ * If a particular glTF asset fails to load and/or display properly, please
145377
+ * [submit an issue](https://github.com/iTwin/itwinjs-core/issues).
145378
+ * @see [Example decorator]($docs/learning/frontend/ViewDecorations#gltf-decorations) for an example of a decorator that reads and displays a glTF asset.
145379
+ * @public
145380
+ */
145381
+ async function readGltf(args) {
145153
145382
  const baseUrl = typeof args.baseUrl === "string" ? new URL(args.baseUrl) : args.baseUrl;
145154
145383
  const props = GltfReaderProps.create(args.gltf, true, baseUrl); // glTF supports exactly one coordinate system with y axis up.
145155
145384
  const reader = props ? new GltfGraphicsReader(props, args) : undefined;
145156
145385
  if (!reader)
145157
145386
  return undefined;
145158
145387
  const result = await reader.read();
145159
- return result.graphic;
145388
+ if (!result.graphic)
145389
+ return undefined;
145390
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(result.contentRange !== undefined, "readGltf always computes content range");
145391
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(result.range !== undefined, "readGltf always computes world range");
145392
+ return {
145393
+ graphic: result.graphic,
145394
+ localBoundingBox: result.contentRange ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull(),
145395
+ boundingBox: result.range ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull(),
145396
+ };
145160
145397
  }
145161
145398
  /** Implements [[readGltfGraphics]]. Exported strictly for tests.
145162
145399
  * @internal
@@ -146326,10 +146563,11 @@ function extractNodeId(nodeName) {
146326
146563
  * @internal
146327
146564
  */
146328
146565
  class ImdlReader {
146329
- constructor(imdl, binaryPosition, args) {
146566
+ constructor(imdl, binaryPosition, args, hasMultiModelFeatureTable) {
146330
146567
  this._patternGeometry = new Map();
146331
146568
  this._buffer = args.stream;
146332
146569
  this._binaryData = new Uint8Array(this._buffer.arrayBuffer, binaryPosition);
146570
+ this._hasMultiModelFeatureTable = hasMultiModelFeatureTable;
146333
146571
  this._animationNodes = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asObject(imdl.animationNodes);
146334
146572
  this._bufferViews = imdl.bufferViews;
146335
146573
  this._meshes = imdl.meshes;
@@ -146385,7 +146623,7 @@ class ImdlReader {
146385
146623
  patternSymbols: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asObject(sceneValue.patternSymbols),
146386
146624
  rtcCenter: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asArray(sceneValue.rtcCenter),
146387
146625
  };
146388
- return undefined !== imdl.meshes ? new ImdlReader(imdl, gltfHeader.binaryPosition, args) : undefined;
146626
+ return undefined !== imdl.meshes ? new ImdlReader(imdl, gltfHeader.binaryPosition, args, 0 !== (imdlHeader.flags & _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ImdlFlags.MultiModelFeatureTable)) : undefined;
146389
146627
  }
146390
146628
  catch (_) {
146391
146629
  return undefined;
@@ -146584,33 +146822,40 @@ class ImdlReader {
146584
146822
  const packedFeatureArray = new Uint32Array(this._buffer.nextUint32s(numUint32s));
146585
146823
  if (this._buffer.isPastTheEnd)
146586
146824
  return undefined;
146587
- let animNodesArray;
146588
- const animationNodes = this._animationNodes;
146589
- if (undefined !== animationNodes) {
146590
- const bytesPerId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(animationNodes.bytesPerId);
146591
- const bufferViewId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asString(animationNodes.bufferView);
146592
- const bufferViewJson = this._bufferViews[bufferViewId];
146593
- if (undefined !== bufferViewJson) {
146594
- const byteOffset = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(bufferViewJson.byteOffset);
146595
- const byteLength = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(bufferViewJson.byteLength);
146596
- const bytes = this._binaryData.subarray(byteOffset, byteOffset + byteLength);
146597
- switch (bytesPerId) {
146598
- case 1:
146599
- animNodesArray = new Uint8Array(bytes);
146600
- break;
146601
- case 2:
146602
- // NB: A *copy* of the subarray.
146603
- animNodesArray = Uint16Array.from(new Uint16Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 2));
146604
- break;
146605
- case 4:
146606
- // NB: A *copy* of the subarray.
146607
- animNodesArray = Uint32Array.from(new Uint32Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 4));
146608
- break;
146825
+ let featureTable;
146826
+ if (this._hasMultiModelFeatureTable) {
146827
+ featureTable = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.MultiModelPackedFeatureTable.create(packedFeatureArray, this._modelId, header.count, this._type, header.numSubCategories);
146828
+ }
146829
+ else {
146830
+ let animNodesArray;
146831
+ const animationNodes = this._animationNodes;
146832
+ if (undefined !== animationNodes) {
146833
+ const bytesPerId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(animationNodes.bytesPerId);
146834
+ const bufferViewId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asString(animationNodes.bufferView);
146835
+ const bufferViewJson = this._bufferViews[bufferViewId];
146836
+ if (undefined !== bufferViewJson) {
146837
+ const byteOffset = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(bufferViewJson.byteOffset);
146838
+ const byteLength = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(bufferViewJson.byteLength);
146839
+ const bytes = this._binaryData.subarray(byteOffset, byteOffset + byteLength);
146840
+ switch (bytesPerId) {
146841
+ case 1:
146842
+ animNodesArray = new Uint8Array(bytes);
146843
+ break;
146844
+ case 2:
146845
+ // NB: A *copy* of the subarray.
146846
+ animNodesArray = Uint16Array.from(new Uint16Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 2));
146847
+ break;
146848
+ case 4:
146849
+ // NB: A *copy* of the subarray.
146850
+ animNodesArray = Uint32Array.from(new Uint32Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 4));
146851
+ break;
146852
+ }
146609
146853
  }
146610
146854
  }
146855
+ featureTable = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.PackedFeatureTable(packedFeatureArray, this._modelId, header.count, this._type, animNodesArray);
146611
146856
  }
146612
146857
  this._buffer.curPos = startPos + header.length;
146613
- return new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.PackedFeatureTable(packedFeatureArray, this._modelId, header.count, header.maxFeatures, this._type, animNodesArray);
146858
+ return featureTable;
146614
146859
  }
146615
146860
  static skipFeatureTable(stream) {
146616
146861
  const startPos = stream.curPos;
@@ -147078,6 +147323,7 @@ class ImdlReader {
147078
147323
  if ("Node_Root" === nodeKey) {
147079
147324
  if (this._timeline) {
147080
147325
  // Split up the root node into transform nodes.
147326
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(featureTable instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.PackedFeatureTable, "multi-model feature tables never include animation branches");
147081
147327
  this.readAnimationBranches(graphics, meshValue, featureTable);
147082
147328
  }
147083
147329
  else if (this._containsTransformNodes) {
@@ -148774,6 +149020,8 @@ class SpatialRefs {
148774
149020
  update() {
148775
149021
  this._allLoaded = false;
148776
149022
  }
149023
+ attachToViewport() { }
149024
+ detachFromViewport() { }
148777
149025
  *[Symbol.iterator]() {
148778
149026
  this.load();
148779
149027
  for (const modelRef of this._refs.values())
@@ -154335,6 +154583,7 @@ __webpack_require__.r(__webpack_exports__);
154335
154583
  /* harmony export */ "internalMapLayerImageryFormats": () => (/* reexport safe */ _map_MapLayerImageryFormats__WEBPACK_IMPORTED_MODULE_51__.internalMapLayerImageryFormats),
154336
154584
  /* harmony export */ "overrideRequestTileTreeProps": () => (/* reexport safe */ _TileAdmin__WEBPACK_IMPORTED_MODULE_21__.overrideRequestTileTreeProps),
154337
154585
  /* harmony export */ "readElementGraphics": () => (/* reexport safe */ _ImdlReader__WEBPACK_IMPORTED_MODULE_33__.readElementGraphics),
154586
+ /* harmony export */ "readGltf": () => (/* reexport safe */ _GltfReader__WEBPACK_IMPORTED_MODULE_30__.readGltf),
154338
154587
  /* harmony export */ "readGltfGraphics": () => (/* reexport safe */ _GltfReader__WEBPACK_IMPORTED_MODULE_30__.readGltfGraphics),
154339
154588
  /* harmony export */ "readPointCloudTileContent": () => (/* reexport safe */ _PntsReader__WEBPACK_IMPORTED_MODULE_64__.readPointCloudTileContent)
154340
154589
  /* harmony export */ });
@@ -164448,7 +164697,11 @@ class ViewClipDecoration extends _EditManipulator__WEBPACK_IMPORTED_MODULE_8__.E
164448
164697
  this._clipEventHandler.onModifyClip(this._clipView);
164449
164698
  }
164450
164699
  testDecorationHit(id) { return (id === this._clipId || this._controlIds.includes(id)); }
164451
- async getDecorationToolTip(hit) { return (hit.sourceId === this._clipId ? "View Clip" : "Modify View Clip"); }
164700
+ async getDecorationToolTip(hit) {
164701
+ if (hit.sourceId === this._clipId)
164702
+ return _Tool__WEBPACK_IMPORTED_MODULE_10__.CoreTools.translate("ViewClip.Message.Clip");
164703
+ return _Tool__WEBPACK_IMPORTED_MODULE_10__.CoreTools.translate("ViewClip.Message.ModifyClip");
164704
+ }
164452
164705
  updateDecorationListener(_add) { super.updateDecorationListener(undefined !== this._clipId); } // Decorator isn't just for resize controls...
164453
164706
  decorate(context) {
164454
164707
  if (this._suspendDecorator)
@@ -183321,7 +183574,6 @@ var ClipMaskXYZRangePlanes;
183321
183574
  * * In normal usage, callers get "outside" clip behavior using ONLY the ClipShape isMask property.
183322
183575
  * * The ClipShape happens to pass the _invisible bit down to ClipPlanes that it creates.
183323
183576
  * * At that level, the flag controls whether the cut edges are produced on the plane
183324
- * * This seems like an confused overloading of the meaning.
183325
183577
  * @public
183326
183578
  */
183327
183579
  class ClipPrimitive {
@@ -183924,21 +184176,22 @@ __webpack_require__.r(__webpack_exports__);
183924
184176
  /* harmony export */ "ClipStepAction": () => (/* binding */ ClipStepAction),
183925
184177
  /* harmony export */ "ClipUtilities": () => (/* binding */ ClipUtilities)
183926
184178
  /* harmony export */ });
184179
+ /* harmony import */ var _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../curve/CurveFactory */ "../../core/geometry/lib/esm/curve/CurveFactory.js");
183927
184180
  /* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
183928
184181
  /* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
183929
184182
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
183930
184183
  /* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
184184
+ /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
183931
184185
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
183932
184186
  /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
184187
+ /* harmony import */ var _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/ReusableObjectCache */ "../../core/geometry/lib/esm/geometry3d/ReusableObjectCache.js");
184188
+ /* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
183933
184189
  /* harmony import */ var _ClipPlane__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ClipPlane */ "../../core/geometry/lib/esm/clipping/ClipPlane.js");
183934
184190
  /* harmony import */ var _ClipPrimitive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ClipPrimitive */ "../../core/geometry/lib/esm/clipping/ClipPrimitive.js");
183935
184191
  /* harmony import */ var _ClipVector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ClipVector */ "../../core/geometry/lib/esm/clipping/ClipVector.js");
183936
184192
  /* harmony import */ var _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ConvexClipPlaneSet */ "../../core/geometry/lib/esm/clipping/ConvexClipPlaneSet.js");
184193
+ /* harmony import */ var _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/LineStringOffsetClipperContext */ "../../core/geometry/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js");
183937
184194
  /* harmony import */ var _UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./UnionOfConvexClipPlaneSets */ "../../core/geometry/lib/esm/clipping/UnionOfConvexClipPlaneSets.js");
183938
- /* harmony import */ var _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/ReusableObjectCache */ "../../core/geometry/lib/esm/geometry3d/ReusableObjectCache.js");
183939
- /* harmony import */ var _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/LineStringOffsetClipperContext */ "../../core/geometry/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js");
183940
- /* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
183941
- /* harmony import */ var _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../curve/CurveFactory */ "../../core/geometry/lib/esm/curve/CurveFactory.js");
183942
184195
  /*---------------------------------------------------------------------------------------------
183943
184196
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
183944
184197
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -183961,6 +184214,7 @@ __webpack_require__.r(__webpack_exports__);
183961
184214
 
183962
184215
 
183963
184216
 
184217
+
183964
184218
  /** Enumerated type for describing where geometry lies with respect to clipping planes.
183965
184219
  * @public
183966
184220
  */
@@ -183998,7 +184252,7 @@ var ClipStatus;
183998
184252
  /** geometry is clearly inside */
183999
184253
  ClipStatus[ClipStatus["TrivialAccept"] = 2] = "TrivialAccept";
184000
184254
  })(ClipStatus || (ClipStatus = {}));
184001
- /** Static class whose various methods are functions for clipping geometry
184255
+ /** Class whose various static methods are functions for clipping geometry
184002
184256
  * @public
184003
184257
  */
184004
184258
  class ClipUtilities {
@@ -184348,6 +184602,32 @@ class ClipUtilities {
184348
184602
  }
184349
184603
  return false;
184350
184604
  }
184605
+ /** Test for intersection of two ranges in different local coordinates.
184606
+ * * Useful for clash detection of elements in iModels, using their stored (tight) local ranges and placement transforms.
184607
+ * @param range0 range in local coordinates of first geometry
184608
+ * @param local0ToWorld placement transform for first geometry
184609
+ * @param range1 range in local coordinates of second geometry
184610
+ * @param local1ToWorld placement transform for second geometry. Assumed to be invertible.
184611
+ * @param range1Margin optional signed local distance to expand/contract the second range before intersection. Positive expands.
184612
+ * @return whether the local ranges are adjacent or intersect. Also returns false if local1ToWorld is singular.
184613
+ */
184614
+ static doLocalRangesIntersect(range0, local0ToWorld, range1, local1ToWorld, range1Margin) {
184615
+ const worldToLocal1 = ClipUtilities._workTransform = local1ToWorld.inverse(ClipUtilities._workTransform);
184616
+ if (!worldToLocal1)
184617
+ return false;
184618
+ let myRange1 = range1;
184619
+ if (range1Margin) {
184620
+ myRange1 = ClipUtilities._workRange = range1.clone(ClipUtilities._workRange);
184621
+ myRange1.expandInPlace(range1Margin);
184622
+ }
184623
+ // convert range0 into a clipper in local1 coordinates, then intersect with range1
184624
+ const local0ToLocal1 = worldToLocal1.multiplyTransformTransform(local0ToWorld, worldToLocal1);
184625
+ const builder = _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_11__.PolyfaceBuilder.create();
184626
+ builder.addTransformedRangeMesh(local0ToLocal1, range0);
184627
+ const mesh0 = builder.claimPolyface();
184628
+ const clipper = ClipUtilities._workClipper = _ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_3__.ConvexClipPlaneSet.createConvexPolyface(mesh0, ClipUtilities._workClipper).clipper;
184629
+ return ClipUtilities.doesClipperIntersectRange(clipper, myRange1);
184630
+ }
184351
184631
  /**
184352
184632
  * Test if `obj` is a `Clipper` object.
184353
184633
  * * This is implemented by testing for each of the methods in the `Clipper` interface.
@@ -184397,9 +184677,9 @@ class ClipUtilities {
184397
184677
  */
184398
184678
  static createXYOffsetClipFromLineString(points, leftOffset, rightOffset, z0, z1) {
184399
184679
  if (Array.isArray(points)) {
184400
- return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_11__.LineStringOffsetClipperContext.createClipBetweenOffsets(new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_12__.Point3dArrayCarrier(points), leftOffset, rightOffset, z0, z1);
184680
+ return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_12__.LineStringOffsetClipperContext.createClipBetweenOffsets(new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_13__.Point3dArrayCarrier(points), leftOffset, rightOffset, z0, z1);
184401
184681
  }
184402
- return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_11__.LineStringOffsetClipperContext.createClipBetweenOffsets(points, leftOffset, rightOffset, z0, z1);
184682
+ return _internalContexts_LineStringOffsetClipperContext__WEBPACK_IMPORTED_MODULE_12__.LineStringOffsetClipperContext.createClipBetweenOffsets(points, leftOffset, rightOffset, z0, z1);
184403
184683
  }
184404
184684
  /** if data.length >= minLength threshold, push it to destination; if smaller drop it back to the cache.
184405
184685
  */
@@ -184590,7 +184870,7 @@ class ClipUtilities {
184590
184870
  */
184591
184871
  static doPolygonClipSequence(xyz, clippers, acceptedIn, acceptedOut, finalCandidates, inAction, outAction, finalFragmentAction, arrayCache) {
184592
184872
  if (arrayCache === undefined)
184593
- arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_13__.GrowableXYZArrayCache();
184873
+ arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_14__.GrowableXYZArrayCache();
184594
184874
  let candidates = [arrayCache.grabAndFill(xyz)];
184595
184875
  let nextCandidates = [];
184596
184876
  const intermediateIn = [];
@@ -184629,7 +184909,7 @@ class ClipUtilities {
184629
184909
  */
184630
184910
  static doPolygonClipParitySequence(xyz, clippers, acceptedIn, acceptedOut, arrayCache) {
184631
184911
  if (arrayCache === undefined)
184632
- arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_13__.GrowableXYZArrayCache();
184912
+ arrayCache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_14__.GrowableXYZArrayCache();
184633
184913
  let candidatesOut = [arrayCache.grabAndFill(xyz)];
184634
184914
  let candidatesIn = [];
184635
184915
  let nextCandidatesIn = [];
@@ -184691,7 +184971,7 @@ class ClipUtilities {
184691
184971
  }
184692
184972
  for (let i = 0; i < n; i++) {
184693
184973
  for (let j = i + 1; j < n; j++) {
184694
- const ray = _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_14__.CurveFactory.planePlaneIntersectionRay(planes[i], planes[j]);
184974
+ const ray = _curve_CurveFactory__WEBPACK_IMPORTED_MODULE_15__.CurveFactory.planePlaneIntersectionRay(planes[i], planes[j]);
184695
184975
  if (ray) {
184696
184976
  if (clipper.hasIntersectionWithRay(ray, interval)) {
184697
184977
  // the normal-to-normal vector is bisector (or close to bisector?)
@@ -189729,11 +190009,8 @@ class CurveCurve {
189729
190009
  return handler.grabResults();
189730
190010
  }
189731
190011
  /**
189732
- * Return xy intersections of 2 curves.
189733
- * @param geometryA first geometry
189734
- * @param extendA true to allow geometryA to extend
189735
- * @param geometryB second geometry
189736
- * @param extendB true to allow geometryB to extend
190012
+ * Return xy intersections of input curves.
190013
+ * @param primitives input curves to intersect
189737
190014
  * @param tolerance optional distance tolerance for coincidence
189738
190015
  */
189739
190016
  static allIntersectionsAmongPrimitivesXY(primitives, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance) {
@@ -190932,7 +191209,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
190932
191209
  const dataA = cpA.toTransformedVectors(this._worldToLocalAffine);
190933
191210
  matrixA = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createColumnsXYW(dataA.vector0, 0, dataA.vector90, 0, dataA.center, 1);
190934
191211
  }
190935
- // The worldToLocal has moved the arc vectors into screen space.
191212
+ // The worldToLocal has moved the arc vectors into local space.
190936
191213
  // matrixA captures the xyw parts (ignoring z)
190937
191214
  // for any point in world space,
190938
191215
  // THIS CODE ONLY WORKS FOR
@@ -191631,7 +191908,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
191631
191908
  const dataA = cpA.toTransformedVectors(this._worldToLocalAffine);
191632
191909
  matrixA = Matrix3d.createColumnsXYW(dataA.vector0, 0, dataA.vector90, 0, dataA.center, 1);
191633
191910
  }
191634
- // The worldToLocal has moved the arc vectors into screen space.
191911
+ // The worldToLocal has moved the arc vectors into local space.
191635
191912
  // matrixA captures the xyw parts (ignoring z)
191636
191913
  // for any point in world space,
191637
191914
  // THIS CODE ONLY WORKS FOR
@@ -211522,7 +211799,7 @@ class Matrix3d {
211522
211799
  this.setRowValues(0, 0, 0, 0, 0, 0, 0, 0, 0);
211523
211800
  this.inverseState = InverseMatrixState.singular;
211524
211801
  }
211525
- /** Copy contents from another matrix. */
211802
+ /** Copy contents from the `other` matrix. If `other` is undefined, use identity matrix. */
211526
211803
  setFrom(other) {
211527
211804
  if (other === undefined) {
211528
211805
  this.setIdentity();
@@ -211697,6 +211974,9 @@ class Matrix3d {
211697
211974
  * Construct a rigid matrix (orthogonal matrix with +1 determinant) using vectorA and its 2 perpendicular.
211698
211975
  * * If axisOrder is not passed then `AxisOrder = AxisOrder.ZXY` is used as default.
211699
211976
  * * This function internally uses createPerpendicularVectorFavorXYPlane and createRigidFromColumns.
211977
+ * * If you want to rotate a given plane (which contains (0,0,0)) to the xy-plane, pass the normal vector of
211978
+ * your plane into createRigidHeadsUp. The transpose of the returned Matrix3d can be used to rotate your plane
211979
+ * to the xy-plane. If plane does not contain (0,0,0) then the plane is rotated to a plane parallel to the xy-plane.
211700
211980
  * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/2PerpendicularVectorsTo1Vector
211701
211981
  */
211702
211982
  static createRigidHeadsUp(vectorA, axisOrder = _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.ZXY, result) {
@@ -211754,6 +212034,7 @@ class Matrix3d {
211754
212034
  /**
211755
212035
  * Replace current rows Ui and Uj with (c*Ui + s*Uj) and (c*Uj - s*Ui).
211756
212036
  * * There is no checking for i,j being 0,1,2.
212037
+ * * The instance matrix A is multiplied in place on the left by a Givens rotation G, resulting in the matrix G*A.
211757
212038
  * @param i first row index. **must be 0,1,2** (unchecked)
211758
212039
  * @param j second row index. **must be 0,1,2** (unchecked)
211759
212040
  * @param c fist coefficient
@@ -211773,6 +212054,7 @@ class Matrix3d {
211773
212054
  /**
211774
212055
  * Replace current columns Ui and Uj with (c*Ui + s*Uj) and (c*Uj - s*Ui).
211775
212056
  * * There is no checking for i,j being 0,1,2.
212057
+ * * The instance matrix A is multiplied in place on the right by a Givens rotation G, resulting in the matrix A*G.
211776
212058
  * * This is used in compute intensive inner loops
211777
212059
  * @param i first row index. **must be 0,1,2** (unchecked)
211778
212060
  * @param j second row index. **must be 0,1,2** (unchecked)
@@ -212798,7 +213080,7 @@ class Matrix3d {
212798
213080
  return undefined;
212799
213081
  }
212800
213082
  /**
212801
- * Multiply `matrixInverse * [x,y,z]` and return result as `Point4d` with given weight.
213083
+ * Multiply `matrixInverse * [x,y,z]` and return result as `Point4d` the with given weight as last element.
212802
213084
  * * Equivalent to solving `matrix * result = [x,y,z]` for an unknown `result`.
212803
213085
  * * Result is `undefined` if the matrix is singular (e.g. has parallel columns or a zero magnitude column)
212804
213086
  * @return result as a Point4d with the same weight.
@@ -213344,6 +213626,10 @@ class Matrix3d {
213344
213626
  * * column 1 is perpendicular to both. It is the "up" vector on the view plane.
213345
213627
  * * Multiplying the returned matrix times a local (view) vector gives the world vector.
213346
213628
  * * Multiplying transpose of the returned matrix times a world vector gives the local (view) vector.
213629
+ * * If you want to rotate a given plane (which contains (0,0,0)) to the xy-plane, pass coordinates of the normal
213630
+ * vector of your plane into createRigidViewAxesZTowardsEye. The transpose of the returned Matrix3d can be used
213631
+ * to rotate your plane to the xy-plane. If plane does not contain (0,0,0) then the plane is rotated to a plane
213632
+ * parallel to the xy-plane.
213347
213633
  * @param x eye x coordinate
213348
213634
  * @param y eye y coordinate
213349
213635
  * @param z eye z coordinate
@@ -213512,21 +213798,21 @@ class Matrix3d {
213512
213798
  * Test if all rows and columns are perpendicular to each other and have equal length.
213513
213799
  * If so, the length (or its negative) is the `scale` factor from a set of `orthonormal axes` to
213514
213800
  * the set of axes created by columns of `this` matrix. Otherwise, returns `undefined`.
213801
+ * @param result optional pre-allocated object to populate and return
213515
213802
  * @returns returns `{ rigidAxes, scale }` where `rigidAxes` is a Matrix3d with its columns as the rigid axes
213516
213803
  * (with the scale factor removed) and `scale` is the scale factor.
213517
213804
  * * Note that determinant of a rigid matrix is +1.
213518
213805
  * * The context for this method is to determine if the matrix is the product a `rotation` matrix and a uniform
213519
213806
  * `scale` matrix (diagonal matrix with all diagonal entries the same nonzero number).
213520
213807
  */
213521
- factorRigidWithSignedScale() {
213808
+ factorRigidWithSignedScale(result) {
213522
213809
  const product = this.multiplyMatrixMatrixTranspose(this);
213523
213810
  const scaleSquare = product.sameDiagonalScale();
213524
213811
  if (scaleSquare === undefined || scaleSquare <= 0.0)
213525
213812
  return undefined;
213526
213813
  const scale = this.determinant() > 0 ? Math.sqrt(scaleSquare) : -Math.sqrt(scaleSquare);
213527
213814
  const scaleInverse = 1.0 / scale;
213528
- const result = { rigidAxes: this.scaleColumns(scaleInverse, scaleInverse, scaleInverse), scale };
213529
- return result;
213815
+ return { rigidAxes: this.scaleColumns(scaleInverse, scaleInverse, scaleInverse, result), scale };
213530
213816
  }
213531
213817
  /** Test if `this` matrix reorders and/or negates the columns of the `identity` matrix. */
213532
213818
  get isSignedPermutation() {
@@ -213555,6 +213841,7 @@ class Matrix3d {
213555
213841
  * * columns are perpendicular and have unit length.
213556
213842
  * * transpose equals inverse.
213557
213843
  * * mirroring is removed.
213844
+ * * This function internally uses `axisOrderCrossProductsInPlace` to make the matrix rigid.
213558
213845
  * @param axisOrder how to reorder the matrix columns
213559
213846
  * @return whether the adjusted matrix is `rigid` on return
213560
213847
  */
@@ -213567,9 +213854,11 @@ class Matrix3d {
213567
213854
  this.axisOrderCrossProductsInPlace(axisOrder);
213568
213855
  return this.normalizeColumnsInPlace();
213569
213856
  }
213570
- /** Create a new orthogonal matrix (perpendicular columns, unit length, transpose is inverse).
213857
+ /**
213858
+ * Create a new orthogonal matrix (perpendicular columns, unit length, transpose is inverse).
213571
213859
  * * Columns are taken from the source Matrix3d in order indicated by the axis order.
213572
213860
  * * Mirroring in the matrix is removed.
213861
+ * * This function internally uses `axisOrderCrossProductsInPlace` to make the matrix rigid.
213573
213862
  */
213574
213863
  static createRigidFromMatrix3d(source, axisOrder = _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.XYZ, result) {
213575
213864
  result = source.clone(result);
@@ -214057,7 +214346,6 @@ __webpack_require__.r(__webpack_exports__);
214057
214346
 
214058
214347
  /**
214059
214348
  * A plane defined by
214060
- *
214061
214349
  * * Any point on the plane.
214062
214350
  * * a unit normal.
214063
214351
  * @public
@@ -214323,7 +214611,7 @@ __webpack_require__.r(__webpack_exports__);
214323
214611
 
214324
214612
 
214325
214613
  /**
214326
- * A Point3dVector3dVector3d is an origin and a pair of vectors.
214614
+ * A Plane3dByOriginAndVectors is an origin and a pair of vectors.
214327
214615
  * This defines a plane with a (possibly skewed) uv coordinate grid
214328
214616
  * * The grid directions (`vectorU` and `vectorV`)
214329
214617
  * * are NOT required to be unit vectors.
@@ -222759,21 +223047,25 @@ __webpack_require__.r(__webpack_exports__);
222759
223047
 
222760
223048
 
222761
223049
 
222762
- /** A transform is an origin and a Matrix3d.
222763
- *
222764
- * * This describes a coordinate frame with
222765
- * this origin, with the columns of the Matrix3d being the
222766
- * local x,y,z axis directions.
222767
- * * Beware that for common transformations (e.g. scale about point,
222768
- * rotate around line, mirror across a plane) the "fixed point" that is used
222769
- * when describing the transform is NOT the "origin" stored in the transform.
222770
- * Setup methods (e.g createFixedPointAndMatrix, createScaleAboutPoint)
222771
- * take care of determining the appropriate origin coordinates.
223050
+ /**
223051
+ * A Transform consists of an origin and a Matrix3d. This describes a coordinate frame with this origin, with
223052
+ * the columns of the Matrix3d being the local x,y,z axis directions.
223053
+ * * The math for a Transform `T` consisting of a Matrix3d `M` and a Point3d `o` on a Vector3d `p` is: `Tp = M*p + o`.
223054
+ * In other words, `T` is a combination of two operations on `p`: the action of matrix multiplication, followed by a
223055
+ * translation. `Origin` is a traditional term for `o`, because `T` can be interpreted as a change of basis from the
223056
+ * global axes centered at the global origin, to a new set of axes centered at `o`.
223057
+ * * Beware that for common transformations (e.g. scale about point, rotate around an axis, mirror across a
223058
+ * plane) the "fixed point" that is used when describing the transform is NOT the "origin" stored in the
223059
+ * transform. Setup methods (e.g createFixedPointAndMatrix, createScaleAboutPoint) take care of determining
223060
+ * the appropriate origin coordinates.
222772
223061
  * @public
222773
223062
  */
222774
223063
  class Transform {
222775
- // Constructor accepts and uses POINTER to content .. no copy here.
222776
- constructor(origin, matrix) { this._origin = origin; this._matrix = matrix; }
223064
+ // Constructor accepts and uses pointer to content (no copy is done here).
223065
+ constructor(origin, matrix) {
223066
+ this._origin = origin;
223067
+ this._matrix = matrix;
223068
+ }
222777
223069
  /** The identity Transform. Value is frozen and cannot be modified. */
222778
223070
  static get identity() {
222779
223071
  if (undefined === this._identity) {
@@ -222783,18 +223075,31 @@ class Transform {
222783
223075
  return this._identity;
222784
223076
  }
222785
223077
  /** Freeze this instance (and its members) so it is read-only */
222786
- freeze() { this._origin.freeze(); this._matrix.freeze(); return Object.freeze(this); }
223078
+ freeze() {
223079
+ this._origin.freeze();
223080
+ this._matrix.freeze();
223081
+ return Object.freeze(this);
223082
+ }
222787
223083
  /**
222788
223084
  * Copy contents from other Transform into this Transform
222789
223085
  * @param other source transform
222790
223086
  */
222791
- setFrom(other) { this._origin.setFrom(other._origin), this._matrix.setFrom(other._matrix); }
223087
+ setFrom(other) {
223088
+ this._origin.setFrom(other._origin);
223089
+ this._matrix.setFrom(other._matrix);
223090
+ }
222792
223091
  /** Set this Transform to be an identity. */
222793
- setIdentity() { this._origin.setZero(); this._matrix.setIdentity(); }
222794
- /** Set this Transform instance from flexible inputs:
222795
- * * Any object (such as another Transform) that has `origin` and `matrix` members accepted by Point3d.setFromJSON and Matrix3d.setFromJSON
223092
+ setIdentity() {
223093
+ this._origin.setZero();
223094
+ this._matrix.setIdentity();
223095
+ }
223096
+ /**
223097
+ * Set this Transform instance from flexible inputs:
223098
+ * * Any object (such as another Transform or TransformProps) that has `origin` and `matrix` members
223099
+ * accepted by `Point3d.setFromJSON` and `Matrix3d.setFromJSON`
222796
223100
  * * An array of 3 number arrays, each with 4 entries which are rows in a 3x4 matrix.
222797
223101
  * * An array of 12 numbers, each block of 4 entries as a row 3x4 matrix.
223102
+ * * If no input is provided, the identity Transform is returned.
222798
223103
  */
222799
223104
  setFromJSON(json) {
222800
223105
  if (json) {
@@ -222819,25 +223124,24 @@ class Transform {
222819
223124
  this.setIdentity();
222820
223125
  }
222821
223126
  /**
222822
- * Test for near equality with other Transform. Comparison uses the isAlmostEqual methods on
222823
- * the origin and matrix parts.
223127
+ * Test for near equality with `other` Transform. Comparison uses the `isAlmostEqual` methods on the `origin` and
223128
+ * `matrix` parts.
222824
223129
  * @param other Transform to compare to.
222825
223130
  */
222826
- isAlmostEqual(other) { return this.origin.isAlmostEqual(other.origin) && this.matrix.isAlmostEqual(other.matrix); }
223131
+ isAlmostEqual(other) {
223132
+ return this.origin.isAlmostEqual(other.origin) && this.matrix.isAlmostEqual(other.matrix);
223133
+ }
222827
223134
  /**
222828
- * Test for near equality with other Transform. Comparison uses the isAlmostEqualAllowZRotation method of Matrix3d
222829
- * the origin and matrix parts.
223135
+ * Test for near equality with `other` Transform. Comparison uses the `isAlmostEqual` methods on the `origin` part
223136
+ * and the `isAlmostEqualAllowZRotation` method on the `matrix` part.
222830
223137
  * @param other Transform to compare to.
222831
223138
  */
222832
- isAlmostEqualAllowZRotation(other) { return this._origin.isAlmostEqual(other._origin) && this._matrix.isAlmostEqualAllowZRotation(other._matrix); }
222833
- /** Return a 3 by 4 matrix containing the rows of this Transform
222834
- * * This transform's origin is the [3] entry of the json arrays
222835
- */
222836
- toJSON() {
222837
- return this.toRows();
223139
+ isAlmostEqualAllowZRotation(other) {
223140
+ return this._origin.isAlmostEqual(other._origin) && this._matrix.isAlmostEqualAllowZRotation(other._matrix);
222838
223141
  }
222839
- /** Return a 3 by 4 matrix containing the rows of this Transform
222840
- * * This transform's origin is the [3] entry of the json arrays
223142
+ /**
223143
+ * Return a 3 by 4 matrix containing the rows of this Transform.
223144
+ * * The transform's origin coordinates are the last entries of the 3 json arrays
222841
223145
  */
222842
223146
  toRows() {
222843
223147
  return [
@@ -222846,13 +223150,20 @@ class Transform {
222846
223150
  [this._matrix.coffs[6], this._matrix.coffs[7], this._matrix.coffs[8], this._origin.z],
222847
223151
  ];
222848
223152
  }
222849
- /** Return a new Transform initialized by `setFromJSON (json)` */
223153
+ /**
223154
+ * Return a 3 by 4 matrix containing the rows of this Transform.
223155
+ * * The transform's origin coordinates are the last entries of the 3 json arrays
223156
+ */
223157
+ toJSON() {
223158
+ return this.toRows();
223159
+ }
223160
+ /** Return a new Transform initialized by `Transform.setFromJSON` */
222850
223161
  static fromJSON(json) {
222851
223162
  const result = Transform.createIdentity();
222852
223163
  result.setFromJSON(json);
222853
223164
  return result;
222854
223165
  }
222855
- /** Copy the contents of this transform into a new Transform (or to the result, if specified). */
223166
+ /** Copy the contents of `this` transform into a new Transform (or to the result, if specified). */
222856
223167
  clone(result) {
222857
223168
  if (result) {
222858
223169
  result._matrix.setFrom(this._matrix);
@@ -222861,18 +223172,17 @@ class Transform {
222861
223172
  }
222862
223173
  return new Transform(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createFrom(this._origin), this._matrix.clone());
222863
223174
  }
222864
- /** Return a copy of this Transform, modified so that its axes are rigid
222865
- * * The first axis direction named in axisOrder is preserved
222866
- * * The plane of the first and second directions is preserved, and its vector in the rigid matrix has positive dot product with the corresponding vector if the instance
222867
- * * The third named column is the cross product of the first and second.
223175
+ /**
223176
+ * Return a modified copy of `this` Transform so that its `matrix` part is rigid (`origin` part is untouched).
223177
+ * * For details of how the matrix is modified to rigid, see documentation of `Matrix3d.axisOrderCrossProductsInPlace`
222868
223178
  */
222869
223179
  cloneRigid(axisOrder = _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.XYZ) {
222870
- const axes0 = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createRigidFromMatrix3d(this.matrix, axisOrder);
222871
- if (!axes0)
223180
+ const modifiedMatrix = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createRigidFromMatrix3d(this.matrix, axisOrder);
223181
+ if (!modifiedMatrix)
222872
223182
  return undefined;
222873
- return new Transform(this.origin.cloneAsPoint3d(), axes0);
223183
+ return new Transform(this.origin.cloneAsPoint3d(), modifiedMatrix);
222874
223184
  }
222875
- /** Create a copy with the given origin and matrix captured as the Transform origin and Matrix3d. */
223185
+ /** Create a Transform with the given `origin` and `matrix`. */
222876
223186
  static createRefs(origin, matrix, result) {
222877
223187
  if (!origin)
222878
223188
  origin = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero();
@@ -222883,7 +223193,7 @@ class Transform {
222883
223193
  }
222884
223194
  return new Transform(origin, matrix);
222885
223195
  }
222886
- /** Create a transform with complete contents given */
223196
+ /** Create a Transform with complete contents given */
222887
223197
  static createRowValues(qxx, qxy, qxz, ax, qyx, qyy, qyz, ay, qzx, qzy, qzz, az, result) {
222888
223198
  if (result) {
222889
223199
  result._origin.set(ax, ay, az);
@@ -222892,42 +223202,55 @@ class Transform {
222892
223202
  }
222893
223203
  return new Transform(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(ax, ay, az), _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createRowValues(qxx, qxy, qxz, qyx, qyy, qyz, qzx, qzy, qzz));
222894
223204
  }
222895
- /** Create a transform with all zeros.
222896
- */
223205
+ /** Create a Transform with all zeros */
222897
223206
  static createZero(result) {
222898
223207
  return Transform.createRowValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, result);
222899
223208
  }
222900
223209
  /**
222901
- * create a Transform with translation provided by x,y,z parts.
223210
+ * Create a Transform with translation provided by x,y,z parts.
222902
223211
  * @param x x part of translation
222903
223212
  * @param y y part of translation
222904
223213
  * @param z z part of translation
222905
- * @param result optional result
222906
- * @returns new or updated transform.
223214
+ * @param result optional pre-allocated Transform
223215
+ * @returns new or updated transform
222907
223216
  */
222908
223217
  static createTranslationXYZ(x = 0, y = 0, z = 0, result) {
222909
223218
  return Transform.createRefs(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(x, y, z), _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createIdentity(), result);
222910
223219
  }
222911
- /** Create a matrix with specified translation part.
222912
- * @param XYZ x,y,z parts of the translation.
222913
- * @returns new or updated transform.
223220
+ /**
223221
+ * Create a Transform with specified `translation` part.
223222
+ * @param translation x,y,z parts of the translation
223223
+ * @param result optional pre-allocated Transform
223224
+ * @returns new or updated transform
222914
223225
  */
222915
223226
  static createTranslation(translation, result) {
222916
223227
  return Transform.createRefs(translation, _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createIdentity(), result);
222917
223228
  }
222918
- /** Return a reference to the matrix within the transform. (NOT a copy) */
222919
- get matrix() { return this._matrix; }
222920
- /** Return a reference to the origin within the transform. (NOT a copy) */
222921
- get origin() { return this._origin; }
222922
- /** return a (clone of) the origin part of the transform, as a Point3d */
222923
- getOrigin() { return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createFrom(this._origin); }
222924
- /** return a (clone of) the origin part of the transform, as a Vector3d */
222925
- getTranslation() { return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createFrom(this._origin); }
222926
- /** test if the transform has 000 origin and identity Matrix3d */
223229
+ /** Return a reference (and NOT a copy) to the `matrix` part of the Transform. */
223230
+ get matrix() {
223231
+ return this._matrix;
223232
+ }
223233
+ /** Return a reference (and NOT a copy) to the `origin` part of the Transform. */
223234
+ get origin() {
223235
+ return this._origin;
223236
+ }
223237
+ /** return a (clone of) the `origin` part of the Transform, as a `Point3d` */
223238
+ getOrigin() {
223239
+ return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createFrom(this._origin);
223240
+ }
223241
+ /** return a (clone of) the `origin` part of the Transform, as a `Vector3d` */
223242
+ getTranslation() {
223243
+ return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createFrom(this._origin);
223244
+ }
223245
+ /** return a (clone of) the `matrix` part of the Transform, as a `Matrix3d` */
223246
+ getMatrix() {
223247
+ return this._matrix.clone();
223248
+ }
223249
+ /** test if the transform has `origin` = (0,0,0) and identity `matrix` */
222927
223250
  get isIdentity() {
222928
223251
  return this._matrix.isIdentity && this._origin.isAlmostZero;
222929
223252
  }
222930
- /** Return an identity transform, optionally filling existing transform. */
223253
+ /** Create an identity transform */
222931
223254
  static createIdentity(result) {
222932
223255
  if (result) {
222933
223256
  result._origin.setZero();
@@ -222936,9 +223259,12 @@ class Transform {
222936
223259
  }
222937
223260
  return Transform.createRefs(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero(), _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createIdentity());
222938
223261
  }
222939
- /** Create by directly installing origin and matrix
222940
- * this is a the appropriate construction when the columns of the matrix are coordinate axes of a local-to-global mapping
222941
- * Note there is a closely related createFixedPointAndMatrix whose point input is the fixed point of the global-to-global transformation.
223262
+ /**
223263
+ * Create a Transform using the given `origin` and `matrix`.
223264
+ * * This is a the appropriate construction when the columns of the matrix are coordinate axes of a
223265
+ * local-to-world mapping.
223266
+ * * This function is a closely related to `createFixedPointAndMatrix` whose point input is the fixed point
223267
+ * of the world-to-world transformation.
222942
223268
  */
222943
223269
  static createOriginAndMatrix(origin, matrix, result) {
222944
223270
  if (result) {
@@ -222948,8 +223274,13 @@ class Transform {
222948
223274
  }
222949
223275
  return Transform.createRefs(origin ? origin.cloneAsPoint3d() : _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero(), matrix === undefined ? _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createIdentity() : matrix.clone(), result);
222950
223276
  }
222951
- /** Create by directly installing origin and columns of the matrix
222952
- */
223277
+ /** Create a Transform using the given `origin` and columns of the `matrix`. If `undefined` zero is used. */
223278
+ setOriginAndMatrixColumns(origin, vectorX, vectorY, vectorZ) {
223279
+ if (origin !== undefined)
223280
+ this._origin.setFrom(origin);
223281
+ this._matrix.setColumns(vectorX, vectorY, vectorZ);
223282
+ }
223283
+ /** Create a Transform using the given `origin` and columns of the `matrix` */
222953
223284
  static createOriginAndMatrixColumns(origin, vectorX, vectorY, vectorZ, result) {
222954
223285
  if (result)
222955
223286
  result.setOriginAndMatrixColumns(origin, vectorX, vectorY, vectorZ);
@@ -222957,127 +223288,177 @@ class Transform {
222957
223288
  result = Transform.createRefs(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createFrom(origin), _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createColumns(vectorX, vectorY, vectorZ));
222958
223289
  return result;
222959
223290
  }
222960
- /** Create by with matrix from Matrix3d.createRigidFromColumns.
222961
- * * Has careful logic for building up optional result without allocations.
223291
+ /**
223292
+ * Create a Transform such that its `matrix` part is rigid.
223293
+ * * For details of how the matrix is created to be rigid, see documentation of `Matrix3d.createRigidFromColumns`
222962
223294
  */
222963
223295
  static createRigidFromOriginAndColumns(origin, vectorX, vectorY, axisOrder, result) {
222964
223296
  const matrix = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createRigidFromColumns(vectorX, vectorY, axisOrder, result ? result._matrix : undefined);
222965
223297
  if (!matrix)
222966
223298
  return undefined;
222967
223299
  if (result) {
222968
- // The matrix was already defined !!!
223300
+ // result._matrix was already modified to become rigid via createRigidFromColumns
222969
223301
  result._origin.setFrom(origin);
222970
223302
  return result;
222971
223303
  }
222972
- // cleanly capture the matrix and then the point ..
223304
+ /**
223305
+ * We don't want to pass "origin" to createRefs because createRefs does not clone "origin" and use its reference.
223306
+ * That means if "origin" is changed via Transform at any point, the initial "origin" passed by the user is also
223307
+ * changed. To avoid that, we pass undefined to createRefs. This would cause createRefs to create a new "origin"
223308
+ * equals (0,0,0) which then we set it to the "origin" passed by user in the next line.
223309
+ */
222973
223310
  result = Transform.createRefs(undefined, matrix);
222974
223311
  result._origin.setFromPoint3d(origin);
222975
223312
  return result;
222976
223313
  }
222977
- /** Reinitialize by directly installing origin and columns of the matrix
222978
- */
222979
- setOriginAndMatrixColumns(origin, vectorX, vectorY, vectorZ) {
222980
- if (origin !== undefined)
222981
- this._origin.setFrom(origin);
222982
- this._matrix.setColumns(vectorX, vectorY, vectorZ);
222983
- }
222984
- /** Create a transform with the specified matrix. Compute an origin (different from the given fixedPoint)
222985
- * so that the fixedPoint maps back to itself.
223314
+ /**
223315
+ * Create a Transform with the specified `matrix`. Compute an `origin` (different from the given `fixedPoint`)
223316
+ * so that the `fixedPoint` maps back to itself. The returned Transform, transforms a point `p` to `M*p + (f - M*f)`
223317
+ * where `f` is the fixedPoint (i.e., `Tp = M*(p-f) + f`).
222986
223318
  */
222987
223319
  static createFixedPointAndMatrix(fixedPoint, matrix, result) {
222988
223320
  if (fixedPoint) {
223321
+ /**
223322
+ * if f is a fixed point, then Tf = M*f + o = f where M is the matrix and o is the origin.
223323
+ * we define the origin o = f - M*f. Therefore, Tf = Mf + o = M*f + (f - M*f) = f.
223324
+ */
222989
223325
  const origin = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzMinusMatrixTimesXYZ(fixedPoint, matrix, fixedPoint);
222990
223326
  return Transform.createRefs(origin, matrix.clone(), result);
222991
223327
  }
222992
223328
  return Transform.createRefs(undefined, matrix.clone());
222993
223329
  }
222994
- /** Create a transform with the specified matrix, acting on any `pointX `via
222995
- * `pointY = matrix * (pointX - pointA) + pointB`
222996
- * so that the fixedPoint maps back to itself.
223330
+ /**
223331
+ * Create a transform with the specified `matrix` and points `a` and `b`. The returned Transform, transforms
223332
+ * point `p` to `M*(p-a) + b` (i.e., `Tp = M*(p-a) + b`) so transforms point `a` to 'b'.
222997
223333
  */
222998
- static createMatrixPickupPutdown(matrix, pointA, pointB, result) {
222999
- const origin = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzMinusMatrixTimesXYZ(pointB, matrix, pointA);
223334
+ static createMatrixPickupPutdown(matrix, a, b, result) {
223335
+ // we define the origin o = b - M*a so Tp = M*p + o = M*p + (b - M*a) = M*(x-a) + b
223336
+ const origin = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzMinusMatrixTimesXYZ(b, matrix, a);
223000
223337
  return Transform.createRefs(origin, matrix.clone(), result);
223001
223338
  }
223002
- /** Create a Transform which leaves the fixedPoint unchanged and
223003
- * scales everything else around it by a single scale factor.
223339
+ /**
223340
+ * Create a Transform which leaves the fixedPoint unchanged and scales everything else around it by
223341
+ * a single scale factor. The returned Transform, transforms a point `p` to `M*p + (f - M*f)`
223342
+ * where `f` is the fixedPoint and M is the scale matrix (i.e., `Tp = M*(p-f) + f`).
223004
223343
  */
223005
223344
  static createScaleAboutPoint(fixedPoint, scale, result) {
223006
223345
  const matrix = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createScale(scale, scale, scale);
223346
+ /**
223347
+ * if f is a fixed point, then Tf = M*f + o = f where M is the matrix and o is the origin.
223348
+ * we define the origin o = f - M*f. Therefore, Tf = M*f + o = M*f + (f - M*f) = f.
223349
+ */
223007
223350
  const origin = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzMinusMatrixTimesXYZ(fixedPoint, matrix, fixedPoint);
223008
223351
  return Transform.createRefs(origin, matrix, result);
223009
223352
  }
223010
- /** Transform the input 2d point. Return as a new point or in the pre-allocated result (if result is given) */
223011
- multiplyPoint2d(source, result) {
223012
- return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyPlusMatrixTimesXY(this._origin, this._matrix, source, result);
223353
+ /** Transform the input 2d point. Return as a new point or in the pre-allocated result (if result is given). */
223354
+ multiplyPoint2d(point, result) {
223355
+ // Tx = Mx + o so we return Mx + o
223356
+ return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyPlusMatrixTimesXY(this._origin, this._matrix, point, result);
223013
223357
  }
223014
- /** Transform the input 3d point. Return as a new point or in the pre-allocated result (if result is given) */
223358
+ /** Transform the input 3d point. Return as a new point or in the pre-allocated result (if result is given). */
223015
223359
  multiplyPoint3d(point, result) {
223360
+ // Tx = Mx + o so we return Mx + o
223016
223361
  return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, point, result);
223017
223362
  }
223018
- /** Transform the input object with x,y,z members */
223363
+ /** Transform the input 3d point in place (override the input point by the transformed point). */
223019
223364
  multiplyXYAndZInPlace(point) {
223365
+ // Tx = Mx + o so we override x by Mx + o
223020
223366
  return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesXYZInPlace(this._origin, this._matrix, point);
223021
223367
  }
223022
- /** Transform the input point. Return as a new point or in the pre-allocated result (if result is given) */
223368
+ /** Transform the input point. Return as a new point or in the pre-allocated result (if result is given). */
223023
223369
  multiplyXYZ(x, y, z = 0, result) {
223370
+ // Tx = Mx + o so we return Mx + o
223024
223371
  return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesCoordinates(this._origin, this._matrix, x, y, z, result);
223025
223372
  }
223026
- /** Multiply a specific row of the transform times xyz. Return the (number). */
223373
+ /**
223374
+ * Multiply a specific row (component) of the transform matrix times xyz and add it to the origin element
223375
+ * at the same row. Return the result.
223376
+ */
223027
223377
  multiplyComponentXYZ(componentIndex, x, y, z = 0) {
223028
223378
  const coffs = this._matrix.coffs;
223029
- const i0 = 3 * componentIndex;
223030
- return this.origin.at(componentIndex) + coffs[i0] * x + coffs[i0 + 1] * y + coffs[i0 + 2] * z;
223379
+ const idx = 3 * componentIndex;
223380
+ return this.origin.at(componentIndex) + (coffs[idx] * x) + (coffs[idx + 1] * y) + (coffs[idx + 2] * z);
223031
223381
  }
223032
- /** Multiply a specific row of the transform times (weighted!) xyzw. Return the (number). */
223382
+ /**
223383
+ * Multiply a specific row (component) of the transform matrix times xyz and add it to the origin element
223384
+ * at the same row times w. Return the result.
223385
+ */
223033
223386
  multiplyComponentXYZW(componentIndex, x, y, z, w) {
223034
223387
  const coffs = this._matrix.coffs;
223035
- const i0 = 3 * componentIndex;
223036
- return this.origin.at(componentIndex) * w +
223037
- coffs[i0] * x + coffs[i0 + 1] * y + coffs[i0 + 2] * z;
223388
+ const idx = 3 * componentIndex;
223389
+ return (this.origin.at(componentIndex) * w) + (coffs[idx] * x) + (coffs[idx + 1] * y) + (coffs[idx + 2] * z);
223038
223390
  }
223039
- /** Transform the input homogeneous point. Return as a new point or in the pre-allocated result (if result is given) */
223391
+ /**
223392
+ * If `p = (x,y,z)` then transform is `Tp = M*p + o*w`. This function returns the transformed point as a new
223393
+ * point4d (`Tp` as first 3 elements and `w` as last element) or in the pre-allocated result (if result is given).
223394
+ */
223040
223395
  multiplyXYZW(x, y, z, w, result) {
223041
223396
  return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesWeightedCoordinates(this._origin, this._matrix, x, y, z, w, result);
223042
223397
  }
223043
- /** Transform the input homogeneous point. Return as a new point or in the pre-allocated result (if result is given) */
223398
+ /**
223399
+ * If `p = (x,y,z)` then transform is `Tp = M*p + o*w`. This function returns the transformed point as a new
223400
+ * Float64Array with size 4 (`Tp` as first 3 elements and `w` as last element) or in the pre-allocated result
223401
+ * (if result is given).
223402
+ */
223044
223403
  multiplyXYZWToFloat64Array(x, y, z, w, result) {
223045
223404
  return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesWeightedCoordinatesToFloat64Array(this._origin, this._matrix, x, y, z, w, result);
223046
223405
  }
223047
- /** Transform the input homogeneous point. Return as a new point or in the pre-allocated result (if result is given) */
223406
+ /**
223407
+ * If `p = (x,y,z)` then transform is `Tp = M*p + o`. This function returns the transformed point as a new
223408
+ * Float64Array with size 3 (`Tp` as 3 elements) or in the pre-allocated result (if result is given).
223409
+ */
223048
223410
  multiplyXYZToFloat64Array(x, y, z, result) {
223049
223411
  return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesCoordinatesToFloat64Array(this._origin, this._matrix, x, y, z, result);
223050
223412
  }
223051
- /** Multiply the transposed transform (as 4x4 with 0001 row) by Point4d given as xyzw.. Return as a new point or in the pre-allocated result (if result is given) */
223413
+ /**
223414
+ * Treat the 3x3 matrix and origin as upper 3x4 part of a 4x4 matrix, with 0001 as the final row. Now multiply
223415
+ * the transposed of this 4x4 matrix by Point4d given as xyzw. Return as a new point4d (`M*p` as first 3 elements
223416
+ * and `o*p + w` as last element where `p = (x,y,z)`) or in the pre-allocated result (if result is given).
223417
+ */
223052
223418
  multiplyTransposeXYZW(x, y, z, w, result) {
223053
223419
  const coffs = this._matrix.coffs;
223054
223420
  const origin = this._origin;
223055
- return _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_3__.Point4d.create(x * coffs[0] + y * coffs[3] + z * coffs[6], x * coffs[1] + y * coffs[4] + z * coffs[7], x * coffs[2] + y * coffs[5] + z * coffs[8], x * origin.x + y * origin.y + z * origin.z + w, result);
223421
+ return _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_3__.Point4d.create((x * coffs[0]) + (y * coffs[3]) + (z * coffs[6]), (x * coffs[1]) + (y * coffs[4]) + (z * coffs[7]), (x * coffs[2]) + (y * coffs[5]) + (z * coffs[8]), (x * origin.x) + (y * origin.y) + (z * origin.z) + w, result);
223056
223422
  }
223057
- /** for each point: replace point by Transform*point */
223423
+ /** For each point in the array, replace point by the transformed point (by `Tp = M*p + o`) */
223058
223424
  multiplyPoint3dArrayInPlace(points) {
223059
223425
  let point;
223060
223426
  for (point of points)
223061
223427
  _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, point, point);
223062
223428
  }
223063
- /** for each point: replace point by Transform*point */
223429
+ /** For each point in the 2d array, replace point by the transformed point (by `Tp = M*p + o`) */
223064
223430
  multiplyPoint3dArrayArrayInPlace(chains) {
223065
223431
  for (const chain of chains)
223066
223432
  this.multiplyPoint3dArrayInPlace(chain);
223067
223433
  }
223068
- /** Return product of the transform's inverse times a point. */
223434
+ /**
223435
+ * If for a point `p` we have `Tp = M*p + o = point` (where `point` is the transformed point), then
223436
+ * `p = MInverse * (point - o)`. This function returns the original point `p` if `point` is the
223437
+ * transformed point (`Tp = point`).
223438
+ * * Return as a new point or in the optional `result`.
223439
+ * * Returns `undefined` if the `matrix` part if this Transform is singular.
223440
+ */
223069
223441
  multiplyInversePoint3d(point, result) {
223070
223442
  return this._matrix.multiplyInverseXYZAsPoint3d(point.x - this._origin.x, point.y - this._origin.y, point.z - this._origin.z, result);
223071
223443
  }
223072
- /** Inverse transform the input homogeneous point.
223073
- * * Return as a new point or in the optional result.
223074
- * * returns undefined if the matrix part if this Transform is singular.
223444
+ /**
223445
+ * If for a point `p` we have `Tp = M*p + w*o = weightedPoint` (where `weightedPoint` is the transformed point), then
223446
+ * `p = MInverse * (weightedPoint - w*o)`. This function returns a Point4d where first 3 elements are the original
223447
+ * point `p` if `weightedPoint` is the transformed point (`Tp = weightedPoint`) and the last element is `w`.
223448
+ * * Return as a new point or in the optional `result`.
223449
+ * * Returns `undefined` if the `matrix` part if this Transform is singular.
223075
223450
  */
223076
223451
  multiplyInversePoint4d(weightedPoint, result) {
223077
223452
  const w = weightedPoint.w;
223078
223453
  return this._matrix.multiplyInverseXYZW(weightedPoint.x - w * this.origin.x, weightedPoint.y - w * this.origin.y, weightedPoint.z - w * this.origin.z, w, result);
223079
223454
  }
223080
- /** Return product of the transform's inverse times a point (point given as x,y,z) */
223455
+ /**
223456
+ * If for a point `p = (x,y,z)` we have `Tp = M*p + o = point` (where `point` is the transformed point), then
223457
+ * `p = MInverse * (point - o)`. This function returns the original point `p` if `point` is the transformed
223458
+ * point (`Tp = point`).
223459
+ * * Return as a new point or in the optional `result`.
223460
+ * * Returns `undefined` if the `matrix` part if this Transform is singular.
223461
+ */
223081
223462
  multiplyInverseXYZ(x, y, z, result) {
223082
223463
  return this._matrix.multiplyInverseXYZAsPoint3d(x - this._origin.x, y - this._origin.y, z - this._origin.z, result);
223083
223464
  }
@@ -223103,8 +223484,8 @@ class Transform {
223103
223484
  return result;
223104
223485
  }
223105
223486
  /**
223106
- * * for each point in source: multiply transformInverse * point in place in the point.
223107
- * * return false if not invertible.
223487
+ * * For each point in source: multiply transformInverse * point in place in the point.
223488
+ * * Return false if not invertible.
223108
223489
  */
223109
223490
  multiplyInversePoint3dArrayInPlace(source) {
223110
223491
  if (!this._matrix.computeCachedInverse(true))
@@ -223148,9 +223529,9 @@ class Transform {
223148
223529
  return numSource;
223149
223530
  }
223150
223531
  /**
223151
- * * for each point: multiply transform * point
223152
- * * if result is given, resize to match source and replace each corresponding pi
223153
- * * if result is not given, return a new array.
223532
+ * * For each point: multiply transform * point
223533
+ * * If result is given, resize to match source and replace each corresponding pi
223534
+ * * If result is not given, return a new array.
223154
223535
  */
223155
223536
  multiplyPoint2dArray(source, result) {
223156
223537
  if (result) {
@@ -223165,9 +223546,9 @@ class Transform {
223165
223546
  return result;
223166
223547
  }
223167
223548
  /**
223168
- * * for each point: multiply transform * point
223169
- * * if result is given, resize to match source and replace each corresponding pi
223170
- * * if result is not given, return a new array.
223549
+ * * For each point: multiply transform * point
223550
+ * * If result is given, resize to match source and replace each corresponding pi
223551
+ * * If result is not given, return a new array.
223171
223552
  */
223172
223553
  multiplyPoint3dArray(source, result) {
223173
223554
  if (result) {
@@ -223181,30 +223562,30 @@ class Transform {
223181
223562
  result.push(_Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, p));
223182
223563
  return result;
223183
223564
  }
223184
- /** Multiply the vector by the Matrix3d part of the transform.
223185
- *
223186
- * * The transform's origin is not used.
223187
- * * Return as new or result by usual optional result convention
223565
+ /**
223566
+ * Multiply the vector by the Matrix3d part of the transform.
223567
+ * * The transform's origin is not used.
223568
+ * * Return as new or result by usual optional result convention
223188
223569
  */
223189
223570
  multiplyVector(vector, result) {
223190
223571
  return this._matrix.multiplyVector(vector, result);
223191
223572
  }
223192
- /** Multiply the vector in place by the Matrix3d part of the transform.
223193
- *
223194
- * * The transform's origin is not used.
223195
- */
223573
+ /**
223574
+ * Multiply the vector in place by the Matrix3d part of the transform.
223575
+ * * The transform's origin is not used.
223576
+ */
223196
223577
  multiplyVectorInPlace(vector) {
223197
223578
  this._matrix.multiplyVectorInPlace(vector);
223198
223579
  }
223199
- /** Multiply the vector (x,y,z) by the Matrix3d part of the transform.
223200
- *
223201
- * * The transform's origin is not used.
223202
- * * Return as new or result by usual optional result convention
223580
+ /**
223581
+ * Multiply the vector (x,y,z) by the Matrix3d part of the transform.
223582
+ * * The transform's origin is not used.
223583
+ * * Return as new or result by usual optional result convention
223203
223584
  */
223204
223585
  multiplyVectorXYZ(x, y, z, result) {
223205
223586
  return this._matrix.multiplyXYZ(x, y, z, result);
223206
223587
  }
223207
- /** multiply this Transform times other Transform.
223588
+ /** Multiply this Transform times other Transform.
223208
223589
  * ```
223209
223590
  * equation
223210
223591
  * \begin{matrix}
@@ -223223,7 +223604,7 @@ class Transform {
223223
223604
  return result;
223224
223605
  }
223225
223606
  /**
223226
- * multiply transformA * transformB, store to calling instance.
223607
+ * Multiply transformA * transformB, store to calling instance.
223227
223608
  * @param transformA left operand
223228
223609
  * @param transformB right operand
223229
223610
  */
@@ -223236,7 +223617,8 @@ class Transform {
223236
223617
  }
223237
223618
  // [Q A][R 0] = [QR A]
223238
223619
  // [0 1][0 1] [0 1]
223239
- /** multiply this Transform times other Matrix3d, with other considered to be a Transform with 0 translation.
223620
+ /**
223621
+ * Multiply this Transform times other Matrix3d, with other considered to be a Transform with 0 translation.
223240
223622
  * ```
223241
223623
  * equation
223242
223624
  * \begin{matrix}
@@ -223259,7 +223641,7 @@ class Transform {
223259
223641
  * Return the range of the transformed corners.
223260
223642
  * * The 8 corners are transformed individually.
223261
223643
  * * Note that if there is anything other than translation and principal axis scaling in the transform, the volume of the range rotation will increase.
223262
- * * Hence to get a "tight" range on rotated geometry, a range computation must be made on the rotated geometry itself.
223644
+ * * Hence to get a "tight" range on rotated geometry, a range computation must be made on the rotated geometry itself.
223263
223645
  */
223264
223646
  multiplyRange(range, result) {
223265
223647
  if (range.isNull)
@@ -223284,15 +223666,22 @@ class Transform {
223284
223666
  }
223285
223667
  /**
223286
223668
  * * Return a Transform which is the inverse of this transform.
223287
- * * Return undefined if this Transform's matrix is singular.
223669
+ * @param result optional pre-allocated result
223670
+ * @return the inverse Transform, or undefined if the matrix is singular
223288
223671
  */
223289
- inverse() {
223290
- const matrixInverse = this._matrix.inverse();
223672
+ inverse(result) {
223673
+ const matrixInverse = this._matrix.inverse(result ? result._matrix : undefined);
223291
223674
  if (!matrixInverse)
223292
223675
  return undefined;
223676
+ if (result) {
223677
+ // result._matrix is already defined
223678
+ matrixInverse.multiplyXYZ(-this._origin.x, -this._origin.y, -this._origin.z, result._origin);
223679
+ return result;
223680
+ }
223293
223681
  return Transform.createRefs(matrixInverse.multiplyXYZ(-this._origin.x, -this._origin.y, -this._origin.z), matrixInverse);
223294
223682
  }
223295
- /** Initialize transforms that map each direction of a box (axis aligned) to `[0,1]`.
223683
+ /**
223684
+ * Initialize transforms that map each direction of a box (axis aligned) to `[0,1]`.
223296
223685
  * * The corner coordinates do _not_ need to be in order in any of the x,y,z directions.
223297
223686
  * * The npcToGlobalTransform (if supplied) maps 000 to the point named point000.
223298
223687
  * * The npcToGlobalTransform (if supplied) maps 11 to the point named point000.
@@ -223468,7 +223857,8 @@ __webpack_require__.r(__webpack_exports__);
223468
223857
  /** @public */
223469
223858
  var XYAndZ;
223470
223859
  (function (XYAndZ) {
223471
- /** Return true if two XYAndZs have equal x,y,z parts within a specified tolerance.
223860
+ /**
223861
+ * Return true if two XYAndZs have equal x,y,z parts within a specified tolerance.
223472
223862
  * @param a The first XYAndZ to compare
223473
223863
  * @param b The second XYAndZ to compare
223474
223864
  * @param The tolerance for comparison. If undefined, [[Geometry.smallMetricDistance]] is used.
@@ -234100,8 +234490,10 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
234100
234490
  addTransformedUnitBox(transform) {
234101
234491
  this.addTransformedRangeMesh(transform, _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__.Range3d.createXYZXYZ(0, 0, 0, 1, 1, 1));
234102
234492
  }
234103
- /** add facets for a transformed unit box.
234104
- * * for each face in the order of BoxTopology.cornerIndexCCW, faceSelector[i]===false skips that facet.
234493
+ /** Add facets for a transformed range box.
234494
+ * @param transform applied to the range points before adding to the polyface
234495
+ * @param range sides become 6 quad polyface facets
234496
+ * @param faceSelector for each face in the order of BoxTopology.cornerIndexCCW, faceSelector[i]===false skips that facet.
234105
234497
  */
234106
234498
  addTransformedRangeMesh(transform, range, faceSelector) {
234107
234499
  const pointIndex0 = this._polyface.data.pointCount;
@@ -234112,8 +234504,16 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
234112
234504
  let faceCounter = 0;
234113
234505
  for (const facet of _BoxTopology__WEBPACK_IMPORTED_MODULE_6__.BoxTopology.cornerIndexCCW) {
234114
234506
  if (!faceSelector || (faceCounter < faceSelector.length && faceSelector[faceCounter])) {
234115
- for (const pointIndex of facet)
234116
- this._polyface.addPointIndex(pointIndex0 + pointIndex);
234507
+ const myFacet = facet.map((pointIndex) => pointIndex + pointIndex0);
234508
+ if (this._reversed)
234509
+ myFacet.reverse();
234510
+ if (this._options.shouldTriangulate) {
234511
+ this.addIndexedTrianglePointIndexes(myFacet[0], myFacet[1], myFacet[2], false);
234512
+ this.addIndexedTrianglePointIndexes(myFacet[0], myFacet[2], myFacet[3], false);
234513
+ }
234514
+ else {
234515
+ this.addIndexedQuadPointIndexes(myFacet[0], myFacet[1], myFacet[3], myFacet[2], false);
234516
+ }
234117
234517
  this._polyface.terminateFacet();
234118
234518
  }
234119
234519
  faceCounter++;
@@ -234443,10 +234843,10 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
234443
234843
  this.addIndexedQuadPointIndexes(idx0, idx1, idx3, idx2);
234444
234844
  }
234445
234845
  /** Announce a single quad facet's point indexes.
234446
- *
234447
234846
  * * The actual quad may be reversed or triangulated based on builder setup.
234448
- * * indexA0 and indexA1 are in the forward order at the "A" end of the quad
234449
- * * indexB0 and indexB1 are in the forward order at the "B" end of the quad.
234847
+ * * indexA0 and indexA1 are in the forward order at the "A" end of the quad
234848
+ * * indexB0 and indexB1 are in the forward order at the "B" end of the quad.
234849
+ * * This means ccw/cw ordered vertices v[i] should be passed into this function as i=[0,1,3,2]
234450
234850
  */
234451
234851
  addIndexedQuadPointIndexes(indexA0, indexA1, indexB0, indexB1, terminate = true) {
234452
234852
  if (this._reversed) {
@@ -280239,7 +280639,7 @@ class TestContext {
280239
280639
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
280240
280640
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
280241
280641
  await core_frontend_1.NoRenderApp.startup({
280242
- applicationVersion: "4.0.0-dev.46",
280642
+ applicationVersion: "4.0.0-dev.50",
280243
280643
  applicationId: this.settings.gprid,
280244
280644
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
280245
280645
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -281080,6 +281480,8 @@ var PresentationStatus;
281080
281480
  PresentationStatus[PresentationStatus["Error"] = 65536] = "Error";
281081
281481
  /** Error: Backend is not initialized. */
281082
281482
  PresentationStatus[PresentationStatus["NotInitialized"] = 65537] = "NotInitialized";
281483
+ /** Error: Result set is too large. */
281484
+ PresentationStatus[PresentationStatus["ResultSetTooLarge"] = 65538] = "ResultSetTooLarge";
281083
281485
  /** Error: Argument is invalid. */
281084
281486
  PresentationStatus[PresentationStatus["InvalidArgument"] = 65539] = "InvalidArgument";
281085
281487
  /**
@@ -281924,7 +282326,7 @@ class PresentationRpcInterface extends _itwin_core_common__WEBPACK_IMPORTED_MODU
281924
282326
  /** The immutable name of the interface. */
281925
282327
  PresentationRpcInterface.interfaceName = "PresentationRpcInterface"; // eslint-disable-line @typescript-eslint/naming-convention
281926
282328
  /** The semantic version of the interface. */
281927
- PresentationRpcInterface.interfaceVersion = "3.3.0";
282329
+ PresentationRpcInterface.interfaceVersion = "4.0.0";
281928
282330
  __decorate([
281929
282331
  _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcOperation.setPolicy({ allowResponseCompression: true })
281930
282332
  ], PresentationRpcInterface.prototype, "getPagedNodes", null);
@@ -286584,7 +286986,7 @@ __webpack_require__.r(__webpack_exports__);
286584
286986
  *--------------------------------------------------------------------------------------------*/
286585
286987
 
286586
286988
 
286587
- const NAMESPACES = ["BisCore", "ECPresentation", "RulesEngine"];
286989
+ const NAMESPACES = ["Presentation"];
286588
286990
  /** @internal */
286589
286991
  class FrontendLocalizationHelper extends _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_0__.LocalizationHelper {
286590
286992
  constructor(lang) {
@@ -287220,18 +287622,12 @@ async function createPagedGeneratorResponse(props) {
287220
287622
  }
287221
287623
  /** @internal */
287222
287624
  const buildPagedArrayResponse = async (requestedPage, getter) => {
287223
- try {
287224
- const items = new Array();
287225
- const gen = await createPagedGeneratorResponse({ page: requestedPage, get: getter });
287226
- for await (const item of gen.items()) {
287227
- items.push(item);
287228
- }
287229
- return { total: gen.total, items };
287230
- }
287231
- catch {
287232
- // FIXME: we should propagate the error...
287233
- return { total: 0, items: [] };
287625
+ const items = new Array();
287626
+ const gen = await createPagedGeneratorResponse({ page: requestedPage, get: getter });
287627
+ for await (const item of gen.items()) {
287628
+ items.push(item);
287234
287629
  }
287630
+ return { total: gen.total, items };
287235
287631
  };
287236
287632
  const stripTransientElementKeys = (keys) => {
287237
287633
  if (!keys.some((key) => _itwin_presentation_common__WEBPACK_IMPORTED_MODULE_2__.Key.isInstanceKey(key) && key.className === _selection_SelectionManager__WEBPACK_IMPORTED_MODULE_7__.TRANSIENT_ELEMENT_CLASSNAME))
@@ -299801,7 +300197,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
299801
300197
  /***/ ((module) => {
299802
300198
 
299803
300199
  "use strict";
299804
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.46","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-eslintrc -c \\"./node_modules/@itwin/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.0.0-dev.46","@itwin/core-bentley":"workspace:^4.0.0-dev.46","@itwin/core-common":"workspace:^4.0.0-dev.46","@itwin/core-geometry":"workspace:^4.0.0-dev.46","@itwin/core-orbitgt":"workspace:^4.0.0-dev.46","@itwin/core-quantity":"workspace:^4.0.0-dev.46"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"nightly","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/mocha":"^8.2.2","@types/node":"^18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/object-storage-azure":"^1.5.0","@itwin/cloud-agnostic-core":"^1.5.0","@itwin/object-storage-core":"^1.5.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","qs":"^6.5.3","semver":"^7.3.5","superagent":"^7.1.5","wms-capabilities":"0.4.0","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
300200
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.50","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-eslintrc -c \\"./node_modules/@itwin/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.0.0-dev.50","@itwin/core-bentley":"workspace:^4.0.0-dev.50","@itwin/core-common":"workspace:^4.0.0-dev.50","@itwin/core-geometry":"workspace:^4.0.0-dev.50","@itwin/core-orbitgt":"workspace:^4.0.0-dev.50","@itwin/core-quantity":"workspace:^4.0.0-dev.50"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"nightly","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/mocha":"^8.2.2","@types/node":"^18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/object-storage-azure":"^1.5.0","@itwin/cloud-agnostic-core":"^1.5.0","@itwin/object-storage-core":"^1.5.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","qs":"^6.5.3","semver":"^7.3.5","superagent":"^7.1.5","wms-capabilities":"0.4.0","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
299805
300201
 
299806
300202
  /***/ }),
299807
300203