Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial ellipsoid #5995

Merged
merged 72 commits into from
Sep 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
fc58ff0
Update EllipsoidGeometry.js
srtrotter Oct 3, 2017
81d013c
Update EllipsoidOutlineGeometry.js
srtrotter Oct 3, 2017
e379f89
Update CzmlDataSource.js
srtrotter Oct 3, 2017
899ed31
Update EllipsoidGeometryUpdater.js
srtrotter Oct 3, 2017
c3ae3ff
Update EllipsoidGeometryUpdater.js
srtrotter Oct 3, 2017
3ff9459
Update EllipsoidGraphics.js
srtrotter Oct 3, 2017
dd4c52b
Added new options in dynamic update function
srtrotter Nov 21, 2017
8ce606a
Added TODOs where needed
srtrotter Nov 21, 2017
613dc63
Added srtrotter to contributors
srtrotter Nov 21, 2017
4e373e3
Added entry for partial ellipsoid volumes
srtrotter Nov 21, 2017
3e8f06f
Merge branch 'master' into partial-ellipsoid
srtrotter Nov 21, 2017
18ebf67
Updated based on feedback
srtrotter Nov 29, 2017
13ca0f7
Updated EllipsoidOutlineGeometry.js based on feedback
srtrotter Nov 29, 2017
a4af472
Used CesiumMath where applicable
srtrotter Nov 29, 2017
48068df
Renamed variables based on feedback
srtrotter Nov 29, 2017
668530e
Renambed variables based on feedback
srtrotter Nov 29, 2017
e821b77
Renamed variables based on feedback
srtrotter Nov 29, 2017
da14f40
Fixed errors in comment descriptions
srtrotter Nov 29, 2017
d7047d1
Used CesiumMath where applicable
srtrotter Nov 29, 2017
859fea7
Fixed normals and texture coordinates
srtrotter Nov 30, 2017
c74c4c8
Updated azimuth definition
srtrotter Nov 30, 2017
4a081e6
Updated az/el definition comments
srtrotter Nov 30, 2017
aafa6fd
Fixed typo and wrong increment
srtrotter Nov 30, 2017
f52ac07
Added partial ellipsoid file
srtrotter Nov 30, 2017
9d7541d
Fixed normals if top/bottom are open
srtrotter Dec 1, 2017
1aeb1ab
Delete Partial Ellipsoid.html
srtrotter Dec 1, 2017
8532e1c
Added partial ellipsoid examples
srtrotter Dec 1, 2017
e1c0796
Fixed typos
srtrotter Dec 1, 2017
595fa8e
Merge branch 'master' into partial-ellipsoid
srtrotter Dec 1, 2017
3d99a52
Fixed bug when calculating tangent
srtrotter Dec 4, 2017
5a8a616
Fixed typo
srtrotter Dec 4, 2017
dc622fa
Trying to fix testing
srtrotter Dec 4, 2017
7fc91d9
Reverted previous change
srtrotter Dec 5, 2017
5cb6217
Merge branch 'master' into partial-ellipsoid
pjcozzi Dec 22, 2017
941f303
Updated CzmlDataSource.js based on findings
srtrotter Jan 11, 2018
9719d93
Fixed merge
srtrotter Jan 11, 2018
4ac7d30
Updated EllipsoidGeometry.js based on findings
srtrotter Jan 11, 2018
c4d6401
Added unit tests for partial ellipsoids
srtrotter Jan 12, 2018
124f9ee
Renamed az/el to clock/cone
srtrotter Jan 12, 2018
78e662f
Update EllipsoidGraphics.js
srtrotter Jan 12, 2018
89e50b1
Renamed az/el to clock/cone.
srtrotter Jan 12, 2018
96414d7
Added unit tests for outlines on partial ellipsoids
srtrotter Jan 12, 2018
852c174
Fixed typos and tweaked examples
srtrotter Jan 12, 2018
4a872ed
Updated change description and moved to 1.42
srtrotter Jan 12, 2018
bc8faee
Merge branch 'master' into partial-ellipsoid
srtrotter Jan 12, 2018
32bf68f
Updated how extra slice/stack are applied
srtrotter Jan 12, 2018
954a618
Updated how extra slice/stack are applied
srtrotter Jan 12, 2018
7ddf64f
Tweak CHANGES.md
pjcozzi Jan 20, 2018
8c1cd56
Merge remote-tracking branch 'cesium/master' into partial-ellipsoid
nahgrin Oct 9, 2018
49d39a9
Update ellipsoid geometry to fix issues from merge.
nahgrin Oct 11, 2018
7564548
Fixed 2D crashing on partial ellipsoid
nahgrin Nov 2, 2018
5d68ee0
Fixed es-lint changes
nahgrin Nov 2, 2018
fb212dc
Updated EllipsoidGeometry tests to increase coverage of file
nahgrin Nov 5, 2018
fce6d19
Updated EllipsoidGeometrySpec to fully cover the file
nahgrin Nov 5, 2018
acc3c53
Updated barycentricCoordinates test to cover the avoid divide by zero
nahgrin Nov 5, 2018
15c17f1
Covered Partial Ellipsoid functionality in EllipsoidGeometryUpdater spec
nahgrin Nov 15, 2018
0867f9e
Updated EllipsiodGraphicsSpec to cover Partial Ellipsoid functionality
nahgrin Nov 15, 2018
0265054
Cleaned up eslint issues
nahgrin Nov 15, 2018
abe35b0
Fixed computing tangents in Ellipsoid Geometry for partial ellipsoids
nahgrin Nov 16, 2018
fa08985
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
nahgrin May 30, 2019
51dbad3
Updated contributers list
nahgrin May 30, 2019
8fd124a
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
nahgrin Jun 6, 2019
44b1478
Merge branch 'master' into partial-ellipsoid
srtrotter Jun 12, 2019
5a67857
Fixed error in merge
srtrotter Jun 12, 2019
48abe88
Merge branch 'master' into partial-ellipsoid
Sep 18, 2019
f8211e8
fix whitespace
Sep 18, 2019
dae1851
sandcastle example cleanup
Sep 18, 2019
9eaac4c
clean up CHANGES.md
Sep 18, 2019
708cccc
final cleanup
Sep 18, 2019
de4e640
Update Spheres and Ellipsoids.html
Sep 18, 2019
414d9d4
Merge remote-tracking branch 'public-cesium/master' into partial-elli…
Sep 18, 2019
48a7987
CHANGES.md
Sep 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
208 changes: 208 additions & 0 deletions Apps/Sandcastle/gallery/Partial Ellipsoids.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="Draw whole/partial spheres and ellipsoids.">
<meta name="cesium-sandcastle-labels" content="Geometries">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
<script type="text/javascript">
if(typeof require === 'function') {
require.config({
baseUrl : '../../../Source',
waitSeconds : 120
});
}
</script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
function startup(Cesium) {
'use strict';
//Sandcastle_Begin
var viewer = new Cesium.Viewer('cesiumContainer');

var saturnPosition = Cesium.Cartesian3.fromDegrees(-95.0, 45.0, 300000.0);
viewer.entities.add({
name : 'Saturn',
position: saturnPosition,
ellipsoid : {
radii : new Cesium.Cartesian3(200000.0, 200000.0, 200000.0),
material : new Cesium.Color(0.95, 0.82, 0.49)
}
});

viewer.entities.add({
name : "Saturn's inner ring",
position: saturnPosition,
orientation : Cesium.Transforms.headingPitchRollQuaternion(
saturnPosition,
new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(30.0), Cesium.Math.toRadians(30.0), 0.0)
),
ellipsoid : {
radii : new Cesium.Cartesian3(400000.0, 400000.0, 400000.0),
innerRadii : new Cesium.Cartesian3(300000.0, 300000.0, 300000.0),
minimumCone : Cesium.Math.toRadians(89.8),
maximumCone : Cesium.Math.toRadians(90.2),
material : new Cesium.Color(0.95, 0.82, 0.49, 0.5)
}
});

viewer.entities.add({
name : "Saturn's outer ring",
position: saturnPosition,
orientation : Cesium.Transforms.headingPitchRollQuaternion(
saturnPosition,
new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(30.0), Cesium.Math.toRadians(30.0), 0.0)
),
ellipsoid : {
radii : new Cesium.Cartesian3(460000.0, 460000.0, 460000.0),
innerRadii : new Cesium.Cartesian3(415000.0, 415000.0, 415000.0),
minimumCone : Cesium.Math.toRadians(89.8),
maximumCone : Cesium.Math.toRadians(90.2),
material : new Cesium.Color(0.95, 0.82, 0.49, 0.5)
}
});

viewer.entities.add({
name : 'Dome',
position: Cesium.Cartesian3.fromDegrees(-120.0, 40.0),
ellipsoid : {
radii : new Cesium.Cartesian3(200000.0, 200000.0, 200000.0),
maximumCone : Cesium.Math.PI_OVER_TWO,
material : Cesium.Color.BLUE.withAlpha(0.3),
outline : true
}
});

viewer.entities.add({
name : 'Dome with inner radius',
position: Cesium.Cartesian3.fromDegrees(-114.0, 40.0),
ellipsoid : {
radii : new Cesium.Cartesian3(250000.0, 200000.0, 150000.0),
innerRadii : new Cesium.Cartesian3(100000.0, 80000.0, 60000.0),
maximumCone : Cesium.Math.PI_OVER_TWO,
material : Cesium.Color.RED.withAlpha(0.3),
outline : true
}
});

