openscenegraph
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osgPresentation::SlideEventHandler Class Reference
Inheritance diagram for osgPresentation::SlideEventHandler:
osgGA::GUIEventHandler osgGA::EventHandler osg::NodeCallback osg::Drawable::EventCallback 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)
 
 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
 
- 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 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)
 
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 StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () 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::Drawable::EventCallback
 EventCallback ()
 
 EventCallback (const EventCallback &, const CopyOp &)
 
 META_Object (osg, EventCallback)
 

Static Public Member Functions

static SlideEventHandlerinstance ()
 
- 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 ()
 

Protected Member Functions

 ~SlideEventHandler ()
 
 SlideEventHandler (const SlideEventHandler &, const osg::CopyOp &)
 
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

Enumerator
FIRST_POSITION 
LAST_POSITION 

Constructor & Destructor Documentation

osgPresentation::SlideEventHandler::SlideEventHandler ( osgViewer::Viewer viewer = 0)
osgPresentation::SlideEventHandler::~SlideEventHandler ( )
inlineprotected
osgPresentation::SlideEventHandler::SlideEventHandler ( const SlideEventHandler ,
const osg::CopyOp  
)
inlineprotected

Member Function Documentation

void osgPresentation::SlideEventHandler::compileSlide ( unsigned int  slideNum)
void osgPresentation::SlideEventHandler::dispatchEvent ( const KeyPosition keyPosition)
void osgPresentation::SlideEventHandler::dispatchEvent ( osgGA::Event event)
void osgPresentation::SlideEventHandler::forwardEventToDevices ( osgGA::Event event)
int osgPresentation::SlideEventHandler::getActiveLayer ( ) const
inline
int osgPresentation::SlideEventHandler::getActiveSlide ( ) const
inline
bool osgPresentation::SlideEventHandler::getAutoSteppingActive ( ) const
inline
double osgPresentation::SlideEventHandler::getCurrentTimeDelayBetweenSlides ( ) const
double osgPresentation::SlideEventHandler::getDuration ( const osg::Node node) const
osg::Node* osgPresentation::SlideEventHandler::getLayer ( int  slideNum,
int  layerNum 
)
bool osgPresentation::SlideEventHandler::getLoopPresentation ( ) const
inline
unsigned int osgPresentation::SlideEventHandler::getNumSlides ( )
osg::Switch* osgPresentation::SlideEventHandler::getPresentationSwitch ( )
inline
double osgPresentation::SlideEventHandler::getReferenceTime ( ) const
inline
bool osgPresentation::SlideEventHandler::getReleaseAndCompileOnEachNewSlide ( ) const
inline
bool osgPresentation::SlideEventHandler::getRequestReload ( ) const
inline
osg::Switch* osgPresentation::SlideEventHandler::getSlide ( int  slideNum)
double osgPresentation::SlideEventHandler::getTimeDelayBetweenSlides ( ) const
inline
float osgPresentation::SlideEventHandler::getTimeDelayOnNewSlideWithMovies ( ) const
inline
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.

osgViewer::Viewer* osgPresentation::SlideEventHandler::getViewer ( )
inline
virtual bool osgPresentation::SlideEventHandler::handle ( const osgGA::GUIEventAdapter ,
osgGA::GUIActionAdapter  
)
virtual

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

Reimplemented from osgGA::GUIEventHandler.

