Skip to content

Commit 36bb4ec

Browse files
author
Hannah
authored
Merge branch 'master' into master
2 parents 8ffa22f + 15eaa73 commit 36bb4ec

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Change Log
1818
* Fixed an issue where scaling near zero with an model animation could cause rendering to stop. [#6954](https://github.com/AnalyticalGraphicsInc/cesium/pull/6954)
1919
* Fixed bug where credits weren't displaying correctly if more than one viewer was initialized [#6965](expect(https://github.com/AnalyticalGraphicsInc/cesium/issues/6965)
2020
* Fixed entity show issues. [#7048](https://github.com/AnalyticalGraphicsInc/cesium/issues/7048)
21+
* 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)
2122

2223
### 1.49 - 2018-09-04
2324

Source/Core/GroundPolylineGeometry.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,6 @@ define([
697697
var normalNudgeScratch = new Cartesian3();
698698

699699
var scratchBoundingSpheres = [new BoundingSphere(), new BoundingSphere()];
700-
var boundingSphereCenterCartographicScratch = new Cartographic();
701700

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

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

10711066
var attributes = {
10721067
position : new GeometryAttribute({

Specs/Core/GroundPolylineGeometrySpec.js

+1
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ defineSuite([
555555
var pointsDistance = Cartesian3.distance(positions[0], positions[1]);
556556

557557
expect(boundingSphere.radius > pointsDistance).toBe(true);
558+
expect(boundingSphere.radius > 1000.0).toBe(true); // starting top/bottom height
558559
});
559560

560561
var packedInstance = [positions.length];

0 commit comments

Comments
 (0)