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

Polylines on terrain via Primitive API #6615

Merged
merged 41 commits into from
Jun 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
bc4a24a
renderable polylines on terrain
likangning93 May 18, 2018
cbd2eb7
synchronization of ground polyline attributes by ID
likangning93 May 18, 2018
b2ac735
picking GroundPolylinePrimitive ignores material type (useful for das…
likangning93 May 21, 2018
bafa5f2
removed vertex normals for polyline shadow volumes
likangning93 May 21, 2018
0371307
Support for 2D/CV
likangning93 May 21, 2018
0c22456
add interpolation for long line segments, fixes for end normals
likangning93 May 22, 2018
ac29934
Sandcastle example for polylines on terrain via Primitive API [ci skip]
likangning93 May 22, 2018
ad8d711
fix some artifacts, fix doubledraw, add per-instance color support [c…
likangning93 May 24, 2018
4f71916
Merge branch 'master' into polylinesOnTerrain
likangning93 May 26, 2018
612152b
switch from batch table and many instances to fat vertices
likangning93 May 28, 2018
fe4849e
integrate ApproximateTerrainHeights into GroundPolylineGeometry, perm…
likangning93 May 29, 2018
5de9ded
some shader cleanup, restore automatic width attribute for polylines …
likangning93 May 29, 2018
9abaa8c
simulate morph [ci skip]
likangning93 May 30, 2018
e6e2c18
additional doc and Primitive parameters, fixed bounding volume comput…
likangning93 May 30, 2018
fe3531f
switch GroundPolylineGeometry to take cartesian positions
likangning93 May 31, 2018
02e7f22
split polyline shadow volumes across IDL and PM [ci skip]
likangning93 May 31, 2018
6a51e44
handle looping and normal projection for IDL/PM split [ci skip]
likangning93 Jun 1, 2018
63db595
fix additional IDL bugs [ci skip]
likangning93 Jun 1, 2018
9e39ecc
specs for GroundPolylineGeometry
likangning93 Jun 1, 2018
bed6ecf
special handling for lines near-parallel to IDL
likangning93 Jun 4, 2018
fd903d2
fix GroundPolylineGeometry test failure for built Cesium
likangning93 Jun 4, 2018
071a636
fix discontinuity for GroundPolylineGeometry due to plane origins bei…
likangning93 Jun 4, 2018
4aebfa1
specs for GroundPolylinePrimitive
likangning93 Jun 5, 2018
6ac0dd5
update Sandcastle example with Z-indexing demonstration
likangning93 Jun 5, 2018
5ee4a47
additional specs for GroundPolylinePrimitive, fix eslint errors
likangning93 Jun 5, 2018
436631a
reduce overdraw for tight corners
likangning93 Jun 7, 2018
d11829d
add defines to enable/disable varyings
likangning93 Jun 7, 2018
1d1850a
PR feedback
likangning93 Jun 7, 2018
1bd9695
Merge branch 'master' into polylinesOnTerrain
likangning93 Jun 7, 2018
6147990
remove custom pick commands for GroundPolylinePrimitive, picking what…
likangning93 Jun 7, 2018
43dbae2
performance tweak for polylines on terrain shader
likangning93 Jun 8, 2018
11d7bc4
adjust epsilons for polylines on terrain IDL handling
likangning93 Jun 8, 2018
7869029
typo fix
likangning93 Jun 8, 2018
eb95073
style/doc fixes, special geometry handling for sceneMode3D
likangning93 Jun 11, 2018
361c4cd
fix IDL split bug for CV and normalization error IDL/PM split bug
likangning93 Jun 11, 2018
fa7075f
push bottom vertices of volumes at far view distances
likangning93 Jun 11, 2018
81a23c8
fix artifacts in 2D and morph
likangning93 Jun 11, 2018
163d254
early discards
likangning93 Jun 11, 2018
403e500
remove unneeded options, add example doc for GroundPolylinePrimitive,…
likangning93 Jun 12, 2018
a822e15
update CHANGES.md
likangning93 Jun 12, 2018
3ec30e3
PR comments, back to breaking turns with larger angles
likangning93 Jun 12, 2018
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
100 changes: 100 additions & 0 deletions Apps/Sandcastle/gallery/development/Ground Polyline Material.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<!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 Ground Polylines with different material appearances.">
<meta name="cesium-sandcastle-labels" content="Development">
<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">
require.config({
baseUrl : '../../../Source',
waitSeconds : 60
});
</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', {
terrainProvider: Cesium.createWorldTerrain()
});
var scene = viewer.scene;

if (!Cesium.GroundPolylinePrimitive.isSupported(scene)) {
throw new Cesium.RuntimeError('Polylines on terrain are not supported on this platform.');
}

// Polyline Glow
scene.groundPrimitives.add(new Cesium.GroundPolylinePrimitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : new Cesium.GroundPolylineGeometry({
positions : Cesium.Cartesian3.fromDegreesArray([
-122.2558, 46.1955,
-122.1058, 46.1955
]),
width : 10.0
})
}),
appearance : new Cesium.PolylineMaterialAppearance({
material : Cesium.Material.fromType(Cesium.Material.PolylineGlowType)
})
}));

// Polyline Dash
scene.groundPrimitives.add(new Cesium.GroundPolylinePrimitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : new Cesium.GroundPolylineGeometry({
positions : Cesium.Cartesian3.fromDegreesArray([
-122.2558, 46.1975,
-122.1058, 46.1975
]),
width : 10.0
})
}),
appearance : new Cesium.PolylineMaterialAppearance({
material : Cesium.Material.fromType(Cesium.Material.PolylineDashType)
})
}));

// Polyline Outline
scene.groundPrimitives.add(new Cesium.GroundPolylinePrimitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : new Cesium.GroundPolylineGeometry({
positions : Cesium.Cartesian3.fromDegreesArray([
-122.2558, 46.1995,
-122.1058, 46.1995
]),
width : 10.0
})
}),
appearance : new Cesium.PolylineMaterialAppearance({
material : Cesium.Material.fromType(Cesium.Material.PolylineOutlineType)
})
}));

viewer.camera.lookAt(Cesium.Cartesian3.fromDegrees(-122.2058, 46.1955, 1000.0), new Cesium.Cartesian3(5000.0, 5000.0, 5000.0));
viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);

//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.
Loading