It's probably osgViewer::CompositeViewer that you want, not
osgViewer::Viewer. There's an example in the source. That way you create
two different osgViewer::Views, and each can have it's own manipulator.
The control is up to you, but if you want automated rotations and
panning, I usually use NodeTrackerManipulator instead of
TrackBallManipulator. I just create a PositionAttitudeTransform
somewhere in my scene that represents the camera position, and animate
it in a callback like Jason suggests.
-Mike
Jason Daly wrote:
Bob Youmans wrote:
My questions are currently:
1. What’s the best way to connect the two cameras so they’re
the same position & orientation, only rendering to different targets
(e.g., update the matrix of one with the other using an update
traversal, put both under a transform node in a tree, etc.)?
This sounds like a plain old osgViewer::Viewer with a slave camera is
the way to go. You control the viewpoint with the master camera, and
both cameras render wherever you need them. I think the osgsidebyside
example may give you an idea how to set this up (it's not exactly what
you're looking for, but a lot of the code is relevant). osgprerender
might also be relevant.
2. What’s the best way to programmatically (vs
TrackBallManipulator default) control the camera, and/or switch
between these methods?
The most straightforward way to do this is with an UpdateCallback. I
think Paul Martz's OSG Quick Start Guide explains this pretty well.
--"J"
------------------------------------------------------------------------
_______________________________________________
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