Skip to content

Change semantics of zoom value / remove base voxel concept #9131

@philippotto

Description

@philippotto

Status Quo

Next to voxel space and physical space (= voxel coordinate * voxelSize), we also have the implicit concept of a "base voxel space" (see getBaseVoxelInUnit and getBaseVoxelFactorsInUnit and its usages).
This third space is responsible for quite some complexity without much gain. Mainly, the space is used for the data planes and the orthographic cameras. Effectively, the data planes are not scaled with the voxelSize (which would be the physical space), but instead with the base voxel factor. All code that deals with lengths of the plane need to convert back from the base voxel space to voxel or physical space.
This complexity already led to quite some sunken time to debug things (e.g., #9114) and also requires additional conversions between coordinate systems in various places.

First experiments showed that hardcoding the base voxel factor to 1 (and thus making it independent of the voxel size) still yields correct behavior (rendering, scale bars etc). Then, base voxel space is equivalent to the voxel space and thus not needed, anymore.

Proposed Changes

I propose to remove the base voxel factor completely. The only downside (as far as I can tell now) is that the semantics of the zoom value changes. That is, old zoom values will look (vastly) different when the code is changed. To reduce this impact, we could change the url manager so that there is a new format for the new zoom value. Then, the old format is automatically converted. This means, that old URLs will still work as before.

To do

  • test setting base voxel factor to 1
  • run/fix screenshot tests (needs conversion of zoom value)
  • run/fix frontend tests
  • build compatibility for old urls and adapt format to support the new semantics
  • clean up by removing the superfluous conversions completely
  • test again manually

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions