anchor.diff:        (push (cons cur-idx (cdr inter)) res))
       (reverse res)))
   
  -(defun ray-tree-intersection (tree origin dir &optional (depth 0))
  +(defun ray-tree-intersection (tree origin dir &optional (depth 0) (path (list tree)))
     "Search intersection of a ray with closest to the ORIGIN
  -   cuboid in TREE"
  +   cuboid in TREE. Returns point in which intersection is occured
  +   and path to a tree leaf in which intersected voxel is stored."
     (declare (optimize (speed 3))
              (type (integer 0 #.most-positive-fixnum) depth))
     (let* ((bb (node-bounding-box tree))
  
positive.code:                         (if (< (calc-abs-metric dot1 origin)
                                 (calc-abs-metric dot2 origin))
                              dot1 dot2)))
                   (reduce #'get-closest leaf-intersections)))))
          
          (t
           (let ((center (node-dots tree))
  
negative.code:     (multiple-value-bind (bb-interp bb-inter-coord)
          (and bb (hit-box bb-min bb-max
                           origin dir))
        (cond
          ((not bb-interp) nil)
          
          ((and (boundp '*lod*)
                (= depth *lod*)) (values bb-inter-coord path))
          
          ((leafp tree)
           (let (leaf-intersections
                 (dots (node-dots tree)))
  