Moved the _boundingSphere set method into the update section of the Drawable::getBoundingBox() method
Added an UpdateVisitor::apply(Drawable&) implementation.
This commit is contained in:
@@ -46,7 +46,18 @@ class OSGUTIL_EXPORT UpdateVisitor : public osg::NodeVisitor
|
||||
virtual void reset();
|
||||
|
||||
/** During traversal each type of node calls its callbacks and its children traversed. */
|
||||
virtual void apply(osg::Node& node) { handle_callbacks_and_traverse(node); }
|
||||
virtual void apply(osg::Node& node) { handle_callbacks_and_traverse(node); }
|
||||
|
||||
virtual void apply(osg::Drawable& drawable)
|
||||
{
|
||||
osg::Drawable::UpdateCallback* callback = drawable.getUpdateCallback();
|
||||
if (callback) callback->update(this,&drawable);
|
||||
|
||||
osg::NodeCallback* node_callback = drawable.osg::Node::getUpdateCallback();
|
||||
if (node_callback) (*node_callback)(&drawable, this);
|
||||
|
||||
handle_callbacks(drawable.getStateSet());
|
||||
}
|
||||
|
||||
virtual void apply(osg::Geode& node) { handle_geode_callbacks(node); }
|
||||
virtual void apply(osg::Billboard& node) { handle_geode_callbacks(node); }
|
||||
|
||||
Reference in New Issue
Block a user