SDL_HapticPeriodic Struct Reference

A structure containing a template for a Periodic effect. More...

#include <SDL_haptic.h>


Data Fields

Uint16 type
SDL_HapticDirection direction
Uint32 length
Uint16 delay
Uint16 button
Uint16 interval
Uint16 period
Sint16 magnitude
Sint16 offset
Uint16 phase
Uint16 attack_length
Uint16 attack_level
Uint16 fade_length
Uint16 fade_level


Detailed Description

A structure containing a template for a Periodic effect.

The struct handles the following effects:

A periodic effect consists in a wave-shaped effect that repeats itself over time. The type determines the shape of the wave and the parameters determine the dimensions of the wave.

Phase is given by hundredth of a cyle meaning that giving the phase a value of 9000 will displace it 25% of it's period. Here are sample values:

Examples:

 SDL_HAPTIC_SINE
   __      __      __      __
  /  \    /  \    /  \    /
 /    \__/    \__/    \__/

 SDL_HAPTIC_SQUARE
  __    __    __    __    __
 |  |  |  |  |  |  |  |  |  |
 |  |__|  |__|  |__|  |__|  |

 SDL_HAPTIC_TRIANGLE
   /\    /\    /\    /\    /\
  /  \  /  \  /  \  /  \  /
 /    \/    \/    \/    \/

 SDL_HAPTIC_SAWTOOTHUP
   /|  /|  /|  /|  /|  /|  /|
  / | / | / | / | / | / | / |
 /  |/  |/  |/  |/  |/  |/  |

 SDL_HAPTIC_SAWTOOTHDOWN
 \  |\  |\  |\  |\  |\  |\  |
  \ | \ | \ | \ | \ | \ | \ |
   \|  \|  \|  \|  \|  \|  \|

See also:
SDL_HAPTIC_SINE

SDL_HAPTIC_SQUARE

SDL_HAPTIC_TRIANGLE

SDL_HAPTIC_SAWTOOTHUP

SDL_HAPTIC_SAWTOOTHDOWN

SDL_HapticEffect


Field Documentation

Duration of the attack.

Level at the start of the attack.

Button that triggers the effect.

Delay before starting the effect.

Direction of the effect.

Duration of the fade.

Level at the end of the fade.

How soon it can be triggered again after button.

Duration of the effect.

Peak value.

Mean value of the wave.

Period of the wave.

Horizontal shift given by hundredth of a cycle.

SDL_HAPTIC_SINE, SDL_HAPTIC_SQUARE, SDL_HAPTIC_TRIANGLE, SDL_HAPTIC_SAWTOOTHUP or SDL_HAPTIC_SAWTOOTHDOWN


The documentation for this struct was generated from the following file:

Generated on Mon Sep 21 21:32:25 2009 for Simple DirectMedia Layer by  doxygen 1.5.8