The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SDL2::HapticCustom - A structure containing a template for a Custom effect

SYNOPSIS

    use SDL2 qw[:all];
    # TODO: I need to whip up a quick example

DESCRIPTION

A SDL2::HapticCustom is exclusively for the SDL_HAPTIC_CUSTOM effect.

A custom force feedback effect is much like a periodic effect, where the application can define its exact shape. You will have to allocate the data yourself. Data should consist of channels * samples Uint16 samples.

If channels is one, the effect is rotated using the defined direction. Otherwise it uses the samples in data for the different axes.

Fields

type - SDL_HAPTIC_CUSTOM
direction - Direction of the effect
length - Duration of the effect
delay - Delay before starting the effect
button - Button that triggers the effect
interval - How soon it can be triggered again after button
channels - Axes to use, minimum of one
period - Sample periods
samples - Amount of samples
data - Should contain channels*samples items
attack_length - Duration of the attack
attack_level - Level at the start of the attack
fade_length - Duration of the fade
fade_level - Level at the end of the fade

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>