Hi Mike, It is not reccomend to modify the scene graph during traversal as this will invalidate iterators that are on the stack (NodeVisitor uses nested calls to do traversal).
The best way is to modify the scene graph before or after traversal. Typically one achieves this by generating a remove/add list during traversal then afterwards do the act add/delete. On 7/26/06, Mike Wozniewski <[EMAIL PROTECTED]> wrote:
Hi all, I am experiencing a segfault that I cannot get rid of, and I'm looking for ideas: I am moving a node (osg::PositionAttitudeTransform) during it's callback... ie, I am detaching it from it's current parent with parent->removeNode(PAT*) and re-attaching it with newParent->addChild(PAT*). The parent nodes are similar PositionAttitudeTransform's with the same type of callback, and could have been visited already by the update traversal, or not. Can I do this? I imagine that the segfault is because the nodePath of the current traversal becomes inaccurate, or perhaps there is some memory management that I'm messing up. Is there a way to tell OSG to restart the update traversal if I re-arrange the graph? ...or does anyone have some other idea? Thanks, Mike Wozniewski _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
