Octree neighbour search
问题 I have an octree, that stores a voxel-based fluid. When I simulate the fluid, I need to access the leaves around the current node, how can I implement such a search? You can assume the node stores a pointer to its parent node.(Perhaps other data is needed?) 回答1: Assuming each octree node also holds its 3D index[1] in the octree (and its depth). Generate the 3D indices for the neighbor nodes of the query node (simply increment/decrement the 3D index of the query node in each dimension). For