OpenSceneGraph  3.4.0
Public Member Functions | Protected Member Functions | Protected Attributes
osg::Callback Class Reference
Inheritance diagram for osg::Callback:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Callback ()
 Callback (const Callback &cb, const CopyOp &copyop)
 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::CallbackgetNestedCallback ()
const osg::CallbackgetNestedCallback () const
void addNestedCallback (osg::Callback *nc)
void removeNestedCallback (osg::Callback *nc)

Protected Member Functions

virtual ~Callback ()

Protected Attributes

ref_ptr< Callback_nestedCallback

Constructor & Destructor Documentation

Reimplemented in osg::StateSet::Callback.

osg::Callback::Callback ( const Callback cb,
const CopyOp copyop 
) [inline]
virtual osg::Callback::~Callback ( ) [inline, protected, virtual]

Member Function Documentation

References addNestedCallback().

Referenced by addNestedCallback().

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().

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()().


Member Data Documentation


The documentation for this class was generated from the following file:

osg logo
Generated at Tue Dec 8 2015 00:14:23 for the OpenSceneGraph by doxygen 1.7.6.1.