Orxonox  0.0.5 Codename: Arcturus
Public Types | Public Member Functions | Protected Attributes | List of all members
OIS::ForceFeedback Class Referenceabstract

Interface class for dealing with Force Feedback devices. More...

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

Inheritance diagram for OIS::ForceFeedback:
OIS::Interface OIS::LinuxForceFeedback OIS::Win32ForceFeedback

Public Types

typedef std::multimap< Effect::EForce, Effect::ETypeSupportedEffectList
 
- Public Types inherited from OIS::Interface
enum  IType { ForceFeedback, Reserved }
 Type of Interface. More...
 

Public Member Functions

 ForceFeedback ()
 
virtual ~ForceFeedback ()
 
void _addEffectTypes (Effect::EForce force, Effect::EType type)
 
void _setAutoCenterSupport (bool on)
 
void _setGainSupport (bool on)
 
virtual short getFFAxesNumber ()=0
 
virtual unsigned short getFFMemoryLoad ()=0
 
const SupportedEffectListgetSupportedEffects () 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
 
bool supportsEffect (Effect::EForce force, Effect::EType type) const
 
virtual void upload (const Effect *effect)=0
 
- Public Member Functions inherited from OIS::Interface
virtual ~Interface ()
 

Protected Attributes

bool mSetAutoCenterSupport
 
bool mSetGainSupport
 
SupportedEffectList mSupportedEffects
 

Detailed Description

Interface class for dealing with Force Feedback devices.

Member Typedef Documentation

Constructor & Destructor Documentation

ForceFeedback::ForceFeedback ( )
virtual OIS::ForceFeedback::~ForceFeedback ( )
inlinevirtual

Member Function Documentation

void ForceFeedback::_addEffectTypes ( Effect::EForce  force,
Effect::EType  type 
)
void ForceFeedback::_setAutoCenterSupport ( bool  on)
void ForceFeedback::_setGainSupport ( bool  on)
virtual short OIS::ForceFeedback::getFFAxesNumber ( )
pure virtual
Remarks
Get the number of supported Axes for FF usage

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

virtual unsigned short OIS::ForceFeedback::getFFMemoryLoad ( )
pure virtual
Remarks
Get the current load (%, in [0, 100] of the FF device memory

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

const ForceFeedback::SupportedEffectList & ForceFeedback::getSupportedEffects ( ) const
Remarks
Get a list of all supported effects
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 Note: If the device does not support auto-centering, nothing is done
Parameters
auto_ontrue to turn auto centering on, false to turn off.

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

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. Note: If the device does not support master gain setting, nothing is done
Parameters
levelA 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::Win32ForceFeedback, and OIS::LinuxForceFeedback.

bool ForceFeedback::supportsEffect ( Effect::EForce  force,
Effect::EType  type 
) const
Remarks
Tell if a given force / effect type pair is supported
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

bool OIS::ForceFeedback::mSetAutoCenterSupport
protected
bool OIS::ForceFeedback::mSetGainSupport
protected
SupportedEffectList OIS::ForceFeedback::mSupportedEffects
protected

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