Max Bandazian wrote on Saturday, August 01, 2009 12:42 PM: > The algorithm copies things from the end of the vector into the locations of > the elements to be deleted, and then shortens the vector by that amount. So > if your vector is a, b, c and you want to remove 'a', first c gets copied > into a's spot (c, b, c), then the vector is resized (c, b). I guess that > would break Switch nodes etc. > > Normally it would be fine with me if this doesn't make it into osg, but the > use of friends in osg::Node means that it's impossible to correctly > reimplement osg::Group::removeChildren without changing the Node header. > Maybe it could be added as an osg::UnorderedGroup, or the current osg::Group > could become osg::OrderedGroup, etc.
Ah, I see the problem, thanks. It seems to me, also, that having so many children in a Group is going to cause performance problems in general; using less of a flat tree structure would help with the cost of removing children, and would improve cull traversal times because the Groups would be more spatially organized. -- Bryan Thrall FlightSafety International [email protected] _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
