From 9a45538db9e5d235619aec73f60d6fe022a76592 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 22 Feb 2010 17:41:35 +0000 Subject: [PATCH] Added an empty() method --- include/osg/ObserverNodePath | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/osg/ObserverNodePath b/include/osg/ObserverNodePath index aaa03b32a..5dfa0163c 100644 --- a/include/osg/ObserverNodePath +++ b/include/osg/ObserverNodePath @@ -59,6 +59,13 @@ class OSG_EXPORT ObserverNodePath : public osg::Observer * of the NodePath. return true if NodePath is valid.*/ bool getNodePath(NodePath& nodePath) const; + bool empty() const + { + if (!_valid) return true; + OpenThreads::ScopedLock lock(*getObserverMutex()); + return _nodePath.empty(); + } + protected: void _setNodePath(const osg::NodePath& nodePath);