frustum view clipping


I'm new to Cesium so please bear with me. I have read as much as I can find relating to my subject in the forum posts and issue tracker. Some come close but don't quite go all the way.

After creating sample applications with the Viewer and CesiumWidget I attempted my main aim which is to offset or clip the camera's view on the canvas (or viewport). I don't want to move or rotate the view. Think flat, tiled, display array with cesium applications having the same camera properties but unique frustums.

I have some questions around why I cannot seem to achieve the behaviour I desire. For example, if (and using the Sandcastle app, with CesiumWidget to demonstrate) I set: = 0.0; = 1.0; = 0.0; = 1.0;

I would expect that the bottom right quad of what camera can see is rendered to the viewport's drawing buffer. This is not the case as the frustum always seems to allow the camera's full view even though the above variables persist.

I also notice that changing the aspect ratio to a value other than 1 has no effect other than an initial squished globe outline before the textures are drawn then it is back to being round. It looks like there is some extra function setting or restoring the aspect ratio and overriding what is requested. Is this the case?

Changing fov does have an effect as I would expect.

It looks like the PerspectiveFrustum is a PerpectiveOffCenterFrustum behind the scenes? Not seeming to be able to instantiate and assign/replace another camera to the scene, I'm assuming that the type of frustum being used is dependent on the current scene mode?

Should there be some other update called for the projection matrix after setting the frustum variables to allow them to stick?

Also, In CesiumWidget.js, there are a couple of functions involved with resize() that look like they might override something somewhere? Are these red herrings?
97: configureCanvasSize(widget)
115: configureCameraFrustum(widget)

While I have had a little hack into the source for frustums and cameras (with no luck) I have not looked into custom rendering loops yet. Hoping not to at the moment. I'm rather lost as to how to make this part of the api work.

Any advice well appreciated.



I have the same questions as Gary. More info would be appreciated.

What I am trying to do is have a side panel div floating over the globe that shows info about each country. I want to be able to zoom to a country’s polygon, but have the camera/frustum offset by the width of the panel so that the panel does not cover the polygon. If anybody knows how to achieve flyTo() with a pixel offset please let me know. Thanks.