Hi,
OSG is very powerful toolkit so I wirte simple nodevisitor
class ReplaceGrouptoSwitchVisitor: public osg::NodeVisitor {
public:
ReplaceGrouptoSwitchVisitor(const std::string& name) :
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
_name(name) {
}
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 ge
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 éc
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/viewt
4 matches
Mail list logo