viewer.entities.add({
name : 'Dome with top cut out',
position: Cesium.Cartesian3.fromDegrees(-108.0, 40.0),
ellipsoid : {
radii : new Cesium.Cartesian3(200000.0, 200000.0, 200000.0),
innerRadii : new Cesium.Cartesian3(100000.0, 100000.0, 100000.0),
minimumCone : Cesium.Math.toRadians(20.0),
maximumCone : Cesium.Math.PI_OVER_TWO,
material : Cesium.Color.YELLOW.withAlpha(0.3),
outline : true
}
});

viewer.entities.add({
name : 'Top and bottom cut out',
position: Cesium.Cartesian3.fromDegrees(-102.0, 40.0, 140000.0),
ellipsoid : {
radii : new Cesium.Cartesian3(200000.0, 200000.0, 200000.0),
innerRadii : new Cesium.Cartesian3(100000.0, 100000.0, 100000.0),
minimumCone : Cesium.Math.toRadians(60.0),
maximumCone : Cesium.Math.toRadians(140.0),
material : Cesium.Color.DARKCYAN.withAlpha(0.3),
outline : true
}
});

viewer.entities.add({
name : 'Bowl',
position: Cesium.Cartesian3.fromDegrees(-96.0, 39.5, 200000.0),
ellipsoid : {
radii : new Cesium.Cartesian3(200000.0, 200000.0, 200000.0),
innerRadii : new Cesium.Cartesian3(180000.0, 180000.0, 180000.0),
minimumCone : Cesium.Math.toRadians(110.0),
material : Cesium.Color.GREEN.withAlpha(0.3),
outline : true
}
});

viewer.entities.add({
name : 'Clock cutout',
position: Cesium.Cartesian3.fromDegrees(-90.0, 39.0),
ellipsoid : {
radii : new Cesium.Cartesian3(200000.0, 200000.0, 200000.0),
innerRadii : new Cesium.Cartesian3(150000.0, 150000.0, 150000.0),
minimumClock : Cesium.Math.toRadians(-90.0),
maximumClock : Cesium.Math.toRadians(180.0),
minimumCone : Cesium.Math.toRadians(20.0),
maximumCone : Cesium.Math.toRadians(70.0),
material : Cesium.Color.BLUE.withAlpha(0.3),
outline : true
}
});

viewer.entities.add({
name : 'Partial dome',
position: Cesium.Cartesian3.fromDegrees(-84.0, 38.5),
ellipsoid : {
radii : new Cesium.Cartesian3(200000.0, 200000.0, 200000.0),
minimumClock : Cesium.Math.toRadians(-90.0),
maximumClock : Cesium.Math.toRadians(180.0),
maximumCone : Cesium.Math.toRadians(90.0),
material : Cesium.Color.RED.withAlpha(0.3),
outline : true
}
});

