Skip to content

Commit

Permalink
Merge branch 'master' into fix-polygon-tangents
Browse files Browse the repository at this point in the history
  • Loading branch information
bagnell committed Jul 11, 2018
2 parents 1dc169d + b32bc17 commit 18aefea
Show file tree
Hide file tree
Showing 54 changed files with 4,292 additions and 1,671 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
95 changes: 95 additions & 0 deletions Apps/Sandcastle/gallery/Time Dynamic Point Cloud.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<!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="Render a time dynamic point cloud from a set of Point Cloud tiles and timestamps.">
<meta name="cesium-sandcastle-labels" content="Showcases">
<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', {
shouldAnimate : true
});

var dates = [
'2018-07-19T15:18:00Z',
'2018-07-19T15:18:00.5Z',
'2018-07-19T15:18:01Z',
'2018-07-19T15:18:01.5Z',
'2018-07-19T15:18:02Z',
'2018-07-19T15:18:02.5Z'
];

var uris = [
'../../SampleData/Cesium3DTiles/PointCloud/PointCloudTimeDynamic/0.pnts',
'../../SampleData/Cesium3DTiles/PointCloud/PointCloudTimeDynamic/1.pnts',
'../../SampleData/Cesium3DTiles/PointCloud/PointCloudTimeDynamic/2.pnts',
'../../SampleData/Cesium3DTiles/PointCloud/PointCloudTimeDynamic/3.pnts',
'../../SampleData/Cesium3DTiles/PointCloud/PointCloudTimeDynamic/4.pnts'
];

function dataCallback(interval, index) {
return {
uri: uris[index]
};
}

var timeIntervalCollection = Cesium.TimeIntervalCollection.fromIso8601DateArray({
iso8601Dates: dates,
dataCallback: dataCallback
});

var pointCloud = new Cesium.TimeDynamicPointCloud({
intervals : timeIntervalCollection,
clock : viewer.clock,
style : new Cesium.Cesium3DTileStyle({
pointSize : 5
})
});
viewer.scene.primitives.add(pointCloud);

var start = Cesium.JulianDate.fromIso8601(dates[0]);
var stop = Cesium.JulianDate.fromIso8601(dates[dates.length - 1]);

viewer.timeline.zoomTo(start, stop);

var clock = viewer.clock;
clock.startTime = start;
clock.currentTime = start;
clock.stopTime = stop;
clock.clockRange = Cesium.ClockRange.LOOP_STOP;

