NAME
SDL2::HapticCondition - A structure containing a template for a Condition effect
SYNOPSIS
use SDL2 qw[:all];
# TODO: I need to whip up a quick example
DESCRIPTION
A SDL2::HapticCondition contains a template for a Condition effect.
The struct handles the following effects:
SDL_HAPTIC_SPRING
- Effect based on axes positionSDL_HAPTIC_DAMPER
- Effect based on axes velocitySDL_HAPTIC_INERTIA
- Effect based on axes accelerationSDL_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 SDL2::HapticDirection diagram for which side is positive and which is negative.
Fields
type
-SDL_HAPTIC_SPRING
,SDL_HAPTIC_DAMPER
,SDL_HAPTIC_INERTIA
, orSDL_HAPTIC_FRICTION
direction
- Direction of the effect - Not used ATMlength
- Duration of the effectdelay
- Delay before starting the effectright_sat
- Level when joystick is to the positive side; max0xFFFF
left_sat
- Level when joystick is to the negative side; max0xFFFF
right_coeff
- How fast to increase the force towards the positive sideleft_coeff
- How fast to increase the force towards the negative sidedeadband
- Size of the dead zone; max0xFFFF
: whole axis-range when0
-centeredcenter
- Position of the dead zone
LICENSE
Copyright (C) Sanko Robinson.
This library is free software; you can redistribute it and/or modify it under the terms found in the Artistic License 2. Other copyrights, terms, and conditions may apply to data transmitted through this module.
AUTHOR
Sanko Robinson <sanko@cpan.org>