Skip to content

Commit

Permalink
Merge pull request #1483 from AnalyticalGraphicsInc/wallGeometry
Browse files Browse the repository at this point in the history
Fix WallGeometry bug
  • Loading branch information
pjcozzi committed Feb 18, 2014
2 parents 1a49160 + 2d695e6 commit 3f6637b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Beta Releases
* `BingMapsImageryProvider` now uses HTTPS by default for metadata and tiles when the document is loaded over HTTPS.
* `RequestErrorEvent` now includes the headers that were returned with the error response.
* Added `CesiumInspector` widget for graphics debugging. In Cesium Viewer, it is enabled by using the query parameter `inspector=true`.
* Fixed `WallGeometry` bug that failed by removing positions that were less close together by less than 6 decimal places. [#1483](https://github.com/AnalyticalGraphicsInc/cesium/pull/1483)

### b25 - 2014-02-03

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/WallGeometryLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ define([
}

function latLonEquals(c0, c1) {
return ((CesiumMath.equalsEpsilon(c0.latitude, c1.latitude, CesiumMath.EPSILON6)) && (CesiumMath.equalsEpsilon(c0.longitude, c1.longitude, CesiumMath.EPSILON6)));
return ((CesiumMath.equalsEpsilon(c0.latitude, c1.latitude, CesiumMath.EPSILON14)) && (CesiumMath.equalsEpsilon(c0.longitude, c1.longitude, CesiumMath.EPSILON14)));
}

var scratchCartographic1 = new Cartographic();
Expand Down
11 changes: 11 additions & 0 deletions Specs/Core/WallGeometrySpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ defineSuite([
}).toThrowDeveloperError();
});

it('does not throw when positions are unique but close', function() {
expect(function() {
return WallGeometry.createGeometry(new WallGeometry({
vertexFormat : VertexFormat.POSITION_ONLY,
positions : ellipsoid.cartographicArrayToCartesianArray([
Cartographic.fromDegrees(-47.93121266896352,-15.771192496304398),
Cartographic.fromDegrees(-47.93119792786269,-15.771148001875085)])
}));
}).not.toThrowDeveloperError();
});

it('creates positions relative to ellipsoid', function() {
var coords = [
Cartographic.fromDegrees(49.0, 18.0, 1000.0),
Expand Down

0 comments on commit 3f6637b

Please sign in to comment.