 If the stack is empty, the nearest intersection of all pierced leaves is returned.If the popped element is entirely beyond the current nearest intersection, its traversal is skipped.It is also possible to add a fifth traversal case, but which also requires a slightly complicated construction phase.