[osg-users] switching between multiple sub-scenes, with different manipulators

Robert Osfield robert.osfield at gmail.com
Sun Jul 17 00:24:10 PDT 2016


Hi Roozbeh,

It should be possible to add and remove View's from a CompositeViewer,
the methods for doing this are protected so that switch off threading
before doing any operation - this should at least work when using a
standard osgViewer based application.  However, I can't say anything
about what you might be doing w.r.t threading on the Qt side as it has
caused various issues w.r.t threading over the years.

The alternative route would be to add both view's to the
CompositeViewer at the same time and then just switch each view on/off
by toggling the view's master Camera's NodeMask between 0 and
0xffffffff.

Robert.


On 16 July 2016 at 13:59, Roozbeh Sharlune <roozbeh.fazl at gmail.com> wrote:
> Hi all,
>
> I have (virtually) independent scene graphs in my application and I want to switch between them. Each sub-scene has its own manipulator, camera, ... although some stuff can be common too.
> The obvious way to do it, to best of my understanding, is to use different osgViewer::View s for each scene and add them to an osgViewer::CompositeViewer and then switch between these views. BUT, this makes problems with multi-threading and Qt5.
> Is there another solution? The bottle neck here I think is that I have to set manipulators for views. If I could do it differently, e.g. to cameras, it could work. Wishful thinking of course :D
>
> Thank you!
>
> Have fun,
> Roozbeh
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68150#68150
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list