Added an empty() method
This commit is contained in:
parent
bb35fcc980
commit
9a45538db9
@ -59,6 +59,13 @@ class OSG_EXPORT ObserverNodePath : public osg::Observer
|
|||||||
* of the NodePath. return true if NodePath is valid.*/
|
* of the NodePath. return true if NodePath is valid.*/
|
||||||
bool getNodePath(NodePath& nodePath) const;
|
bool getNodePath(NodePath& nodePath) const;
|
||||||
|
|
||||||
|
bool empty() const
|
||||||
|
{
|
||||||
|
if (!_valid) return true;
|
||||||
|
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*getObserverMutex());
|
||||||
|
return _nodePath.empty();
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void _setNodePath(const osg::NodePath& nodePath);
|
void _setNodePath(const osg::NodePath& nodePath);
|
||||||
|
Loading…
Reference in New Issue
Block a user