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

Added throttle option to TerrainData.createMesh #9313

Merged
merged 5 commits into from
Feb 28, 2021

Conversation

IanLilleyT
Copy link
Contributor

This PR originates from #9286 (comment). It adds a throttle option to TerrainData.createMesh which says whether it should limit the number of asynchronous mesh creations. Note that createMesh now takes an options object instead of separate arguments.

For rendering purposes, throttling is enabled so that only the most relevant terrain tiles are processed, letting it quickly adapt to camera movements.

For sampleTerrain/sampleTerrainMostDetailed, throttling is disabled so that all heights are sampled at once. This ability is needed by #9286 which calls createMesh when a TerrainData can't be interpolated from its raw buffer. Before, if the sample positions spanned a large number of tiles, many of the heights would be undefined because the system couldn't spawn a worker for every tile.

This PR also sets TaskProcessor.maximumActiveTasks constructor option to infinity by default.

…d a throttle option to TerrainData.createMesh, and using options object for TerrainData.createMesh
@cesium-concierge
Copy link

Thanks for the pull request @IanLilleyT!

  • ✔️ Signed CLA found.

Reviewers, don't forget to make sure that:

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

CHANGES.md Outdated

##### Additions :tada:

- Added `Cartesian2.cross`. [#9305](https://github.com/CesiumGS/cesium/pull/9305)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover from #9305

@cesium-concierge
Copy link

Thanks again for your contribution @IanLilleyT!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@lilleyse
Copy link
Contributor

Looks good. Thanks @IanLilleyT

@lilleyse lilleyse merged commit 52c3e87 into master Feb 28, 2021
@lilleyse lilleyse deleted the terrainDataThrottleControl branch February 28, 2021 19:55
@lilleyse lilleyse restored the terrainDataThrottleControl branch February 28, 2021 19:59
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