Skip to content

Commit c3e902a

Browse files
author
Hannah
authoredJan 30, 2020
Merge pull request #8576 from AnalyticalGraphicsInc/planeGeometryFix
Fixed crash when creating plane with translation and normal on the Z axis
2 parents db3f21e + 109f855 commit c3e902a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
 

‎CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Change Log
4747
* Fixed a crash that could occur when an entity was deleted while the corresponding `Primitive` was being created asynchronously. [#8569](https://github.com/AnalyticalGraphicsInc/cesium/pull/8569)
4848
* Fixed a crash when calling `camera.lookAt` with the origin as the target. This could happen when looking at a tileset with the origin as its center. [#8571](https://github.com/AnalyticalGraphicsInc/cesium/pull/8571)
4949
* Fixed a bug where `camera.viewBoundingSphere` was modifying the `offset` parameter [#8438](https://github.com/AnalyticalGraphicsInc/cesium/pull/8438)
50+
* Fixed a crash when creating a plane with both position and normal on the Z-axis. [#8576](https://github.com/AnalyticalGraphicsInc/cesium/pull/8576)
5051

5152
### 1.65.0 - 2020-01-06
5253

‎Source/DataSources/PlaneGeometryUpdater.js

+3
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ import Property from './Property.js';
240240
var up = ellipsoid.geodeticSurfaceNormal(translation, scratchAxis2);
241241
if (CesiumMath.equalsEpsilon(Math.abs(Cartesian3.dot(up, transformedNormal)), 1.0, CesiumMath.EPSILON8)) {
242242
up = Cartesian3.clone(Cartesian3.UNIT_Z, up);
243+
if (CesiumMath.equalsEpsilon(Math.abs(Cartesian3.dot(up, transformedNormal)), 1.0, CesiumMath.EPSILON8)) {
244+
up = Cartesian3.clone(Cartesian3.UNIT_X, up);
245+
}
243246
}
244247

245248
var left = Cartesian3.cross(up, transformedNormal, scratchAxis);

0 commit comments

Comments
 (0)
Please sign in to comment.