Zoom2: Adding zoom specific `cell_getid` functions.
This PR adds the functions and logic to get the cell IDs of various cells in the cell hierarchy when running with the zoom code enabled.
Specifically:
- Cell types and subtypes are introduced. Along with names which previously didn't exist.
-
cell_getid_pos
is introduced. This replaces every instance ofcell_getid
in the code where a position is multiplied by the inverse width of a cell. Instead, this function takes the positions as arguments and in a non-zoom case simply abstracts the multiplication by the inverse cell width. However, in a zoom case, it callscell_getid_zoom
with the positions. -
cell_getid_zoom
is introduced. This function uses cell types to identify which level of the hierarchy should be returned. It starts at the background level and then moves down a level if the cell subtype isempty
orvoid
, accounting for grid boundaries as it goes. -
cell_getid_offset
is introduced to make getting buffer and background cell IDs fromi
j
k
coordinates a bit cleaner.