SDL_HapticRamp - A structure containing a template for a Ramp effect.
Contents
Availability
This struct is available since SDL 3.2.0.
Description
This struct is exclusively for the SDL_HAPTIC_RAMP
effect.
The ramp effect starts at start strength and ends at end strength. It augments in linear fashion. If you
use attack and fade with a ramp the effects get added to the ramp effect making the effect become
quadratic instead of linear.
Header File
Defined in SDL3/SDL_haptic.h
Name
SDL_HapticRamp - A structure containing a template for a Ramp effect.
See Also
•(3), SDL_HAPTIC_RAMP(3), •(3), SDL_HapticEffect(3type) Simple Directmedia Layer SDL 3.2.10 SDL_HapticRamp(3type)
Synopsis
#include"SDL3/SDL.h"typedefstructSDL_HapticRamp{/*Header*/Uint16type;/**<SDL_HAPTIC_RAMP*/SDL_HapticDirectiondirection;/**<Directionoftheeffect.*//*Replay*/Uint32length;/**<Durationoftheeffect.*/Uint16delay;/**<Delaybeforestartingtheeffect.*//*Trigger*/Uint16button;/**<Buttonthattriggerstheeffect.*/Uint16interval;/**<Howsoonitcanbetriggeredagainafterbutton.*//*Ramp*/Sint16start;/**<Beginningstrengthlevel.*/Sint16end;/**<Endingstrengthlevel.*//*Envelope*/Uint16attack_length;/**<Durationoftheattack.*/Uint16attack_level;/**<Levelatthestartoftheattack.*/Uint16fade_length;/**<Durationofthefade.*/Uint16fade_level;/**<Levelattheendofthefade.*/}SDL_HapticRamp;