Hi Peter, On 2/17/07, Peter Steibert <[EMAIL PROTECTED]> wrote:
I´m just trying to create a minimap of the scene depicted in a corner of the screen. Furthermore I don´t want to use osgProducer::Viewer but osgViewer::SimpleViewer (because of Qt).
I have yet got it wired up, but my plan is to make it possible to use all the osgViewer Viewer classes usable with 3rd party toolkits like Qt. This will give you a few more options for how to put your viewer together. I'll ping the list once I've got more of this working - basically we'll have a GraphicsWindowQT that'll provide integration.
As I´m quite a newbie in OpenSceneGraph, I´m not sure about the steps to create the minimap (Camera Node etc.). Any help that outlines those steps would be very helpful.
When you say minimap do you mean a second view onto the scene, with this second insert ed view a map view? There are a couple ways of tackling this. First up you can use an osg::Camera as part of the scene graph to create this second view, this camera sets up its own view and project matrices as well as the scene that it wishes to view. Using a Camera in the scene graph will make the code portable between different viewers, WIth SimpleViewer its the approach to use, however conceptually having a Camera in the scene for this extra view is a bit awkward. The type of usage you have is really a case of having multiple views on the scene, and this is exactly the type of scenario supported by osgViewer::CompositeViewer. The osgmultiplecameras example in SVN/CVS shows how to set things up. CompositeViewer allows you to manage multiple views on to one of more scenes, and have separate camera manipulation and even handling for each view. The views can be rendered across multiple graphics windows as well. Moving between a Camera in the scene graph to a Camera in a separate View in a CompositeViewer won't require many changes as all the Camera set up will be the same, it'll just be slightly different at the top level viewer setup. Robert. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
