Add a comment explaining some confusing code in UpdateVisitor and EventVisitor

This commit is contained in:
scrawl 2017-02-03 17:39:56 +01:00
parent 09ca132102
commit a858b2a2cd
2 changed files with 4 additions and 4 deletions

View File

@ -106,11 +106,11 @@ class OSGGA_EXPORT EventVisitor : public osg::NodeVisitor
handle_callbacks(drawable.getStateSet());
}
// The following overrides are technically redundant as the default implementation would eventually trickle down to
// apply(osg::Node&); - however defining these explicitely should save a couple of virtual function calls
virtual void apply(osg::Geode& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Billboard& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::LightSource& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Group& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Transform& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Projection& node) { handle_callbacks_and_traverse(node); }

View File

@ -73,11 +73,11 @@ class OSGUTIL_EXPORT UpdateVisitor : public osg::NodeVisitor
handle_callbacks(drawable.getStateSet());
}
// The following overrides are technically redundant as the default implementation would eventually trickle down to
// apply(osg::Node&); - however defining these explicitely should save a couple of virtual function calls
virtual void apply(osg::Geode& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Billboard& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::LightSource& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Group& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Transform& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Projection& node) { handle_callbacks_and_traverse(node); }