#include <src/ois/win32/Win32ForceFeedback.h>
Public Member Functions | |
void | _addEffectSupport (LPCDIEFFECTINFO pdei) |
short | getFFAxesNumber () |
void | modify (const Effect *effect) |
void | remove (const Effect *effect) |
void | setAutoCenterMode (bool auto_on) |
void | setMasterGain (float level) |
void | upload (const Effect *effect) |
Win32ForceFeedback (IDirectInputDevice8 *joy) | |
~Win32ForceFeedback () | |
Protected Types | |
typedef std::map< int, LPDIRECTINPUTEFFECT > | EffectList |
Protected Member Functions | |
void | _setCommonProperties (DIEFFECT *diEffect, DWORD *rgdwAxes, LONG *rglDirection, DWORD struct_size, LPVOID struct_type, const Effect *effect) |
void | _updateConditionalEffect (const Effect *effect) |
void | _updateConstantEffect (const Effect *effect) |
void | _updateCustomEffect (const Effect *effect) |
void | _updatePeriodicEffect (const Effect *effect) |
void | _updateRampEffect (const Effect *effect) |
void | _upload (GUID, DIEFFECT *, const Effect *) |
Protected Attributes | |
EffectList | mEffectList |
int | mHandles |
IDirectInputDevice8 * | mJoyStick |
Private Member Functions | |
Win32ForceFeedback () |
typedef std::map<int,LPDIRECTINPUTEFFECT> OIS::Win32ForceFeedback::EffectList [protected] |
OIS::Win32ForceFeedback::Win32ForceFeedback | ( | ) | [inline, private] |
Win32ForceFeedback::Win32ForceFeedback | ( | IDirectInputDevice8 * | joy | ) |
Win32ForceFeedback::~Win32ForceFeedback | ( | ) |
References mEffectList.
void Win32ForceFeedback::_addEffectSupport | ( | LPCDIEFFECTINFO | pdei | ) |
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::_setCommonProperties | ( | DIEFFECT * | diEffect, | |
DWORD * | rgdwAxes, | |||
LONG * | rglDirection, | |||
DWORD | struct_size, | |||
LPVOID | struct_type, | |||
const Effect * | effect | |||
) | [protected] |
References OIS::Effect::getNumAxes(), OIS::Effect::replay_delay, and OIS::Effect::replay_length.
Referenced by _updateConditionalEffect(), _updateConstantEffect(), _updatePeriodicEffect(), and _updateRampEffect().
void Win32ForceFeedback::_updateConditionalEffect | ( | const Effect * | effect | ) | [protected] |
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::_updateConstantEffect | ( | const Effect * | effect | ) | [protected] |
References _setCommonProperties(), _upload(), and OIS::Effect::getForceEffect().
Referenced by upload().
void Win32ForceFeedback::_updateCustomEffect | ( | const Effect * | effect | ) | [protected] |
void Win32ForceFeedback::_updatePeriodicEffect | ( | const Effect * | effect | ) | [protected] |
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::_updateRampEffect | ( | const Effect * | effect | ) | [protected] |
References _setCommonProperties(), _upload(), and OIS::Effect::getForceEffect().
Referenced by upload().
void Win32ForceFeedback::_upload | ( | GUID | guid, | |
DIEFFECT * | diEffect, | |||
const Effect * | effect | |||
) | [protected] |
References OIS::Effect::_handle, OIS::E_DeviceFull, OIS::E_General, OIS::E_InvalidParam, mEffectList, mHandles, mJoyStick, and OIS_EXCEPT.
Referenced by _updateConditionalEffect(), _updateConstantEffect(), _updatePeriodicEffect(), and _updateRampEffect().
short OIS::Win32ForceFeedback::getFFAxesNumber | ( | ) | [inline, virtual] |
Implements OIS::ForceFeedback.
void Win32ForceFeedback::modify | ( | const Effect * | effect | ) | [virtual] |
Implements OIS::ForceFeedback.
References upload().
void Win32ForceFeedback::remove | ( | const Effect * | effect | ) | [virtual] |
Implements OIS::ForceFeedback.
References OIS::Effect::_handle, and mEffectList.
void Win32ForceFeedback::setAutoCenterMode | ( | bool | auto_on | ) | [virtual] |
auto_on | true to turn auto centering on, false to turn off. |
Implements OIS::ForceFeedback.
References mJoyStick.
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.
References mJoyStick.
void Win32ForceFeedback::upload | ( | const Effect * | effect | ) | [virtual] |
Implements OIS::ForceFeedback.
References _updateConditionalEffect(), _updateConstantEffect(), _updatePeriodicEffect(), _updateRampEffect(), OIS::Effect::ConditionalForce, OIS::Effect::ConstantForce, OIS::E_NotImplemented, OIS::Effect::force, OIS_EXCEPT, OIS::Effect::PeriodicForce, and OIS::Effect::RampForce.
Referenced by modify().
EffectList OIS::Win32ForceFeedback::mEffectList [protected] |
Referenced by _upload(), remove(), and ~Win32ForceFeedback().
int OIS::Win32ForceFeedback::mHandles [protected] |
Referenced by _upload().
IDirectInputDevice8* OIS::Win32ForceFeedback::mJoyStick [protected] |
Referenced by _upload(), setAutoCenterMode(), and setMasterGain().