Orxonox: OIS::Effect Class Reference

# OIS::Effect Class Reference

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

List of all members.

## Public Types

enum | EDirection { NorthWest, North, NorthEast, East, SouthEast, South, SouthWest, West }
| Direction of the Force. More...
enum | EForce { UnknownForce = 0, ConstantForce, RampForce, PeriodicForce, ConditionalForce, CustomForce }
| Type of force. More...

enum

EType {
Unknown = 0, Constant, Ramp, Square,
Triangle, Sine, SawToothUp, SawToothDown,
Friction, Damper, Inertia, Spring,
Custom
}

| Type of effect. More...

## Public Member Functions

| Effect (EForce ef, EType et)
ForceEffect * | getForceEffect () const
short | getNumAxes () const
void | setNumAxes (short nAxes)
virtual | ~Effect ()

## Public Attributes

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

## Static Public Attributes

static const unsigned int | OIS_INFINITE = 0xFFFFFFFF

## Protected Attributes

short | axes
ForceEffect * | effect

## Private Member Functions

| Effect ()

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

enum OIS::Effect::EDirection

Direction of the Force.

Enumerator:

  NorthWest |
  North |
  NorthEast |
  East |
  SouthEast |
  South |
  SouthWest |
  West |

enum OIS::Effect::EForce

Type of force.

Enumerator:

  UnknownForce |
  ConstantForce |
  RampForce |
  PeriodicForce |
  ConditionalForce |
  CustomForce |

enum OIS::Effect::EType

Type of effect.

Enumerator:

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

## Constructor & Destructor Documentation

Effect::Effect | ( |  | ) | `[private]`

hidden so this class cannot be instanced with default constructor

Effect::Effect | ( | EForce | ef,
|  | EType | et |
| ) |  |  |

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

References ConditionalForce, ConstantForce, effect, PeriodicForce, and RampForce.

Effect::~Effect | ( |  | ) | `[virtual]`

References effect.

## Member Function Documentation

ForceEffect * Effect::getForceEffect | ( |  | ) | const

References OIS::E_NotSupported, effect, and OIS_EXCEPT.

Referenced by OIS::Win32ForceFeedback::_updateConditionalEffect(), OIS::Win32ForceFeedback::_updateConstantEffect(), OIS::Win32ForceFeedback::_updatePeriodicEffect(), and OIS::Win32ForceFeedback::_updateRampEffect().

short Effect::getNumAxes | ( |  | ) | const

Remarks:
  Returns the number of axes used in this effect

References axes.

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

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)

References _handle, and axes.

## Member Data Documentation

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

Referenced by OIS::Win32ForceFeedback::_upload(), OIS::Win32ForceFeedback::remove(), and setNumAxes().

short OIS::Effect::axes`[protected]`

Referenced by getNumAxes(), and setNumAxes().

EDirection OIS::Effect::direction

ForceEffect* OIS::Effect::effect`[protected]`

Referenced by Effect(), getForceEffect(), and ~Effect().

const EForce OIS::Effect::force

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

const unsigned int OIS::Effect::OIS_INFINITE = 0xFFFFFFFF`[static]`

unsigned int OIS::Effect::replay_delay

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

unsigned int OIS::Effect::replay_length

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

short OIS::Effect::trigger_button

unsigned int OIS::Effect::trigger_interval

const EType OIS::Effect::type

Referenced by OIS::Win32ForceFeedback::_updateConditionalEffect(), and OIS::Win32ForceFeedback::_updatePeriodicEffect().

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

- src/ois/OISEffect.h
- src/ois/OISEffect.cpp