Hi Bart, I'm not entirely clear on your setup, but as a general comment, for selecting between different views you could have multiple View's in a CompositeViewer and switch the views on/off by set each View's master Camera's NodeMask to 0x0 or 0xffffffff to switch them on/off. Or you could simply copy the view and projection matrices from different sources to a single Viewer's master Camera. There are other ways you can do it as well, but personally I'd probably just opt for copying the appropriate view and projection matrices to a single master camera.
Robert. On 2 December 2011 01:48, bart gallet <[email protected]> wrote: > Howdy folks > > I got a question about viewing different cameras, one at a time, from one and > the same display: > > I am running a virtual environment for multiple AI agents. Each of them have > a camera sensor. So each agent has an osg::Camera and continuously produce > offscreen image sequences that get processed by the AI and then steer the > agent (and its camera) accordingly (closed loop feedback). > > So each agent has a viewer that renders to a pBuffer to generate osg::Images > that get processed. > > Now, as curious as I am, during the simulation runs, I would also like to > select any agent and "see" what the agent is currently "seeing". So I would > have just one display, and through the use of a keyboard input select any > agent in my environment and then watch its camera feed in the one and only > display. > > What would be the best way to achieve this? Could I have a single viewer to > drive my display, and depending on my keyboard input hot swap in and out the > osg::Camera objects through the osgViewer::Viewer->setCamera() method? (if > not, why not?) > > Alternatively, I could tap into the video streams directly (i.e. the > osg::Images in CPU memory from each agent) and then somehow display the > images directly to the screen? How would I go about that? > > Thank you in advance > > Cheers, > bart > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=44177#44177 > > > > > > _______________________________________________ > 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

