Skip to content

Commit

Permalink
Merge pull request CesiumGS#6529 from AnalyticalGraphicsInc/fix-extru…
Browse files Browse the repository at this point in the history
…de-epsilon

Fix geometry extrusion epsilon check
  • Loading branch information
lilleyse committed Apr 30, 2018
2 parents f2e3d2e + f9efe8c commit fd4e3fd
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Source/Core/CorridorGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ define([

var height = corridorGeometry._height;
var extrudedHeight = corridorGeometry._extrudedHeight;
var extrude = !CesiumMath.equalsEpsilon(height, extrudedHeight, CesiumMath.EPSILON2);
var extrude = !CesiumMath.equalsEpsilon(height, extrudedHeight, 0, CesiumMath.EPSILON2);

var vertexFormat = corridorGeometry._vertexFormat;
var params = {
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/CorridorOutlineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ define([

var height = corridorOutlineGeometry._height;
var extrudedHeight = corridorOutlineGeometry._extrudedHeight;
var extrude = !CesiumMath.equalsEpsilon(height, extrudedHeight, CesiumMath.EPSILON2);
var extrude = !CesiumMath.equalsEpsilon(height, extrudedHeight, 0, CesiumMath.EPSILON2);

var params = {
ellipsoid : ellipsoid,
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/EllipseGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ define([

var height = ellipseGeometry._height;
var extrudedHeight = ellipseGeometry._extrudedHeight;
var extrude = !CesiumMath.equalsEpsilon(height, extrudedHeight, CesiumMath.EPSILON2);
var extrude = !CesiumMath.equalsEpsilon(height, extrudedHeight, 0, CesiumMath.EPSILON2);

ellipseGeometry._center = ellipseGeometry._ellipsoid.scaleToGeodeticSurface(ellipseGeometry._center, ellipseGeometry._center);
var options = {
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/EllipseOutlineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ define([

var height = ellipseGeometry._height;
var extrudedHeight = ellipseGeometry._extrudedHeight;
var extrude = !CesiumMath.equalsEpsilon(height, extrudedHeight, CesiumMath.EPSILON2);
var extrude = !CesiumMath.equalsEpsilon(height, extrudedHeight, 0, CesiumMath.EPSILON2);

ellipseGeometry._center = ellipseGeometry._ellipsoid.scaleToGeodeticSurface(ellipseGeometry._center, ellipseGeometry._center);
var options = {
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/PolygonGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ define([

var height = polygonGeometry._height;
var extrudedHeight = polygonGeometry._extrudedHeight;
var extrude = polygonGeometry._perPositionHeightExtrude || !CesiumMath.equalsEpsilon(height, extrudedHeight, CesiumMath.EPSILON2);
var extrude = polygonGeometry._perPositionHeightExtrude || !CesiumMath.equalsEpsilon(height, extrudedHeight, 0, CesiumMath.EPSILON2);

var options = {
perPositionHeight: perPositionHeight,
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/PolygonOutlineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ define([

var height = polygonGeometry._height;
var extrudedHeight = polygonGeometry._extrudedHeight;
var extrude = polygonGeometry._perPositionHeightExtrude || !CesiumMath.equalsEpsilon(height, extrudedHeight, CesiumMath.EPSILON2);
var extrude = polygonGeometry._perPositionHeightExtrude || !CesiumMath.equalsEpsilon(height, extrudedHeight, 0, CesiumMath.EPSILON2);

if (extrude) {
for (i = 0; i < polygons.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/RectangleGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ define([

var surfaceHeight = rectangleGeometry._surfaceHeight;
var extrudedHeight = rectangleGeometry._extrudedHeight;
var extrude = !CesiumMath.equalsEpsilon(surfaceHeight, extrudedHeight, CesiumMath.EPSILON2);
var extrude = !CesiumMath.equalsEpsilon(surfaceHeight, extrudedHeight, 0, CesiumMath.EPSILON2);

options.lonScalar = 1.0 / rectangleGeometry._rectangle.width;
options.latScalar = 1.0 / rectangleGeometry._rectangle.height;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/RectangleOutlineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ define([

var surfaceHeight = rectangleGeometry._surfaceHeight;
var extrudedHeight = rectangleGeometry._extrudedHeight;
var extrude = !CesiumMath.equalsEpsilon(surfaceHeight, extrudedHeight, CesiumMath.EPSILON2);
var extrude = !CesiumMath.equalsEpsilon(surfaceHeight, extrudedHeight, 0, CesiumMath.EPSILON2);

if (extrude) {
geometry = constructExtrudedRectangle(options);
Expand Down

0 comments on commit fd4e3fd

Please sign in to comment.