OIS::Win32JoyStick Class Reference

#include <Win32JoyStick.h>

Inheritance diagram for OIS::Win32JoyStick:
[legend]
Collaboration diagram for OIS::Win32JoyStick:
[legend]

List of all members.

Public Member Functions

 Win32JoyStick (InputManager *creator, IDirectInput8 *pDI, bool buffered, DWORD coopSettings, const JoyStickInfo &info)
virtual ~Win32JoyStick ()
virtual void setBuffered (bool buffered)
virtual void capture ()
virtual InterfacequeryInterface (Interface::IType type)
virtual void _initialize ()
JoyStickInfo _getJoyInfo ()

Protected Member Functions

 Win32JoyStick ()
void _enumerate ()
 Enumerates all things.
bool _doButtonClick (int button, DIDEVICEOBJECTDATA &di)
bool _changePOV (int pov, DIDEVICEOBJECTDATA &di)

Static Protected Member Functions

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

Protected Attributes

IDirectInput8 * mDirectInput
IDirectInputDevice8 * mJoyStick
DWORD coopSetting
GUID deviceGuid
Win32ForceFeedbackff_device
 A force feedback device.
int _AxisNumber
 Mapping.


Detailed Description

Definition at line 31 of file Win32JoyStick.h.


Constructor & Destructor Documentation

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

Definition at line 35 of file Win32JoyStick.cpp.

References coopSetting, deviceGuid, OIS::JoyStickInfo::deviceID, OIS::JoyStickInfo::devId, ff_device, OIS::JoyStick::listener, OIS::Object::mBuffered, OIS::Object::mCreator, OIS::Object::mDevID, mDirectInput, mJoyStick, OIS::Object::mType, OIS::Object::mVendor, OISJoyStick, and OIS::JoyStickInfo::vendor.

Win32JoyStick::~Win32JoyStick (  )  [virtual]

Definition at line 47 of file Copy of Win32JoyStick.cpp.

References mJoyStick.

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

Definition at line 56 of file Win32JoyStick.h.


Member Function Documentation

void Win32JoyStick::setBuffered ( bool  buffered  )  [virtual]

Remarks:
Sets buffered mode

Implements OIS::Object.

Definition at line 362 of file Copy of Win32JoyStick.cpp.

References _initialize(), OIS::Object::mBuffered, and mJoyStick.

void Win32JoyStick::capture (  )  [virtual]

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

Implements OIS::Object.

Definition at line 127 of file Copy of Win32JoyStick.cpp.

References OIS::Object::mBuffered.

Referenced by _initialize().

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:
type The type of interface you are looking for

Implements OIS::Object.

Definition at line 392 of file Win32JoyStick.cpp.

References ff_device, and OIS::Interface::ForceFeedback.

void Win32JoyStick::_initialize (  )  [virtual]

Remarks:
Internal... Do not call this directly.

Implements OIS::Object.

Definition at line 58 of file Copy of Win32JoyStick.cpp.

References _enumerate(), capture(), OIS::JoyStickState::clear(), coopSetting, deviceGuid, OIS::Object::mBuffered, mDirectInput, mJoyStick, OIS::JoyStick::mState, and OIS_EXCEPT.

Referenced by setBuffered().

JoyStickInfo Win32JoyStick::_getJoyInfo (  ) 

Remarks:
For internal use only... Returns a strucure to the manager, to make the device availiable for use again

Definition at line 379 of file Copy of Win32JoyStick.cpp.

References deviceGuid, OIS::JoyStickInfo::deviceID, OIS::JoyStickInfo::devId, OIS::Object::mDevID, OIS::Object::mVendor, and OIS::JoyStickInfo::vendor.

void Win32JoyStick::_enumerate (  )  [protected]

Enumerates all things.

Definition at line 93 of file Copy of Win32JoyStick.cpp.

References mJoyStick, OIS::JoyStick::numAxes, and OIS::JoyStick::numButtons.

Referenced by _initialize().

BOOL CALLBACK Win32JoyStick::DIEnumDeviceObjectsCallback ( LPCDIDEVICEOBJECTINSTANCE  lpddoi,
LPVOID  pvRef 
) [static, protected]

Enumerate axis callback.

Definition at line 131 of file Win32JoyStick.cpp.

References _AxisNumber, ff_device, OIS::JoyStick::MAX_AXIS, OIS::JoyStick::MIN_AXIS, mJoyStick, and OIS_EXCEPT.

BOOL CALLBACK Win32JoyStick::DIEnumEffectsCallback ( LPCDIEFFECTINFO  pdei,
LPVOID  pvRef 
) [static, protected]

Enumerate Force Feedback callback.

Definition at line 173 of file Win32JoyStick.cpp.

References OIS::Win32ForceFeedback::_addEffectSupport(), ff_device, and mJoyStick.

bool Win32JoyStick::_doButtonClick ( int  button,
DIDEVICEOBJECTDATA &  di 
) [protected]

Definition at line 331 of file Copy of Win32JoyStick.cpp.

References OIS::JoyStickListener::buttonPressed(), OIS::JoyStickListener::buttonReleased(), OIS::JoyStickState::buttons, OIS::JoyStick::listener, and OIS::JoyStick::mState.

bool Win32JoyStick::_changePOV ( int  pov,
DIDEVICEOBJECTDATA &  di 
) [protected]

Definition at line 351 of file Copy of Win32JoyStick.cpp.

References OIS::JoyStick::listener, OIS::JoyStickState::mPOV, OIS::JoyStick::mState, and OIS::JoyStickListener::povMoved().


Member Data Documentation

IDirectInput8* OIS::Win32JoyStick::mDirectInput [protected]

Definition at line 67 of file Win32JoyStick.h.

Referenced by _initialize(), and Win32JoyStick().

IDirectInputDevice8* OIS::Win32JoyStick::mJoyStick [protected]

Definition at line 68 of file Win32JoyStick.h.

Referenced by _enumerate(), _initialize(), DIEnumDeviceObjectsCallback(), DIEnumEffectsCallback(), setBuffered(), Win32JoyStick(), and ~Win32JoyStick().

DWORD OIS::Win32JoyStick::coopSetting [protected]

Definition at line 69 of file Win32JoyStick.h.

Referenced by _initialize(), and Win32JoyStick().

GUID OIS::Win32JoyStick::deviceGuid [protected]

Definition at line 70 of file Win32JoyStick.h.

Referenced by _getJoyInfo(), _initialize(), and Win32JoyStick().

Win32ForceFeedback* OIS::Win32JoyStick::ff_device [protected]

A force feedback device.

Definition at line 73 of file Win32JoyStick.h.

Referenced by DIEnumDeviceObjectsCallback(), DIEnumEffectsCallback(), queryInterface(), and Win32JoyStick().

int OIS::Win32JoyStick::_AxisNumber [protected]

Mapping.

Definition at line 76 of file Win32JoyStick.h.

Referenced by DIEnumDeviceObjectsCallback().


The documentation for this class was generated from the following files:
Generated on Sat Dec 1 20:13:55 2007 for OIS by  doxygen 1.5.4