[osg-users] Slave cameras in a view

Karl Heijdenberg karl.heijdenberg.osg at gmail.com
Wed Oct 10 02:45:09 PDT 2007


Hi,

I'm trying to add two cameras to one View in compositeViewer.
The first camera is added as a master camera and the second as a slave
camera.

Frustums for the cameras:
master={-50, 0, -40, 40}
slave={0, 50, -40, 40}

For the first camera I set the projectionMatrix with
setProjectionMatrixAsFrustum.

How do I calculate the projectionOffset for the slave camera?

The offset is needed in call to addSlave(osg::Camera* camera,const
osg::Matrix& projectionOffset, const osg::Matrix& viewOffset, bool
useMastersSceneData=true);

I've also tried to set the reference frame to ABSOLUTE_RF_INHERIT_VIEWPOINT
and then call the setProjectionMatrixAsFrustum for both cameras. This test
ended up in a black scene for the second camera. Am I missing something?

Thanks, Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071010/01bc5101/attachment-0002.htm>


More information about the osg-users mailing list