SDL_HapticCondition

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.

\since This struct is available since SDL 3.2.0.

\sa SDL_HapticDirection \sa SDL_HAPTIC_SPRING \sa SDL_HAPTIC_DAMPER \sa SDL_HAPTIC_INERTIA \sa SDL_HAPTIC_FRICTION \sa SDL_HapticEffect

Members

Variables

button
Uint16 button;

Button that triggers the effect.

center
Sint16[3] center;

Position of the dead zone.

deadband
Uint16[3] deadband;

Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered.

delay
Uint16 delay;

Delay before starting the effect.

direction
SDL_HapticDirection direction;

Direction of the effect.

interval
Uint16 interval;

How soon it can be triggered again after button.

left_coeff
Sint16[3] left_coeff;

How fast to increase the force towards the negative side.

left_sat
Uint16[3] left_sat;

Level when joystick is to the negative side; max 0xFFFF.

length
Uint32 length;

Duration of the effect.

right_coeff
Sint16[3] right_coeff;

How fast to increase the force towards the positive side.

right_sat
Uint16[3] right_sat;

Level when joystick is to the positive side; max 0xFFFF.

type
SDL_HapticEffectType type;

SDL_HAPTIC_SPRING, SDL_HAPTIC_DAMPER, SDL_HAPTIC_INERTIA or SDL_HAPTIC_FRICTION

Meta