voxelinc/voxellancer — pull request #226 by mrzzzrm (2014-01-03 22:38:20+00:00)
Title: Several updates on VoxelTree and WorldTree

Now, this is a big one. Didn't want to split it, since the changes depend on each other and with the current review speed this would have taken ages. Sorry for that.

* Introduces WorldTree and VoxelTree as controllers for the actual trees made of ...Nodes. The ...Tree manages extending, so #217 and #218 are fixed
* Geodes are now managed via integer-AABBs as that is faster
* ...Nodes only expose subnodes() that contain something, little performance boost. That way the WorldTree or anyone using it is prevented from doing needless work. Fixes #163
* No need to "shrink" after voxeldestruction or splitting as VoxelTree::root() is pointing to the smallest node that directly contains filled nodes. Fixes #209.
* remove rebuildVoxelTree() as it wasn't needed any longer.
* VoxelCluster::aabb(), thus WorldTreeGeode::aabb() is cached to prevent some redundant calculations
* Add intersectingLeafs to WorldTreeGeode. This currently isn't useful, but can reduce the count of possibleColliders in the collision detector if used correctly in the future
* Fixed tests
* #183 takes around 4% under heavy fire. I'd consider it fixed for now.
* #182 is done somehow as well, as tree's only expose "active" subnodes

While this speeds up things a bit, the performance problem now needs to be crushed on another front, i.e. the splitdetector and managing particles outside of the worldtree.

Happy reviewing ;)