source: Swollen/swollen/keyboardeventhandler.h @ 100

Last change on this file since 100 was 92, checked in by darran, 19 years ago
  • bedslope texture only when asked
  • code cleanup (comment-out PnP gone)
  • bedslope material/stateset only used for texture
  • 'l' keyboard toggle removed
  • code for looking at global attributes of .sww file
File size: 911 bytes
Line 
1/*
2    SWWViewer
3
4    An OpenSceneGraph viewer for pyVolution SWW files.
5    copyright (C) 2004 Geoscience Australia
6*/
7
8#ifndef KEYBOARDEVENTHANDLER_H
9#define KEYBOARDEVENTHANDLER_H
10
11#include <project.h>
12#include <osgGA/GUIEventHandler>
13
14
15class KeyboardEventHandler : public osgGA::GUIEventHandler
16{
17
18public:
19    KeyboardEventHandler( int nTimesteps, float tps);
20    virtual bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&);
21    virtual void accept(osgGA::GUIEventHandlerVisitor&) {}
22    virtual bool isPaused(){return _paused;}
23    virtual bool timestepChanged();
24    virtual bool toggleWireframe();
25    virtual int getTimestep(){return (unsigned int) _timestep;}
26    virtual void setTime(float time);
27
28private:
29    int _direction, _timestep, _ntimesteps;
30    float _tps, _prevtime, _tpsorig;
31    bool _paused, _timestepchanged, _togglewireframe;
32};
33
34#endif  // KEYBOARDEVENTHANDLER_H
Note: See TracBrowser for help on using the repository browser.