Calculates the +Z camera distance that fits a bounding box in view.
X/Y are the screen plane and Z is depth, matching fitCameraToBounds' fixed
face-on pose. The larger X/Y extent fills fitRatio of the shorter viewport
axis at the nearest Z face. If both projected extents are zero, half the Z
extent is used as a conservative fallback so the camera stays off the geometry.
Calculates the +Z camera distance that fits a bounding box in view. X/Y are the screen plane and Z is depth, matching fitCameraToBounds' fixed face-on pose. The larger X/Y extent fills fitRatio of the shorter viewport axis at the nearest Z face. If both projected extents are zero, half the Z extent is used as a conservative fallback so the camera stays off the geometry.