Re: [osg-users] Nodes commiting suicide during traversal

2008-11-26 Thread Sukender
Thank you for answering so fast, Robert. I guess I'll try something like "parent->addUpdateCallback(new CallbackThatCleansThingsInChildren())", since I'm writing generic code (I don't want to change parents' code). Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.

Re: [osg-users] Nodes commiting suicide during traversal

2008-11-26 Thread Robert Osfield
Hi Sukender, The approaches I'd used are either: 1) A top level clean up tool that runs before/after the update traversal - like your suggestion of a manager, but in essence it just a list of objects to remove from the list. 2) Have a callback above the child you want to remove do the rem

[osg-users] Nodes commiting suicide during traversal

2008-11-26 Thread Sukender
Hello all, "Modifying elements on the scene graph that affect traversal during traversal is a [...] restriction, simply because doing so invalidates iterators of the calling methods.", Robert said ( http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2007-September/002938.htm