A generic Octree implementation