Hi Farshid, On 7 May 2014 17:26, Farshid Lashkari <[email protected]> wrote: > I have an application that will load a model from file and attach a custom > cull callback to the node. I recently discovered that my cull callback does > not work properly if the root node of the model is a Geode. When > encountering a Geode, the CullVisitor will handle the cull callbacks and > then traverse the Geode. However, the drawables are processed after the > traversal, regardless of the result of the cull callbacks. > > I typically use cull callbacks to either prevent traversal of a node under > certain conditions, or to wrap some custom operation around the traversal of > the sub-graph. Neither of these are currently possible with Geodes. > > I recall a discussion a few years ago about making Drawable objects another > kind of Node. Is this still being considered?
I haven't thought about it for a year or so, so it's not really fresh in my mind. I think might had a bash at implementing it but stalled for some reason, I suspect parts ended up more complicated than originally anticipated. I don't recall the details. > If this would cause too much > compatibility issues, how about adding an additional > NodeVisitor::apply(Drawable) method? This would just require implementing a > Geode::traverse method and should not cause much compatibility issues. With > some minor changes to the CullVisitor, this would allow cull callbacks to > work properly with geodes. I also think this would simplify implementing > custom node visitors that operate on drawable objects. > > Does this seem like a reasonable change? Thoughts/suggestions? Feel free to have bash implementing it, see what happens when you try to make the changes. Unfortunately I'm just too hazy on the whole issue to know of the potential issues that might need resolving off the top of my head. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

