[Algorithms] Octree leaf neighbours
Brought to you by:
vexxed72
From: Sam K. <sa...@ip...> - 2000-07-15 20:56:49
|
Hi, I'm creating an octree, and need to maintain pointers between neighbouring *leaves*, and do it quick. The only way I can think of is to skip back up the tree and down the neighbouring branches to locate each of the 6 neighbours. This doesn't seem very fast. There is a method called "linear octrees" which supposedly let you use the so called "morton number" to directly hash a neighbour from is location in 3 space. But I believe you *have to subdivide the whole octree evenly* so every leaf is stored and can be hashed properly. (i.e. a 3d array!). Fat use since the reason i'm using an octree is to avoid a memory hungry grid in the first place, or am I missing the point? Any insights would be appriciated! Sam. |