From 6cfb8b80870ee802c4b8d110eb3e7460760a27d9 Mon Sep 17 00:00:00 2001 From: Kangning Li Date: Thu, 20 Sep 2018 15:02:14 -0400 Subject: [PATCH 1/4] add cutoutRectangle to ImageryLayer --- Apps/Sandcastle/gallery/Imagery Cutout.html | 159 ++++++++++++++++++++ Apps/Sandcastle/gallery/Imagery Cutout.jpg | Bin 0 -> 11291 bytes Source/Scene/GlobeSurfaceShaderSet.js | 62 +++++--- Source/Scene/GlobeSurfaceTileProvider.js | 25 ++- Source/Scene/ImageryLayer.js | 8 + Source/Shaders/GlobeFS.glsl | 4 + Specs/Scene/GlobeSurfaceTileProviderSpec.js | 25 ++- 7 files changed, 263 insertions(+), 20 deletions(-) create mode 100644 Apps/Sandcastle/gallery/Imagery Cutout.html create mode 100644 Apps/Sandcastle/gallery/Imagery Cutout.jpg diff --git a/Apps/Sandcastle/gallery/Imagery Cutout.html b/Apps/Sandcastle/gallery/Imagery Cutout.html new file mode 100644 index 000000000000..f973960dd615 --- /dev/null +++ b/Apps/Sandcastle/gallery/Imagery Cutout.html @@ -0,0 +1,159 @@ + + + + + + + + + Cesium Demo + + + + + + +
+

Loading...

