globe bounding box in screen coordinates

I can't seem to figure out how to calculate the bounding box of the globe in screen coordinates. I can easily get the center with:

     var center = Cesium.SceneTransforms.wgs84ToWindowCoordinates(viewer.scene, new Cesium.Cartesian3(0,0,0));

but how do I get the top left, top right, bottom left, bottom right points for any camera position? i.e. allow me to place a div with css exactly bounding the earth at all times.

Hi,

I don’t think we have a generic function yet to project a bounding sphere to screenspace. However, we have similar code when filling the poles for drawing the globe. The approach is instead of projecting just (0, 0, 0). Project +/- Ellipsoid.WGS84.X, Y, and Z and then take the min/max. This is imprecise but may work for your case (#1316).

Patrick