viewer.entities.add({
name : 'Wedge',
position : Cesium.Cartesian3.fromDegrees(-102.0, 35.0, 20000.0),
orientation : Cesium.Transforms.headingPitchRollQuaternion(
Cesium.Cartesian3.fromDegrees(-102.0, 35.0, 20000.0),
new Cesium.HeadingPitchRoll(Cesium.Math.PI / 1.5, 0, 0.0)
),
ellipsoid : {
radii : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0),
innerRadii : new Cesium.Cartesian3(10000.0, 10000.0, 10000.0),
minimumClock : Cesium.Math.toRadians(-15.0),
maximumClock : Cesium.Math.toRadians(15.0),
minimumCone : Cesium.Math.toRadians(75.0),
maximumCone : Cesium.Math.toRadians(105.0),
material : Cesium.Color.DARKCYAN.withAlpha(0.3),
outline : true
}
});
viewer.entities.add({
name : 'Partial ellipsoid',
position : Cesium.Cartesian3.fromDegrees(-95.0, 34.0),
ellipsoid : {
radii : new Cesium.Cartesian3(300000.0, 300000.0, 300000.0),
innerRadii : new Cesium.Cartesian3(70000.0, 70000.0, 70000.0),
minimumClock : Cesium.Math.toRadians(180.0),
maximumClock : Cesium.Math.toRadians(400.0),
maximumCone : Cesium.Math.toRadians(90.0),
material : Cesium.Color.DARKCYAN.withAlpha(0.3),
outline : true
}
});

viewer.zoomTo(viewer.entities);
//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== 'undefined') {
startup(Cesium);
} else if (typeof require === 'function') {
require(['Cesium'], startup);
}
</script>
</body>
</html>
Binary file added Apps/Sandcastle/gallery/Partial Ellipsoids.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions Apps/Sandcastle/gallery/Spheres and Ellipsoids.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
<script type="text/javascript">
require.config({
baseUrl : '../../../Source',
waitSeconds : 60
});
if(typeof require === 'function') {
require.config({
baseUrl : '../../../Source',
waitSeconds : 120
});
}
</script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Change Log

### 1.62 - 2019-10-01

##### Additions :tada:
* Added ability to create partial ellipsoids using both the Entity API and CZML. New ellipsoid geometry properties: `innerRadii`, `minimumClock`, `maximumClock`, `minimumCone`, and `maximumCone`. This affects both `EllipsoidGeometry` and `EllipsoidOutlineGeometry`. See the updated [Sandcastle example](https://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Partial%20Ellipsoids.html&label=Geometries). [#5995](https://github.com/AnalyticalGraphicsInc/cesium/pull/5995)

##### Fixes :wrench:
* `Camera.flyTo` flies to the correct location in 2D when the destination crosses the international date line [#7909](https://github.com/AnalyticalGraphicsInc/cesium/pull/7909)

Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Brandon Barker](https://github.com/ProjectBarks)
* [Peter Gagliardi](https://github.com/ptrgags)
* [Ian Lilley](https://github.com/IanLilleyT)
* [Northrop Grumman](http://www.northropgrumman.com)
* [Joseph Stein](https://github.com/nahgrin)

## [Individual CLA](Documentation/Contributors/CLAs/individual-contributor-license-agreement-v1.0.pdf)
* [Victor Berchet](https://github.com/vicb)
Expand Down Expand Up @@ -205,6 +207,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Cody Guldner](https://github.com/burn123)
* [Nacho Carnicero](https://github.com/nacho-carnicero)
* [Y.Selim Abidin](https://github.com/SelimAbidin)
* [Steven Trotter](https://github.com/srtrotter)
* [Tamar Cohen](https://github.com/tamarmot)
* [Stephen Wiseman](https://github.com/srwiseman)
* [Gabriel Macario](https://github.com/gabriel-macario)
Expand Down
Loading