Skip to content

Add Tileset::sampleHeightCurrentDetail() to sample terrain height based on the currently loaded tiles#1338

Open
ELeeScape wants to merge 1 commit intoCesiumGS:mainfrom
WorldscapeAI:sampleHeightCurrentDetail
Open

Add Tileset::sampleHeightCurrentDetail() to sample terrain height based on the currently loaded tiles#1338
ELeeScape wants to merge 1 commit intoCesiumGS:mainfrom
WorldscapeAI:sampleHeightCurrentDetail

Conversation

@ELeeScape
Copy link
Copy Markdown
Contributor

Description

Tileset::sampleHeightMostDetailed() run asynchronously and causes the tileset to fully load the most detailed level before resolving a result. In some cases it's more useful to know what the height of the currently-loaded LOD is, and to know it immediately.

Refactored a bit of logic out of TilesetHeightRequest to TilesetHeightQuery in order to reduce code duplication with the new functionality.

Issue number or link

Fixes #1216.

Author checklist

  • I have submitted a Contributor License Agreement (only needed once).
  • I have done a full self-review of my code.
  • I have updated CHANGES.md with a short summary of my change (for user-facing changes).
  • I have added or updated unit tests to ensure consistent code coverage as necessary.
  • I have updated the documentation as necessary.

Testing plan

Added unit tests to cover additive-refined, replace-refined, and partially-loaded tilesets as well as exercising the convenience overload.

Reviewer checklist

Thank you for taking the time to review this PR. By approving a PR you are taking as much responsibility for these changes as the author.

As you review, please go through the checklist below:

  • Review and run all parts of the test plan on this branch and verify it matches expectations.
    • If the issue is a bug please make sure you can reproduce the bug in the main branch and then checkout this branch to make sure it actually solved the issue.
  • Review the code and make sure you do not have any remaining questions or concerns. You should understand the code change and the chosen approach. If you are not confident or have doubts about the code, please do not hesitate to ask questions.
  • Review the unit tests and make sure there are no missing tests or edge cases.
  • Review documentation changes and updates to CHANGES.md to make sure they accurately cover the work in this PR.
  • Verify that the Contributor License Agreement has been submitted, if needed.

@ELeeScape
Copy link
Copy Markdown
Contributor Author

I'm not deeply familiar with cesium-native internals yet so I'm happy to receive feedback on better ways to implement this!

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.

Add Tileset::sampleHeightCurrentDetail

2 participants