worklist/hifi — pull request #96 by ZappoMan (2013-04-20 03:27:59+00:00)
Title: Working on False Color Support & LOD Bug fix

This is a big commit, but it's got several things in it:

* Fix to the LOD bug - turns out the problem was related to how we were calculating node points in both VoxelTree (bitstream on server code) and VoxelSystem (treeToArrays to render) I've left the old code in place, and fixed it by using an existing helper function that was reliably working in treeToArrays()

* Adding "false color" support to the VoxelNode (and Tree/System) - We're going to use false color in the client to do things like testing LOD and View Frustum behavior. This part of the commit cleans up the direct access of ->color[] and turns it into a more standard getter/setter approach. But also adds support for false color. NOTE: I do think we'll be changing this false color support to possibly only live in client side VoxelNodes by using a #ifdef or some other option, since it's costing us memory. But for now, our voxel trees are small enough that this isn't a huge problem.

* Adding recurseTreeWithOperation() to VoxelTree class - this is a generic version of tree recursion. It takes a callback/hook function as a parameter to allow you to call it and do an operation on each node of the tree. I'm using it in VoxelSystem to do false coloring.

* some general clean up and tidiness