+
+ + + + + + + + + + + + +
Click on the Cesium display to start.
w/s - move cutout north/south
a/d - move cutout west/east
+
+ + + diff --git a/Apps/Sandcastle/gallery/Imagery Cutout.jpg b/Apps/Sandcastle/gallery/Imagery Cutout.jpg new file mode 100644 index 0000000000000000000000000000000000000000..15defcded8b1600576dd71d8e76eca6d9e6e7134 GIT binary patch literal 11291 zcmb7pbyQWs_wTuvd&vu2y7AK8-Q6A14bt6+C?L|^DczxTNP~oQmmu8|A_xld@cWCm z-k)!uS!c~Tvu3ZEz4y##$K&$jCIDBKSCR)nAP~^=^Z<`*fDC{H2LEeM1bJ#uR45bz zfuf_JAfv+2VK5AI3=B*xTsS5c4i*LmoDhzKhfhF20K+CCCd4Pk#V5f3#{`7*GzS7j zgF?~pF)=Xl|G(+6AHYEc(t#}`5Doyw0U_al9tQz(0C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peY#WMr33#`|40_0V}WG1h?v6q2J3PSfKu42a4=a^MhANWQf>Uqu& zcYXNc=Mv5VRYfN#!DxJZZ?!+6#F0=AoAmFLnZg!t`>TOR;F&_K2(hbio4$nSn_N;6 zotW-GZcn7CxNYh4ApaqCk-f31v%BF!pYKs{;~HiKuUKTyDudVen^=MYD_$yExn+#c zkTBEyEZxiXY{Fjy}W6XstXI|={hqNkTk3~9qem$sb8!I9}b62Fv zdZ+d=Ky-6~OwDa2{z05eJ_0M@974r1`k^`fjhoKW#a3wSqWR zf&%!m;X>llCmt&CO<5ctf5vSf^+1iyYVcpT=`25v<%`E+{>UVyEZ8x z^VT2EZ{g1rz{yujs($l-FOHrY;577BbI- z@)7;_fT(7TByYvVeka#M_I~*4F5p{o045WLKo2E}b{LMdn>;DA43L{G)puzHh+?%_ zxsHs7B7X(fe_xVGuvtWhX{jXF5wF-o9uSfjf!A60B&0XK#rn$9Gg z2tR6CEPy|C!#BPh%QY5pM#&QuzF$Xg zqLY+j#Km2QztdjCw9t%Xv|0;psP6N~OI*vDT1?Xk(TAP23ghT1(r;2K*K$#_rOBI&PmGtN|i+MKx_ftE)g I_HpI^06|C Date: Thu, 20 Sep 2018 15:22:40 -0400 Subject: [PATCH 2/4] update CHANGES.md, remove FPS watch from Imagery Cutout sandcastle --- Apps/Sandcastle/gallery/Imagery Cutout.html | 1 - CHANGES.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Apps/Sandcastle/gallery/Imagery Cutout.html b/Apps/Sandcastle/gallery/Imagery Cutout.html index f973960dd615..d71be23999c6 100644 --- a/Apps/Sandcastle/gallery/Imagery Cutout.html +++ b/Apps/Sandcastle/gallery/Imagery Cutout.html @@ -55,7 +55,6 @@ }; var scene = viewer.scene; -scene.debugShowFramesPerSecond = true; var defaultImageryLayerCutout = Cesium.Rectangle.fromDegrees(-90, 20, -70, 40); diff --git a/CHANGES.md b/CHANGES.md index 11127b8d53cf..fc8f4e2057ac 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Change Log ##### Additions :tada: * Added `cartographicLimitRectangle` to `Globe`. Use this to limit terrain and imagery to a specific `Rectangle` area. [#6987](https://github.com/AnalyticalGraphicsInc/cesium/pull/6987) * Added `OpenCageGeocoderService`, which provides geocoding via [OpenCage](https://opencagedata.com/). [#7015](https://github.com/AnalyticalGraphicsInc/cesium/pull/7015) +* Added `cutoutRectangle` to `ImageryLayer`, which allows cutting out rectangular areas in imagery layers to reveal underlying imagery. [#7056](https://github.com/AnalyticalGraphicsInc/cesium/pull/7056) ##### Fixes :wrench: * Fixed picking for overlapping translucent primitives. [#7039](https://github.com/AnalyticalGraphicsInc/cesium/pull/7039) From 6722027a31110427fb39361580ba0e6de504158c Mon Sep 17 00:00:00 2001 From: Kanging Li Date: Tue, 9 Oct 2018 16:40:57 -0400 Subject: [PATCH 3/4] fix imagery cutout spec --- Specs/Scene/GlobeSurfaceTileProviderSpec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Specs/Scene/GlobeSurfaceTileProviderSpec.js b/Specs/Scene/GlobeSurfaceTileProviderSpec.js index 26f94120b8a2..e7d53545f84f 100644 --- a/Specs/Scene/GlobeSurfaceTileProviderSpec.js +++ b/Specs/Scene/GlobeSurfaceTileProviderSpec.js @@ -573,13 +573,13 @@ defineSuite([ switchViewMode(SceneMode.SCENE3D, new GeographicProjection(Ellipsoid.WGS84)); return updateUntilDone(scene.globe).then(function() { - expect(scene).toRender([0, 0, 127, 255]); // default baseColor + expect(scene).toRender([0, 0, 128, 255]); // default baseColor layer.cutoutRectangle = undefined; return updateUntilDone(scene.globe); }) .then(function() { - expect(scene).notToRender([0, 0, 127, 255]); + expect(scene).notToRender([0, 0, 128, 255]); expect(scene).notToRender([0, 0, 0, 255]); }); }); From 96eafbefe1541a7f5ceecb0c1b7eec26d3b08769 Mon Sep 17 00:00:00 2001 From: Kangning Li Date: Thu, 11 Oct 2018 15:46:26 -0400 Subject: [PATCH 4/4] fix imagery cutout spec --- Specs/Scene/GlobeSurfaceTileProviderSpec.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Specs/Scene/GlobeSurfaceTileProviderSpec.js b/Specs/Scene/GlobeSurfaceTileProviderSpec.js index e7d53545f84f..f398050cfb1b 100644 --- a/Specs/Scene/GlobeSurfaceTileProviderSpec.js +++ b/Specs/Scene/GlobeSurfaceTileProviderSpec.js @@ -572,15 +572,21 @@ defineSuite([ switchViewMode(SceneMode.SCENE3D, new GeographicProjection(Ellipsoid.WGS84)); + var baseColor; return updateUntilDone(scene.globe).then(function() { - expect(scene).toRender([0, 0, 128, 255]); // default baseColor + expect(scene).toRenderAndCall(function(rgba) { + baseColor = rgba; + expect(rgba).not.toEqual([0, 0, 0, 255]); + }); layer.cutoutRectangle = undefined; return updateUntilDone(scene.globe); }) .then(function() { - expect(scene).notToRender([0, 0, 128, 255]); - expect(scene).notToRender([0, 0, 0, 255]); + expect(scene).toRenderAndCall(function(rgba) { + expect(rgba).not.toEqual(baseColor); + expect(rgba).not.toEqual([0, 0, 0, 255]); + }); }); });