Working on kd-tree intersection test.