-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuserinputhandlers.h
56 lines (46 loc) · 1.49 KB
/
userinputhandlers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef KEYBOARD_HANDLERS_H_
#define KEYBOARD_HANDLERS_H_
#include <osgGA/GUIEventHandler>
#include <osg/Node>
#include <osg/Geode>
#include <osg/MatrixTransform>
#include "abstracttypes.h"
#include "macro.h"
namespace amussementpark {
class ToggleNodeKeyboardHandler: public osgGA::GUIEventHandler {
private:
osg::Node::NodeMask defaultMask;
osg::ref_ptr<osg::Geode> geode;
osgGA::GUIEventAdapter::KeySymbol key;
public:
ToggleNodeKeyboardHandler(osg::Geode *g, osgGA::GUIEventAdapter::KeySymbol k);
virtual BOOLEAN handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
};
class HelpMenuKeyboardHandler: public ToggleNodeKeyboardHandler {
public:
HelpMenuKeyboardHandler(osg::Geode *g);
};
class DebuggerKeyboardHandler: public ToggleNodeKeyboardHandler {
public:
DebuggerKeyboardHandler(osg::Geode *g);
};
class UserInputHandler: public osgGA::GUIEventHandler {
private:
ManipulableObject *obj;
CHAR actionKey;
public:
UserInputHandler(ManipulableObject *o, CHAR key);
virtual BOOLEAN handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
};
class MouseInputHandler: public osgGA::GUIEventHandler {
public:
MouseInputHandler();
virtual BOOLEAN handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
};
class CameraSwitchHandler: public osgGA::GUIEventHandler {
public:
CameraSwitchHandler();
virtual BOOLEAN handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
};
}
#endif