[osg-submissions] Group::removeChildren fix
Robert Osfield
robert.osfield at gmail.com
Mon Jan 14 11:13:12 PST 2008
HI Garrett,
On Jan 14, 2008 5:38 PM, Garrett Potts <potts at cfl.rr.com> wrote:
> Is there a problem with childRemoved taking as an argument a
> osg::Node* type. Looking at the code in where childRemoved in the
> osg::Group node the indices as mentioned can't really be used to
> access the list in which the node was removed. Instead, would it be
> better to just pass the osg::Node* to childRemoved?
The unsigned int position is used because the Nodes themselves have
been removed and potentially no longer exist, so it'd be very bad
thing to pass the Node* around.
The concept behind the childInserted and childRemoved is that it
enables the maintenance of data structures that exist on a one per
child basis where there is 1:1 correspondance between the lists that
hold the original child data and the local data.
Robert.
More information about the osg-submissions
mailing list