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

Handling zero origin for localFrameToFixedFrame #8571

Merged
merged 4 commits into from
Jan 28, 2020
Merged

Conversation

IanLilleyT
Copy link
Contributor

@IanLilleyT IanLilleyT commented Jan 28, 2020

Fixes #8570

#8475 exposed a bug where calling viewer.zoomTo(tileset) on a root tile (or any tile centered at zero) would crash. Ultimately this was caused by Transforms.eastNorthUpToFixedFrame not handling the zero vector case and returning a bad transformation matrix. Since ENU is not well defined at zero, I return the degeneratePositionLocalFrame matrix instead, which is similar to how the north and south pole are handled.

@loshjawrence

@IanLilleyT IanLilleyT requested a review from lilleyse January 28, 2020 21:05
@cesium-concierge
Copy link

Thanks for the pull request @IanLilleyT!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@lilleyse
Copy link
Contributor

Nice, this fixes zooming to regions that cover the whole globe and bounding spheres at (0,0,0), both important for global 3D Tilesets.

@loshjawrence
Copy link
Contributor

I can confirm it fixes it, I looked over the code and it seems fine.

@loshjawrence loshjawrence merged commit 036bf12 into master Jan 28, 2020
@loshjawrence loshjawrence deleted the lookToOriginFix branch January 28, 2020 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OBB commit broke certain zoomTo's
4 participants