Hi Lucie
Hi,

I want to delete a complete scene. I use 
root->removeChildren(0,root->getNumChildren());
Does it destroys the objects in the scene?
Yes and no. First of all it does exactly what the name says. It removes the children from the group. If you don't reference the nodes below that scene anymore(via osg::ref_ptr), they get destroyed (i.e. if their reference count is zero) A simpler approach is to do: root = new osg::Group(), which will also detach all children and is less pain ;-)

As you are speaking of the "scene", you probably should consider simply setting the viewers scenedata to an empty group:

viewer.setSceneData(new osg::Group());

cheers
Sebastian

Thank you!

Cheers,
lucie

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=52918#52918





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to