@itwin/ecschema-rpcinterface-tests 4.4.0-dev.24 → 4.4.0-dev.26

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.
@@ -1 +1 @@
1
- {"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\161\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.1.6\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\7\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.1.6\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
@@ -139243,6 +139243,17 @@ function colorFromMaterial(material, isTransparent) {
139243
139243
  color = color.withTransparency(0);
139244
139244
  return color;
139245
139245
  }
139246
+ function trsMatrix(translation, rotation, scale, result) {
139247
+ // SPEC: To compose the local transformation matrix, TRS properties MUST be converted to matrices and postmultiplied in the T * R * S order;
139248
+ // first the scale is applied to the vertices, then the rotation, and then the translation.
139249
+ const scaleTf = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createRefs(undefined, scale ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createScale(scale[0], scale[1], scale[2]) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity);
139250
+ const rotTf = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createRefs(undefined, rotation ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createFromQuaternion(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point4d.create(rotation[0], rotation[1], rotation[2], rotation[3])) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity);
139251
+ rotTf.matrix.transposeInPlace(); // See comment on Matrix3d.createFromQuaternion
139252
+ const transTf = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslation(translation ? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d(translation[0], translation[1], translation[2]) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero());
139253
+ const tf = scaleTf.multiplyTransformTransform(rotTf, result);
139254
+ transTf.multiplyTransformTransform(tf, tf);
139255
+ return tf;
139256
+ }
139246
139257
  class TransformStack {
139247
139258
  constructor(transform) {
139248
139259
  this._stack = [];
@@ -139263,14 +139274,7 @@ class TransformStack {
139263
139274
  nodeTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createOriginAndMatrix(origin, matrix);
139264
139275
  }
139265
139276
  else if (node.rotation || node.scale || node.translation) {
139266
- // SPEC: To compose the local transformation matrix, TRS properties MUST be converted to matrices and postmultiplied in the T * R * S order;
139267
- // first the scale is applied to the vertices, then the rotation, and then the translation.
139268
- const scale = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createRefs(undefined, node.scale ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createScale(node.scale[0], node.scale[1], node.scale[2]) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity);
139269
- const rot = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createRefs(undefined, node.rotation ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createFromQuaternion(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point4d.create(node.rotation[0], node.rotation[1], node.rotation[2], node.rotation[3])) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity);
139270
- rot.matrix.transposeInPlace(); // See comment on Matrix3d.createFromQuaternion
139271
- const trans = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslation(node.translation ? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d(node.translation[0], node.translation[1], node.translation[2]) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero());
139272
- nodeTransform = scale.multiplyTransformTransform(rot);
139273
- trans.multiplyTransformTransform(nodeTransform, nodeTransform);
139277
+ nodeTransform = trsMatrix(node.translation, node.rotation, node.scale);
139274
139278
  }
139275
139279
  const top = this.transform;
139276
139280
  if (!top)
@@ -139323,6 +139327,9 @@ class GltfReader {
139323
139327
  traverseScene() {
139324
139328
  return this.traverseNodes(this._sceneNodes);
139325
139329
  }
139330
+ get viewFlagOverrides() {
139331
+ return undefined;
139332
+ }
139326
139333
  getTileTransform(transformToRoot, pseudoRtcBias) {
139327
139334
  let transform;
139328
139335
  if (this._returnToCenter || pseudoRtcBias || this._yAxisUp || transformToRoot) {
@@ -139366,18 +139373,19 @@ class GltfReader {
139366
139373
  renderGraphic = renderGraphicList[0];
139367
139374
  else
139368
139375
  renderGraphic = this._system.createGraphicList(renderGraphicList);
139369
- const transform = this.getTileTransform(transformToRoot, pseudoRtcBias);
139370
- let range = contentRange;
139371
- const invTransform = transform?.inverse();
139372
- if (invTransform)
139373
- range = invTransform.multiplyRange(contentRange);
139374
139376
  if (featureTable)
139375
- renderGraphic = this._system.createBatch(renderGraphic, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.PackedFeatureTable.pack(featureTable), range);
139376
- if (transform) {
139377
+ renderGraphic = this._system.createBatch(renderGraphic, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.PackedFeatureTable.pack(featureTable), contentRange);
139378
+ const transform = this.getTileTransform(transformToRoot, pseudoRtcBias);
139379
+ const viewFlagOverrides = this.viewFlagOverrides;
139380
+ if (transform || viewFlagOverrides) {
139377
139381
  const branch = new _render_GraphicBranch__WEBPACK_IMPORTED_MODULE_4__.GraphicBranch(true);
139382
+ if (viewFlagOverrides)
139383
+ branch.setViewFlagOverrides(viewFlagOverrides);
139378
139384
  branch.add(renderGraphic);
139379
- renderGraphic = this._system.createBranch(branch, transform);
139385
+ renderGraphic = this._system.createBranch(branch, transform ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity());
139380
139386
  }
139387
+ const invTransform = transform?.inverse();
139388
+ const range = invTransform ? invTransform.multiplyRange(contentRange) : contentRange;
139381
139389
  return {
139382
139390
  readStatus,
139383
139391
  isLeaf,
@@ -139424,12 +139432,76 @@ class GltfReader {
139424
139432
  mesh.normals.push(new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.OctEncodedNormal(normal));
139425
139433
  return mesh.getGraphics(this._system, instances);
139426
139434
  }
139427
- readNodeAndCreateGraphics(renderGraphicList, node, featureTable, transformStack, instances, pseudoRtcBias) {
139435
+ readInstanceAttributes(node, featureTable) {
139436
+ const ext = node.extensions?.EXT_mesh_gpu_instancing;
139437
+ if (!ext || !ext.attributes) {
139438
+ return undefined;
139439
+ }
139440
+ const translationsView = this.getBufferView(ext.attributes, "TRANSLATION");
139441
+ const translations = translationsView?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
139442
+ const rotations = this.getBufferView(ext.attributes, "ROTATION")?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
139443
+ const scales = this.getBufferView(ext.attributes, "SCALE")?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
139444
+ // All attributes must specify the same count, count must be greater than zero, and at least one attribute must be specified.
139445
+ const count = translations?.count ?? rotations?.count ?? scales?.count;
139446
+ if (!count || (rotations && rotations.count !== count) || (scales && scales.count !== count)) {
139447
+ return undefined;
139448
+ }
139449
+ const transformCenter = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d();
139450
+ const trMin = translationsView?.accessor.min;
139451
+ const trMax = translationsView?.accessor.max;
139452
+ if (trMin && trMax) {
139453
+ const half = (idx) => trMin[idx] + (trMax[idx] - trMin[idx]) / 2;
139454
+ transformCenter.set(half(0), half(1), half(2));
139455
+ }
139456
+ const getTranslation = (index) => {
139457
+ if (!translations) {
139458
+ return undefined;
139459
+ }
139460
+ index *= 3;
139461
+ return [
139462
+ translations.buffer[index + 0] - transformCenter.x,
139463
+ translations.buffer[index + 1] - transformCenter.y,
139464
+ translations.buffer[index + 2] - transformCenter.z,
139465
+ ];
139466
+ };
139467
+ const getRotation = (index) => {
139468
+ index *= 4;
139469
+ return rotations ? [rotations.buffer[index], rotations.buffer[index + 1], rotations.buffer[index + 2], rotations.buffer[index + 3]] : undefined;
139470
+ };
139471
+ const getScale = (index) => {
139472
+ index *= 3;
139473
+ return scales ? [scales.buffer[index], scales.buffer[index + 1], scales.buffer[index + 2]] : undefined;
139474
+ };
139475
+ const transforms = new Float32Array(3 * 4 * count);
139476
+ const transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
139477
+ for (let i = 0; i < count; i++) {
139478
+ const tf = trsMatrix(getTranslation(i), getRotation(i), getScale(i), transform);
139479
+ const idx = i * 3 * 4;
139480
+ transforms[idx + 0] = tf.matrix.coffs[0];
139481
+ transforms[idx + 1] = tf.matrix.coffs[1];
139482
+ transforms[idx + 2] = tf.matrix.coffs[2];
139483
+ transforms[idx + 3] = tf.origin.x;
139484
+ transforms[idx + 4] = tf.matrix.coffs[3];
139485
+ transforms[idx + 5] = tf.matrix.coffs[4];
139486
+ transforms[idx + 6] = tf.matrix.coffs[5];
139487
+ transforms[idx + 7] = tf.origin.y;
139488
+ transforms[idx + 8] = tf.matrix.coffs[6];
139489
+ transforms[idx + 9] = tf.matrix.coffs[7];
139490
+ transforms[idx + 10] = tf.matrix.coffs[8];
139491
+ transforms[idx + 11] = tf.origin.z;
139492
+ }
139493
+ // ###TODO? The extension currently provides no way of specifying per-instance feature Ids.
139494
+ // For now, assume that if the feature table contains exactly one feature, all the instances belong to that feature.
139495
+ const featureIds = featureTable && featureTable.isUniform ? new Uint8Array(3 * count) : undefined;
139496
+ return { count, transforms, transformCenter, featureIds };
139497
+ }
139498
+ readNodeAndCreateGraphics(renderGraphicList, node, featureTable, transformStack, batchInstances, pseudoRtcBias) {
139428
139499
  if (undefined === node)
139429
139500
  return _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TileReadStatus.InvalidTileData;
139430
139501
  // IMPORTANT: Do not return without popping this node from the stack.
139431
139502
  transformStack.push(node);
139432
139503
  const thisTransform = transformStack.transform;
139504
+ const nodeInstances = !batchInstances && undefined !== node.mesh ? this.readInstanceAttributes(node, featureTable) : undefined;
139433
139505
  /**
139434
139506
  * This is a workaround for tiles generated by
139435
139507
  * context capture which have a large offset from the tileset origin that exceeds the
@@ -139444,16 +139516,16 @@ class GltfReader {
139444
139516
  for (const meshKey of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.getGltfNodeMeshIds)(node)) {
139445
139517
  const nodeMesh = this._meshes[meshKey];
139446
139518
  if (nodeMesh?.primitives) {
139447
- const meshes = this.readMeshPrimitives(node, featureTable, thisTransform, thisBias);
139519
+ const meshes = this.readMeshPrimitives(node, featureTable, thisTransform, thisBias, nodeInstances);
139448
139520
  let renderGraphic;
139449
139521
  if (0 !== meshes.length) {
139450
139522
  if (1 === meshes.length) {
139451
- renderGraphic = this.graphicFromMeshData(meshes[0], instances);
139523
+ renderGraphic = this.graphicFromMeshData(meshes[0], batchInstances ?? nodeInstances);
139452
139524
  }
139453
139525
  else {
139454
139526
  const thisList = [];
139455
139527
  for (const mesh of meshes) {
139456
- renderGraphic = this.graphicFromMeshData(mesh, instances);
139528
+ renderGraphic = this.graphicFromMeshData(mesh, batchInstances ?? nodeInstances);
139457
139529
  if (undefined !== renderGraphic)
139458
139530
  thisList.push(renderGraphic);
139459
139531
  }
@@ -139475,7 +139547,7 @@ class GltfReader {
139475
139547
  for (const childId of node.children) {
139476
139548
  const child = this._nodes[childId];
139477
139549
  if (child)
139478
- this.readNodeAndCreateGraphics(renderGraphicList, child, featureTable, transformStack, instances);
139550
+ this.readNodeAndCreateGraphics(renderGraphicList, child, featureTable, transformStack, batchInstances ?? nodeInstances);
139479
139551
  }
139480
139552
  }
139481
139553
  transformStack.pop();
@@ -139704,9 +139776,9 @@ class GltfReader {
139704
139776
  // DisplayParams doesn't want a separate texture mapping if the material already has one.
139705
139777
  textureMapping = undefined;
139706
139778
  }
139707
- return new _common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams(_common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams.Type.Mesh, color, color, 1, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LinePixels.Solid, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FillFlags.Always, renderMaterial, undefined, hasBakedLighting, textureMapping);
139779
+ return new _common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams(_common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams.Type.Mesh, color, color, 1, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LinePixels.Solid, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FillFlags.None, renderMaterial, undefined, hasBakedLighting, textureMapping);
139708
139780
  }
139709
- readMeshPrimitives(node, featureTable, thisTransform, thisBias) {
139781
+ readMeshPrimitives(node, featureTable, thisTransform, thisBias, instances) {
139710
139782
  const meshes = [];
139711
139783
  for (const meshKey of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.getGltfNodeMeshIds)(node)) {
139712
139784
  const nodeMesh = this._meshes[meshKey];
@@ -139716,9 +139788,30 @@ class GltfReader {
139716
139788
  if (mesh) {
139717
139789
  meshes.push(mesh);
139718
139790
  if (this._computedContentRange && mesh.pointRange) {
139719
- const invTransform = thisTransform?.inverse();
139720
- const meshRange = invTransform ? invTransform.multiplyRange(mesh.pointRange) : mesh.pointRange;
139721
- this._computedContentRange.extendRange(meshRange);
139791
+ const meshRange = thisTransform ? thisTransform.multiplyRange(mesh.pointRange) : mesh.pointRange;
139792
+ if (!instances) {
139793
+ this._computedContentRange.extendRange(meshRange);
139794
+ }
139795
+ else {
139796
+ const tfs = instances.transforms;
139797
+ const nodeRange = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d();
139798
+ const extendTransformedRange = (i, x, y, z) => {
139799
+ nodeRange.extendXYZ(tfs[i + 3] + tfs[i + 0] * x + tfs[i + 1] * y + tfs[i + 2] * z, tfs[i + 7] + tfs[i + 4] * x + tfs[i + 5] * y + tfs[i + 6] * z, tfs[i + 11] + tfs[i + 8] * x + tfs[i + 9] * y + tfs[i + 10] * z);
139800
+ };
139801
+ for (let i = 0; i < tfs.length; i += 3 * 4) {
139802
+ extendTransformedRange(i, meshRange.low.x, meshRange.low.y, meshRange.low.z);
139803
+ extendTransformedRange(i, meshRange.low.x, meshRange.low.y, meshRange.high.z);
139804
+ extendTransformedRange(i, meshRange.low.x, meshRange.high.y, meshRange.low.z);
139805
+ extendTransformedRange(i, meshRange.low.x, meshRange.high.y, meshRange.high.z);
139806
+ extendTransformedRange(i, meshRange.high.x, meshRange.low.y, meshRange.low.z);
139807
+ extendTransformedRange(i, meshRange.high.x, meshRange.low.y, meshRange.high.z);
139808
+ extendTransformedRange(i, meshRange.high.x, meshRange.high.y, meshRange.low.z);
139809
+ extendTransformedRange(i, meshRange.high.x, meshRange.high.y, meshRange.high.z);
139810
+ }
139811
+ nodeRange.low.addInPlace(instances.transformCenter);
139812
+ nodeRange.high.addInPlace(instances.transformCenter);
139813
+ this._computedContentRange.extendRange(nodeRange);
139814
+ }
139722
139815
  }
139723
139816
  }
139724
139817
  }
@@ -140453,6 +140546,12 @@ class GltfGraphicsReader extends GltfReader {
140453
140546
  this._featureTable.insert(new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Feature(pickableId));
140454
140547
  }
140455
140548
  }
140549
+ get viewFlagOverrides() {
140550
+ return {
140551
+ whiteOnWhiteReversal: false,
140552
+ renderMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderMode.SmoothShade,
140553
+ };
140554
+ }
140456
140555
  async read() {
140457
140556
  await this.resolveResources();
140458
140557
  return this.readGltfAndCreateGraphics(this._isLeaf, this._featureTable, this._contentRange, this._transform);
@@ -191047,7 +191146,7 @@ class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
191047
191146
  dgnBoundaryType() {
191048
191147
  /**
191049
191148
  * All "Loop" become "outer". TypeScript Loop object is equivalent to a native CurveVector with
191050
- * boundaryType = BOUNDARY_TYPE_Outer. In other words, TypeScript has no flavor of Loop that
191149
+ * boundaryType = BOUNDARY_TYPE_Outer. In other words, TypeScript has no flavor of Loop that
191051
191150
  * carries "hole" semantics.
191052
191151
  */
191053
191152
  return 2;
@@ -258414,7 +258513,10 @@ __webpack_require__.r(__webpack_exports__);
258414
258513
 
258415
258514
 
258416
258515
 
258417
- /** Class to test match of half edge mask. */
258516
+ /**
258517
+ * Class to test match of half edge mask.
258518
+ * @internal
258519
+ */
258418
258520
  class HalfEdgeMaskTester {
258419
258521
  /**
258420
258522
  * Constructor
@@ -258430,7 +258532,10 @@ class HalfEdgeMaskTester {
258430
258532
  return edge.isMaskSet(this._targetMask) === this._targetValue;
258431
258533
  }
258432
258534
  }
258433
- /** Class for different types of searches for HalfEdgeGraph. */
258535
+ /**
258536
+ * Class for different types of searches for HalfEdgeGraph.
258537
+ * @internal
258538
+ */
258434
258539
  class HalfEdgeGraphSearch {
258435
258540
  /**
258436
258541
  * Static method for face area computation -- useful as function parameter in `collectFaceAreaSummary`.
@@ -258622,6 +258727,99 @@ class HalfEdgeGraphSearch {
258622
258727
  HalfEdgeGraphSearch.correctParityInComponentArrays(parityMask, components);
258623
258728
  return components;
258624
258729
  }
258730
+ /**
258731
+ * Breadth First Search through connected component of a graph.
258732
+ * @param component vector of nodes, one per face.
258733
+ * @param seed seed node in component.
258734
+ * @param visitMask mask to apply to visited nodes. Assumed cleared throughout component.
258735
+ * @param ignoreMask (optional) mask preset on faces to ignore. Default value is `HalfEdgeMask.EXTERIOR` to
258736
+ * ignore exterior faces. Pass `HalfEdgeMask.NULL_MASK` to process all faces.
258737
+ * @param maxFaceCount (optional) maximum number of faces in the component. Should be positive; otherwise
258738
+ * `Infinity` is used.
258739
+ * @returns node at which to start next component if maximum face count exceeded, or undefined.
258740
+ */
258741
+ static exploreComponent(component, seed, visitMask, ignoreMask = _Graph__WEBPACK_IMPORTED_MODULE_1__.HalfEdgeMask.EXTERIOR, maxFaceCount = Infinity) {
258742
+ if (maxFaceCount <= 0)
258743
+ maxFaceCount = Infinity;
258744
+ const boundaryMask = visitMask | ignoreMask;
258745
+ let numFaces = 0;
258746
+ const candidates = []; // the queue
258747
+ candidates.push(seed);
258748
+ while (candidates.length !== 0 && numFaces < maxFaceCount) {
258749
+ // shift is O(n) and may be inefficient for large queues; if needed, we can replace
258750
+ // queue by circular array or implement the queue using 2 stacks; both are O(1)
258751
+ const node = candidates.shift();
258752
+ if (node.isMaskSet(boundaryMask))
258753
+ continue;
258754
+ component.push(node);
258755
+ ++numFaces;
258756
+ const enqueueNeighboringFaces = (heNode) => {
258757
+ heNode.setMask(visitMask);
258758
+ const neighbor = heNode.vertexSuccessor;
258759
+ if (!neighbor.isMaskSet(boundaryMask))
258760
+ candidates.push(neighbor);
258761
+ };
258762
+ node.collectAroundFace(enqueueNeighboringFaces);
258763
+ }
258764
+ if (candidates.length === 0)
258765
+ return undefined;
258766
+ else {
258767
+ const front = candidates[0];
258768
+ while (candidates.length !== 0) {
258769
+ // try to find a node at the boundary of both the geometry and previous component
258770
+ const node = candidates.shift(); // shift may be inefficient for large queues
258771
+ if (node.vertexSuccessor.isMaskSet(ignoreMask))
258772
+ return node;
258773
+ if (node.edgeMate.isMaskSet(ignoreMask))
258774
+ return node;
258775
+ }
258776
+ return front;
258777
+ }
258778
+ }
258779
+ /**
258780
+ * Collect connected components of the graph (via Breadth First Search).
258781
+ * @param graph graph to inspect.
258782
+ * @param maxFaceCount (optional) maximum number of faces in each component. Should be positive; otherwise
258783
+ * `Infinity` is used.
258784
+ * @param ignoreMask (optional) mask preset on faces to ignore. Default value is `HalfEdgeMask.EXTERIOR` to ignore
258785
+ * exterior faces. Pass `HalfEdgeMask.NULL_MASK` to process all faces.
258786
+ * @returns the components of the graph, each component represented by an array of nodes, one node per face
258787
+ * of the component. In other words, entry [i][j] is a HalfEdge in the j_th face loop of the i_th component.
258788
+ */
258789
+ static collectConnectedComponents(graph, maxFaceCount = Infinity, ignoreMask = _Graph__WEBPACK_IMPORTED_MODULE_1__.HalfEdgeMask.EXTERIOR) {
258790
+ const components = [];
258791
+ if (graph.countMask(ignoreMask) === 0)
258792
+ ignoreMask = _Graph__WEBPACK_IMPORTED_MODULE_1__.HalfEdgeMask.NULL_MASK;
258793
+ const visitMask = _Graph__WEBPACK_IMPORTED_MODULE_1__.HalfEdgeMask.VISITED;
258794
+ const boundaryMask = visitMask | ignoreMask;
258795
+ // Starting with the input node, look ahead for a boundary face. Failing that, return the input node.
258796
+ // Starting all floods at the boundary reduces the chance of ending up with a ring-shaped component at the boundary.
258797
+ const findNextFloodSeed = (index) => {
258798
+ for (let i = index; i < graph.countNodes(); ++i) {
258799
+ if (!graph.allHalfEdges[i].isMaskSet(boundaryMask)
258800
+ && graph.allHalfEdges[i].edgeMate.isMaskSet(boundaryMask)) {
258801
+ index = i;
258802
+ break;
258803
+ }
258804
+ }
258805
+ return index;
258806
+ };
258807
+ for (let i = 0; i < graph.countNodes(); ++i) {
258808
+ if (graph.allHalfEdges[i].isMaskSet(boundaryMask))
258809
+ continue;
258810
+ const i0 = findNextFloodSeed(i);
258811
+ let seed = graph.allHalfEdges[i0];
258812
+ do { // flood this component
258813
+ const component = [];
258814
+ seed = HalfEdgeGraphSearch.exploreComponent(component, seed, visitMask, ignoreMask, maxFaceCount);
258815
+ if (component.length !== 0)
258816
+ components.push(component);
258817
+ } while (seed !== undefined);
258818
+ if (!graph.allHalfEdges[i].isMaskSet(visitMask))
258819
+ --i; // reprocess this node
258820
+ }
258821
+ return components;
258822
+ }
258625
258823
  /**
258626
258824
  * Test if test point (xTest,yTest) is inside/outside a face or on an edge.
258627
258825
  * @param seedNode any node on the face loop.
@@ -292255,7 +292453,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
292255
292453
  /***/ ((module) => {
292256
292454
 
292257
292455
  "use strict";
292258
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.4.0-dev.24","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 && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","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","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/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 -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -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 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"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.4.0-dev.24","@itwin/core-bentley":"workspace:^4.4.0-dev.24","@itwin/core-common":"workspace:^4.4.0-dev.24","@itwin/core-geometry":"workspace:^4.4.0-dev.24","@itwin/core-orbitgt":"workspace:^4.4.0-dev.24","@itwin/core-quantity":"workspace:^4.4.0-dev.24"},"//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":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.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/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
292456
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.4.0-dev.26","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 && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","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","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/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 -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -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 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"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.4.0-dev.26","@itwin/core-bentley":"workspace:^4.4.0-dev.26","@itwin/core-common":"workspace:^4.4.0-dev.26","@itwin/core-geometry":"workspace:^4.4.0-dev.26","@itwin/core-orbitgt":"workspace:^4.4.0-dev.26","@itwin/core-quantity":"workspace:^4.4.0-dev.26"},"//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":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.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/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
292259
292457
 
292260
292458
  /***/ })
292261
292459