History

Support for LeapMotion and worklist 19734

- Introduce the DeviceTracker class to abstract all the possible devices - Introduce the MotionTracker ( a DeviceTracker ) that contains a transform tree of joints - Add Leapmotion class as a MotionTracker and the support for the Leapmotion sdk in external - Add InputController as the abstraction of a MotionTracker/Joint for Javascript

samcake committed 12 years ago

Commit 3ce455a1 parent fe0374333 files · +7810 −197Browse files

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

Unified · Split

libraries/script-engine/src/AbstractControllerScriptingInterface.h+25−0
@@ -19,6 +19,28 @@ · 18 unmodified lines
19 19
20#include "EventTypes.h"20#include "EventTypes.h"
21 21
22class AbstractInputController : public QObject {
23 Q_OBJECT
24
25public:
26 typedef unsigned int Key;
27
28 virtual void update() = 0;
29
30 virtual Key getKey() const = 0;
31
32public slots:
33
34 virtual bool isActive() const = 0;
35 virtual glm::vec3 getAbsTranslation() const = 0;
36 virtual glm::quat getAbsRotation() const = 0;
37 virtual glm::vec3 getLocTranslation() const = 0;
38 virtual glm::quat getLocRotation() const = 0;
39
40signals:
41 void spatialEvent(const SpatialEvent& event);
42
43};
22 44
23/// handles scripting of input controller commands from JS45/// handles scripting of input controller commands from JS
24class AbstractControllerScriptingInterface : public QObject {46class AbstractControllerScriptingInterface : public QObject {
@@ -60,6 +82,9 @@ public slots: · 35 unmodified lines
60 82
61 virtual glm::vec2 getViewportDimensions() const = 0;83 virtual glm::vec2 getViewportDimensions() const = 0;
62 84
85
86 virtual AbstractInputController* createInputController( const QString& category, const QString& tracker ) = 0;
87
63signals:88signals:
64 void keyPressEvent(const KeyEvent& event);89 void keyPressEvent(const KeyEvent& event);
65 void keyReleaseEvent(const KeyEvent& event);90 void keyReleaseEvent(const KeyEvent& event);