logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_HapticCondition - A structure containing a template for a Condition effect.

Availability

       This struct is available since SDL 3.2.0.

Description

       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.

Header File

       Defined in SDL3/SDL_haptic.h

Name

       SDL_HapticCondition - A structure containing a template for a Condition effect.

See Also

(3),   SDL_HapticDirection(3type),   (3),   SDL_HAPTIC_SPRING(3),   (3),  SDL_HAPTIC_DAMPER(3),  (3),
       SDL_HAPTIC_INERTIA(3), (3), SDL_HAPTIC_FRICTION(3), (3), SDL_HapticEffect(3type)

Simple Directmedia Layer                           SDL 3.2.10                         SDL_HapticCondition(3type)

Synopsis

#include"SDL3/SDL.h"typedefstructSDL_HapticCondition{/*Header*/Uint16type;/**<SDL_HAPTIC_SPRING,SDL_HAPTIC_DAMPER,SDL_HAPTIC_INERTIAorSDL_HAPTIC_FRICTION*/SDL_HapticDirectiondirection;/**<Directionoftheeffect.*//*Replay*/Uint32length;/**<Durationoftheeffect.*/Uint16delay;/**<Delaybeforestartingtheeffect.*//*Trigger*/Uint16button;/**<Buttonthattriggerstheeffect.*/Uint16interval;/**<Howsoonitcanbetriggeredagainafterbutton.*//*Condition*/Uint16right_sat[3];/**<Levelwhenjoystickistothepositiveside;max0xFFFF.*/Uint16left_sat[3];/**<Levelwhenjoystickistothenegativeside;max0xFFFF.*/Sint16right_coeff[3];/**<Howfasttoincreasetheforcetowardsthepositiveside.*/Sint16left_coeff[3];/**<Howfasttoincreasetheforcetowardsthenegativeside.*/Uint16deadband[3];/**<Sizeofthedeadzone;max0xFFFF:wholeaxis-rangewhen0-centered.*/Sint16center[3];/**<Positionofthedeadzone.*/}SDL_HapticCondition;

See Also