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

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

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

Public Member Functions

 Win32JoyStick (InputManager *creator, IDirectInput8 *pDI, bool buffered, DWORD coopSettings, const JoyStickInfo &info)
 
virtual ~Win32JoyStick ()
 
virtual void _initialize ()
 
virtual void capture ()
 
void captureXInput ()
 hanlde xinput More...
 
virtual InterfacequeryInterface (Interface::IType type)
 
virtual void setBuffered (bool buffered)
 
- Public Member Functions inherited from OIS::JoyStick
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 bool buffered () const
 
InputManagergetCreator () const
 
virtual int getID () const
 
Type type () const
 
const std::string & vendor () const
 

Static Public Member Functions

static void CheckXInputDevices (JoyStickInfoList &joys)
 

Protected Member Functions

bool _changePOV (int pov, DIDEVICEOBJECTDATA &di)
 
bool _doButtonClick (int button, DIDEVICEOBJECTDATA &di)
 
void _enumerate ()
 Enumerates all things. More...
 
- Protected Member Functions inherited from OIS::JoyStick
 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)
 

Static Protected Member Functions

static BOOL CALLBACK DIEnumDeviceObjectsCallback (LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef)
 Enumerate axis callback. More...
 
static BOOL CALLBACK DIEnumEffectsCallback (LPCDIEFFECTINFO pdei, LPVOID pvRef)
 Enumerate Force Feedback callback. More...
 

Protected Attributes

int _AxisNumber
 Mapping. More...
 
DWORD coopSetting
 
DIDEVCAPS mDIJoyCaps
 
IDirectInput8 * mDirectInput
 
Win32ForceFeedbackmFfDevice
 A force feedback device. More...
 
JoyStickInfo mJoyInfo
 
IDirectInputDevice8 * mJoyStick
 
- Protected Attributes inherited from OIS::JoyStick
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...
 

Additional Inherited Members

- Static Public Attributes inherited from OIS::JoyStick
static const int MAX_AXIS = 32767
 The maximum axis value. More...
 
static const int MIN_AXIS = -32768
 The minimal axis value. More...
 

Constructor & Destructor Documentation

Win32JoyStick::Win32JoyStick ( InputManager creator,
IDirectInput8 *  pDI,
bool  buffered,
DWORD  coopSettings,
const JoyStickInfo info 
)
Win32JoyStick::~Win32JoyStick ( )
virtual

Member Function Documentation

bool Win32JoyStick::_changePOV ( int  pov,
DIDEVICEOBJECTDATA &  di 
)
protected
bool Win32JoyStick::_doButtonClick ( int  button,
DIDEVICEOBJECTDATA &  di 
)
protected
void Win32JoyStick::_enumerate ( )
protected

Enumerates all things.

void Win32JoyStick::_initialize ( )
virtual

Remarks
Internal... Do not call this directly.

Implements OIS::Object.

void Win32JoyStick::capture ( )
virtual

Remarks
Used for updating call once per frame before checking state or to update events

Implements OIS::Object.

void Win32JoyStick::captureXInput ( )

hanlde xinput

void Win32JoyStick::CheckXInputDevices ( JoyStickInfoList joys)
static
Remarks
Enum each PNP device using WMI and check each device ID to see if it contains "IG_" (ex. "VID_045E&PID_028E&IG_00"). If it does, then it's an XInput device Unfortunately this information can not be found by just using DirectInput
BOOL CALLBACK Win32JoyStick::DIEnumDeviceObjectsCallback ( LPCDIDEVICEOBJECTINSTANCE  lpddoi,
LPVOID  pvRef 
)
staticprotected

Enumerate axis callback.

BOOL CALLBACK Win32JoyStick::DIEnumEffectsCallback ( LPCDIEFFECTINFO  pdei,
LPVOID  pvRef 
)
staticprotected

Enumerate Force Feedback callback.

Interface * Win32JoyStick::queryInterface ( Interface::IType  type)
virtual

Remarks
If available, get an interface to write to some devices. Examples include, turning on and off LEDs, ForceFeedback, etc
Parameters
typeThe type of interface you are looking for

Implements OIS::Object.

void Win32JoyStick::setBuffered ( bool  buffered)
virtual

Remarks
Sets buffered mode

Implements OIS::Object.

Member Data Documentation

int OIS::Win32JoyStick::_AxisNumber
protected

Mapping.

DWORD OIS::Win32JoyStick::coopSetting
protected
DIDEVCAPS OIS::Win32JoyStick::mDIJoyCaps
protected
IDirectInput8* OIS::Win32JoyStick::mDirectInput
protected
Win32ForceFeedback* OIS::Win32JoyStick::mFfDevice
protected

A force feedback device.

JoyStickInfo OIS::Win32JoyStick::mJoyInfo
protected
IDirectInputDevice8* OIS::Win32JoyStick::mJoyStick
protected

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