Hi Andrew, On Wed, Aug 5, 2009 at 9:35 AM, Andrew Burnett-Thompson<[email protected]> wrote: > I noticed osg::Camera offers more direct access to the view/projection than > the camera manipulator (which only affects the View), so I've dumped camera > manipulator and created two cameras - perspective / plan.
Yes this would be doable, although having two separate views in CompositeViewer might be more logical an easier to manage. > Then I am directly updating the camera in the perspective/plan mode from my > own event handling code. (In addition I need multiple other cameras that I > can position around the scene in perspective mode and switch to on various > key presses). > > One problem - I am trying to swap the cameras in/out of the osg::Viewer so I > was using osg::Viewer::setCamera and getCamera to get/set the default > camera, however it is not behaving as expected. What problem are you seeing? Using the viewer.getCamera()->set..MatrixAs..(..) methods work fine, but if you need to make sure that you aren't also attaching a CameraManipulator as this will overwrite your values on each frame. > Is this the right way to set the default camera? Just use the Camera that is already assigned to the Viewer. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

