What is the best way to determine which billboards are visible in the current camera view?
I am working on a project where I have very large data set that I am required to draw as points initially (I'm actually using billboards to draw the points so I can change their scale by distance). These points are not static, and their positions will update based on data coming in from the server. I have been asked to change the point graphics to more complex mil symbol graphics when there are fewer than a certain number of points on the screen. So for example, when there are less than 100 points viewable, I will turn them into larger graphics. This is not based on zoom level, it's only based on the number of points in the current view.
I was thinking of doing something like this:
1) At every clock tick, get the current bounds of the viewable area using the technique posted here (https://groups.google.com/forum/#!topic/cesium-dev/VL_KVvLrELM)
2) Cycling through my billboard collections to compare the lat/lon values to the bounds obtained in step 1
3) If there are less than my threshold, cycle through the viewable billboards obtained in step 2 and change their images to be the proper mil symbol.
4) Revert any billboards not in the viewable area back to their point graphic
This feels inefficient, doesn't work when the user is zoomed out enough so that sky is in the view, and I know there are internal calculations going on that are much better than anything I will come up with that already determine which objects to display for the current camera view, so I'm hoping there's a way to get to that data.