Tiled datasets with SPS/PCS

I have a point cloud that can be thought of as tiled, as the user zooms in I dynamically add more data to the scene.

I currently have a grid of SPS (could also be PCS) and as the camera (ArcRotateCamera) radius decreases I change the LOD dynamically and add data to each of SPS objects by hooking into useBeforeRender. That works quite well.

However how do I calculate which cells of the grid are in the current view, I know it is trig but is there an example with rays or a convenience function I should be calling?

This is essentially an octree problem, a single PCS or SPS where the points are updated dynamically depending on the view and LOD, is this something I can hook into at the octree level?

Many thanks,


Hi @normanb and welcome to the forum

With an octree, you can check if a box hierarchy is in frustum:

and retrieve frustum planes with : var planes = scene.frustumPlanes;

For the LOD, if the box is in the frustum, then it’s a matter a distance to the camera.


Ok, that makes sense. I was hoping that the culling operation would give me a list of activeMeshes but they are all active, I will loop through the tiles (there are not that many of them) and check isInFrustum.

I should also be able to make a Playground example out of this.

1 Like