thanks!

2007/10/10, Matthias Stiller <[EMAIL PROTECTED]>:
>
> Hello Pablo,
>
> you need to remove children from the back of the list or doing something
> like this
>
> OSG::beginEditCP( scene );
> while (scene->getNChildren()>0)
>     scene->subChild(0);
> OSG::endEditCP( scene );
>
> HTH
>
> Matthias
>
> On Tuesday 09 October 2007 21:39, Pablo Carneiro Elias wrote:
> > Hi eveyone.. I have a scene which is basically a Node with a
> > Transform set as the core.... So, I add all geometry as child of this
> > Node and now I just want to get children removed from that node....
> > here's my chunk of code...
> >
> >   unsigned int numChilds = scene->getNChildren();
> >
> > OSG::beginEditCP( scene );
> >
> >     if( numChilds > 0 )
> >     {
> >         // Cleaning scene
> >         for( unsigned int i = 0 ; i < numChilds; i++  )
> >         {
> >             scene->subChild( i );
> >         }
> >
> > OSG::endEditCP( scene );
> >
> >
> > It should work for me.... but it doesnt.... can anyone say whats the
> > right way to clean up a node (remove children)...
> >
> >
> > Thanks!!!!
>
> --
> +---------------------+----------------------------+
> | VREC GmbH           |                            |
> | Matthias Stiller    |                            |
> | Robert-Bosch-Str. 7 | tel:    +49 6151 4921034   |
> | 64293 Darmstadt     | web:    http://www.vrec.de |
> | Germany             | mail:   [EMAIL PROTECTED]         |
> +---------------------+----------------------------+
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to