Hi Guy, Win XP on a SGI Octane? Have a woken up in different parallel universe today? If thought Octanes were Mips+IRIX machines...
As for the project/view matrix configuration... The different combinations are quite equivalent. First up the slave camera's view and project matrix are modified each frame unless that slave camera's ReferenceFrame is set to ABSOLTE_RF in which case on the slave camera's project and view matrices are left untouched. When the ReferenceFrame is RELATIVE_RF (as it is by default) each frame the view matrix of the slave is computed by post-multiplying the master camera's view matrix by the view transform matrix you passed in with the addSlave method. The slave projection matrix is computed by post-multiplying the master camera's projection matrix by the projection transform matrix you passed in with the addSlave method. Robert. On Mon, Jan 12, 2009 at 1:04 AM, Guy Wallis <[email protected]> wrote: > Hello, > > I have a query relating to setting up cameras in OSG. > > > > I am looking to specify a frustum and view offset for my camera. I can do > this in several different ways: > > > > > > viewer.addSlave(camera.get(), osg::Matrix::frustum(-1,1,-1,1,3,1000), > osg::Matrix::translate(0.0f,0.0f,-30.0f)); > > > > OR > > > > camera->setProjectionMatrixAsFrustum(-1,1,-1,1,3,1000); > > camera->setViewMatrix(osg::Matrix::translate(0.0f,0.0f,-30.0f)); > > viewer.addSlave(camera.get()); > > > > OR > > > > viewer.addSlave(camera.get()); > > viewer.getCamera()->setProjectionMatrixAsFrustum(-1,1,-1,1,3,1000); > > viewer.getCamera()->setViewMatrix(osg::Matrix::translate(0.0f,0.0f,-30.0f)); > > > > Only the last of these combinations produces the results I was expecting. I > thought they were equivalent. What am I missing? > > > > Thanks, > > > > Guy > > > > PS I'm running OSG 2.4 under Win XP and on a SGI Octane > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

