OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osgGA::EventVisitor Class Reference

#include <EventVisitor.h>

Inheritance diagram for osgGA::EventVisitor:
Inheritance graph
[legend]
Collaboration diagram for osgGA::EventVisitor:
Collaboration graph
[legend]

Public Member Functions

 EventVisitor ()
 
virtual ~EventVisitor ()
 
 META_NodeVisitor (osgGA, EventVisitor) void setActionAdapter(osgGA
 
osgGA::GUIActionAdapter * getActionAdapter ()
 
const osgGA::GUIActionAdapter * getActionAdapter () const
 
void addEvent (Event *event)
 
void removeEvent (Event *event)
 
void setEventHandled (bool handled)
 
bool getEventHandled () const
 
void setEvents (const EventQueue::Events &events)
 
EventQueue::Events & getEvents ()
 
const EventQueue::Events & getEvents () 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
 
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 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 (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 StateAttribute * asStateAttribute ()
 
virtual const StateAttribute * asStateAttribute () const
 
virtual Uniform * asUniform ()
 
virtual const Uniform * asUniform () 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)
 
osg::UserDataContainer * getUserDataContainer ()
 
const osg::UserDataContainer * getUserDataContainer () const
 
osg::UserDataContainer * getOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
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

EventVisitor & operator= (const EventVisitor &)
 
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
 

Protected Attributes

osgGA::GUIActionAdapter * _actionAdapter
 
osg::ref_ptr< GUIEventAdapter > _accumulateEventState
 
bool _handled
 
EventQueue::Events _events
 
- 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
 
- 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
 

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 setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandler * getDeleteHandler ()
 

Detailed Description

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

Definition at line 40 of file EventVisitor.h.

Constructor & Destructor Documentation

osgGA::EventVisitor::EventVisitor ( )
virtual osgGA::EventVisitor::~EventVisitor ( )
virtual

Member Function Documentation

void osgGA::EventVisitor::addEvent ( Event *  event)
virtual void osgGA::EventVisitor::apply ( osg::Node &  node)
inlinevirtual

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

Reimplemented from osg::NodeVisitor.

Definition at line 70 of file EventVisitor.h.

virtual void osgGA::EventVisitor::apply ( osg::Drawable &  drawable)
inlinevirtual

Reimplemented from osg::NodeVisitor.

Definition at line 73 of file EventVisitor.h.

Here is the call graph for this function:

virtual void osgGA::EventVisitor::apply ( osg::Geode &  node)
inlinevirtual

Reimplemented from osg::NodeVisitor.

Definition at line 91 of file EventVisitor.h.

virtual void osgGA::EventVisitor::apply ( osg::Billboard &  node)
inlinevirtual

Reimplemented from osg::NodeVisitor.

Definition at line 92 of file EventVisitor.h.

virtual void osgGA::EventVisitor::apply ( osg::LightSource &  node)
inlinevirtual

Reimplemented from osg::NodeVisitor.

Definition at line 94 of file EventVisitor.h.

virtual void osgGA::EventVisitor::apply ( osg::Group &  node)
inlinevirtual

Reimplemented from osg::NodeVisitor.

Definition at line 96 of file EventVisitor.h.

virtual void osgGA::EventVisitor::apply ( osg::Transform &  node)
inlinevirtual

Reimplemented from osg::NodeVisitor.

Definition at line 97 of file EventVisitor.h.

virtual void osgGA::EventVisitor::apply ( osg::Projection &  node)
inlinevirtual

Reimplemented from osg::NodeVisitor.

Definition at line 98 of file EventVisitor.h.

virtual void osgGA::EventVisitor::apply ( osg::Switch &  node)
inlinevirtual

Reimplemented from osg::NodeVisitor.

Definition at line 99 of file EventVisitor.h.

virtual void osgGA::EventVisitor::apply ( osg::LOD &  node)
inlinevirtual

Reimplemented from osg::NodeVisitor.

Definition at line 100 of file EventVisitor.h.

virtual void osgGA::EventVisitor::apply ( osg::OccluderNode &  node)
inlinevirtual

Reimplemented from osg::NodeVisitor.

Definition at line 101 of file EventVisitor.h.

osgGA::GUIActionAdapter* osgGA::EventVisitor::getActionAdapter ( )
inline

Definition at line 51 of file EventVisitor.h.

const osgGA::GUIActionAdapter* osgGA::EventVisitor::getActionAdapter ( ) const
inline

Definition at line 53 of file EventVisitor.h.

bool osgGA::EventVisitor::getEventHandled ( ) const
inline

Definition at line 59 of file EventVisitor.h.

EventQueue::Events& osgGA::EventVisitor::getEvents ( )
inline

Definition at line 62 of file EventVisitor.h.

const EventQueue::Events& osgGA::EventVisitor::getEvents ( ) const
inline

Definition at line 63 of file EventVisitor.h.

void osgGA::EventVisitor::handle_callbacks ( osg::StateSet *  stateset)
inlineprotected

Definition at line 109 of file EventVisitor.h.

Here is the call graph for this function:

void osgGA::EventVisitor::handle_callbacks_and_traverse ( osg::Node &  node)
inlineprotected

Definition at line 117 of file EventVisitor.h.

Here is the call graph for this function:

osgGA::EventVisitor::META_NodeVisitor ( osgGA  ,
EventVisitor   
)
inline

Definition at line 47 of file EventVisitor.h.

EventVisitor& osgGA::EventVisitor::operator= ( const EventVisitor &  )
inlineprotected

Prevent unwanted copy operator.

Definition at line 107 of file EventVisitor.h.

void osgGA::EventVisitor::removeEvent ( Event *  event)
virtual void osgGA::EventVisitor::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.

void osgGA::EventVisitor::setEventHandled ( bool  handled)
inline

Definition at line 58 of file EventVisitor.h.

void osgGA::EventVisitor::setEvents ( const EventQueue::Events &  events)
inline

Definition at line 61 of file EventVisitor.h.

Member Data Documentation

osg::ref_ptr<GUIEventAdapter> osgGA::EventVisitor::_accumulateEventState
protected

Definition at line 129 of file EventVisitor.h.

osgGA::GUIActionAdapter* osgGA::EventVisitor::_actionAdapter
protected

Definition at line 127 of file EventVisitor.h.

EventQueue::Events osgGA::EventVisitor::_events
protected

Definition at line 132 of file EventVisitor.h.

bool osgGA::EventVisitor::_handled
protected

Definition at line 131 of file EventVisitor.h.


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