SDL Library

Dependents:   H261_decoder

Embed: (wiki syntax)

« Back to documentation index

SDL_HapticCondition Struct Reference

SDL_HapticCondition Struct Reference

A structure containing a template for a Condition effect. More...

#include <SDL_haptic.h>

Data Fields

Uint16 type
 SDL_HAPTIC_SPRING, SDL_HAPTIC_DAMPER, SDL_HAPTIC_INERTIA or SDL_HAPTIC_FRICTION
SDL_HapticDirection direction
 Direction of the effect - Not used ATM.
Uint32 length
 Duration of the effect.
Uint16 delay
 Delay before starting the effect.
Uint16 button
 Button that triggers the effect.
Uint16 interval
 How soon it can be triggered again after button.
Uint16 right_sat [3]
 Level when joystick is to the positive side.
Uint16 left_sat [3]
 Level when joystick is to the negative side.
Sint16 right_coeff [3]
 How fast to increase the force towards the positive side.
Sint16 left_coeff [3]
 How fast to increase the force towards the negative side.
Uint16 deadband [3]
 Size of the dead zone.
Sint16 center [3]
 Position of the dead zone.

Detailed Description

A structure containing a template for a Condition effect.

The struct handles the following effects:

  • SDL_HAPTIC_SPRING: Effect based on axes position.
  • SDL_HAPTIC_DAMPER: Effect based on axes velocity.
  • SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
  • SDL_HAPTIC_FRICTION: Effect based on axes movement.

Direction is handled by condition internals instead of a direction member. The condition effect specific members have three parameters. The first refers to the X axis, the second refers to the Y axis and the third refers to the Z axis. The right terms refer to the positive side of the axis and the left terms refer to the negative side of the axis. Please refer to the SDL_HapticDirection diagram for which side is positive and which is negative.

See also:
SDL_HapticDirection
SDL_HAPTIC_SPRING
SDL_HAPTIC_DAMPER
SDL_HAPTIC_INERTIA
SDL_HAPTIC_FRICTION
SDL_HapticEffect

Definition at line 591 of file SDL_haptic.h.


Field Documentation

Button that triggers the effect.

Definition at line 603 of file SDL_haptic.h.

Position of the dead zone.

Definition at line 612 of file SDL_haptic.h.

Size of the dead zone.

Definition at line 611 of file SDL_haptic.h.

Delay before starting the effect.

Definition at line 600 of file SDL_haptic.h.

Direction of the effect - Not used ATM.

Definition at line 596 of file SDL_haptic.h.

How soon it can be triggered again after button.

Definition at line 604 of file SDL_haptic.h.

How fast to increase the force towards the negative side.

Definition at line 610 of file SDL_haptic.h.

Level when joystick is to the negative side.

Definition at line 608 of file SDL_haptic.h.

Duration of the effect.

Definition at line 599 of file SDL_haptic.h.

How fast to increase the force towards the positive side.

Definition at line 609 of file SDL_haptic.h.

Level when joystick is to the positive side.

Definition at line 607 of file SDL_haptic.h.

SDL_HAPTIC_SPRING, SDL_HAPTIC_DAMPER, SDL_HAPTIC_INERTIA or SDL_HAPTIC_FRICTION

Definition at line 594 of file SDL_haptic.h.