OpenSceneGraph
3.4.0
|
Public Member Functions | |
Callback () | |
Callback (const Callback &cb, const CopyOp ©op) | |
META_Object (osg, Callback) | |
virtual bool | run (osg::Object *object, osg::Object *data) |
Invoke the callback, first parameter is the Object that the callback is attached to, the second parameter, the data, is typically the NodeVisitor that is invoking the callback. | |
bool | traverse (osg::Object *object, osg::Object *data) |
traverse the nested callbacks or call NodeVisitor::traverse() if the object is Node, and data is NodeVisitor. | |
void | setNestedCallback (osg::Callback *cb) |
osg::Callback * | getNestedCallback () |
const osg::Callback * | getNestedCallback () const |
void | addNestedCallback (osg::Callback *nc) |
void | removeNestedCallback (osg::Callback *nc) |
Protected Member Functions | |
virtual | ~Callback () |
Protected Attributes | |
ref_ptr< Callback > | _nestedCallback |
osg::Callback::Callback | ( | ) | [inline] |
Reimplemented in osg::StateSet::Callback.
osg::Callback::Callback | ( | const Callback & | cb, |
const CopyOp & | copyop | ||
) | [inline] |
virtual osg::Callback::~Callback | ( | ) | [inline, protected, virtual] |
void osg::Callback::addNestedCallback | ( | osg::Callback * | nc | ) | [inline] |
References addNestedCallback().
Referenced by addNestedCallback().
osg::Callback* osg::Callback::getNestedCallback | ( | ) | [inline] |
const osg::Callback* osg::Callback::getNestedCallback | ( | ) | const [inline] |
osg::Callback::META_Object | ( | osg | , |
Callback | |||
) |
void osg::Callback::removeNestedCallback | ( | osg::Callback * | nc | ) | [inline] |
References getNestedCallback(), removeNestedCallback(), and setNestedCallback().
Referenced by removeNestedCallback().
virtual bool osg::Callback::run | ( | osg::Object * | object, |
osg::Object * | data | ||
) | [inline, virtual] |
Invoke the callback, first parameter is the Object that the callback is attached to, the second parameter, the data, is typically the NodeVisitor that is invoking the callback.
The run(..) method may be overriden by users directly, or if the user is using one of the old style callbacks such as NodeCallback or Drawable::UpdateCallback then you can just override the appropriate callback method on those callback subclasses. If you are implementing your own callback then one should call traverse() to make sure nested callbacks and visitor traversal() is completed.
Reimplemented in osgViewer::InteractiveImageHandler, osgVolume::PropertyAdjustmentCallback, osg::StateSet::Callback, osg::Drawable::EventCallback, osg::Drawable::UpdateCallback, osg::UniformCallback, osg::StateAttributeCallback, osg::NodeCallback, osg::CallbackObject, osgShadow::MinimalDrawBoundsShadowMap::CameraCullCallback, osgGA::EventHandler, and osg::ClusterCullingCallback.
Referenced by osgUtil::UpdateVisitor::handle_callbacks_and_traverse(), osgGA::EventVisitor::handle_callbacks_and_traverse(), osgUtil::CullVisitor::handle_cull_callbacks_and_accept(), and osgUtil::CullVisitor::handle_cull_callbacks_and_traverse().
void osg::Callback::setNestedCallback | ( | osg::Callback * | cb | ) | [inline] |
bool osg::Callback::traverse | ( | osg::Object * | object, |
osg::Object * | data | ||
) |
traverse the nested callbacks or call NodeVisitor::traverse() if the object is Node, and data is NodeVisitor.
Referenced by osgAnimation::UpdateUniform< osg::Matrixf >::operator()().
ref_ptr<Callback> osg::Callback::_nestedCallback [protected] |
![]() | Generated at Tue Dec 8 2015 00:16:41 for the OpenSceneGraph by doxygen 1.7.6.1. |