History

hacking on controller events

ZappoMan committed 12 years ago

Commit 5addc351 parent 64afd173 files · +61 −0Browse files

Showing the changes to libraries/script-engine/src/AbstractControllerScriptingInterface.h (1 of 3 files). Show all

Unified · Split

libraries/script-engine/src/AbstractControllerScriptingInterface.h+19−0
@@ -10,8 +10,12 @@ · 9 unmodified lines
10#define __hifi__AbstractControllerScriptingInterface__10#define __hifi__AbstractControllerScriptingInterface__
11 11
12#include <QtCore/QObject>12#include <QtCore/QObject>
13
13#include <glm/glm.hpp>14#include <glm/glm.hpp>
14 15
16#include "EventTypes.h"
17
18
15/// handles scripting of input controller commands from JS19/// handles scripting of input controller commands from JS
16class AbstractControllerScriptingInterface : public QObject {20class AbstractControllerScriptingInterface : public QObject {
17 Q_OBJECT21 Q_OBJECT
@@ -33,6 +37,21 @@ public slots: · 15 unmodified lines
33 virtual glm::vec3 getSpatialControlPosition(int controlIndex) const = 0;37 virtual glm::vec3 getSpatialControlPosition(int controlIndex) const = 0;
34 virtual glm::vec3 getSpatialControlVelocity(int controlIndex) const = 0;38 virtual glm::vec3 getSpatialControlVelocity(int controlIndex) const = 0;
35 virtual glm::vec3 getSpatialControlNormal(int controlIndex) const = 0;39 virtual glm::vec3 getSpatialControlNormal(int controlIndex) const = 0;
40
41signals:
42 void keyPressEvent(const KeyEvent& event);
43 void keyReleaseEvent(const KeyEvent& event);
44
45 void mouseMoveEvent(const MouseEvent& event);
46 void mousePressEvent(const MouseEvent& event);
47 void mouseReleaseEvent(const MouseEvent& event);
48
49 void touchBeginEvent(const TouchEvent& event);
50 void touchEndEvent(const TouchEvent& event);
51 void touchUpdateEvent(const TouchEvent& event);
52
53 void wheelEvent(const WheelEvent& event);
54
36};55};
37 56
38#endif /* defined(__hifi__AbstractControllerScriptingInterface__) */57#endif /* defined(__hifi__AbstractControllerScriptingInterface__) */