bool osgPresentation::SlideEventHandler::home ( )
bool osgPresentation::SlideEventHandler::home ( const osgGA::GUIEventAdapter ea,
osgGA::GUIActionAdapter aa 
)
protected
static SlideEventHandler* osgPresentation::SlideEventHandler::instance ( )
static
osgPresentation::SlideEventHandler::META_Object ( osgPresentation  ,
SlideEventHandler   
)
bool osgPresentation::SlideEventHandler::nextLayer ( )
bool osgPresentation::SlideEventHandler::nextLayerOrSlide ( )
bool osgPresentation::SlideEventHandler::nextSlide ( )
bool osgPresentation::SlideEventHandler::previousLayer ( )
bool osgPresentation::SlideEventHandler::previousLayerOrSlide ( )
bool osgPresentation::SlideEventHandler::previousSlide ( )
void osgPresentation::SlideEventHandler::releaseSlide ( unsigned int  slideNum)
bool osgPresentation::SlideEventHandler::selectLayer ( int  layerNum)
bool osgPresentation::SlideEventHandler::selectSlide ( int  slideNum,
int  layerNum = FIRST_POSITION 
)
void osgPresentation::SlideEventHandler::set ( osg::Node model)
void osgPresentation::SlideEventHandler::setAutoSteppingActive ( bool  flag = true)
inline
void osgPresentation::SlideEventHandler::setLoopPresentation ( bool  loop)
inline
void osgPresentation::SlideEventHandler::setReleaseAndCompileOnEachNewSlide ( bool  flag)
inline
void osgPresentation::SlideEventHandler::setRequestReload ( bool  flag)
void osgPresentation::SlideEventHandler::setTimeDelayBetweenSlides ( double  dt)
inline
void osgPresentation::SlideEventHandler::setTimeDelayOnNewSlideWithMovies ( float  t)
inline
void osgPresentation::SlideEventHandler::updateAlpha ( bool  ,
bool  ,
float  x,
float  y 
)
protected
void osgPresentation::SlideEventHandler::updateLight ( float  x,
float  y 
)
protected
void osgPresentation::SlideEventHandler::updateOperators ( )
protected

Member Data Documentation

int osgPresentation::SlideEventHandler::_activeLayer
protected
ActiveOperators osgPresentation::SlideEventHandler::_activeOperators
protected
int osgPresentation::SlideEventHandler::_activePresentation
protected
int osgPresentation::SlideEventHandler::_activeSlide
protected
bool osgPresentation::SlideEventHandler::_autoSteppingActive
protected
osg::ref_ptr<CompileSlideCallback> osgPresentation::SlideEventHandler::_compileSlideCallback
protected
bool osgPresentation::SlideEventHandler::_cursorOn
protected
bool osgPresentation::SlideEventHandler::_firstSlideOrLayerChange
protected
bool osgPresentation::SlideEventHandler::_firstTraversal
protected
bool osgPresentation::SlideEventHandler::_hold
protected
bool osgPresentation::SlideEventHandler::_loopPresentation
protected
double osgPresentation::SlideEventHandler::_minimumTimeBetweenKeyPresses
protected
bool osgPresentation::SlideEventHandler::_pause
protected
osg::observer_ptr<osg::Switch> osgPresentation::SlideEventHandler::_presentationSwitch
protected
double osgPresentation::SlideEventHandler::_previousTime
protected
float osgPresentation::SlideEventHandler::_previousX
protected
float osgPresentation::SlideEventHandler::_previousY
protected
double osgPresentation::SlideEventHandler::_referenceTime
protected
bool osgPresentation::SlideEventHandler::_releaseAndCompileOnEachNewSlide
protected
bool osgPresentation::SlideEventHandler::_requestReload
protected
osg::observer_ptr<osg::Switch> osgPresentation::SlideEventHandler::_showSwitch
protected
osg::observer_ptr<osg::Switch> osgPresentation::SlideEventHandler::_slideSwitch
protected
osg::Timer_t osgPresentation::SlideEventHandler::_tickAtFirstSlideOrLayerChange
protected
osg::Timer_t osgPresentation::SlideEventHandler::_tickAtLastSlideOrLayerChange
protected
float osgPresentation::SlideEventHandler::_timeDelayOnNewSlideWithMovies
protected
double osgPresentation::SlideEventHandler::_timeLastKeyPresses
protected
double osgPresentation::SlideEventHandler::_timePerSlide
protected
bool osgPresentation::SlideEventHandler::_updateLightActive
protected
bool osgPresentation::SlideEventHandler::_updateOpacityActive
protected
osg::observer_ptr<osgViewer::Viewer> osgPresentation::SlideEventHandler::_viewer
protected

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