Might moving the logic over to the add/remove parent methods and making special 
overloads for those methods in the drawable class be a solution? I don't know 
if it's better at the end but at least this would at least remove the need to 
have special handling of this in the setChild method (with all those delta's).

Btw I also noticed that setNumChildrenRequiringUpdateTraversal has a special 
check if there is already an updatecallback there should also be a test for a 
drawable updatecallback somewhere in there, right?

However you solve this you will get yucky code. Even both callbacks use the 
same member variable name _updateCallback which just don't feel right now...

I just found a new bug regarding with the callbacks: a osg::NodeCallback as a 
update callback to a drawable will not be called if the drawable is attached to 
a geode.

Btw I haven't tested event callbacks but those might also not work correctly 
now.

Cheers,
Pjotr

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=59504#59504





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

Reply via email to