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

Made GlobeSurfaceTile.pick not pick triangles behind the ray #8499

Merged
merged 3 commits into from
Dec 30, 2019

Conversation

IanLilleyT
Copy link
Contributor

Introduced this bug in #8390 (mid-December 2019). The old way uses IntersectionTests.rayTriangle which returns undefined when the triangle is behind the ray. The new way uses IntersectionTests.rayTriangleParametric which returns a negative distance when the triangle is behind the ray. Since I never added a check for this in GlobeSurfaceTile.pick, triangles behind the ray could be picked. I added a comment and another picking test to avoid this confusion in the future.

Fortunately this bug never made it into an official release.

@lilleyse Let's get this in before the January release.

@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

Looks good, thanks @IanLilleyT

@lilleyse lilleyse merged commit 2bc678a into master Dec 30, 2019
@lilleyse lilleyse deleted the negativePickFix branch December 30, 2019 21:33
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.

3 participants