at.wisch.joystick.ffeffect
Class SineEffect

java.lang.Object
  extended by at.wisch.joystick.ffeffect.Effect
      extended by at.wisch.joystick.ffeffect.ExtendedEffect
          extended by at.wisch.joystick.ffeffect.PeriodicEffect
              extended by at.wisch.joystick.ffeffect.SineEffect

public class SineEffect
extends PeriodicEffect

The Class SineEffect. A periodic effect with a sine shaped wave form:

     __        __        __        _ <--- magnitude (peak value)
    /  \      /  \      /  \      /
   /    \    /    \    /    \    /   <--- offset (mean value)
 _/      \__/      \__/      \__/
 

Author:
Martin Wischenbart

Field Summary
 
Fields inherited from class at.wisch.joystick.ffeffect.Effect
EFFECT_CONSTANT, EFFECT_CUSTOM, EFFECT_DAMPER, EFFECT_FRICTION, EFFECT_INERTIA, EFFECT_RAMP, EFFECT_SAWTOOHDOWN, EFFECT_SAWTOOTHUP, EFFECT_SINE, EFFECT_SPRING, EFFECT_SQUARE, EFFECT_TRIANGLE, INFINITE_LENGTH, MAX_DELAY, MAX_LENGTH, MAX_LEVEL, MIN_LEVEL, NO_BUTTON
 
Constructor Summary
SineEffect()
          Instantiates a new SineEffect with default parameters.
SineEffect(Direction direction, int effectLength, int effectDelay, int buttonIndex, int buttonInterval, int attackLength, int fadeLength, int attackLevel, int fadeLevel, int period, int magnitude, int offset, int phase)
          Instantiates a new SineEffect with the specified parameters.
 
Method Summary
 java.lang.String getName()
          Gets the effect type as a String.
 
Methods inherited from class at.wisch.joystick.ffeffect.PeriodicEffect
getMagnitude, getOffset, getPeriod, getPhase, getStrength, setMagnitude, setOffset, setPeriod, setPhase, setStrength
 
Methods inherited from class at.wisch.joystick.ffeffect.ExtendedEffect
getAttackLength, getAttackLevel, getDirection, getFadeLength, getFadeLevel, setAttackLength, setAttackLevel, setDirection, setFadeLength, setFadeLevel
 
Methods inherited from class at.wisch.joystick.ffeffect.Effect
getButtonIndex, getButtonInterval, getDefaultDirection, getEffectDelay, getEffectLength, getEffectType, setButtonIndex, setButtonInterval, setDefaultDirection, setEffectDelay, setEffectLength
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SineEffect

public SineEffect(Direction direction,
                  int effectLength,
                  int effectDelay,
                  int buttonIndex,
                  int buttonInterval,
                  int attackLength,
                  int fadeLength,
                  int attackLevel,
                  int fadeLevel,
                  int period,
                  int magnitude,
                  int offset,
                  int phase)
Instantiates a new SineEffect with the specified parameters.

Parameters:
direction - a Direction object
effectLength - the effect length in ms (or INFINITE_LENGTH)
effectDelay - the delay before the effect starts in ms
buttonIndex - the trigger button index (or NO_BUTTON)
buttonInterval - the trigger button interval in ms
attackLength - the attack length (fade-in) in ms
fadeLength - the fade length (fade-out) in ms
attackLevel - the level from where to start the fade-in
fadeLevel - the level where the fade-out fades to
period - the period of the wave in ms
magnitude - the magnitude (peak value of the wave)
offset - the offset (mean value of the wave)
phase - the phase (horizontal cycle shift in hundredth of a degree)
See Also:
SineEffect()

SineEffect

public SineEffect()
Instantiates a new SineEffect with default parameters.

Method Detail

getName

public java.lang.String getName()
Gets the effect type as a String.

Specified by:
getName in class Effect
Returns:
the effect type as a String: "Sine"
See Also:
Effect.getEffectType()