Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed crash when creating plane with translation and normal on the Z axis #8576

Merged
merged 3 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Change Log
* Fixed a crash that could occur when an entity was deleted while the corresponding `Primitive` was being created asynchronously. [#8569](https:/AnalyticalGraphicsInc/cesium/pull/8569)
* 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:/AnalyticalGraphicsInc/cesium/pull/8571)
* Fixed a bug where `camera.viewBoundingSphere` was modifying the `offset` parameter [#8438](https:/AnalyticalGraphicsInc/cesium/pull/8438)
* Fixed a crash when creating a plane with both position and normal on the Z-axis. [#8576](https:/AnalyticalGraphicsInc/cesium/pull/8576)

### 1.65.0 - 2020-01-06

Expand Down
3 changes: 3 additions & 0 deletions Source/DataSources/PlaneGeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ import Property from './Property.js';
var up = ellipsoid.geodeticSurfaceNormal(translation, scratchAxis2);
if (CesiumMath.equalsEpsilon(Math.abs(Cartesian3.dot(up, transformedNormal)), 1.0, CesiumMath.EPSILON8)) {
up = Cartesian3.clone(Cartesian3.UNIT_Z, up);
if (CesiumMath.equalsEpsilon(Math.abs(Cartesian3.dot(up, transformedNormal)), 1.0, CesiumMath.EPSILON8)) {
up = Cartesian3.clone(Cartesian3.UNIT_X, up);
}
}

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