at.wisch.joystick.ffeffect
Class TriangleEffect

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

public class TriangleEffect
extends PeriodicEffect

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

TriangleEffect

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

TriangleEffect

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