From a316c30b4a3c7b87ce3ac24535f4b021d58838fc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 6 Jun 2014 15:05:31 +0000 Subject: [PATCH] Removed redudent NodeVisitor::s/getUserData() as osg::Object provide this. Added using run entry to InteractiveImageHandler to quieten warning git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14247 16af8721-9629-0410-8352-f15c8da7e697 --- include/osg/NodeVisitor | 19 +------------------ include/osgViewer/ViewerEventHandlers | 2 ++ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/include/osg/NodeVisitor b/include/osg/NodeVisitor index 9f6e91237..07ff5665c 100644 --- a/include/osg/NodeVisitor +++ b/include/osg/NodeVisitor @@ -92,7 +92,7 @@ class OSG_EXPORT NodeVisitor : public virtual Object NodeVisitor(const NodeVisitor& nv, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); virtual ~NodeVisitor(); - + META_Object(osg, NodeVisitor) /** Method to call to reset visitor. Useful if your visitor accumulates @@ -168,21 +168,6 @@ class OSG_EXPORT NodeVisitor : public virtual Object /** Get the traversal mode.*/ inline TraversalMode getTraversalMode() const { return _traversalMode; } - /** - * Set user data, data must be subclassed from Referenced to allow - * automatic memory handling. If your own data isn't directly - * subclassed from Referenced then create an adapter object - * which points to your own objects and handles the memory addressing. - */ - inline void setUserData(Referenced* obj) { _userData = obj; } - - /** Get user data.*/ - inline Referenced* getUserData() { return _userData.get(); } - - /** Get const user data.*/ - inline const Referenced* getUserData() const { return _userData.get(); } - - /** Method for handling traversal of a nodes. If you intend to use the visitor for actively traversing the scene graph then make sure the accept() methods call @@ -340,8 +325,6 @@ class OSG_EXPORT NodeVisitor : public virtual Object NodePath _nodePath; - ref_ptr _userData; - ref_ptr _databaseRequestHandler; ref_ptr _imageRequestHandler; diff --git a/include/osgViewer/ViewerEventHandlers b/include/osgViewer/ViewerEventHandlers index 5701a4c12..4fb0a43eb 100644 --- a/include/osgViewer/ViewerEventHandlers +++ b/include/osgViewer/ViewerEventHandlers @@ -514,6 +514,8 @@ public: META_Object(osgViewer, InteractiveImageHandler); + using osgGA::GUIEventHandler::run; + virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor* nv); virtual bool cull(osg::NodeVisitor* nv, osg::Drawable* drawable, osg::RenderInfo* renderInfo) const;