OIS  1.5
Object-oriented Input System
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
OIS::Effect Class Reference

#include <OISEffect.h>

Public Types

enum  EForce {
  UnknownForce = 0, ConstantForce, RampForce, PeriodicForce,
  ConditionalForce, CustomForce, _ForcesNumber
}
 Type of force. More...
 
enum  EType {
  Unknown = 0, Constant, Ramp, Square,
  Triangle, Sine, SawToothUp, SawToothDown,
  Friction, Damper, Inertia, Spring,
  Custom, _TypesNumber
}
 Type of effect. More...
 
enum  EDirection {
  NorthWest, North, NorthEast, East,
  SouthEast, South, SouthWest, West,
  _DirectionsNumber
}
 Direction of the Force. More...
 

Public Member Functions

 Effect (EForce ef, EType et)
 
virtual ~Effect ()
 
ForceEffectgetForceEffect () const
 
void setNumAxes (short nAxes)
 
short getNumAxes () const
 

Static Public Member Functions

static const char * getForceTypeName (EForce eValue)
 
static const char * getEffectTypeName (EType eValue)
 
static const char * getDirectionName (EDirection eValue)
 

Public Attributes

const EForce force
 
const EType type
 
EDirection direction
 
short trigger_button
 
unsigned int trigger_interval
 
unsigned int replay_length
 
unsigned int replay_delay
 
int _handle
 

Static Public Attributes

static const unsigned int OIS_INFINITE = 0xFFFFFFFF
 

Protected Member Functions

 Effect (const Effect &)
 
Effectoperator= (Effect)
 

Protected Attributes

ForceEffecteffect
 
short axes
 

Detailed Description

Force Feedback is a relatively complex set of properties to upload to a device. The best place for information on the different properties, effects, etc is in the DX Documentation and MSDN - there are even pretty graphs ther =) As this class is modeled on the the DX interface you can apply that same knowledge to creating effects via this class on any OS supported by OIS.

In anycase, this is the main class you will be using. There is absolutely no need to instance any of the supporting ForceEffect classes yourself.

Member Enumeration Documentation

◆ EDirection

Direction of the Force.

Enumerator
NorthWest 
North 
NorthEast 
East 
SouthEast 
South 
SouthWest 
West 
_DirectionsNumber 

◆ EForce

Type of force.

Enumerator
UnknownForce 
ConstantForce 
RampForce 
PeriodicForce 
ConditionalForce 
CustomForce 
_ForcesNumber 

◆ EType

Type of effect.

Enumerator
Unknown 
Constant 
Ramp 
Square 
Triangle 
Sine 
SawToothUp 
SawToothDown 
Friction 
Damper 
Inertia 
Spring 
Custom 
_TypesNumber 

Constructor & Destructor Documentation

◆ Effect() [1/2]

Effect::Effect ( EForce  ef,
EType  et 
)

This constructor allows you to set the force type and effect.

◆ ~Effect()

Effect::~Effect ( )
virtual

◆ Effect() [2/2]

OIS::Effect::Effect ( const Effect )
protected

Member Function Documentation

◆ getDirectionName()

const char * Effect::getDirectionName ( Effect::EDirection  eValue)
static

◆ getEffectTypeName()

const char * Effect::getEffectTypeName ( Effect::EType  eValue)
static

◆ getForceEffect()

ForceEffect * Effect::getForceEffect ( ) const

◆ getForceTypeName()

const char * Effect::getForceTypeName ( Effect::EForce  eValue)
static

◆ getNumAxes()

short Effect::getNumAxes ( ) const
Remarks
Returns the number of axes used in this effect

◆ operator=()

Effect& OIS::Effect::operator= ( Effect  )
protected

◆ setNumAxes()

void Effect::setNumAxes ( short  nAxes)
Remarks
Set the number of Axes to use before the initial creation of the effect. Can only be done prior to creation! Use the FF interface to determine how many axes can be used (are availiable)

Member Data Documentation

◆ _handle

int OIS::Effect::_handle
mutable

set internally.. do not change or you will not be able to upload/stop this effect any more. It will become lost. It is mutable so even with const reference it can/will be changed by this lib

◆ axes

short OIS::Effect::axes
protected

◆ direction

EDirection OIS::Effect::direction

◆ effect

ForceEffect* OIS::Effect::effect
protected

◆ force

const EForce OIS::Effect::force

◆ OIS_INFINITE

const unsigned int OIS::Effect::OIS_INFINITE = 0xFFFFFFFF
static

◆ replay_delay

unsigned int OIS::Effect::replay_delay

◆ replay_length

unsigned int OIS::Effect::replay_length

◆ trigger_button

short OIS::Effect::trigger_button

◆ trigger_interval

unsigned int OIS::Effect::trigger_interval

◆ type

const EType OIS::Effect::type

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