Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannah authored Sep 20, 2018
2 parents 8ffa22f + 15eaa73 commit 36bb4ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Change Log
* Fixed an issue where scaling near zero with an model animation could cause rendering to stop. [#6954](https://github.com/AnalyticalGraphicsInc/cesium/pull/6954)
* Fixed bug where credits weren't displaying correctly if more than one viewer was initialized [#6965](expect(https://github.com/AnalyticalGraphicsInc/cesium/issues/6965)
* Fixed entity show issues. [#7048](https://github.com/AnalyticalGraphicsInc/cesium/issues/7048)
* Fixed a bug where polylines on terrain covering very large portions of the globe would cull incorrectly in 3d-only scenes. [#7043](https://github.com/AnalyticalGraphicsInc/cesium/issues/7043)

### 1.49 - 2018-09-04

Expand Down
9 changes: 2 additions & 7 deletions Source/Core/GroundPolylineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,6 @@ define([
var normalNudgeScratch = new Cartesian3();

var scratchBoundingSpheres = [new BoundingSphere(), new BoundingSphere()];
var boundingSphereCenterCartographicScratch = new Cartographic();

// Winding order is reversed so each segment's volume is inside-out
var REFERENCE_INDICES = [
Expand Down Expand Up @@ -1061,12 +1060,8 @@ define([
BoundingSphere.fromVertices(topPositionsArray, Cartesian3.ZERO, 3, boundingSpheres[1]);
var boundingSphere = BoundingSphere.fromBoundingSpheres(boundingSpheres);

// Adjust bounding sphere height and radius to cover whole volume
var midHeight = sumHeights / (segmentCount * 2.0);
var boundingSphereCenterCartographic = Cartographic.fromCartesian(boundingSphere.center, ellipsoid, boundingSphereCenterCartographicScratch);
boundingSphereCenterCartographic.height = midHeight;
boundingSphere.center = Cartographic.toCartesian(boundingSphereCenterCartographic, ellipsoid, boundingSphere.center);
boundingSphere.radius = Math.max(boundingSphere.radius, midHeight);
// Adjust bounding sphere height and radius to cover more of the volume
boundingSphere.radius += sumHeights / (segmentCount * 2.0);

var attributes = {
position : new GeometryAttribute({
Expand Down
1 change: 1 addition & 0 deletions Specs/Core/GroundPolylineGeometrySpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ defineSuite([
var pointsDistance = Cartesian3.distance(positions[0], positions[1]);

expect(boundingSphere.radius > pointsDistance).toBe(true);
expect(boundingSphere.radius > 1000.0).toBe(true); // starting top/bottom height
});

var packedInstance = [positions.length];
Expand Down

0 comments on commit 36bb4ec

Please sign in to comment.