23 #ifndef OIS_Joystick_H 24 #define OIS_Joystick_H 31 #define OIS_JOYSTICK_VECTOR3_DEFAULT 2.28f 40 static const int Centered = 0x00000000;
41 static const int North = 0x00000001;
42 static const int South = 0x00000010;
43 static const int East = 0x00000100;
44 static const int West = 0x00001000;
45 static const int NorthEast = 0x00000101;
46 static const int SouthEast = 0x00000110;
47 static const int NorthWest = 0x00001001;
48 static const int SouthWest = 0x00001010;
92 for(std::vector<bool>::iterator i = mButtons.begin(), e = mButtons.end(); i != e; ++i)
97 for(std::vector<Axis>::iterator i = mAxes.begin(), e = mAxes.end(); i != e; ++i)
103 for(std::vector<Vector3>::iterator i = mVectors.begin(), e = mVectors.end(); i != e; ++i)
108 for(
int i = 0; i < 4; ++i)
111 mSliders[i].
abX = mSliders[i].
abY = 0;
144 virtual bool buttonPressed(
const JoyStickEvent& arg,
int button) = 0;
147 virtual bool buttonReleased(
const JoyStickEvent& arg,
int button) = 0;
150 virtual bool axisMoved(
const JoyStickEvent& arg,
int axis) = 0;
209 float getVector3Sensitivity()
const;
227 static const int MIN_AXIS = -32768;
230 static const int MAX_AXIS = 32767;
JoyStickListener * mListener
The callback listener.
Definition: OISJoyStick.h:245
Definition: OISEvents.h:32
Definition: OISJoyStick.h:139
std::vector< Axis > mAxes
Represents all the single axes on the device.
Definition: OISJoyStick.h:78
std::vector< Vector3 > mVectors
Represents all Vector type controls the device exports.
Definition: OISJoyStick.h:87
Definition: OISPrereqs.h:181
#define _OISExport
Definition: OISPrereqs.h:40
Slider()
Definition: OISJoyStick.h:57
virtual bool povMoved(const JoyStickEvent &arg, int index)
Joystick Event, and povID.
Definition: OISJoyStick.h:162
virtual bool vector3Moved(const JoyStickEvent &arg, int index)
Joystick Event, and Vector3ID.
Definition: OISJoyStick.h:170
const JoyStickState & state
Definition: OISJoyStick.h:124
JoyStickEvent(Object *obj, const JoyStickState &st)
Definition: OISJoyStick.h:120
ComponentType
Base type for all device components (button, axis, etc)
Definition: OISPrereqs.h:175
std::vector< bool > mButtons
Represents all the buttons (uses a bitset)
Definition: OISJoyStick.h:75
void clear()
internal method to reset all variables to initial values
Definition: OISJoyStick.h:90
JoyStickState()
Constructor.
Definition: OISJoyStick.h:72
#define OIS_JOYSTICK_VECTOR3_DEFAULT
Definition: OISJoyStick.h:31
Definition: OISJoyStick.h:117
virtual ~JoyStickListener()
Definition: OISJoyStick.h:142
float mVector3Sensitivity
Adjustment factor for orientation vector accuracy.
Definition: OISJoyStick.h:248
int abX
true if pushed, false otherwise
Definition: OISJoyStick.h:58
Definition: OISPrereqs.h:180
Base of all device components (button, axis, etc)
Definition: OISPrereqs.h:186
int mSliders
Number of sliders.
Definition: OISJoyStick.h:236
A sliding axis - only used in Win32 Right Now.
Definition: OISJoyStick.h:54
virtual ~JoyStick()
Definition: OISJoyStick.h:185
Definition: OISJoyStick.h:68
Definition: OISJoyStick.h:182
Definition: OISObject.h:32
int direction
Definition: OISJoyStick.h:50
const JoyStickState & getJoyStickState() const
Definition: OISJoyStick.h:224
#define OIS_UNUSED(x)
Definition: OISPrereqs.h:117
virtual bool sliderMoved(const JoyStickEvent &arg, int index)
Joystick Event, and sliderID.
Definition: OISJoyStick.h:154
Definition: OISEffect.h:28
Pov()
Definition: OISJoyStick.h:37
JoyStickState mState
The JoyStickState structure (contains all component values)
Definition: OISJoyStick.h:242
POV / HAT Joystick component.
Definition: OISJoyStick.h:34
virtual ~JoyStickEvent()
Definition: OISJoyStick.h:122
int mPOVs
Number of POVs.
Definition: OISJoyStick.h:239
static const int Centered
Definition: OISJoyStick.h:40
int abY
Definition: OISJoyStick.h:58