osgUtil::UpdateVisitor Class Reference

`#include <UpdateVisitor>`

Inheritance diagram for osgUtil::UpdateVisitor:

## Public Member Functions

| UpdateVisitor ()
virtual | ~UpdateVisitor ()
| META_NodeVisitor (osgUtil, UpdateVisitor) virtual osgUtil
virtual const osgUtil::UpdateVisitor * | asUpdateVisitor () const
virtual void | reset ()
virtual void | apply (osg::Node &node)
virtual void | apply (osg::Drawable &drawable)
virtual void | apply (osg::Geode &node)
virtual void | apply (osg::Billboard &node)
virtual void | apply (osg::LightSource &node)
virtual void | apply (osg::Group &node)
virtual void | apply (osg::Transform &node)
virtual void | apply (osg::Projection &node)
virtual void | apply (osg::Switch &node)
virtual void | apply (osg::LOD &node)
virtual void | apply (osg::OccluderNode &node)
Public Member Functions inherited from osg::NodeVisitor
| NodeVisitor (TraversalMode tm=TRAVERSE_NONE)
| NodeVisitor (VisitorType type, TraversalMode tm=TRAVERSE_NONE)
| NodeVisitor (const NodeVisitor &nv, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual | ~NodeVisitor ()
| META_Object (osg, NodeVisitor) virtual NodeVisitor *asNodeVisitor()
virtual const NodeVisitor * | asNodeVisitor () const
virtual osgUtil::UpdateVisitor * | asUpdateVisitor ()
virtual osgUtil::CullVisitor * | asCullVisitor ()
virtual const osgUtil::CullVisitor * | asCullVisitor () const
virtual osgGA::EventVisitor * | asEventVisitor ()
virtual const osgGA::EventVisitor * | asEventVisitor () const
virtual osgUtil::IntersectionVisitor * | asIntersectionVisitor ()
virtual const osgUtil::IntersectionVisitor * | asIntersectionVisitor () const
virtual osg::CullStack * | asCullStack ()
virtual const osg::CullStack * | asCullStack () const
void | setVisitorType (VisitorType type)
VisitorType | getVisitorType () const
void | setTraversalNumber (unsigned int fn)
unsigned int | getTraversalNumber () const
void | setFrameStamp (FrameStamp *fs)
const FrameStamp * | getFrameStamp () const
void | setTraversalMask (Node::NodeMask mask)
Node::NodeMask | getTraversalMask () const
void | setNodeMaskOverride (Node::NodeMask mask)
Node::NodeMask | getNodeMaskOverride () const
bool | validNodeMask (const osg::Node &node) const
void | setTraversalMode (TraversalMode mode)
TraversalMode | getTraversalMode () const
void | setValueMap (ValueMap *ps)
ValueMap * | getValueMap ()
const ValueMap * | getValueMap () const
ValueMap * | getOrCreateValueMap ()
void | setValueStack (ValueStack *ps)
ValueStack * | getValueStack ()
const ValueStack * | getValueStack () const
ValueStack * | getOrCreateValueStack ()
void | traverse (Node &node)
void | pushOntoNodePath (Node *node)
void | popFromNodePath ()
NodePath & | getNodePath ()
const NodePath & | getNodePath () const
virtual osg::Vec3 | getEyePoint () const
virtual osg::Vec3 | getViewPoint () const
virtual float | getDistanceToEyePoint (const Vec3 &, bool) const
virtual float | getDistanceFromEyePoint (const Vec3 &, bool) const
virtual float | getDistanceToViewPoint (const Vec3 &, bool) const
virtual void | apply (Geometry &geometry)
virtual void | apply (ProxyNode &node)
virtual void | apply (CoordinateSystemNode &node)
virtual void | apply (ClipNode &node)
virtual void | apply (TexGenNode &node)
virtual void | apply (Camera &node)
virtual void | apply (CameraView &node)
virtual void | apply (MatrixTransform &node)
virtual void | apply (PositionAttitudeTransform &node)
virtual void | apply (AutoTransform &node)
virtual void | apply (Sequence &node)
virtual void | apply (PagedLOD &node)
virtual void | apply (ClearNode &node)
virtual void | apply (OcclusionQueryNode &node)
void | setDatabaseRequestHandler (DatabaseRequestHandler *handler)
DatabaseRequestHandler * | getDatabaseRequestHandler ()
const DatabaseRequestHandler * | getDatabaseRequestHandler () const
void | setImageRequestHandler (ImageRequestHandler *handler)
ImageRequestHandler * | getImageRequestHandler ()
const ImageRequestHandler * | getImageRequestHandler () const
Public Member Functions inherited from osg::Object
| Object ()
| Object (bool threadSafeRefUnref)
| Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual Object * | cloneType () const =0
virtual Object * | clone (const CopyOp &) const =0
virtual bool | isSameKindAs (const Object *) const
virtual const char * | libraryName () const =0
virtual const char * | className () const =0
std::string | getCompoundClassName () const
virtual Node * | asNode ()
virtual const Node * | asNode () const
virtual NodeVisitor * | asNodeVisitor ()
virtual StateSet * | asStateSet ()
virtual const StateSet * | asStateSet () const
virtual StateAttribute * | asStateAttribute ()
virtual const StateAttribute * | asStateAttribute () const
virtual Uniform * | asUniform ()
virtual const Uniform * | asUniform () const
virtual Camera * | asCamera ()
virtual const Camera * | asCamera () const
virtual Drawable * | asDrawable ()
virtual const Drawable * | asDrawable () const
virtual Callback * | asCallback ()
virtual const Callback * | asCallback () const
virtual CallbackObject * | asCallbackObject ()
virtual const CallbackObject * | asCallbackObject () const
virtual UserDataContainer * | asUserDataContainer ()
virtual const UserDataContainer * | asUserDataContainer () const
virtual ValueObject * | asValueObject ()
virtual const ValueObject * | asValueObject () const
virtual Image * | asImage ()
virtual const Image * | asImage () const
virtual void | setThreadSafeRefUnref (bool threadSafe)
virtual void | setName (const std::string &name)
void | setName (const char *name)
const std::string & | getName () const
void | setDataVariance (DataVariance dv)
DataVariance | getDataVariance () const
virtual void | computeDataVariance ()
void | setUserDataContainer (osg::UserDataContainer *udc)
template<class T>
void | setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainer * | getUserDataContainer ()
const osg::UserDataContainer * | getUserDataContainer () const
osg::UserDataContainer * | getOrCreateUserDataContainer ()
virtual void | setUserData (Referenced *obj)
template<class T>
void | setUserData (const ref_ptr< T > &ud)
virtual Referenced * | getUserData ()
virtual const Referenced * | getUserData () const
template<typename T>
bool | getUserValue (const std::string &name, T &value) const
template<typename T>
void | setUserValue (const std::string &name, const T &value)
virtual void | resizeGLObjectBuffers (unsigned int)
virtual void | releaseGLObjects (osg::State *=0) const
template<typename T>
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool | getUserValue (const std::string &name, T &value) const
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const

## Protected Member Functions

UpdateVisitor & | operator= (const UpdateVisitor &)
void | handle_callbacks (osg::StateSet *stateset)
void | handle_callbacks_and_traverse (osg::Node &node)
Protected Member Functions inherited from osg::Object
virtual | ~Object ()
Protected Member Functions inherited from osg::Referenced
virtual | ~Referenced ()
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const
void | deleteUsingDeleteHandler () const

## Additional Inherited Members

Public Types inherited from osg::NodeVisitor
enum | TraversalMode { TRAVERSE_NONE , TRAVERSE_PARENTS , TRAVERSE_ALL_CHILDREN , TRAVERSE_ACTIVE_CHILDREN }
enum | VisitorType { NODE_VISITOR = 0 , UPDATE_VISITOR , EVENT_VISITOR , COLLECT_OCCLUDER_VISITOR , CULL_VISITOR , INTERSECTION_VISITOR }
Public Types inherited from osg::Object
enum | DataVariance { DYNAMIC , STATIC , UNSPECIFIED }
Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()
Protected Attributes inherited from osg::NodeVisitor
VisitorType | _visitorType
unsigned int | _traversalNumber
ref_ptr< FrameStamp > | _frameStamp
TraversalMode | _traversalMode
Node::NodeMask | _traversalMask
Node::NodeMask | _nodeMaskOverride
NodePath | _nodePath
ref_ptr< DatabaseRequestHandler > | _databaseRequestHandler
ref_ptr< ImageRequestHandler > | _imageRequestHandler
osg::ref_ptr< ValueMap > | _valueMap
osg::ref_ptr< ValueStack > | _valueStack
Protected Attributes inherited from osg::Object
std::string | _name
DataVariance | _dataVariance
osg::UserDataContainer * | _userDataContainer
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount

## Detailed Description

Basic UpdateVisitor implementation for animating a scene. This visitor traverses the scene graph, calling each nodes appCallback if it exists.

## Constructor & Destructor Documentation

## UpdateVisitor()

osgUtil::UpdateVisitor::UpdateVisitor | ( |  | ) |

Referenced by META_NodeVisitor(), and operator=().

## ~UpdateVisitor()

virtual osgUtil::UpdateVisitor::~UpdateVisitor | ( |  | ) |

virtual

## Member Function Documentation

## apply() [1/11]

virtual void osgUtil::UpdateVisitor::apply | ( | osg::Billboard & | node | ) |

inline virtual

Reimplemented from osg::NodeVisitor.

References handle_callbacks_and_traverse().

## apply() [2/11]

virtual void osgUtil::UpdateVisitor::apply | ( | osg::Drawable & | drawable | ) |

inline virtual

Reimplemented from osg::NodeVisitor.

References osg::Callback::asDrawableUpdateCallback(), osg::Callback::asNodeCallback(), osg::Node::getStateSet(), osg::Node::getUpdateCallback(), handle_callbacks(), osg::Callback::run(), and osg::DrawableUpdateCallback::update().

## apply() [3/11]

virtual void osgUtil::UpdateVisitor::apply | ( | osg::Geode & | node | ) |

inline virtual

Reimplemented from osg::NodeVisitor.

References handle_callbacks_and_traverse().

## apply() [4/11]

virtual void osgUtil::UpdateVisitor::apply | ( | osg::Group & | node | ) |

inline virtual

Reimplemented from osg::NodeVisitor.

References handle_callbacks_and_traverse().

## apply() [5/11]

virtual void osgUtil::UpdateVisitor::apply | ( | osg::LightSource & | node | ) |

inline virtual

Reimplemented from osg::NodeVisitor.

References handle_callbacks_and_traverse().

## apply() [6/11]

virtual void osgUtil::UpdateVisitor::apply | ( | osg::LOD & | node | ) |

inline virtual

Reimplemented from osg::NodeVisitor.

References handle_callbacks_and_traverse().

## apply() [7/11]

virtual void osgUtil::UpdateVisitor::apply | ( | osg::Node & | node | ) |

inline virtual

During traversal each type of node calls its callbacks and its children traversed.

Reimplemented from osg::NodeVisitor.

References handle_callbacks_and_traverse().

## apply() [8/11]

virtual void osgUtil::UpdateVisitor::apply | ( | osg::OccluderNode & | node | ) |

inline virtual

Reimplemented from osg::NodeVisitor.

References handle_callbacks_and_traverse().

## apply() [9/11]

virtual void osgUtil::UpdateVisitor::apply | ( | osg::Projection & | node | ) |

inline virtual

Reimplemented from osg::NodeVisitor.

References handle_callbacks_and_traverse().

## apply() [10/11]

virtual void osgUtil::UpdateVisitor::apply | ( | osg::Switch & | node | ) |

inline virtual

Reimplemented from osg::NodeVisitor.

References handle_callbacks_and_traverse().

## apply() [11/11]

virtual void osgUtil::UpdateVisitor::apply | ( | osg::Transform & | node | ) |

inline virtual

Reimplemented from osg::NodeVisitor.

References handle_callbacks_and_traverse().

## asUpdateVisitor()

virtual const osgUtil::UpdateVisitor * osgUtil::UpdateVisitor::asUpdateVisitor | ( |  | ) | const

inline virtual

convert 'const this' into a const osgUtil::UpdateVisitor pointer if Object is a osgUtil::UpdateVisitor, otherwise return 0. Equivalent to dynamic_cast<const osgUtil::UpdateVisitor*>(this).

Reimplemented from osg::NodeVisitor.

Referenced by META_NodeVisitor().

## handle_callbacks()

void osgUtil::UpdateVisitor::handle_callbacks | ( | osg::StateSet * | stateset | ) |

inline protected

References osg::StateSet::requiresUpdateTraversal(), and osg::StateSet::runUpdateCallbacks().

Referenced by apply(), and handle_callbacks_and_traverse().

## handle_callbacks_and_traverse()

void osgUtil::UpdateVisitor::handle_callbacks_and_traverse | ( | osg::Node & | node | ) |

inline protected

References osg::Node::getNumChildrenRequiringUpdateTraversal(), osg::Node::getStateSet(), osg::Node::getUpdateCallback(), handle_callbacks(), osg::Callback::run(), and osg::NodeVisitor::traverse().

Referenced by apply(), apply(), apply(), apply(), apply(), apply(), apply(), apply(), apply(), and apply().

## META_NodeVisitor()

osgUtil::UpdateVisitor::META_NodeVisitor | ( | osgUtil | ,
|  | UpdateVisitor | )

inline

Convert 'this' into a osgUtil::UpdateVisitor pointer if Object is a osgUtil::UpdateVisitor, otherwise return 0. Equivalent to dynamic_cast<osgUtil::UpdateVisitor*>(this).

References asUpdateVisitor(), and UpdateVisitor().

## operator=()

UpdateVisitor & osgUtil::UpdateVisitor::operator= | ( | const UpdateVisitor & |  | ) |

inline protected

Prevent unwanted copy construction. Prevent unwanted copy operator.

References UpdateVisitor().

## reset()

virtual void osgUtil::UpdateVisitor::reset | ( |  | ) |

virtual

Method to call to reset visitor. Useful if your visitor accumulates state during a traversal, and you plan to reuse the visitor. To flush that state for the next traversal: call reset() prior to each traversal.

Reimplemented from osg::NodeVisitor.

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

- UpdateVisitor