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

Fix zoomTo bug for scaled models #10855

Merged
merged 2 commits into from
Oct 13, 2022
Merged

Fix zoomTo bug for scaled models #10855

merged 2 commits into from
Oct 13, 2022

Conversation

j9liu
Copy link
Contributor

@j9liu j9liu commented Oct 13, 2022

Fixes #10830.

updateBoundingSphere was only applying the scale to the radius of the model's local bounding sphere, not the center. This didn't matter for many models because their local bounding spheres are (0, 0, 0). However, this clearly results in an incorrect bounding sphere for models whose bounding spheres are "off-center."

Local sandcastle from the issue to demonstrate the correct behavior.

@cesium-concierge
Copy link

Thanks for the pull request @j9liu!

  • ✔️ 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.

@j9liu
Copy link
Contributor Author

j9liu commented Oct 13, 2022

@ptrgags could you give this a review?

@ptrgags
Copy link
Contributor

ptrgags commented Oct 13, 2022

@j9liu the code looks good and I can confirm it fixes the problem works locally. The travis build failed due to a network error, so I restarted it. If it passes, I'll merge this

@ptrgags
Copy link
Contributor

ptrgags commented Oct 13, 2022

Thanks @j9liu!

@ptrgags ptrgags merged commit 33e9553 into main Oct 13, 2022
@ptrgags ptrgags deleted the scale-zoomto-fix branch October 13, 2022 18:04
This pull request was closed.
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.

zoomTo ignores the scale property of the entity
3 participants