Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CesiumGS/cesium
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 067113c5519236fdef3cdfdd9121f0b38c42b10c
Choose a base ref
..
head repository: CesiumGS/cesium
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7b4b727b3137a63773d9f5323aae9f0c901fa7ac
Choose a head ref
Showing with 1,514 additions and 103 deletions.
  1. +15 −0 Apps/Sandcastle/gallery/Polygon.html
  2. +12 −1 Apps/Sandcastle/gallery/Polyline.html
  3. +21 −0 Apps/Sandcastle/gallery/development/Ground Primitive.html
  4. +14 −0 Apps/Sandcastle/gallery/development/Polylines.html
  5. +4 −0 CHANGES.md
  6. +39 −0 Source/Core/ArcType.js
  7. +73 −10 Source/Core/GroundPolylineGeometry.js
  8. +25 −10 Source/Core/PolygonGeometry.js
  9. +72 −7 Source/Core/PolygonGeometryLibrary.js
  10. +47 −11 Source/Core/PolygonOutlineGeometry.js
  11. +154 −0 Source/Core/PolygonPipeline.js
  12. +51 −21 Source/Core/PolylineGeometry.js
  13. +164 −0 Source/Core/PolylinePipeline.js
  14. +44 −13 Source/Core/SimplePolylineGeometry.js
  15. +1 −1 Source/DataSources/Entity.js
  16. +4 −0 Source/DataSources/GeoJsonDataSource.js
  17. +6 −0 Source/DataSources/PolygonGeometryUpdater.js
  18. +13 −0 Source/DataSources/PolygonGraphics.js
  19. +33 −3 Source/DataSources/PolylineGeometryUpdater.js
  20. +19 −3 Source/DataSources/PolylineGraphics.js
  21. +5 −3 Source/Scene/DebugModelMatrixPrimitive.js
  22. +57 −2 Specs/Core/GroundPolylineGeometrySpec.js
  23. +127 −1 Specs/Core/PolygonGeometrySpec.js
  24. +86 −1 Specs/Core/PolygonOutlineGeometrySpec.js
  25. +75 −0 Specs/Core/PolygonPipelineSpec.js
  26. +78 −4 Specs/Core/PolylineGeometrySpec.js
  27. +57 −0 Specs/Core/PolylinePipelineSpec.js
  28. +57 −0 Specs/Core/SimplePolylineGeometrySpec.js
  29. +0 −1 Specs/DataSources/GeoJsonDataSourceSpec.js
  30. +19 −2 Specs/DataSources/PolygonGeometryUpdaterSpec.js
  31. +13 −0 Specs/DataSources/PolygonGraphicsSpec.js
  32. +115 −9 Specs/DataSources/PolylineGeometryUpdaterSpec.js
  33. +14 −0 Specs/DataSources/PolylineGraphicsSpec.js
15 changes: 15 additions & 0 deletions Apps/Sandcastle/gallery/Polygon.html
Original file line number Diff line number Diff line change
@@ -125,6 +125,21 @@
}
});

var purplePolygonUsingRhumbLines = viewer.entities.add({
name : 'Purple polygon using rhumb lines with outline',
polygon : {
hierarchy : Cesium.Cartesian3.fromDegreesArray([-120.0, 45.0,
-80.0, 45.0,
-80.0, 55.0,
-120.0, 55.0]),
extrudedHeight: 50000,
material : Cesium.Color.PURPLE,
outline : true,
outlineColor : Cesium.Color.MAGENTA,
arcType : Cesium.ArcType.RHUMB
}
});

viewer.zoomTo(viewer.entities);//Sandcastle_End
Sandcastle.finishedLoading();
}
13 changes: 12 additions & 1 deletion Apps/Sandcastle/gallery/Polyline.html
Original file line number Diff line number Diff line change
@@ -40,6 +40,17 @@
}
});

var greenRhumbLine = viewer.entities.add({
name : 'Green rhumb line',
polyline : {
positions : Cesium.Cartesian3.fromDegreesArray([-75, 35,
-125, 35]),
width : 5,
arcType : Cesium.ArcType.RHUMB,
material : Cesium.Color.GREEN
}
});

var glowingLine = viewer.entities.add({
name : 'Glowing blue line on the surface',
polyline : {
@@ -73,7 +84,7 @@
positions : Cesium.Cartesian3.fromDegreesArrayHeights([-75, 43, 500000,
-125, 43, 500000]),
width : 10,
followSurface : false,
arcType : Cesium.ArcType.NONE,
material : new Cesium.PolylineArrowMaterialProperty(Cesium.Color.PURPLE)
}
});
21 changes: 21 additions & 0 deletions Apps/Sandcastle/gallery/development/Ground Primitive.html
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@
terrainProvider: Cesium.createWorldTerrain()
});
var scene = viewer.scene;
viewer.extend(Cesium.viewerCesiumInspectorMixin);

function offsetPositions(positions, degreeOffset) {
positions = scene.globe.ellipsoid.cartesianArrayToCartographicArray(positions);
@@ -325,6 +326,26 @@
}),
classificationType : Cesium.ClassificationType.TERRAIN
}));

// Rhumb line polygon geometry
scene.groundPrimitives.add(new Cesium.GroundPrimitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : new Cesium.PolygonGeometry({
polygonHierarchy: new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray([
-130, 55,
-100, 55,
-100, 45,
-130, 45
])),
arcType : Cesium.ArcType.RHUMB
}),
attributes: {
color: Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 1.0, 0.0, 0.5))
},
id : 'rhumbPolygon'
}),
classificationType : Cesium.ClassificationType.TERRAIN
}));
});

Sandcastle.reset = function() {
14 changes: 14 additions & 0 deletions Apps/Sandcastle/gallery/development/Polylines.html
Original file line number Diff line number Diff line change
@@ -119,6 +119,20 @@
})
});
Sandcastle.declare(fadingPolyline); // For highlighting on mouseover in Sandcastle.

// A rhumb line with two points.
var rhumbLine = polylines.add({
positions : Cesium.PolylinePipeline.generateCartesianRhumbArc({
positions : Cesium.Cartesian3.fromDegreesArray([-130.0, 30.0,
-75.0, 30.0])
}),
width: 5,
material : Cesium.Material.fromType('Color', {
color : new Cesium.Color(0.0, 1.0, 0.0, 1.0)
})
});
Sandcastle.declare(rhumbLine); // For highlighting on mouseover in Sandcastle.

}

var viewer = new Cesium.Viewer('cesiumContainer');
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@ Change Log

##### Deprecated :hourglass_flowing_sand:
* `Scene.clampToHeight` now takes an optional `width` argument before the `result` argument. The previous function definition will no longer work in 1.56. [#7287](https://github.com/AnalyticalGraphicsInc/cesium/pull/7287)
* `PolylineGeometry.followSurface` has been superceded by `PolylineGeometry.arcType`. The previous definition will no longer work in 1.57. Replace `followSurface: false` with `arcType: Cesium.ArcType.NONE` and `followSurface: true` with `arcType: Cesium.ArcType.GEODESIC`. [#7492](https://github.com/AnalyticalGraphicsInc/cesium/pull/7492)
* `SimplePolylineGeometry.followSurface` has been superceded by `SimplePolylineGeometry.arcType`. The previous definition will no longer work in 1.57. Replace `followSurface: false` with `arcType: Cesium.ArcType.NONE` and `followSurface: true` with `arcType: Cesium.ArcType.GEODESIC`. [#7492](https://github.com/AnalyticalGraphicsInc/cesium/pull/7492)

##### Additions :tada:
* Added support for textured ground entities (entities with unspecified `height`) and `GroundPrimitives` on 3D Tiles. [#7434](https://github.com/AnalyticalGraphicsInc/cesium/pull/7434)
@@ -17,6 +19,7 @@ Change Log
* Added the ability to specify the width of the intersection volume for `Scene.sampleHeight`, `Scene.clampToHeight`, `Scene.sampleHeightMostDetailed`, and `Scene.clampToHeightMostDetailed`. [#7287](https://github.com/AnalyticalGraphicsInc/cesium/pull/7287)
* Added a [new Sandcastle example](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Time%20Dynamic%20Wheels.html) on using `nodeTransformations` to rotate a model's wheels based on its velocity. [#7361](https://github.com/AnalyticalGraphicsInc/cesium/pull/7361)
* Added `EllipsoidRhumbLine` class as a rhumb line counterpart to `EllipsoidGeodesic`. [#7484](https://github.com/AnalyticalGraphicsInc/cesium/pull/7484)
* Added rhumb line support to `PolygonGeometry`, `PolygonOutlineGeometry`, `PolylineGeometry`, `GroundPolylineGeometry`, and `SimplePolylineGeometry`. [#7492](https://github.com/AnalyticalGraphicsInc/cesium/pull/7492)
* Improved the performance of `QuantizedMeshTerrainData.interpolateHeight`. [#7508](https://github.com/AnalyticalGraphicsInc/cesium/pull/7508)

##### Fixes :wrench:
@@ -29,6 +32,7 @@ Change Log
* Fixed Sandcastle's "Open in New Window" button not displaying imagery due to blob URI limitations. [#7250](https://github.com/AnalyticalGraphicsInc/cesium/pull/7250)
* Fixed an issue where setting `scene.globe.cartographicLimitRectangle` to `undefined` would cause a crash. [#7477](https://github.com/AnalyticalGraphicsInc/cesium/issues/7477)
* Fixed `PrimitiveCollection.removeAll` to no longer `contain` removed primitives. [#7491](https://github.com/AnalyticalGraphicsInc/cesium/pull/7491)
* Fixed `GeoJsonDataSource` to use polygons and polylines that use rhumb lines. [#7492](https://github.com/AnalyticalGraphicsInc/cesium/pull/7492)

### 1.53 - 2019-01-02

39 changes: 39 additions & 0 deletions Source/Core/ArcType.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
define([
'./freezeObject'
], function(
freezeObject) {
'use strict';

/**
* ArcType defines the path that should be taken connecting vertices.
*
* @exports ArcType
*/
var ArcType = {
/**
* Straight line that does not conform to the surface of the ellipsoid.
*
* @type {Number}
* @constant
*/
NONE : 0,

/**
* Follow geodesic path.
*
* @type {Number}
* @constant
*/
GEODESIC : 1,

/**
* Follow rhumb or loxodrome path.
*
* @type {Number}
* @constant
*/
RHUMB : 2
};

return freezeObject(ArcType);
});
Loading