Skip to content

Commit d381a14

Browse files
authored
Merge branch 'main' into const-get-root-tile
2 parents ecebbcd + e19684a commit d381a14

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
- Added `element_type` to `IntrusivePointer`, allowing it to be used with `std::pointer_types`.
1515
- Added implicit conversion of `IntrusivePointer<T>` to `T*`.
1616

17+
##### Fixes :wrench:
18+
19+
- Fixed a bug in `Tileset::updateViewGroupOffline` that would cause it to get stuck in an endless loop when invoked with no frustums.
20+
1721
### v0.50.0 - 2025-08-01
1822

1923
##### Breaking Changes :mega:

Cesium3DTilesSelection/src/Tileset.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,12 @@ const ViewUpdateResult& Tileset::updateViewGroupOffline(
330330
while (viewGroup.getPreviousLoadProgressPercentage() < 100.0f) {
331331
this->_externals.pAssetAccessor->tick();
332332
this->loadTiles();
333+
334+
// If there are no frustums, we'll never make any progress. So break here to
335+
// avoid getting stuck in an endless loop.
336+
if (frustums.empty())
337+
break;
338+
333339
this->updateViewGroup(viewGroup, frustums, 0.0f);
334340
}
335341

Cesium3DTilesSelection/test/TestTilesetSelectionAlgorithm.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,13 @@ TEST_CASE("Test replace refinement for render") {
550550
REQUIRE(result.culledTilesVisited == 0);
551551
}
552552
}
553+
554+
SUBCASE(
555+
"updateViewGroupOffline does not get stuck in an endless loop when no "
556+
"frustums are given") {
557+
std::vector<ViewState> empty;
558+
tileset.updateViewGroupOffline(tileset.getDefaultViewGroup(), empty);
559+
}
553560
}
554561

555562
TEST_CASE("Test additive refinement") {

0 commit comments

Comments
 (0)