osgPresentation::SlideEventHandler Class Reference

`#include <SlideEventHandler>`

Inheritance diagram for osgPresentation::SlideEventHandler:

## Public Types

enum | WhichPosition { FIRST_POSITION = 0 , LAST_POSITION = -1 }
Public Types inherited from osg::Object
enum | DataVariance { DYNAMIC , STATIC , UNSPECIFIED }

## Public Member Functions

| SlideEventHandler (osgViewer::Viewer *viewer=0)
| SlideEventHandler (const SlideEventHandler &seh, const osg::CopyOp &copyop)
| META_Object (osgPresentation, SlideEventHandler)
void | set (osg::Node *model)
virtual bool | handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &)
virtual void | getUsage (osg::ApplicationUsage &usage) const
osgViewer::Viewer * | getViewer ()
osg::Switch * | getPresentationSwitch ()
void | compileSlide (unsigned int slideNum)
void | releaseSlide (unsigned int slideNum)
unsigned int | getNumSlides ()
int | getActiveSlide () const
int | getActiveLayer () const
osg::Switch * | getSlide (int slideNum)
osg::Node * | getLayer (int slideNum, int layerNum)
bool | selectSlide (int slideNum, int layerNum=FIRST_POSITION)
bool | selectLayer (int layerNum)
bool | nextLayerOrSlide ()
bool | previousLayerOrSlide ()
bool | nextSlide ()
bool | previousSlide ()
bool | nextLayer ()
bool | previousLayer ()
bool | home ()
void | setAutoSteppingActive (bool flag=true)
bool | getAutoSteppingActive () const
void | setTimeDelayBetweenSlides (double dt)
double | getTimeDelayBetweenSlides () const
double | getDuration (const osg::Node *node) const
double | getCurrentTimeDelayBetweenSlides () const
void | setReleaseAndCompileOnEachNewSlide (bool flag)
bool | getReleaseAndCompileOnEachNewSlide () const
void | setTimeDelayOnNewSlideWithMovies (float t)
float | getTimeDelayOnNewSlideWithMovies () const
void | setLoopPresentation (bool loop)
bool | getLoopPresentation () const
void | dispatchEvent (const KeyPosition &keyPosition)
void | dispatchEvent (osgGA::Event *event)
void | forwardEventToDevices (osgGA::Event *event)
void | setRequestReload (bool flag)
bool | getRequestReload () const
double | getReferenceTime () const
virtual bool | checkNeedToDoFrame ()
Public Member Functions inherited from osgGA::GUIEventHandler
| GUIEventHandler ()
| GUIEventHandler (const GUIEventHandler &eh, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
| META_Object (osgGA, GUIEventHandler)
virtual bool | handle (osgGA::Event *event, osg::Object *object, osg::NodeVisitor *nv)
virtual bool | handle (const GUIEventAdapter &ea, GUIActionAdapter &aa, osg::Object *, osg::NodeVisitor *)
Public Member Functions inherited from osgGA::EventHandler
| EventHandler ()
| EventHandler (const EventHandler &eh, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
| META_Object (osgGA, EventHandler)
virtual NodeCallback * | asNodeCallback ()
virtual const NodeCallback * | asNodeCallback () const
virtual DrawableEventCallback * | asDrawableEventCallback ()
virtual const DrawableEventCallback * | asDrawableEventCallback () const
virtual EventHandler * | asEventHandler ()
virtual const EventHandler * | asEventHandler () const
virtual bool | run (osg::Object *object, osg::Object *data)
virtual void | operator() (osg::Node *node, osg::NodeVisitor *nv)
virtual void | event (osg::NodeVisitor *nv, osg::Drawable *drawable)
Public Member Functions inherited from osg::NodeCallback
| NodeCallback ()
| NodeCallback (const NodeCallback &nc, const CopyOp &copyop)
| META_Object (osg, NodeCallback)
Public Member Functions inherited from osg::Callback
| Callback ()
| Callback (const Callback &cb, const CopyOp &copyop)
| META_Object (osg, Callback)
virtual Callback * | asCallback ()
virtual const Callback * | asCallback () const
virtual CallbackObject * | asCallbackObject ()
virtual const CallbackObject * | asCallbackObject () const
virtual StateAttributeCallback * | asStateAttributeCallback ()
virtual const StateAttributeCallback * | asStateAttributeCallback () const
virtual UniformCallback * | asUniformCallback ()
virtual const UniformCallback * | asUniformCallback () const
virtual DrawableUpdateCallback * | asDrawableUpdateCallback ()
virtual const DrawableUpdateCallback * | asDrawableUpdateCallback () const
virtual DrawableCullCallback * | asDrawableCullCallback ()
virtual const DrawableCullCallback * | asDrawableCullCallback () const
bool | traverse (osg::Object *object, osg::Object *data)
void | setNestedCallback (osg::Callback *cb)
osg::Callback * | getNestedCallback ()
const osg::Callback * | getNestedCallback () const
void | addNestedCallback (osg::Callback *nc)
void | removeNestedCallback (osg::Callback *nc)
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 const NodeVisitor * | asNodeVisitor () const
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 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
Public Member Functions inherited from osg::DrawableEventCallback
| DrawableEventCallback ()
| DrawableEventCallback (const DrawableEventCallback &org, const CopyOp &copyop)
| META_Object (osg, DrawableEventCallback)

## Static Public Member Functions

static SlideEventHandler * | instance ()
Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()

## Protected Member Functions

| ~SlideEventHandler ()
bool | home (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
void | updateAlpha (bool, bool, float x, float y)
void | updateLight (float x, float y)
void | updateOperators ()
Protected Member Functions inherited from osgGA::GUIEventHandler
virtual | ~GUIEventHandler ()
Protected Member Functions inherited from osg::NodeCallback
virtual | ~NodeCallback ()
Protected Member Functions inherited from osg::Callback
virtual | ~Callback ()
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

osg::observer_ptr< osgViewer::Viewer > | _viewer
osg::observer_ptr< osg::Switch > | _showSwitch
int | _activePresentation
osg::observer_ptr< osg::Switch > | _presentationSwitch
int | _activeSlide
osg::observer_ptr< osg::Switch > | _slideSwitch
int | _activeLayer
bool | _firstTraversal
double | _referenceTime
double | _previousTime
double | _timePerSlide
bool | _autoSteppingActive
bool | _loopPresentation
bool | _pause
bool | _hold
bool | _updateLightActive
bool | _updateOpacityActive
float | _previousX
float | _previousY
bool | _cursorOn
bool | _releaseAndCompileOnEachNewSlide
bool | _firstSlideOrLayerChange
osg::Timer_t | _tickAtFirstSlideOrLayerChange
osg::Timer_t | _tickAtLastSlideOrLayerChange
float | _timeDelayOnNewSlideWithMovies
double | _minimumTimeBetweenKeyPresses
double | _timeLastKeyPresses
ActiveOperators | _activeOperators
osg::ref_ptr< CompileSlideCallback > | _compileSlideCallback
bool | _requestReload
Protected Attributes inherited from osg::Callback
ref_ptr< Callback > | _nestedCallback
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

## Member Enumeration Documentation

## WhichPosition

enum osgPresentation::SlideEventHandler::WhichPosition

Enumerator
FIRST_POSITION |
LAST_POSITION |

## Constructor & Destructor Documentation

## SlideEventHandler() [1/2]

osgPresentation::SlideEventHandler::SlideEventHandler | ( | osgViewer::Viewer * | viewer = 0 | ) |

Referenced by instance(), META_Object(), and SlideEventHandler().

## SlideEventHandler() [2/2]

osgPresentation::SlideEventHandler::SlideEventHandler | ( | const SlideEventHandler & | seh,
|  | const osg::CopyOp & | copyop )

References SlideEventHandler().

## ~SlideEventHandler()

osgPresentation::SlideEventHandler::~SlideEventHandler | ( |  | ) |

inline protected

## Member Function Documentation

## checkNeedToDoFrame()

virtual bool osgPresentation::SlideEventHandler::checkNeedToDoFrame | ( |  | ) |

virtual

## compileSlide()

void osgPresentation::SlideEventHandler::compileSlide | ( | unsigned int | slideNum | ) |

## dispatchEvent() [1/2]

void osgPresentation::SlideEventHandler::dispatchEvent | ( | const KeyPosition & | keyPosition | ) |

## dispatchEvent() [2/2]

void osgPresentation::SlideEventHandler::dispatchEvent | ( | osgGA::Event * | event | ) |

References osgGA::EventHandler::event().

## forwardEventToDevices()

void osgPresentation::SlideEventHandler::forwardEventToDevices | ( | osgGA::Event * | event | ) |

References osgGA::EventHandler::event().

## getActiveLayer()

int osgPresentation::SlideEventHandler::getActiveLayer | ( |  | ) | const

inline

References _activeLayer.

## getActiveSlide()

int osgPresentation::SlideEventHandler::getActiveSlide | ( |  | ) | const

inline

References _activeSlide.

## getAutoSteppingActive()

bool osgPresentation::SlideEventHandler::getAutoSteppingActive | ( |  | ) | const

inline

References _autoSteppingActive.

## getCurrentTimeDelayBetweenSlides()

double osgPresentation::SlideEventHandler::getCurrentTimeDelayBetweenSlides | ( |  | ) | const

## getDuration()

double osgPresentation::SlideEventHandler::getDuration | ( | const osg::Node * | node | ) | const

## getLayer()

osg::Node * osgPresentation::SlideEventHandler::getLayer | ( | int | slideNum,
|  | int | layerNum )

## getLoopPresentation()

bool osgPresentation::SlideEventHandler::getLoopPresentation | ( |  | ) | const

inline

References _loopPresentation.

## getNumSlides()

unsigned int osgPresentation::SlideEventHandler::getNumSlides | ( |  | ) |

## getPresentationSwitch()

osg::Switch * osgPresentation::SlideEventHandler::getPresentationSwitch | ( |  | ) |

inline

References _presentationSwitch.

## getReferenceTime()

double osgPresentation::SlideEventHandler::getReferenceTime | ( |  | ) | const

inline

References _referenceTime.

## getReleaseAndCompileOnEachNewSlide()

bool osgPresentation::SlideEventHandler::getReleaseAndCompileOnEachNewSlide | ( |  | ) | const

inline

References _releaseAndCompileOnEachNewSlide.

## getRequestReload()

bool osgPresentation::SlideEventHandler::getRequestReload | ( |  | ) | const

inline

References _requestReload.

## getSlide()

osg::Switch * osgPresentation::SlideEventHandler::getSlide | ( | int | slideNum | ) |

## getTimeDelayBetweenSlides()

double osgPresentation::SlideEventHandler::getTimeDelayBetweenSlides | ( |  | ) | const

inline

References _timePerSlide.

## getTimeDelayOnNewSlideWithMovies()

float osgPresentation::SlideEventHandler::getTimeDelayOnNewSlideWithMovies | ( |  | ) | const

inline

References _timeDelayOnNewSlideWithMovies.

## getUsage()

virtual void osgPresentation::SlideEventHandler::getUsage | ( | osg::ApplicationUsage & |  | ) | const

virtual

Get the user interface usage of this event handler, i.e. keyboard and mouse bindings.

Reimplemented from osgGA::EventHandler.

## getViewer()

osgViewer::Viewer * osgPresentation::SlideEventHandler::getViewer | ( |  | ) |

inline

References _viewer.

## handle()

virtual bool osgPresentation::SlideEventHandler::handle | ( | const osgGA::GUIEventAdapter & | ,
|  | osgGA::GUIActionAdapter & | )

virtual

Deprecated, Handle events, return true if handled, false otherwise.

Reimplemented from osgGA::GUIEventHandler.

## home() [1/2]

bool osgPresentation::SlideEventHandler::home | ( |  | ) |

## home() [2/2]

bool osgPresentation::SlideEventHandler::home | ( | const osgGA::GUIEventAdapter & | ea,
|  | osgGA::GUIActionAdapter & | aa )

protected

## instance()

SlideEventHandler * osgPresentation::SlideEventHandler::instance | ( |  | ) |

static

References SlideEventHandler().

## META_Object()

osgPresentation::SlideEventHandler::META_Object | ( | osgPresentation | ,
|  | SlideEventHandler | )

References SlideEventHandler().

## nextLayer()

bool osgPresentation::SlideEventHandler::nextLayer | ( |  | ) |

## nextLayerOrSlide()

bool osgPresentation::SlideEventHandler::nextLayerOrSlide | ( |  | ) |

## nextSlide()

bool osgPresentation::SlideEventHandler::nextSlide | ( |  | ) |

## previousLayer()

bool osgPresentation::SlideEventHandler::previousLayer | ( |  | ) |

## previousLayerOrSlide()

bool osgPresentation::SlideEventHandler::previousLayerOrSlide | ( |  | ) |

## previousSlide()

bool osgPresentation::SlideEventHandler::previousSlide | ( |  | ) |

## releaseSlide()

void osgPresentation::SlideEventHandler::releaseSlide | ( | unsigned int | slideNum | ) |

## selectLayer()

bool osgPresentation::SlideEventHandler::selectLayer | ( | int | layerNum | ) |

## selectSlide()

bool osgPresentation::SlideEventHandler::selectSlide | ( | int | slideNum,
|  | int | layerNum = FIRST_POSITION )

References FIRST_POSITION.

## set()

void osgPresentation::SlideEventHandler::set | ( | osg::Node * | model | ) |

## setAutoSteppingActive()

void osgPresentation::SlideEventHandler::setAutoSteppingActive | ( | bool | flag = true | ) |

inline

References _autoSteppingActive.

## setLoopPresentation()

void osgPresentation::SlideEventHandler::setLoopPresentation | ( | bool | loop | ) |

inline

References _loopPresentation.

## setReleaseAndCompileOnEachNewSlide()

void osgPresentation::SlideEventHandler::setReleaseAndCompileOnEachNewSlide | ( | bool | flag | ) |

inline

References _releaseAndCompileOnEachNewSlide.

## setRequestReload()

void osgPresentation::SlideEventHandler::setRequestReload | ( | bool | flag | ) |

## setTimeDelayBetweenSlides()

void osgPresentation::SlideEventHandler::setTimeDelayBetweenSlides | ( | double | dt | ) |

inline

References _timePerSlide.

## setTimeDelayOnNewSlideWithMovies()

void osgPresentation::SlideEventHandler::setTimeDelayOnNewSlideWithMovies | ( | float | t | ) |

inline

References _timeDelayOnNewSlideWithMovies.

## updateAlpha()

void osgPresentation::SlideEventHandler::updateAlpha | ( | bool | ,
|  | bool | ,
|  | float | x,
|  | float | y )

protected

## updateLight()

void osgPresentation::SlideEventHandler::updateLight | ( | float | x,
|  | float | y )

protected

## updateOperators()

void osgPresentation::SlideEventHandler::updateOperators | ( |  | ) |

protected

## Member Data Documentation

## _activeLayer

int osgPresentation::SlideEventHandler::_activeLayer

protected

Referenced by getActiveLayer().

## _activeOperators

ActiveOperators osgPresentation::SlideEventHandler::_activeOperators

protected

## _activePresentation

int osgPresentation::SlideEventHandler::_activePresentation

protected

## _activeSlide

int osgPresentation::SlideEventHandler::_activeSlide

protected

Referenced by getActiveSlide().

## _autoSteppingActive

bool osgPresentation::SlideEventHandler::_autoSteppingActive

protected

Referenced by getAutoSteppingActive(), and setAutoSteppingActive().

## _compileSlideCallback

osg::ref_ptr<CompileSlideCallback> osgPresentation::SlideEventHandler::_compileSlideCallback

protected

## _cursorOn

bool osgPresentation::SlideEventHandler::_cursorOn

protected

## _firstSlideOrLayerChange

bool osgPresentation::SlideEventHandler::_firstSlideOrLayerChange

protected

## _firstTraversal

bool osgPresentation::SlideEventHandler::_firstTraversal

protected

## _hold

bool osgPresentation::SlideEventHandler::_hold

protected

## _loopPresentation

bool osgPresentation::SlideEventHandler::_loopPresentation

protected

Referenced by getLoopPresentation(), and setLoopPresentation().

## _minimumTimeBetweenKeyPresses

double osgPresentation::SlideEventHandler::_minimumTimeBetweenKeyPresses

protected

## _pause

bool osgPresentation::SlideEventHandler::_pause

protected

## _presentationSwitch

osg::observer_ptr<osg::Switch> osgPresentation::SlideEventHandler::_presentationSwitch

protected

Referenced by getPresentationSwitch().

## _previousTime

double osgPresentation::SlideEventHandler::_previousTime

protected

## _previousX

float osgPresentation::SlideEventHandler::_previousX

protected

## _previousY

float osgPresentation::SlideEventHandler::_previousY

protected

## _referenceTime

double osgPresentation::SlideEventHandler::_referenceTime

protected

Referenced by getReferenceTime().

## _releaseAndCompileOnEachNewSlide

bool osgPresentation::SlideEventHandler::_releaseAndCompileOnEachNewSlide

protected

Referenced by getReleaseAndCompileOnEachNewSlide(), and setReleaseAndCompileOnEachNewSlide().

## _requestReload

bool osgPresentation::SlideEventHandler::_requestReload

protected

Referenced by getRequestReload().

## _showSwitch

osg::observer_ptr<osg::Switch> osgPresentation::SlideEventHandler::_showSwitch

protected

## _slideSwitch

osg::observer_ptr<osg::Switch> osgPresentation::SlideEventHandler::_slideSwitch

protected

## _tickAtFirstSlideOrLayerChange

osg::Timer_t osgPresentation::SlideEventHandler::_tickAtFirstSlideOrLayerChange

protected

## _tickAtLastSlideOrLayerChange

osg::Timer_t osgPresentation::SlideEventHandler::_tickAtLastSlideOrLayerChange

protected

## _timeDelayOnNewSlideWithMovies

float osgPresentation::SlideEventHandler::_timeDelayOnNewSlideWithMovies

protected

Referenced by getTimeDelayOnNewSlideWithMovies(), and setTimeDelayOnNewSlideWithMovies().

## _timeLastKeyPresses

double osgPresentation::SlideEventHandler::_timeLastKeyPresses

protected

## _timePerSlide

double osgPresentation::SlideEventHandler::_timePerSlide

protected

Referenced by getTimeDelayBetweenSlides(), and setTimeDelayBetweenSlides().

## _updateLightActive

bool osgPresentation::SlideEventHandler::_updateLightActive

protected

## _updateOpacityActive

bool osgPresentation::SlideEventHandler::_updateOpacityActive

protected

## _viewer

osg::observer_ptr<osgViewer::Viewer> osgPresentation::SlideEventHandler::_viewer

protected

Referenced by getViewer().

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

- SlideEventHandler