Re: [osg-users] changing the node in viewer.setDataScene

2007-02-11 Thread Paul Speed
elekis wrote: [snip] //init osg::Group* root = new osg::Group(); osg::Group* root2 = new osg::Group(); viewer.setSceneData( root ); // after a action viewer.setSceneData( root2 ); // after a other action viewer.setSceneData( root );

Re: [osg-users] changing the node in viewer.setDataScene

2007-02-10 Thread elekis
On 2/8/07, Paul Speed [EMAIL PROTECTED] wrote: elekis wrote: hi all I have a little probleme, I have two node who represent two differents things, and I would like to render one, and afer pushing a touch, changing on other something like that //init osg::Group* root = new

[osg-users] changing the node in viewer.setDataScene

2007-02-08 Thread elekis
hi all I have a little probleme, I have two node who represent two differents things, and I would like to render one, and afer pushing a touch, changing on other something like that //init osg::Group* root = new osg::Group(); osg::Group* root2 = new osg::Group(); viewer.setSceneData( root

Re: [osg-users] changing the node in viewer.setDataScene

2007-02-08 Thread Rafa Gaitan
Hi elekis You can use an osg::Switch node on top of your two scenes: osg::Switch *switchRoot = new osg::Switch() ... your nodes... switchRoot-addChild(root); switchRoot-addChild(root2); switchRoot-setSingleChild(0); ... When you want change to the root2 scene only do:

Re: [osg-users] changing the node in viewer.setDataScene

2007-02-08 Thread Robert Osfield
Hi, With osgProducer::Viewer you'd be best toggling the using a Switch. With osgViewer::Viewer it can handle a setSceneData/getSceneData() without problems. Robert. On 2/8/07, elekis [EMAIL PROTECTED] wrote: hi all I have a little probleme, I have two node who represent two differents

Re: [osg-users] changing the node in viewer.setDataScene

2007-02-08 Thread elekis
thnaks, thats works, except in my code it's setSingleChildOn(0); (he didn't recognize without On) a++ On 2/8/07, Rafa Gaitan [EMAIL PROTECTED] wrote: Hi elekis You can use an osg::Switch node on top of your two scenes: osg::Switch *switchRoot = new osg::Switch() ... your nodes...

Re: [osg-users] changing the node in viewer.setDataScene

2007-02-08 Thread elekis
On 2/8/07, Robert Osfield [EMAIL PROTECTED] wrote: Hi, With osgProducer::Viewer you'd be best toggling the using a Switch. With osgViewer::Viewer it can handle a setSceneData/getSceneData() without problems. what is the difference between osgProducer and osgViewer?? whitch is the best?

Re: [osg-users] changing the node in viewer.setDataScene

2007-02-08 Thread Robert Osfield
Hi Elikis, On 2/8/07, elekis [EMAIL PROTECTED] wrote: what is the difference between osgProducer and osgViewer?? whitch is the best? Do a search for discussions in th osg-users archives about osgViewer over the past two months, there is huge amount of discussion on it. osgViewer is new

Re: [osg-users] changing the node in viewer.setDataScene

2007-02-08 Thread Paul Speed
elekis wrote: hi all I have a little probleme, I have two node who represent two differents things, and I would like to render one, and afer pushing a touch, changing on other something like that //init osg::Group* root = new osg::Group(); osg::Group* root2 = new osg::Group();