osgEarth 2.1.1
Public Member Functions | Public Attributes

osgEarth::FindTopMostNodeOfTypeVisitor< T > Class Template Reference

List of all members.

Public Member Functions

 FindTopMostNodeOfTypeVisitor ()
void apply (osg::Node &node)

Public Attributes

T * _foundNode

Detailed Description

template<typename T>
class osgEarth::FindTopMostNodeOfTypeVisitor< T >

Visitor that locates a node by its type

Definition at line 29 of file FindNode.


Constructor & Destructor Documentation

Definition at line 32 of file FindNode.

                                      :
          osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
              _foundNode(0)
          {}

Member Function Documentation

template<typename T>
void osgEarth::FindTopMostNodeOfTypeVisitor< T >::apply ( osg::Node &  node) [inline]

Definition at line 37 of file FindNode.

          {
              T* result = dynamic_cast<T*>(&node);
              if (result)
              {
                  _foundNode = result;
              }
              else
              {
                  traverse(node);
              }
          }

Member Data Documentation

template<typename T>
T* osgEarth::FindTopMostNodeOfTypeVisitor< T >::_foundNode

Definition at line 50 of file FindNode.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines