nl_tokens: Recursively moves an existing point to a new position .
pl_tokens: function move ( point , position , octree , octant , parent , depth ) { const children = octant . children ; let result = null ; let i , l ; let points ; if ( octant . contains ( point , octree . bias ) ) { if ( octant . contains ( position , octree . bias ) ) { // The point and the new position both fall into the current octant. if ( children !== null ) { ++ depth ; for ( i = 0 , l = children . length ; result === null && i < l ; ++ i ) { result = move ( point , position , octree , children [ i ] , octant , depth ) ; } } else if ( octant . points !== null ) { // No divergence - the point can be updated in place. points = octant . points ; for ( i = 0 , l = points . length ; i < l ; ++ i ) { if ( point . equals ( points [ i ] ) ) { // The point exists! Update its position. points [ i ] . copy ( position ) ; result = octant . data [ i ] ; break ; } } } } else { // Retrieve the point and remove it. result = remove ( point , octree , octant , parent ) ; // Go back to the parent octant and add the updated point. put ( position , result , octree , parent , depth - 1 ) ; } } return <mask> ; }