OIS::ForceFeedback Class Reference

#include <OISForceFeedback.h>

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

List of all members.

Public Types

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

Public Member Functions

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

Protected Attributes

SupportedEffectList mSupportedEffects


Detailed Description

Interface class for dealing with Force Feedback devices

Definition at line 35 of file OISForceFeedback.h.


Member Typedef Documentation

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

Definition at line 89 of file OISForceFeedback.h.


Constructor & Destructor Documentation

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

Definition at line 38 of file OISForceFeedback.h.

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

Definition at line 39 of file OISForceFeedback.h.


Member Function Documentation

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

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

Definition at line 39 of file OISForceFeedback.cpp.

References mSupportedEffects.

Referenced by doStartup().

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

Definition at line 29 of file OISForceFeedback.cpp.

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

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


Member Data Documentation

SupportedEffectList OIS::ForceFeedback::mSupportedEffects [protected]

Definition at line 99 of file OISForceFeedback.h.

Referenced by _addEffectTypes(), and getSupportedEffects().


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