Added support for new event visitor type into osgGA and osgProducer::Viewer,

and event callback into Drawable.
This commit is contained in:
Robert Osfield
2005-02-25 14:02:48 +00:00
parent 82d8bcd2af
commit 0f61af08bd
11 changed files with 319 additions and 10 deletions

View File

@@ -16,8 +16,8 @@
#include <vector>
#include <osg/Referenced>
#include <osg/Object>
#include <osg/NodeCallback>
#include <osg/Drawable>
#include <osg/ApplicationUsage>
#include <osgGA/Export>
@@ -49,7 +49,7 @@ This request is made via the GUIActionAdapter class.
*/
class OSGGA_EXPORT GUIEventHandler : public virtual osg::Object
class OSGGA_EXPORT GUIEventHandler : public osg::NodeCallback, public osg::Drawable::EventCallback
{
public:
@@ -58,6 +58,12 @@ public:
META_Object(osgGA,GUIEventHandler);
/** Event traversal node callback method.*/
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
/** Event traversal drawable callback method.*/
virtual void event(osg::NodeVisitor* nv, osg::Drawable* drawable);
/** Returns 0 if this GUIEventHandler is not a CompositeGUIEventHandler. */
virtual const CompositeGUIEventHandler* getComposite() const { return 0; }