Orxonox: OIS::ForceFeedback Class Reference

# OIS::ForceFeedback Class Reference

`#include <src/ois/OISForceFeedback.h>`

Inheritance diagram for OIS::ForceFeedback:

List of all members.

## Public Types

typedef std::map < Effect::EForce, Effect::EType > | SupportedEffectList

## Public Member Functions

void | _addEffectTypes (Effect::EForce force, Effect::EType type)
| ForceFeedback ()
virtual short | getFFAxesNumber ()=0
const SupportedEffectList & | getSupportedEffects () const
virtual void | modify (const Effect *effect)=0
virtual void | remove (const Effect *effect)=0
virtual void | setAutoCenterMode (bool auto_on)=0
virtual void | setMasterGain (float level)=0
virtual void | upload (const Effect *effect)=0
virtual | ~ForceFeedback ()

## Protected Attributes

SupportedEffectList | mSupportedEffects

## Detailed Description

Interface class for dealing with Force Feedback devices

## Member Typedef Documentation

typedef std::map<Effect::EForce, Effect::EType> OIS::ForceFeedback::SupportedEffectList

## Constructor & Destructor Documentation

OIS::ForceFeedback::ForceFeedback | ( |  | ) | `[inline]`

virtual OIS::ForceFeedback::~ForceFeedback | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

void ForceFeedback::_addEffectTypes | ( | Effect::EForce | force,
|  | Effect::EType | type |
| ) |  |  |

References OIS::E_General, mSupportedEffects, OIS_EXCEPT, OIS::Effect::Unknown, and OIS::Effect::UnknownForce.

Referenced by OIS::Win32ForceFeedback::_addEffectSupport().

virtual short OIS::ForceFeedback::getFFAxesNumber | ( |  | ) | `[pure virtual]`

Remarks:
  Get the number of supported Axes for FF usage

Implemented in OIS::LinuxForceFeedback, and OIS::Win32ForceFeedback.

const ForceFeedback::SupportedEffectList & ForceFeedback::getSupportedEffects | ( |  | ) | const

Remarks:
  Get a list of all supported effects

References mSupportedEffects.

virtual void OIS::ForceFeedback::modify | ( | const Effect * | effect | ) | `[pure virtual]`

Remarks:
  Modifies an effect that is currently playing

Implemented in OIS::LinuxForceFeedback, and OIS::Win32ForceFeedback.

virtual void OIS::ForceFeedback::remove | ( | const Effect * | effect | ) | `[pure virtual]`

Remarks:
  Remove the effect from the device

Implemented in OIS::LinuxForceFeedback, and OIS::Win32ForceFeedback.

virtual void OIS::ForceFeedback::setAutoCenterMode | ( | bool | auto_on | ) | `[pure virtual]`

Remarks:
  If using Force Feedback effects, this should be turned off before uploading any effects. Auto centering is the motor moving the joystick back to center. DirectInput only has an on/off setting, whereas linux has levels.. Though, we go with DI's on/off mode only

Parameters:

  | auto_on | true to turn auto centering on, false to turn off.

Implemented in OIS::LinuxForceFeedback, and OIS::Win32ForceFeedback.

virtual void OIS::ForceFeedback::setMasterGain | ( | float | level | ) | `[pure virtual]`

Remarks:
  This is like setting the master volume of an audio device. Individual effects have gain levels; however, this affects all effects at once.

Parameters:

  | 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).

Implemented in OIS::LinuxForceFeedback, and OIS::Win32ForceFeedback.

virtual void OIS::ForceFeedback::upload | ( | const Effect * | effect | ) | `[pure virtual]`

Remarks:
  Creates and Plays the effect immediately. If the device is full of effects, it will fail to be uploaded. You will know this by an invalid Effect Handle

Implemented in OIS::LinuxForceFeedback, and OIS::Win32ForceFeedback.

## Member Data Documentation

SupportedEffectList OIS::ForceFeedback::mSupportedEffects`[protected]`

Referenced by _addEffectTypes(), and getSupportedEffects().

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

- src/ois/OISForceFeedback.h
- src/ois/OISForceFeedback.cpp