Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
OIS::JoyStick Class Reference

Joystick base class. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/external/ois/OISJoyStick.h>

Inheritance diagram for OIS::JoyStick:
OIS::Object OIS::LinuxJoyStick OIS::MacJoyStick OIS::Win32JoyStick

Public Member Functions

virtual ~JoyStick ()
 
JoyStickListenergetEventCallback () const
 
const JoyStickStategetJoyStickState () const
 
int getNumberOfComponents (ComponentType cType) const
 
float getVector3Sensitivity () const
 
virtual void setEventCallback (JoyStickListener *joyListener)
 
void setVector3Sensitivity (float degrees=OIS_JOYSTICK_VECTOR3_DEFAULT)
 
- Public Member Functions inherited from OIS::Object
virtual ~Object ()
 
virtual void _initialize ()=0
 
virtual bool buffered () const
 
virtual void capture ()=0
 
InputManagergetCreator () const
 
virtual int getID () const
 
virtual InterfacequeryInterface (Interface::IType type)=0
 
virtual void setBuffered (bool buffered)=0
 
Type type () const
 
const std::string & vendor () const
 

Static Public Attributes

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

Protected Member Functions

 JoyStick (const std::string &vendor, bool buffered, int devID, InputManager *creator)
 
- Protected Member Functions inherited from OIS::Object
 Object (const std::string &vendor, Type iType, bool buffered, int devID, InputManager *creator)
 

Protected Attributes

JoyStickListenermListener
 The callback listener. More...
 
int mPOVs
 Number of POVs. More...
 
int mSliders
 Number of sliders. More...
 
JoyStickState mState
 The JoyStickState structure (contains all component values) More...
 
float mVector3Sensitivity
 Adjustment factor for orientation vector accuracy. More...
 
- Protected Attributes inherited from OIS::Object
bool mBuffered
 Buffered flag. More...
 
InputManagermCreator
 The creator who created this object. More...
 
int mDevID
 Not fully implemented yet. More...
 
Type mType
 Type of controller object. More...
 
std::string mVendor
 Vendor name if applicable/known. More...
 

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 ( )
inlinevirtual
JoyStick::JoyStick ( const std::string &  vendor,
bool  buffered,
int  devID,
InputManager creator 
)
protected

Member Function Documentation

JoyStickListener * JoyStick::getEventCallback ( ) const
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
int JoyStick::getNumberOfComponents ( ComponentType  cType) const
Remarks
Returns the number of requested components
Parameters
cTypeThe ComponentType you are interested in knowing about
float JoyStick::getVector3Sensitivity ( ) const
Remarks
Returns the sensitivity cutoff for Vector3 Component
void JoyStick::setEventCallback ( JoyStickListener joyListener)
virtual
Remarks
Register/unregister a JoyStick Listener - Only one allowed for simplicity. If broadcasting is neccessary, just broadcast from the callback you registered.
Parameters
joyListenerSend a pointer to a class derived from JoyStickListener or 0 to clear the callback
void JoyStick::setVector3Sensitivity ( float  degrees = OIS_JOYSTICK_VECTOR3_DEFAULT)
Remarks
Sets a cutoff limit for changes in the Vector3 component for movement to be ignored. Helps reduce much event traffic for frequent small/sensitive changes
Parameters
degreesThe degree under which Vector3 events should be discarded

Member Data Documentation

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

The maximum axis value.

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

The minimal axis value.

JoyStickListener* OIS::JoyStick::mListener
protected

The callback listener.

int OIS::JoyStick::mPOVs
protected

Number of POVs.

int OIS::JoyStick::mSliders
protected

Number of sliders.

JoyStickState OIS::JoyStick::mState
protected

The JoyStickState structure (contains all component values)

float OIS::JoyStick::mVector3Sensitivity
protected

Adjustment factor for orientation vector accuracy.


The documentation for this class was generated from the following files: