4. Case 1 B P If P is inside B, the clamped point is P itself, which is also the point in B closest to P
5. Case 2 B Q P If P is in a face Voronoi region (two dimensions from the box) of B, the clamping operation will bring P to that face of B which will be called Q. The clamping corresponds to an orthogonal projection of P onto B and must therefore result in the closest point on B.
6. Case 3 P Q When P is in a vertex Voronoi region of B, clamping P gives the vertex as a result, which again is the closest point on B. B
7. Case 4 P Q B when P is in an edge Voronoi region, clamping P corresponds to an orthogonal projection onto the edge, which also must be the closest point on B to P.