History

Remove old Leap Motion code

David Rowe committed 9 years ago

Commit a8501a71 parent 9c928f112 files · +0 −1464Browse files

Showing the changes to interface/src/scripting/ControllerScriptingInterface.h (1 of 12 files). Show all

Unified · Split

interface/src/scripting/ControllerScriptingInterface.h+0−40
@@ -25,38 +25,6 @@ · 24 unmodified lines
25#include <WheelEvent.h>25#include <WheelEvent.h>
26class ScriptEngine;26class ScriptEngine;
27 27
28class PalmData;
29
30class InputController : public controller::InputController {
31 Q_OBJECT
32
33public:
34 InputController(int deviceTrackerId, int subTrackerId, QObject* parent = NULL);
35
36 virtual void update() override;
37 virtual Key getKey() const override;
38
39public slots:
40
41 virtual bool isActive() const override { return _isActive; }
42 virtual glm::vec3 getAbsTranslation() const override { return _eventCache.absTranslation; }
43 virtual glm::quat getAbsRotation() const override { return _eventCache.absRotation; }
44 virtual glm::vec3 getLocTranslation() const override { return _eventCache.locTranslation; }
45 virtual glm::quat getLocRotation() const override { return _eventCache.locRotation; }
46
47private:
48
49 int _deviceTrackerId;
50 uint _subTrackerId;
51
52 // cache for the spatial
53 SpatialEvent _eventCache;
54 bool _isActive;
55
56signals:
57};
58
59
60/// handles scripting of input controller commands from JS28/// handles scripting of input controller commands from JS
61class ControllerScriptingInterface : public controller::ScriptingInterface {29class ControllerScriptingInterface : public controller::ScriptingInterface {
62 Q_OBJECT30 Q_OBJECT
@@ -86,8 +54,6 @@ public: · 23 unmodified lines
86 bool isJoystickCaptured(int joystickIndex) const;54 bool isJoystickCaptured(int joystickIndex) const;
87 bool areEntityClicksCaptured() const;55 bool areEntityClicksCaptured() const;
88 56
89 void updateInputControllers();
90
91public slots:57public slots:
92 58
93 virtual void captureKeyEvents(const KeyEvent& event);59 virtual void captureKeyEvents(const KeyEvent& event);
@@ -102,10 +68,6 @@ public slots: · 8 unmodified lines
102 virtual glm::vec2 getViewportDimensions() const;68 virtual glm::vec2 getViewportDimensions() const;
103 virtual QVariant getRecommendedOverlayRect() const;69 virtual QVariant getRecommendedOverlayRect() const;
104 70
105 /// Factory to create an InputController
106 virtual controller::InputController* createInputController(const QString& deviceName, const QString& tracker);
107 virtual void releaseInputController(controller::InputController* input);
108
109signals:71signals:
110 void keyPressEvent(const KeyEvent& event);72 void keyPressEvent(const KeyEvent& event);
111 void keyReleaseEvent(const KeyEvent& event);73 void keyReleaseEvent(const KeyEvent& event);
@@ -135,8 +97,6 @@ private: · 23 unmodified lines
135 bool _captureEntityClicks;97 bool _captureEntityClicks;
136 98
137 using InputKey = controller::InputController::Key;99 using InputKey = controller::InputController::Key;
138 using InputControllerMap = std::map<InputKey, controller::InputController::Pointer>;
139 InputControllerMap _inputControllers;
140};100};
141 101
142const int NUMBER_OF_SPATIALCONTROLS_PER_PALM = 2; // the hand and the tip102const int NUMBER_OF_SPATIALCONTROLS_PER_PALM = 2; // the hand and the tip