Hi Sherman,

Nice little diagram and explanation, made it clear what could be an
awkward topic... answers below.

On Wed, Jul 22, 2009 at 8:12 PM, sherman wilcox<[email protected]> wrote:
> Take a look at the attached image. From within F's update callback, we
> know that we must not add children to or remove children from any of
> the red nodes, because all of those nodes have active traversals (i.e.
> invocations of osg::Group::traverse, where the local iterator variable
> is in danger of being invalidated).  But can we modify the blue nodes,
> since they do not have active traversals? By modify I mean add/remove
> child nodes of the blue nodes or change properties of the nodes
> themselves.

Yes it will be safe to modify the children of the blue nodes, as well
as the green node itself as the the update callback will be done
before or after your own children are traversed (this is under the
callbacks control.)   The one to avoid is the change of any parents
children lists as this will surely invalidate iterators.

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

Reply via email to