osg::ObserverNodePath Class Reference

Inheritance diagram for osg::ObserverNodePath:

osg::Observer

List of all members.

Public Member Functions

 ObserverNodePath ()
 ObserverNodePath (const ObserverNodePath &rhs)
 ObserverNodePath (const osg::NodePath &nodePath)
 ~ObserverNodePath ()
ObserverNodePathoperator= (const ObserverNodePath &rhs)
bool valid () const
void setNodePathTo (osg::Node *node)
void setNodePath (const osg::RefNodePath &nodePath)
void setNodePath (const osg::NodePath &nodePath)
void clearNodePath ()
bool getRefNodePath (RefNodePath &refNodePath) const
bool getNodePath (NodePath &nodePath) const

Protected Member Functions

void _setNodePath (const osg::NodePath &nodePath)
void _clearNodePath ()
virtual bool objectUnreferenced (void *ptr)

Protected Attributes

osg::NodePath _nodePath
bool _valid


Detailed Description

ObserverNodePath is an observer class for tracking changes to a NodePath, that automatically invalidates it when nodes are deleted.

Constructor & Destructor Documentation

osg::ObserverNodePath::ObserverNodePath (  ) 

osg::ObserverNodePath::ObserverNodePath ( const ObserverNodePath rhs  ) 

osg::ObserverNodePath::ObserverNodePath ( const osg::NodePath nodePath  ) 

osg::ObserverNodePath::~ObserverNodePath (  ) 


Member Function Documentation

ObserverNodePath& osg::ObserverNodePath::operator= ( const ObserverNodePath rhs  ) 

bool osg::ObserverNodePath::valid (  )  const [inline]

void osg::ObserverNodePath::setNodePathTo ( osg::Node node  ) 

get the NodePath from the first parental chain back to root, plus the specified node.

void osg::ObserverNodePath::setNodePath ( const osg::RefNodePath nodePath  ) 

void osg::ObserverNodePath::setNodePath ( const osg::NodePath nodePath  ) 

void osg::ObserverNodePath::clearNodePath (  ) 

bool osg::ObserverNodePath::getRefNodePath ( RefNodePath refNodePath  )  const

Get a thread safe RefNodePath, return true if NodePath is valid.

bool osg::ObserverNodePath::getNodePath ( NodePath nodePath  )  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. return true if NodePath is valid.

void osg::ObserverNodePath::_setNodePath ( const osg::NodePath nodePath  )  [protected]

void osg::ObserverNodePath::_clearNodePath (  )  [protected]

virtual bool osg::ObserverNodePath::objectUnreferenced ( void *   )  [protected, virtual]

objectUnreferenced(void*) is called when the observed object's referenced count goes to zero, indicating that the object will be deleted unless a new reference is made to it. If you wish to prevent deletion of the object then it's reference count should be incremented such as via taking a ref_ptr<> to it, if no refernce is taken by any of the observers of the object then the object will be deleted, and objectDeleted will in turn be called. return true if the Observer wishes to removed from the oberseved objects observer set.

Reimplemented from osg::Observer.


Member Data Documentation


The documentation for this class was generated from the following file:

Generated on Fri Mar 19 19:52:51 2010 for openscenegraph by  doxygen 1.5.6