cognitedata / reveal

Cognite Reveal 3D viewer

Home Page:https://cognitedata.github.io/reveal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom sector weighting in V9 ByScreenSizeSectorCuller

vegasten opened this issue · comments

We would like the opportunity to create a custom sector weighting in the V9 ByScreenSizeSectorCuller , to make it work with our sector splitting. This means that we would not use the functions in WeightFunctionsHelper , but rather create new ones for our specific use. The determineSectorPriority function would also have to be different.

Having a custom determineSectorPriority function could solve a lot of our problems. We would need some more data available to the function, though. We need to have access to the camera (specifically camera position), to calculate the distance to each sector, and maxSectorDistance/minSectorDistance for normalized distance.

An idea is to:

  • Make V9 ByScreenSizeSectorCuller public
  • Extend the constructor with a new optional function: determineSectorPriority (similar to the already implemented determineSectorCost )
  • Make the determineSectorPriority signature equal to the internal one.
  • Make Camera, and min/max distance in WeightFunctionsHelper public so it can be extracted and used in a "non-preexisting" weight system.

Closing this because we now have a custom sector culler.