Added CullCallbacks to osg::Node, and osgUtil::CullVisitor.

This commit is contained in:
Robert Osfield
2002-04-15 13:15:48 +00:00
parent 0222f10d27
commit bbef7164db
7 changed files with 69 additions and 21 deletions

View File

@@ -22,7 +22,13 @@ class SG_EXPORT NodeCallback : public Referenced {
/** Callback method call by the NodeVisitor when visiting a node.*/
virtual void operator()(Node*, NodeVisitor*) {}
virtual void operator()(Node* node, NodeVisitor* nv)
{
// note, callback is repsonsible for scenegraph traversal so
// should always include call the traverse(node,nv) to ensure
// that the rest of cullbacks and the scene graph are traversed.
traverse(node,nv);
}
/** Call any nested callbacks and then traverse the scene graph. */
void traverse(Node* node,NodeVisitor* nv);