• David Flynn's avatar
    geom: use single level based tree position representation · a8e8d3e6
    David Flynn authored
    The geometry tree nodes contain a position element (pos) that identifies
    the spatial position of the node.  At internal nodes this node position
    is the partial position of a point and may either be represented using
    the magnitude of the decoded points, or the magnitude of the current
    depth.
    
    The first form equates to:
     nextPos = curPos | (xyz << currentNodeSize)
    
    The second:
     nextPos = (curPos << 1) | xyz
    
    Where xyz represents a position bit from the coded occupancy.
    
    In order to use the first form to determine neighbour relationships,
    curPos must be shifted down to represent position within the current
    depth.  This repeated shifting, along with the introduction of
    simultaneous quantised and unquantised positions becomes increasingly
    difficult to follow when adding non-cubic nodes (via OtQtBt).
    
    This commit switches the representation to the second form above,
    eliminating various shifted forms and duplicate state.  A decoded
    positions is inverse quantised when reaching a leaf node.
    a8e8d3e6