viewer.zoomTo(pointCloud, new Cesium.HeadingPitchRange(0.0, -0.5, 50.0));
//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== "undefined") {
startup(Cesium);
} else if (typeof require === "function") {
require(["Cesium"], startup);
}
</script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions Apps/Sandcastle/gallery/Web Map Tile Service with Time.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@
provider.readyPromise
.then(function() {
var start = Cesium.JulianDate.fromIso8601('2015-07-30');
var end = Cesium.JulianDate.fromIso8601('2017-06-17');
var stop = Cesium.JulianDate.fromIso8601('2017-06-17');

viewer.timeline.zoomTo(start, end);
viewer.timeline.zoomTo(start, stop);

var clock = viewer.clock;
clock.startTime = start;
clock.endTime = end;
clock.stopTime = stop;
clock.currentTime = start;
clock.clockRange = Cesium.ClockRange.LOOP_STOP;
clock.multiplier = 86400;
Expand Down
49 changes: 39 additions & 10 deletions Apps/Sandcastle/gallery/development/Coplanar Polygon Outline.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,52 @@
var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;

var polygonOutlineGeometry = new Cesium.CoplanarPolygonOutlineGeometry({
positions : Cesium.Cartesian3.fromDegreesArrayHeights([
-91.0, 50.0, 0.0,
-90.0, 50.0, 200000.0,
-89.0, 50.0, 200000.0,
-88.0, 50.0, 0.0
])
var polygonOutline1 = new Cesium.GeometryInstance({
geometry : Cesium.CoplanarPolygonOutlineGeometry.fromPositions({
positions : Cesium.Cartesian3.fromDegreesArrayHeights([
-94.0, 40.0, 0.0,
-93.0, 40.0, 200000.0,
-92.0, 40.0, 200000.0,
-91.0, 40.0, 0.0
])
}),
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.WHITE)
}
});
var polygonOutline = new Cesium.GeometryInstance({
geometry : polygonOutlineGeometry,

var polygonOutline2 = new Cesium.GeometryInstance({
geometry : new Cesium.CoplanarPolygonOutlineGeometry({
polygonHierarchy : {
positions : Cesium.Cartesian3.fromDegreesArrayHeights([-99.0, 38.0, 100000,
-97.0, 38.0, 100000,
-97.0, 40.0, 100000,
-99.0, 40.0, 100000]),
holes : [{
positions : Cesium.Cartesian3.fromDegreesArrayHeights([
-98.5, 38.5, 100000,
-98.5, 39.5, 100000,
-97.5, 39.5, 100000,
-97.5, 38.5, 100000
]),
holes : [{
positions : Cesium.Cartesian3.fromDegreesArrayHeights([
-98.25, 38.75, 100000,
-97.75, 38.75, 100000,
-97.75, 39.25, 100000,
-98.25, 39.25, 100000
])
}]
}]
}
}),
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.WHITE)
}
});

scene.primitives.add(new Cesium.Primitive({
geometryInstances : [polygonOutline],
geometryInstances : [polygonOutline1, polygonOutline2],
appearance : new Cesium.PerInstanceColorAppearance({
flat : true,
renderState : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 64 additions & 9 deletions Apps/Sandcastle/gallery/development/Coplanar Polygon.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,86 @@
var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;

var polygonGeometry = new Cesium.CoplanarPolygonGeometry({
var polygonGeometry1 = Cesium.CoplanarPolygonGeometry.fromPositions({
vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,
positions : Cesium.Cartesian3.fromDegreesArrayHeights([
-91.0, 50.0, 0.0,
-90.0, 50.0, 200000.0,
-89.0, 50.0, 200000.0,
-88.0, 50.0, 0.0
-91.0, 40.0, 0.0,
-90.0, 40.0, 200000.0,
-89.0, 40.0, 200000.0,
-88.0, 40.0, 0.0
])
});

var polygonInstance = new Cesium.GeometryInstance({
geometry : polygonGeometry,
var polygonGeometry2 = new Cesium.CoplanarPolygonGeometry({
vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,
polygonHierarchy : {
positions : Cesium.Cartesian3.fromDegreesArrayHeights([-99.0, 38.0, 100000,
-97.0, 38.0, 100000,
-97.0, 40.0, 100000,
-99.0, 40.0, 100000]),
holes : [{
positions : Cesium.Cartesian3.fromDegreesArrayHeights([
-98.5, 38.5, 100000,
-98.5, 39.5, 100000,
-97.5, 39.5, 100000,
-97.5, 38.5, 100000
]),
holes : [{
positions : Cesium.Cartesian3.fromDegreesArrayHeights([
-98.25, 38.75, 100000,
-97.75, 38.75, 100000,
-97.75, 39.25, 100000,
-98.25, 39.25, 100000
])
}]
}]
}
});

var polygonInstance1 = new Cesium.GeometryInstance({
geometry : polygonGeometry1,
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.BLUE)
}
});

var polygonInstance2 = new Cesium.GeometryInstance({
geometry : polygonGeometry2,
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED)
}
});

scene.primitives.add(new Cesium.Primitive({
geometryInstances : polygonInstance,
geometryInstances : [polygonInstance1, polygonInstance2],
appearance : new Cesium.PerInstanceColorAppearance({
translucent : false,
closed : false
})
}));
//Sandcastle_End

var polygonGeometry = Cesium.CoplanarPolygonGeometry.fromPositions({
vertexFormat : Cesium.VertexFormat.ALL,
positions : Cesium.Cartesian3.fromDegreesArrayHeights([
-95.0, 40.0, 100000.0,
-94.0, 42.0, 200000.0,
-93.0, 42.0, 200000.0,
-92.0, 40.0, 100000.0
]),
stRotation: Cesium.Math.toRadians(-20)
});

var polygonInstance = new Cesium.GeometryInstance({
geometry : polygonGeometry
});

scene.primitives.add(new Cesium.Primitive({
geometryInstances : polygonInstance,
appearance : new Cesium.MaterialAppearance({
material : Cesium.Material.fromType('Checkerboard'),
materialSupport : Cesium.MaterialAppearance.MaterialSupport.TEXTURED
})
}));//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== "undefined") {
Expand Down
Binary file modified Apps/Sandcastle/gallery/development/Coplanar Polygon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ Change Log

### 1.48 - 2018-08-01

##### Deprecated :hourglass_flowing_sand:
* Support for 3D Tiles `content.url` is deprecated to reflect updates to the [3D Tiles spec](https://github.com/AnalyticalGraphicsInc/3d-tiles/pull/301). Use `content.uri instead`. Support for `content.url` will remain for backwards compatibility. [#6744](https://github.com/AnalyticalGraphicsInc/cesium/pull/6744)

##### Additions :tada:
* Added support for loading Draco compressed Point Cloud tiles for 2-3x better compression. [#6559](https://github.com/AnalyticalGraphicsInc/cesium/pull/6559)
* Added `TimeDynamicPointCloud` for playback of time-dynamic point cloud data, where each frame is a 3D Tiles Point Cloud tile. [#6721](https://github.com/AnalyticalGraphicsInc/cesium/pull/6721)
* Added `CoplanarPolygonGeometry` and `CoplanarPolygonGeometryOutline` for drawing polygons composed of coplanar positions that are not necessarliy on the ellipsoid surface. [#6769](https://github.com/AnalyticalGraphicsInc/cesium/pull/6769)

##### Deprecated :hourglass_flowing_sand:
* Support for 3D Tiles `content.url` is deprecated to reflect updates to the [3D Tiles spec](https://github.com/AnalyticalGraphicsInc/3d-tiles/pull/301). Use `content.uri instead`. Support for `content.url` will remain for backwards compatibility. [#6744](https://github.com/AnalyticalGraphicsInc/cesium/pull/6744)

#### Fixes :wrench:
* Fixed bug causing billboards and labels to appear the wrong size when switching scene modes [#6745](https://github.com/AnalyticalGraphicsInc/cesium/issues/6745)
* Fixed `PolygonGeometry` when using `VertexFormat.POSITION_ONLY`, `perPositionHeight` and `extrudedHeight` [#6790](expect(https://github.com/AnalyticalGraphicsInc/cesium/pull/6790)
* Fixed a bug that was preventing 3D Tilesets on the opposite side of the globe from being occluded [#6714](https://github.com/AnalyticalGraphicsInc/cesium/issues/6714)
* Fixed a bug where 3D Tilesets using the `region` bounding volume don't get transformed when the tileset's `modelMatrix` changes. [6755](https://github.com/AnalyticalGraphicsInc/cesium/pull/6755)
* Fixed `PolygonGeometry` and `EllipseGeometry` tangent and bitangent attributes when a texture rotation is used [#6788](https://github.com/AnalyticalGraphicsInc/cesium/pull/6788)

### 1.47 - 2018-07-02
Expand Down
Loading

0 comments on commit 18aefea

Please sign in to comment.