History

added all buttons triggers and joysticks

ZappoMan committed 12 years ago

Commit efdef1a1 parent 70e97813 files · +132 −3Browse files

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

Unified · Split

interface/src/ControllerScriptingInterface.h+23−3
@@ -6,8 +6,8 @@ · 5 unmodified lines
66 // Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
77 //
88
9−#ifndef __hifi__InterfaceControllerScriptingInterface__
10−#define __hifi__InterfaceControllerScriptingInterface__
9+#ifndef __hifi__ControllerScriptingInterface__
10+#define __hifi__ControllerScriptingInterface__
1111
1212 #include <QtCore/QObject>
1313
@@ -21,8 +21,28 @@ public slots: · 7 unmodified lines
2121 virtual bool isPrimaryButtonPressed() const;
2222 virtual glm::vec2 getPrimaryJoystickPosition() const;
2323
24+ virtual int getNumberOfButtons() const;
25+ virtual bool isButtonPressed(int buttonIndex) const;
26+
27+ virtual int getNumberOfTriggers() const;
28+ virtual float getTriggerValue(int triggerIndex) const;
29+
30+ virtual int getNumberOfJoysticks() const;
31+ virtual glm::vec2 getJoystickPosition(int joystickIndex) const;
32+
33+ virtual int getNumberOfSpatialControls() const;
34+ virtual glm::vec3 getSpatialControlPosition(int controlIndex) const;
35+
2436 private:
2537 const PalmData* getPrimaryPalm() const;
38+ const PalmData* getPalm(int palmIndex) const;
39+ int getNumberOfActivePalms() const;
40+ const PalmData* getActivePalm(int palmIndex) const;
41+
42+ const int NUMBER_OF_SPATIALCONTROLS_PER_PALM = 0;
43+ const int NUMBER_OF_JOYSTICKS_PER_PALM = 1;
44+ const int NUMBER_OF_TRIGGERS_PER_PALM = 1;
45+ const int NUMBER_OF_BUTTONS_PER_PALM = 6;
2646 };
2747
28−#endif /* defined(__hifi__InterfaceControllerScriptingInterface__) */
48+#endif /* defined(__hifi__ControllerScriptingInterface__) */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t