Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
OIS::Win32ForceFeedback Class Reference

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

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

Public Member Functions

 Win32ForceFeedback (IDirectInputDevice8 *pDIJoy, const DIDEVCAPS *pDIJoyCaps)
 
 ~Win32ForceFeedback ()
 
void _addEffectSupport (LPCDIEFFECTINFO pdei)
 
void _addFFAxis ()
 
short getFFAxesNumber ()
 
unsigned short getFFMemoryLoad ()
 
void modify (const Effect *effect)
 
void remove (const Effect *effect)
 
void setAutoCenterMode (bool auto_on)
 
void setMasterGain (float level)
 
void upload (const Effect *effect)
 
- Public Member Functions inherited from OIS::ForceFeedback
 ForceFeedback ()
 
virtual ~ForceFeedback ()
 
void _addEffectTypes (Effect::EForce force, Effect::EType type)
 
void _setAutoCenterSupport (bool on)
 
void _setGainSupport (bool on)
 
const SupportedEffectListgetSupportedEffects () const
 
bool supportsEffect (Effect::EForce force, Effect::EType type) const
 
- Public Member Functions inherited from OIS::Interface
virtual ~Interface ()
 

Protected Types

typedef std::map< int, LPDIRECTINPUTEFFECT > EffectList
 

Protected Member Functions

void _setCommonProperties (DIEFFECT *diEffect, DWORD *rgdwAxes, LONG *rglDirection, DIENVELOPE *diEnvelope, DWORD struct_size, LPVOID struct_type, const Effect *effect, const Envelope *envelope)
 
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
 
short mFFAxes
 
int mHandles
 
IDirectInputDevice8 * mJoyStick
 
const DIDEVCAPS * mpDIJoyCaps
 
- Protected Attributes inherited from OIS::ForceFeedback
bool mSetAutoCenterSupport
 
bool mSetGainSupport
 
SupportedEffectList mSupportedEffects
 

Private Member Functions

 Win32ForceFeedback ()
 

Additional Inherited Members

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

Member Typedef Documentation

typedef std::map<int,LPDIRECTINPUTEFFECT> OIS::Win32ForceFeedback::EffectList
protected

Constructor & Destructor Documentation

OIS::Win32ForceFeedback::Win32ForceFeedback ( )
inlineprivate
Win32ForceFeedback::Win32ForceFeedback ( IDirectInputDevice8 *  pDIJoy,
const DIDEVCAPS *  pDIJoyCaps 
)
Win32ForceFeedback::~Win32ForceFeedback ( )

Member Function Documentation

void Win32ForceFeedback::_addEffectSupport ( LPCDIEFFECTINFO  pdei)
Remarks
Internal use.. Used during enumeration to build a list of a devices support effects.
void Win32ForceFeedback::_addFFAxis ( )
Remarks
Internal use.. Used during axis enumeration to get number of FF axes support effects.
void Win32ForceFeedback::_setCommonProperties ( DIEFFECT *  diEffect,
DWORD *  rgdwAxes,
LONG *  rglDirection,
DIENVELOPE *  diEnvelope,
DWORD  struct_size,
LPVOID  struct_type,
const Effect effect,
const Envelope envelope 
)
protected
void Win32ForceFeedback::_updateConditionalEffect ( const Effect effect)
protected
void Win32ForceFeedback::_updateConstantEffect ( const Effect effect)
protected
void Win32ForceFeedback::_updateCustomEffect ( const Effect effect)
protected
void Win32ForceFeedback::_updatePeriodicEffect ( const Effect effect)
protected
void Win32ForceFeedback::_updateRampEffect ( const Effect effect)
protected
void Win32ForceFeedback::_upload ( GUID  guid,
DIEFFECT *  diEffect,
const Effect effect 
)
protected
short Win32ForceFeedback::getFFAxesNumber ( )
virtual

Remarks
Get the number of supported Axes for FF usage

Implements OIS::ForceFeedback.

unsigned short Win32ForceFeedback::getFFMemoryLoad ( )
virtual

Remarks
Get the current load (%, in [0, 100] of the FF device memory

Implements OIS::ForceFeedback.

void Win32ForceFeedback::modify ( const Effect effect)
virtual

Remarks
Modifies an effect that is currently playing

Implements OIS::ForceFeedback.

void Win32ForceFeedback::remove ( const Effect effect)
virtual

Remarks
Remove the effect from the device

Implements OIS::ForceFeedback.

void Win32ForceFeedback::setAutoCenterMode ( bool  auto_on)
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.

Implements OIS::ForceFeedback.

void Win32ForceFeedback::setMasterGain ( float  level)
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).

Implements OIS::ForceFeedback.

void Win32ForceFeedback::upload ( const Effect effect)
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

Implements OIS::ForceFeedback.

Member Data Documentation

EffectList OIS::Win32ForceFeedback::mEffectList
protected
short OIS::Win32ForceFeedback::mFFAxes
protected
int OIS::Win32ForceFeedback::mHandles
protected
IDirectInputDevice8* OIS::Win32ForceFeedback::mJoyStick
protected
const DIDEVCAPS* OIS::Win32ForceFeedback::mpDIJoyCaps
protected

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