at.wisch.joystick.ffeffect
Class SquareEffect

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.SquareEffect

public class SquareEffect
extends PeriodicEffect

The Class SquareEffect. A periodic effect with a square 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
SquareEffect()
          Instantiates a new SquareEffect with default parameters.
SquareEffect(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 SquareEffect 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

SquareEffect

public SquareEffect(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 SquareEffect 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:
SquareEffect()

SquareEffect

public SquareEffect()
Instantiates a new SquareEffect 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: "Square"
See Also:
Effect.getEffectType()