On Nov 27, 2007 2:15 PM, Paul Martz <[EMAIL PROTECTED]> wrote: > Hi Robert -- Here's something that's stumped me for the past couple weeks: > Why does CullVisitor have an apply(Group&)? It appears to be a copy of > CullVisitor::apply(Node&), so I would think that if CullVisitor didn't > override apply(Group&), then the base class NodeVisitor::apply(Group&) would > get called, which (in turn) would result in CullVisitor::apply(Node&) > getting called. From this line of thinking, CullVisitor::apply(Group&) > appears to be redundant and unnecessary. > > Is there something going on C++-wise that makes this method a necessity?
Nothing clever or special. Never forgot code evolves over time, at one point there was code in apply(Group&) that was particular to Group, but over time CullVisitor evolved to not need this, perhaps at a later point new code will be reintroduced. There is no execution time overhead involved have this "redundant" method, so keeping it around is simply convinient. For instance I occassionally adding debug code in to places like Group& so its far better to just modify the .cpp than modify the header too and force a major rebuild. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

