Skip to content

Commit 650066a

Browse files
author
Joshua Bernstein
authored
Merge branch 'master' into 5819_fix_for_empty_icon_tag
2 parents 5f5cb33 + c292a33 commit 650066a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+466
-158
lines changed

.gitattributes

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Auto detect text files and perform LF normalization
2-
* text=auto
2+
* text=auto
3+
package.json text eol=lf

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Thumbs.db
2424
/node_modules
2525
npm-debug.log
2626
npm-debug.log.*
27+
package-lock.json
2728

2829
# WebStorm user-specific
2930
.idea/workspace.xml

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- "6"
3+
- "8"
44
sudo: false
55
before_script:
66
- export DISPLAY=:99.0

Apps/Sandcastle/gallery/3D Models Coloring.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
viewer.entities.removeAll();
173173

174174
var position = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, height);
175-
var heading = -Cesium.Math.toRadians(135);
175+
var heading = Cesium.Math.toRadians(135);
176176
var pitch = 0;
177177
var roll = 0;
178178
var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);

Apps/Sandcastle/gallery/Classification.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
var center = new Cesium.Cartesian3(1216378.730451297, -4736275.917774027, 4081266.871000864);
5858
var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
59-
var hprRotation = Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(-2.619728786416368, 0.0, 0.0));
59+
var hprRotation = Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(2.619728786416368, 0.0, 0.0));
6060
var hpr = Cesium.Matrix4.fromRotationTranslation(hprRotation, new Cesium.Cartesian3(0.0, 0.0, -2.0));
6161
Cesium.Matrix4.multiply(modelMatrix, hpr, modelMatrix);
6262

@@ -91,7 +91,7 @@
9191

9292
var center = new Cesium.Cartesian3(1216398.6054139996, -4736204.533089285, 4081338.6585485404);
9393
var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
94-
var hprRotation = Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(-5.785339046755887, 0.0, 0.0));
94+
var hprRotation = Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(5.785339046755887, 0.0, 0.0));
9595
var hpr = Cesium.Matrix4.fromRotationTranslation(hprRotation, new Cesium.Cartesian3(0.4, 0.0, -2.0));
9696
Cesium.Matrix4.multiply(modelMatrix, hpr, modelMatrix);
9797

@@ -111,7 +111,7 @@
111111

112112
center = new Cesium.Cartesian3(1216394.3346955755, -4736207.431365568, 4081336.7768881875);
113113
modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
114-
hprRotation = Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(-5.785339046755887, 0.0, 0.0));
114+
hprRotation = Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(5.785339046755887, 0.0, 0.0));
115115
hpr = Cesium.Matrix4.fromRotationTranslation(hprRotation, new Cesium.Cartesian3(-0.25, 0.0, -2.0));
116116
Cesium.Matrix4.multiply(modelMatrix, hpr, modelMatrix);
117117

Apps/Sandcastle/gallery/Custom Geocoder.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
* @returns {Promise<GeocoderResult[]>}
5252
*/
5353
OpenStreetMapNominatimGeocoder.prototype.geocode = function (input) {
54-
var endpoint = 'http://nominatim.openstreetmap.org/search?';
54+
var endpoint = 'https://nominatim.openstreetmap.org/search?';
5555
var query = 'format=json&q=' + input;
5656
var requestString = endpoint + query;
5757
return Cesium.loadJson(requestString)

Apps/Sandcastle/gallery/Distance Display Conditions.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
var position = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883, 0.0);
5656
var heading = Cesium.Math.toRadians(135);
57-
var hpr = new Cesium.HeadingPitchRoll(-heading, 0.0, 0.0);
57+
var hpr = new Cesium.HeadingPitchRoll(heading, 0.0, 0.0);
5858
var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, hpr);
5959

6060
viewer.entities.add({

Apps/Sandcastle/gallery/Projection.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
viewer.projectionPicker.viewModel.switchToOrthographic();
3737

3838
var position = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, 0.0);
39-
var hpr = new Cesium.HeadingPitchRoll(-Cesium.Math.toRadians(135), 0.0, 0.0);
39+
var hpr = new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(135), 0.0, 0.0);
4040
var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, hpr);
4141

