Octtree implementation in C++