source: Swollen/swollen/keyboardeventhandler.h @ 1697

Last change on this file since 1697 was 115, checked in by darran, 20 years ago
File size: 1.1 KB
RevLine 
[9]1/*
2    SWWViewer
[6]3
[9]4    An OpenSceneGraph viewer for pyVolution SWW files.
5    copyright (C) 2004 Geoscience Australia
6*/
7
[6]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:
[66]19    KeyboardEventHandler( int nTimesteps, float tps);
[6]20    virtual bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&);
[66]21    virtual void accept(osgGA::GUIEventHandlerVisitor&) {}
22    virtual bool isPaused(){return _paused;}
[115]23    virtual void setPaused(bool value){_paused = value;}
[66]24    virtual bool timestepChanged();
25    virtual bool toggleWireframe();
[104]26    virtual bool toggleCulling();
[111]27    virtual bool toggleRecording();
[114]28    virtual bool togglePlayback();
29    virtual bool toggleSave();
[66]30    virtual int getTimestep(){return (unsigned int) _timestep;}
31    virtual void setTime(float time);
[6]32
33private:
[66]34    int _direction, _timestep, _ntimesteps;
35    float _tps, _prevtime, _tpsorig;
[104]36    bool _paused, _timestepchanged, _togglewireframe, _toggleculling;
[114]37    bool _togglerecording, _toggleplayback, _togglesave;
[6]38};
39
40#endif  // KEYBOARDEVENTHANDLER_H
Note: See TracBrowser for help on using the repository browser.