4242
var entity = viewer.entities.add({

Apps/Sandcastle/gallery/development/3D Models.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@
123123

124124
function createModel(url, height, heading, pitch, roll) {
125125
height = Cesium.defaultValue(height, 0.0);
126-
heading = -Cesium.defaultValue(heading, 0.0);
127-
pitch = -Cesium.defaultValue(pitch, 0.0);
126+
heading = Cesium.defaultValue(heading, 0.0);
127+
pitch = Cesium.defaultValue(pitch, 0.0);
128128
roll = Cesium.defaultValue(roll, 0.0);
129129
var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);
130130

CHANGES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ Change Log
22
==========
33
### 1.39 - 2017-11-01
44

5+
* Added support for the layer.json `parentUrl` property in `CesiumTerrainProvider` to allow for compositing of tilesets.
56
* Fixed bug with placemarks in imported KML: placemarks with no specified icon would be displayed with default icon. [#5819](https://github.com/AnalyticalGraphicsInc/cesium/issues/5819)
67

78
### 1.38 - 2017-10-02
89

910
* Breaking changes
10-
* `HeadingPitchRoll.fromQuaternion`, `Matrix3.fromHeadingPitchRoll`, `Quaternion.fromHeadingPitchRoll`, `Transforms.headingPitchRollToFixedFrame`, and `Transforms.headingPitchRollQuaternion` now use the classical orientation of heading and pitch calculated counter-clockwise. With this new behavior, heading and pitch need to be the negative of their previous values. The warning message will be removed in Cesium 1.40.[#5666](https://github.com/AnalyticalGraphicsInc/cesium/issues/5666)
1111
* `Scene/CullingVolume` has been removed. Use `Core/CullingVolume`.
1212
* `Scene/OrthographicFrustum` has been removed. Use `Core/OrthographicFrustum`.
1313
* `Scene/OrthographicOffCenterFrustum` has been removed. Use `Core/OrthographicOffCenterFrustum`.

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Before we can merge a pull request, we require a signed Contributor License Agre
5555
* [individuals](Documentation/Contributors/CLAs/individual-cla-agi-v1.0.txt) and
5656
* [corporations](Documentation/Contributors/CLAs/corporate-cla-agi-v1.0.txt).
5757

58-
This only needs to be completed once. The CLA ensures you retain copyright to your contributions, and we have the right to use them and incorporate them into Cesium using the [Apache 2.0 License](LICENSE.md).
58+
This only needs to be completed once, and enables contributions to all of the projects under the [Analytical Graphics Inc](https://github.com/AnalyticalGraphicsInc) organization, including Cesium. The CLA ensures you retain copyright to your contributions, and provides us the right to use, modify, and redistribute your contributions using the [Apache 2.0 License](LICENSE.md).
5959

6060
Please email a completed CLA with all fields filled in to [cla@agi.com](mailto:cla@agi.com). Related questions are also welcome.
6161

@@ -82,6 +82,6 @@ Our code is our lifeblood so maintaining Cesium's high code quality is important
8282

8383
# Code of Conduct
8484

85-
One of Cesium's strengths is our community. Our contributors and users are pushing the 3D geospatial field to amazing new levels. We rely on an open, friendly, inclusive environment to facilitate this. As such, we follow the [Contributor Covenant](http://contributor-covenant.org/)'s [Code of Conduct](http://contributor-covenant.org/version/1/4/code_of_conduct.md) to ensure a harassment-free experience in the Cesium community. Any unacceptable behavior can be confidentiality sent to the core team at pcozzi@agi.com.
85+
One of Cesium's strengths is our community. Our contributors and users are pushing the 3D geospatial field to amazing new levels. We rely on an open, friendly, inclusive environment to facilitate this. As such, we follow the [Contributor Covenant](http://contributor-covenant.org/)'s [Code of Conduct](http://contributor-covenant.org/version/1/4/code_of_conduct.md) to ensure a harassment-free experience in the Cesium community. Any unacceptable behavior can be confidentially sent to the core team at pcozzi@agi.com.
8686

8787
This applies to the main Cesium repo, forum, twitter, and all channels, including all repos in the [AnalyticalGraphicsInc](https://github.com/AnalyticalGraphicsInc) GitHub organization.

CONTRIBUTORS.md

-1
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
160160
* [Rishabh Shah](https://github.com/rms13)
161161
* [Rudraksha Shah](https://github.com/Rudraksha20)
162162
* [Cody Guldner](https://github.com/burn123)
163-
* [Florent Cayré](https://github.com/fcayre)
164163
* [Nacho Carnicero](https://github.com/nacho-carnicero)

Source/Core/BoundingSphere.js

+17-11
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ define([
7272
* The bounding sphere is computed by running two algorithms, a naive algorithm and
7373
* Ritter's algorithm. The smaller of the two spheres is used to ensure a tight fit.
7474
*
75-
* @param {Cartesian3[]} positions An array of points that the bounding sphere will enclose. Each point must have <code>x</code>, <code>y</code>, and <code>z</code> properties.
75+
* @param {Cartesian3[]} [positions] An array of points that the bounding sphere will enclose. Each point must have <code>x</code>, <code>y</code>, and <code>z</code> properties.
7676
* @param {BoundingSphere} [result] The object onto which to store the result.
7777
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
7878
*
@@ -223,7 +223,7 @@ define([
223223
/**
224224
* Computes a bounding sphere from a rectangle projected in 2D.
225225
*
226-
* @param {Rectangle} rectangle The rectangle around which to create a bounding sphere.
226+
* @param {Rectangle} [rectangle] The rectangle around which to create a bounding sphere.
227227
* @param {Object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
228228
* @param {BoundingSphere} [result] The object onto which to store the result.
229229
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
@@ -236,7 +236,7 @@ define([
236236
* Computes a bounding sphere from a rectangle projected in 2D. The bounding sphere accounts for the
237237
* object's minimum and maximum heights over the rectangle.
238238
*
239-
* @param {Rectangle} rectangle The rectangle around which to create a bounding sphere.
239+
* @param {Rectangle} [rectangle] The rectangle around which to create a bounding sphere.
240240
* @param {Object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
241241
* @param {Number} [minimumHeight=0.0] The minimum height over the rectangle.
242242
* @param {Number} [maximumHeight=0.0] The maximum height over the rectangle.
@@ -282,7 +282,7 @@ define([
282282
* Computes a bounding sphere from a rectangle in 3D. The bounding sphere is created using a subsample of points
283283
* on the ellipsoid and contained in the rectangle. It may not be accurate for all rectangles on all types of ellipsoids.
284284
*
285-
* @param {Rectangle} rectangle The valid rectangle used to create a bounding sphere.
285+
* @param {Rectangle} [rectangle] The valid rectangle used to create a bounding sphere.
286286
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid used to determine positions of the rectangle.
287287
* @param {Number} [surfaceHeight=0.0] The height above the surface of the ellipsoid.
288288
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -292,11 +292,17 @@ define([
292292
ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
293293
surfaceHeight = defaultValue(surfaceHeight, 0.0);
294294

295-
var positions;
296-
if (defined(rectangle)) {
297-
positions = Rectangle.subsample(rectangle, ellipsoid, surfaceHeight, fromRectangle3DScratch);
295+
if (!defined(result)) {
296+
result = new BoundingSphere();
297+
}
298+
299+
if (!defined(rectangle)) {
300+
result.center = Cartesian3.clone(Cartesian3.ZERO, result.center);
301+
result.radius = 0.0;
302+
return result;
298303
}
299304

305+
var positions = Rectangle.subsample(rectangle, ellipsoid, surfaceHeight, fromRectangle3DScratch);
300306
return BoundingSphere.fromPoints(positions, result);
301307
};
302308

@@ -306,7 +312,7 @@ define([
306312
* algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
307313
* ensure a tight fit.
308314
*
309-
* @param {Number[]} positions An array of points that the bounding sphere will enclose. Each point
315+
* @param {Number[]} [positions] An array of points that the bounding sphere will enclose. Each point
310316
* is formed from three elements in the array in the order X, Y, Z.
311317
* @param {Cartesian3} [center=Cartesian3.ZERO] The position to which the positions are relative, which need not be the
312318
* origin of the coordinate system. This is useful when the positions are to be used for
@@ -489,9 +495,9 @@ define([
489495
* algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
490496
* ensure a tight fit.
491497
*
492-
* @param {Number[]} positionsHigh An array of high bits of the encoded cartesians that the bounding sphere will enclose. Each point
498+
* @param {Number[]} [positionsHigh] An array of high bits of the encoded cartesians that the bounding sphere will enclose. Each point
493499
* is formed from three elements in the array in the order X, Y, Z.
494-
* @param {Number[]} positionsLow An array of low bits of the encoded cartesians that the bounding sphere will enclose. Each point
500+
* @param {Number[]} [positionsLow] An array of low bits of the encoded cartesians that the bounding sphere will enclose. Each point
495501
* is formed from three elements in the array in the order X, Y, Z.
496502
* @param {BoundingSphere} [result] The object onto which to store the result.
497503
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
@@ -700,7 +706,7 @@ define([
700706
/**
701707
* Computes a tight-fitting bounding sphere enclosing the provided array of bounding spheres.
702708
*
703-
* @param {BoundingSphere[]} boundingSpheres The array of bounding spheres.
709+
* @param {BoundingSphere[]} [boundingSpheres] The array of bounding spheres.
704710
* @param {BoundingSphere} [result] The object onto which to store the result.
705711
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
706712
*/

0 commit comments

Comments
 (0)