Stop recursion only when all 3 vertices of the triangle are outside the roi (left/right or above/below).