RAY-TREE-INTERSECTION and octree construction