openscenegraph
osgPresentation::SlideEventHandler Class Reference

#include <SlideEventHandler>

Inheritance diagram for osgPresentation::SlideEventHandler:
osgGA::GUIEventHandler osgGA::EventHandler osg::NodeCallback osg::DrawableEventCallback osg::Callback osg::Callback osg::Object osg::Object osg::Referenced osg::Referenced

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::ViewergetViewer ()
osg::SwitchgetPresentationSwitch ()
void compileSlide (unsigned int slideNum)
void releaseSlide (unsigned int slideNum)
unsigned int getNumSlides ()
int getActiveSlide () const
int getActiveLayer () const
osg::SwitchgetSlide (int slideNum)
osg::NodegetLayer (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 NodeCallbackasNodeCallback ()
virtual const NodeCallbackasNodeCallback () const
virtual DrawableEventCallbackasDrawableEventCallback ()
virtual const DrawableEventCallbackasDrawableEventCallback () const
virtual EventHandlerasEventHandler ()
virtual const EventHandlerasEventHandler () 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 CallbackasCallback ()
virtual const CallbackasCallback () const
virtual CallbackObjectasCallbackObject ()
virtual const CallbackObjectasCallbackObject () const
virtual StateAttributeCallbackasStateAttributeCallback ()
virtual const StateAttributeCallbackasStateAttributeCallback () const
virtual UniformCallbackasUniformCallback ()
virtual const UniformCallbackasUniformCallback () const
virtual DrawableUpdateCallbackasDrawableUpdateCallback ()
virtual const DrawableUpdateCallbackasDrawableUpdateCallback () const
virtual DrawableCullCallbackasDrawableCullCallback ()
virtual const DrawableCullCallbackasDrawableCullCallback () const
bool traverse (osg::Object *object, osg::Object *data)
void setNestedCallback (osg::Callback *cb)
osg::CallbackgetNestedCallback ()
const osg::CallbackgetNestedCallback () 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 ObjectcloneType () const =0
virtual Objectclone (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 NodeasNode ()
virtual const NodeasNode () const
virtual NodeVisitorasNodeVisitor ()
virtual const NodeVisitorasNodeVisitor () const
virtual StateSetasStateSet ()
virtual const StateSetasStateSet () const
virtual StateAttributeasStateAttribute ()
virtual const StateAttributeasStateAttribute () const
virtual UniformasUniform ()
virtual const UniformasUniform () const
virtual CameraasCamera ()
virtual const CameraasCamera () const
virtual DrawableasDrawable ()
virtual const DrawableasDrawable () const
virtual UserDataContainerasUserDataContainer ()
virtual const UserDataContainerasUserDataContainer () const
virtual ValueObjectasValueObject ()
virtual const ValueObjectasValueObject () const
virtual ImageasImage ()
virtual const ImageasImage () 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::UserDataContainergetUserDataContainer ()
const osg::UserDataContainergetUserDataContainer () const
osg::UserDataContainergetOrCreateUserDataContainer ()
virtual void setUserData (Referenced *obj)
template<class T>
void setUserData (const ref_ptr< T > &ud)
virtual ReferencedgetUserData ()
virtual const ReferencedgetUserData () 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 &)
Referencedoperator= (const Referenced &)
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
Public Member Functions inherited from osg::DrawableEventCallback
 DrawableEventCallback ()
 DrawableEventCallback (const DrawableEventCallback &org, const CopyOp &copyop)
 META_Object (osg, DrawableEventCallback)

Static Public Member Functions

static SlideEventHandlerinstance ()
Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()

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

Enumerator
FIRST_POSITION 
LAST_POSITION 

Constructor & Destructor Documentation

◆ SlideEventHandler() [1/2]

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

◆ SlideEventHandler() [2/2]

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

References SlideEventHandler().

◆ ~SlideEventHandler()

osgPresentation::SlideEventHandler::~SlideEventHandler ( )
inlineprotected

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)

◆ forwardEventToDevices()

void osgPresentation::SlideEventHandler::forwardEventToDevices ( osgGA::Event * 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ _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

◆ _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

◆ _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

◆ _timeLastKeyPresses

double osgPresentation::SlideEventHandler::_timeLastKeyPresses
protected

◆ _timePerSlide

double osgPresentation::SlideEventHandler::_timePerSlide
protected

◆ _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: