Skip to content

Commit

Permalink
Fixed traversal bug when skipLevelOfDetail is false
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Oct 2, 2017
1 parent e80757a commit 80b6162
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Change Log
* Fixed a 3D Tiles point cloud bug causing a stray point to appear at the center of the screen on certain hardware. [#5599](https://github.com/AnalyticalGraphicsInc/cesium/issues/5599)
* Fixed removing multiple event listeners within event callbacks. [#5827](https://github.com/AnalyticalGraphicsInc/cesium/issues/5827)
* Running `buildApps` now creates a built version of Sandcastle which uses the built version of Cesium for better performance.
* Fixed a tileset traversal bug when the `skipLevelOfDetail` optimization is off. [#5869](https://github.com/AnalyticalGraphicsInc/cesium/issues/5869)

### 1.37 - 2017-09-01

Expand Down
11 changes: 9 additions & 2 deletions Source/Scene/Cesium3DTilesetTraversal.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ define([
if (!tile.hasTilesetContent) {
if (tile.refine === Cesium3DTileRefine.ADD) {
// Always load additive tiles
loadTile(tileset, tile, this.frameState);
loadTile(tileset, tile, this.frameState, true);
if (hasAdditiveContent(tile)) {
tileset._desiredTiles.push(tile);
}
Expand Down Expand Up @@ -635,9 +635,16 @@ define([
}
}

function checkAdditiveVisibility(tileset, tile, frameState) {
if (defined(tile.parent) && (tile.parent.refine === Cesium3DTileRefine.ADD)) {
return isVisibleAndMeetsSSE(tileset, tile, frameState);
}
return true;
}

function loadTile(tileset, tile, frameState, checkVisibility) {
if ((tile.contentUnloaded || tile.contentExpired) && tile._requestedFrame !== frameState.frameNumber) {
if (!checkVisibility || isVisibleAndMeetsSSE(tileset, tile, frameState)) {
if (!checkVisibility || checkAdditiveVisibility(tileset, tile, frameState)) {
tile._requestedFrame = frameState.frameNumber;
tileset._requestedTiles.push(tile);
}
Expand Down

0 comments on commit 80b6162

Please sign in to comment.