Moved RayOctree method to the cpp