From c0844bce4a1649371be392a60a91ac955026dc4a Mon Sep 17 00:00:00 2001 From: hpinkos Date: Fri, 12 Jun 2020 14:21:51 -0400 Subject: [PATCH 1/2] draw walls in order given --- CHANGES.md | 6 ++++++ Source/Core/WallGeometryLibrary.js | 18 ------------------ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3b07c0f7430c..29ab3a087f66 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Change Log +### 1.71 - 2020-07-01 + +##### Breaking Changes :mega: + +- Updated `WallGeometry` to respect the order of positions passed in, instead of making the positions respect a counter clockwise winding order. This will only effect the look of walls with an image material. If this changed the way your wall is drawing, reverse the order of the positions. + ### 1.70.1 - 2020-06-10 ##### Additions :tada: diff --git a/Source/Core/WallGeometryLibrary.js b/Source/Core/WallGeometryLibrary.js index ff4fc2a956b9..cdd88604c8ed 100644 --- a/Source/Core/WallGeometryLibrary.js +++ b/Source/Core/WallGeometryLibrary.js @@ -128,24 +128,6 @@ WallGeometryLibrary.computePositions = function ( maximumHeights = o.topHeights; minimumHeights = o.bottomHeights; - if (wallPositions.length >= 3) { - // Order positions counter-clockwise - var tangentPlane = EllipsoidTangentPlane.fromPoints( - wallPositions, - ellipsoid - ); - var positions2D = tangentPlane.projectPointsOntoPlane(wallPositions); - - if ( - PolygonPipeline.computeWindingOrder2D(positions2D) === - WindingOrder.CLOCKWISE - ) { - wallPositions.reverse(); - maximumHeights.reverse(); - minimumHeights.reverse(); - } - } - var length = wallPositions.length; var numCorners = length - 2; var topPositions; From b61f36002d2ccf8980207fce7cee1d111ed51c4e Mon Sep 17 00:00:00 2001 From: hpinkos Date: Fri, 12 Jun 2020 15:02:11 -0400 Subject: [PATCH 2/2] eslint --- Source/Core/WallGeometryLibrary.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/Source/Core/WallGeometryLibrary.js b/Source/Core/WallGeometryLibrary.js index cdd88604c8ed..902f3c4b3083 100644 --- a/Source/Core/WallGeometryLibrary.js +++ b/Source/Core/WallGeometryLibrary.js @@ -1,10 +1,7 @@ import Cartographic from "./Cartographic.js"; import defined from "./defined.js"; -import EllipsoidTangentPlane from "./EllipsoidTangentPlane.js"; import CesiumMath from "./Math.js"; -import PolygonPipeline from "./PolygonPipeline.js"; import PolylinePipeline from "./PolylinePipeline.js"; -import WindingOrder from "./WindingOrder.js"; /** * @private