OIS::JoyStick Class Reference

#include <OISJoyStick.h>

Inheritance diagram for OIS::JoyStick:

OIS::Object List of all members.

Public Member Functions

virtual ~JoyStick ()
short buttons ()
short axes ()
short hats ()
virtual void setEventCallback (JoyStickListener *joyListener)
JoyStickListenergetEventCallback ()
const JoyStickStategetJoyStickState () const

Static Public Attributes

static const int MIN_AXIS = -32768
 The minimal axis value.
static const int MAX_AXIS = 32767
 The maximum axis value.

Protected Member Functions

 JoyStick ()

Protected Attributes

short numButtons
short numAxes
short numHats
JoyStickState mState
JoyStickListenerlistener

Detailed Description

Joystick base class. To be implemented by specific system (ie. DirectX joystick) This class is useful as you remain OS independent using this common interface.


Constructor & Destructor Documentation

virtual OIS::JoyStick::~JoyStick (  )  [inline, virtual]

OIS::JoyStick::JoyStick (  )  [inline, protected]


Member Function Documentation

short OIS::JoyStick::buttons (  )  [inline]

Remarks:
Returns the number of buttons

short OIS::JoyStick::axes (  )  [inline]

Remarks:
Returns the number of axes

short OIS::JoyStick::hats (  )  [inline]

Remarks:
Returns the number of hats

virtual void OIS::JoyStick::setEventCallback ( JoyStickListener joyListener  )  [inline, virtual]

Remarks:
Register/unregister a JoyStick Listener - Only one allowed for simplicity. If broadcasting is neccessary, just broadcast from the callback you registered.
Parameters:
joyListener Send a pointer to a class derived from JoyStickListener or 0 to clear the callback

JoyStickListener* OIS::JoyStick::getEventCallback (  )  [inline]

Remarks:
Returns currently set callback.. or null

const JoyStickState& OIS::JoyStick::getJoyStickState (  )  const [inline]

Remarks:
Returns the state of the joystick - is valid for both buffered and non buffered mode


Member Data Documentation

const int OIS::JoyStick::MIN_AXIS = -32768 [static]

The minimal axis value.

const int OIS::JoyStick::MAX_AXIS = 32767 [static]

The maximum axis value.

short OIS::JoyStick::numButtons [protected]

short OIS::JoyStick::numAxes [protected]

short OIS::JoyStick::numHats [protected]

JoyStickState OIS::JoyStick::mState [protected]

JoyStickListener* OIS::JoyStick::listener [protected]


The documentation for this class was generated from the following file:
Generated on Fri Jul 13 21:21:05 2007 for OIS by  doxygen 1.5.2