have a look at osg::Group::replaceChild. Get the parents list from the group you want to replace and call parent->replaceChild(group,switch)
-Nick On Thu, Jun 17, 2010 at 2:11 PM, Vincent Bourdier < vincent.bourd...@gmail.com> wrote: > Hi, > > You just have to create a new Switch, attach the geodes to it, and get the > parent of the group to attach the switch and remove the group. > Next just check that the geode only have one parent, but I think this would > be enought > > Regards, > Vincent. > > Le 17/06/2010 12:58, Roman Grigoriev a écrit : > > Hi, >> Sorry for noob question but maybe there is example how to change >> this scenegraph >> group -| >> |-geode >> |-geode >> to >> switch-| >> |-geode >> |-geode >> >> ... >> >> Thank you! >> >> Cheers, >> Roman >> >> ------------------ >> Read this topic online here: >> http://forum.openscenegraph.org/viewtopic.php?p=29074#29074 >> >> >> >> >> >> _______________________________________________ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org