Draw entities/billboards/primitives that are within the current camera view region ONLY.

Hi guys.

Could you help me please.

I draw a lot of entities/billboards/primitives on page initialization. This approach kills performance dramatically, the page has freezing effect. How can I optimize it the best way?

Seems like I need to "redraw/rerender" entities/billboards/primitives that are within the current camera view region ONLY.

How can I get the current camera view region ?

How can I check that entites/billboards/primitives are within the current view camera region ?

Does "redraw/rerender" mean to remove entites/billboards/primitives from viewer and add the new ones) ?

Thank you very much.

Yes and of course the current camera view region takes into account the current zoom level

Hello,

Sorry, we don’t have a method for getting the camera’s view region. This is surprisingly complicated in 3D, especially when viewing the globe at an angle. We have an issue open here: https://github.com/AnalyticalGraphicsInc/cesium/issues/871

There are a few workaround suggestions in that issue.

Ultimately, the best solution for this is to use the new 3D Tiles format that is currently being developed. See this forum post for details: https://groups.google.com/forum/?hl=en#!searchin/cesium-dev/3d$20tiles/cesium-dev/tCCooBxpZFU/7hxT_E4pGgAJ

Best,

Hannah

Actually, it looks like we just added a new function in Cesium 1.19 to get the rectangle camera coordinate. See Camera.computeViewRectangle

-Hannah