#include <Win32ForceFeedback.h>
Public Member Functions | |
| Win32ForceFeedback (IDirectInputDevice8 *joy) | |
| ~Win32ForceFeedback () | |
| void | upload (const Effect *effect) |
| void | modify (const Effect *effect) |
| void | remove (const Effect *effect) |
| void | setMasterGain (float level) |
| void | setAutoCenterMode (bool auto_on) |
| short | getFFAxesNumber () |
| void | _addEffectSupport (LPCDIEFFECTINFO pdei) |
Protected Types | |
| typedef std::map< int, LPDIRECTINPUTEFFECT > | EffectList |
Protected Member Functions | |
| void | _updateConstantEffect (const Effect *effect) |
| void | _updateRampEffect (const Effect *effect) |
| void | _updatePeriodicEffect (const Effect *effect) |
| void | _updateConditionalEffect (const Effect *effect) |
| void | _updateCustomEffect (const Effect *effect) |
| void | _setCommonProperties (DIEFFECT *diEffect, DWORD *rgdwAxes, LONG *rglDirection, DWORD struct_size, LPVOID struct_type, const Effect *effect) |
| void | _upload (GUID, DIEFFECT *, const Effect *) |
Protected Attributes | |
| EffectList | mEffectList |
| int | mHandles |
| IDirectInputDevice8 * | mJoyStick |
Private Member Functions | |
| Win32ForceFeedback () | |
Definition at line 32 of file Win32ForceFeedback.h.
typedef std::map<int,LPDIRECTINPUTEFFECT> OIS::Win32ForceFeedback::EffectList [protected] |
Definition at line 80 of file Win32ForceFeedback.h.
| OIS::Win32ForceFeedback::Win32ForceFeedback | ( | ) | [inline, private] |
Definition at line 34 of file Win32ForceFeedback.h.
| Win32ForceFeedback::Win32ForceFeedback | ( | IDirectInputDevice8 * | joy | ) |
Definition at line 34 of file Win32ForceFeedback.cpp.
| Win32ForceFeedback::~Win32ForceFeedback | ( | ) |
| void Win32ForceFeedback::upload | ( | const Effect * | effect | ) | [virtual] |
Implements OIS::ForceFeedback.
Definition at line 54 of file Win32ForceFeedback.cpp.
References _updateConditionalEffect(), _updateConstantEffect(), _updatePeriodicEffect(), _updateRampEffect(), OIS::Effect::ConditionalForce, OIS::Effect::ConstantForce, E_NotImplemented, OIS::Effect::force, OIS_EXCEPT, OIS::Effect::PeriodicForce, and OIS::Effect::RampForce.
Referenced by modify().
| void Win32ForceFeedback::modify | ( | const Effect * | effect | ) | [virtual] |
Implements OIS::ForceFeedback.
Definition at line 68 of file Win32ForceFeedback.cpp.
References upload().
| void Win32ForceFeedback::remove | ( | const Effect * | effect | ) | [virtual] |
Implements OIS::ForceFeedback.
Definition at line 75 of file Win32ForceFeedback.cpp.
References OIS::Effect::_handle, and mEffectList.
| void Win32ForceFeedback::setMasterGain | ( | float | level | ) | [virtual] |
| level | A value between 0.0 and 1.0 represent the percentage of gain. 1.0 being the highest possible force level (means no scaling). |
Implements OIS::ForceFeedback.
Definition at line 96 of file Win32ForceFeedback.cpp.
References mJoyStick.
| void Win32ForceFeedback::setAutoCenterMode | ( | bool | auto_on | ) | [virtual] |
| auto_on | true to turn auto centering on, false to turn off. |
Implements OIS::ForceFeedback.
Definition at line 117 of file Win32ForceFeedback.cpp.
References mJoyStick.
| short OIS::Win32ForceFeedback::getFFAxesNumber | ( | ) | [inline, virtual] |
Implements OIS::ForceFeedback.
Definition at line 57 of file Win32ForceFeedback.h.
| void Win32ForceFeedback::_addEffectSupport | ( | LPCDIEFFECTINFO | pdei | ) |
Definition at line 295 of file Win32ForceFeedback.cpp.
References OIS::ForceFeedback::_addEffectTypes(), OIS::Effect::Constant, OIS::Effect::Custom, OIS::Effect::Damper, OIS::Effect::Friction, OIS::Effect::Inertia, OIS::Effect::Ramp, OIS::Effect::SawToothDown, OIS::Effect::SawToothUp, OIS::Effect::Sine, OIS::Effect::Spring, OIS::Effect::Square, and OIS::Effect::Triangle.
Referenced by OIS::Win32JoyStick::DIEnumEffectsCallback().
| void Win32ForceFeedback::_updateConstantEffect | ( | const Effect * | effect | ) | [protected] |
Definition at line 132 of file Win32ForceFeedback.cpp.
References _setCommonProperties(), _upload(), and OIS::Effect::getForceEffect().
Referenced by upload().
| void Win32ForceFeedback::_updateRampEffect | ( | const Effect * | effect | ) | [protected] |
Definition at line 148 of file Win32ForceFeedback.cpp.
References _setCommonProperties(), _upload(), and OIS::Effect::getForceEffect().
Referenced by upload().
| void Win32ForceFeedback::_updatePeriodicEffect | ( | const Effect * | effect | ) | [protected] |
Definition at line 164 of file Win32ForceFeedback.cpp.
References _setCommonProperties(), _upload(), OIS::Effect::getForceEffect(), OIS::Effect::SawToothDown, OIS::Effect::SawToothUp, OIS::Effect::Sine, OIS::Effect::Square, OIS::Effect::Triangle, and OIS::Effect::type.
Referenced by upload().
| void Win32ForceFeedback::_updateConditionalEffect | ( | const Effect * | effect | ) | [protected] |
Definition at line 191 of file Win32ForceFeedback.cpp.
References _setCommonProperties(), _upload(), OIS::Effect::Damper, OIS::Effect::Friction, OIS::Effect::getForceEffect(), OIS::Effect::Inertia, OIS::Effect::Spring, and OIS::Effect::type.
Referenced by upload().
| void Win32ForceFeedback::_updateCustomEffect | ( | const Effect * | effect | ) | [protected] |
Definition at line 218 of file Win32ForceFeedback.cpp.
| void Win32ForceFeedback::_setCommonProperties | ( | DIEFFECT * | diEffect, | |
| DWORD * | rgdwAxes, | |||
| LONG * | rglDirection, | |||
| DWORD | struct_size, | |||
| LPVOID | struct_type, | |||
| const Effect * | effect | |||
| ) | [protected] |
Definition at line 233 of file Win32ForceFeedback.cpp.
References OIS::Effect::getNumAxes(), OIS::Effect::replay_delay, and OIS::Effect::replay_length.
Referenced by _updateConditionalEffect(), _updateConstantEffect(), _updatePeriodicEffect(), and _updateRampEffect().
| void Win32ForceFeedback::_upload | ( | GUID | guid, | |
| DIEFFECT * | diEffect, | |||
| const Effect * | effect | |||
| ) | [protected] |
Definition at line 257 of file Win32ForceFeedback.cpp.
References OIS::Effect::_handle, E_DeviceFull, E_InvalidParam, mEffectList, mHandles, mJoyStick, and OIS_EXCEPT.
Referenced by _updateConditionalEffect(), _updateConstantEffect(), _updatePeriodicEffect(), and _updateRampEffect().
EffectList OIS::Win32ForceFeedback::mEffectList [protected] |
Definition at line 81 of file Win32ForceFeedback.h.
Referenced by _upload(), remove(), and ~Win32ForceFeedback().
int OIS::Win32ForceFeedback::mHandles [protected] |
IDirectInputDevice8* OIS::Win32ForceFeedback::mJoyStick [protected] |
Definition at line 86 of file Win32ForceFeedback.h.
Referenced by _upload(), setAutoCenterMode(), and setMasterGain().
1.5.4