openscenegraph
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osgGA::EventVisitor Class Reference
Inheritance diagram for osgGA::EventVisitor:
osg::NodeVisitor osg::Referenced

Public Types

typedef std::list< osg::ref_ptr< GUIEventAdapter > > EventList
 
- 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
}
 

Public Member Functions

 EventVisitor ()
 
virtual ~EventVisitor ()
 
 META_NodeVisitor (osgGA, EventVisitor) void setActionAdapter(osgGA
 
osgGA::GUIActionAdaptergetActionAdapter ()
 
const osgGA::GUIActionAdaptergetActionAdapter () const
 
void addEvent (GUIEventAdapter *event)
 
void removeEvent (GUIEventAdapter *event)
 
void setEventHandled (bool handled)
 
bool getEventHandled () const
 
void setEvents (const EventQueue::Events &events)
 
EventQueue::EventsgetEvents ()
 
const EventQueue::EventsgetEvents () const
 
virtual void reset ()
 
virtual void apply (osg::Node &node)
 
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)
 
virtual ~NodeVisitor ()
 
virtual const char * libraryName () const
 
virtual const char * className () const
 
void setVisitorType (VisitorType type)
 
VisitorType getVisitorType () const
 
void setTraversalNumber (unsigned int fn)
 
unsigned int getTraversalNumber () const
 
void setFrameStamp (FrameStamp *fs)
 
const FrameStampgetFrameStamp () 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 setUserData (Referenced *obj)
 
ReferencedgetUserData ()
 
const ReferencedgetUserData () const
 
void traverse (Node &node)
 
void pushOntoNodePath (Node *node)
 
void popFromNodePath ()
 
NodePathgetNodePath ()
 
const NodePathgetNodePath () 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 (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)
 
DatabaseRequestHandlergetDatabaseRequestHandler ()
 
const DatabaseRequestHandlergetDatabaseRequestHandler () const
 
void setImageRequestHandler (ImageRequestHandler *handler)
 
ImageRequestHandlergetImageRequestHandler ()
 
const ImageRequestHandlergetImageRequestHandler () const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 

Protected Member Functions

EventVisitoroperator= (const EventVisitor &)
 
void handle_callbacks (osg::StateSet *stateset)
 
void handle_callbacks_and_traverse (osg::Node &node)
 
void handle_geode_callbacks (osg::Geode &node)
 
void traverseGeode (osg::Geode &geode)
 
- 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< Referenced_userData
 
ref_ptr< DatabaseRequestHandler_databaseRequestHandler
 
ref_ptr< ImageRequestHandler_imageRequestHandler
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

Detailed Description

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

Member Typedef Documentation

§ EventList

Constructor & Destructor Documentation

§ EventVisitor()

osgGA::EventVisitor::EventVisitor ( )

§ ~EventVisitor()

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

Member Function Documentation

§ addEvent()

void osgGA::EventVisitor::addEvent ( GUIEventAdapter event)

§ apply() [1/10]

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.

§ apply() [2/10]

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

Reimplemented from osg::NodeVisitor.

§ apply() [3/10]

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

Reimplemented from osg::NodeVisitor.

§ apply() [4/10]

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

Reimplemented from osg::NodeVisitor.

§ apply() [5/10]

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

Reimplemented from osg::NodeVisitor.

§ apply() [6/10]

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

Reimplemented from osg::NodeVisitor.

§ apply() [7/10]

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

Reimplemented from osg::NodeVisitor.

§ apply() [8/10]

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

Reimplemented from osg::NodeVisitor.

§ apply() [9/10]

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

Reimplemented from osg::NodeVisitor.

§ apply() [10/10]

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

Reimplemented from osg::NodeVisitor.

§ getActionAdapter() [1/2]

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

§ getActionAdapter() [2/2]

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

§ getEventHandled()

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

§ getEvents() [1/2]

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

§ getEvents() [2/2]

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

§ handle_callbacks()

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

§ handle_callbacks_and_traverse()

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

§ handle_geode_callbacks()

void osgGA::EventVisitor::handle_geode_callbacks ( osg::Geode node)
inlineprotected

§ META_NodeVisitor()

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

§ operator=()

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

Prevent unwanted copy operator.

§ removeEvent()

void osgGA::EventVisitor::removeEvent ( GUIEventAdapter event)

§ reset()

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.

§ setEventHandled()

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

§ setEvents()

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

§ traverseGeode()

void osgGA::EventVisitor::traverseGeode ( osg::Geode geode)
inlineprotected

Member Data Documentation

§ _accumulateEventState

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

§ _actionAdapter

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

§ _events

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

§ _handled

bool osgGA::EventVisitor::_handled
protected

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