From ab66740fb09262b1525d6a7c776a2288d9f6a5cc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 18 Feb 2010 09:00:37 +0000 Subject: [PATCH] Added new setNodePathTo() method --- include/osg/ObserverNodePath | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/osg/ObserverNodePath b/include/osg/ObserverNodePath index ee7d27caf..925f606cf 100644 --- a/include/osg/ObserverNodePath +++ b/include/osg/ObserverNodePath @@ -40,19 +40,23 @@ class OSG_EXPORT ObserverNodePath : public osg::Observer bool valid() const { return _valid; } + + /** get the NodePath from the first parental chain back to root, plus the specified node.*/ + void setNodePathTo(osg::Node* node); + void setNodePath(const osg::RefNodePath& nodePath); void setNodePath(const osg::NodePath& nodePath); void clearNodePath(); - /** Get a thread safe RefNodePath.*/ + /** Get a thread safe RefNodePath, return true if NodePath is valid.*/ bool getRefNodePath(RefNodePath& refNodePath) const; /** Get a lightweight NodePath that isn't thread safe but * may be safely used in single threaded applications, or when * its known that the NodePath won't be invalidated during usage - * of the NodePath.*/ + * of the NodePath. return true if NodePath is valid.*/ bool getNodePath(NodePath& nodePath) const; protected: