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

Update tileset transform on get bounding sphere #6914

Merged
merged 1 commit into from
Aug 13, 2018

Conversation

hpinkos
Copy link
Contributor

@hpinkos hpinkos commented Aug 13, 2018

This calls root.updateTransform when the bounding sphere is fetched instead of when modelMatrix is set. This fixes a case where I was calling viewer.flyTo(tileset) after the root.transform was updated but a render hadn't occurred yet, resulting in the bounding sphere being out of sync with the tileset position.

@hpinkos hpinkos requested a review from lilleyse August 13, 2018 18:23
@cesium-concierge
Copy link

Thanks for the pull request @hpinkos!

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

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@lilleyse
Copy link
Contributor

I agree on adding this to the bounding sphere getter, but why does it have to be removed from model matrix? Could both call updateTransform?

@hpinkos
Copy link
Contributor Author

hpinkos commented Aug 13, 2018

@lilleyse I suppose it doesn't have to be removed, but looking at that inline comment it looked like the only reason it was there was to update the bounding sphere for calls used by viewer.flyTo so I don't think it's necessary to have it both places. Is there a benefit to keeping it there?

@lilleyse
Copy link
Contributor

Hm, yeah I suppose that's the only case I can think of too. Looks good.

@lilleyse lilleyse merged commit 021405f into master Aug 13, 2018
@lilleyse lilleyse deleted the tileset-boundingsphere branch August 13, 2018 18:41
@mramato
Copy link
Contributor

mramato commented Aug 14, 2018

Do you think this could be what was causing #6898?

@hpinkos
Copy link
Contributor Author

hpinkos commented Aug 14, 2018

@mramato I don't think so. This was really only causing problems if you changed the root transform and called 'fly to' before the next frame update. I don't think you were changing the transform when you encountered that issue.

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.

4 participants