de.tu_berlin.cs.tfs.muvitorkit.animation
Class AnimationPathModifier

java.lang.Object
  extended by de.tu_berlin.cs.tfs.muvitorkit.animation.AnimationPathModifier

public abstract class AnimationPathModifier
extends Object

This class provides some basic AnimationPathModifiers ready to use with AnimatingCommands:

Of course you may implement your own modifier via #getLocation(Rectangle, Rectangle, float) using the helper method getOrthogonalShifted(Point, Dimension, double) to rotate the relative coordinate system. Sorry, I can't explain this better now.

TODO Proceed steadily on the paths themselves instead of proceeding steadily along the shift vector. So the elements would not "accelerate" when reaching the end of a circle. This would need to alter the x coordinate according to the progress and the shape of the path as well.

Rating red

Constructor Summary
AnimationPathModifier()
           
 
Method Summary
static AnimationPathModifier getCircularModifier()
           
static AnimationPathModifier getEllipticModifier(int axis)
           
abstract  Point getLocation(Rectangle intialBounds, Rectangle endingBounds, double progress)
           
protected static Point getOrthogonalShifted(Point location, Dimension direction, double length)
           
static AnimationPathModifier getParabolicModifier(int amp)
           
static AnimationPathModifier getRandomModifier(int max)
           
static AnimationPathModifier getSineModifier(int amp, float periods)
           
static AnimationPathModifier getStandardModifier()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationPathModifier

public AnimationPathModifier()
Method Detail

getLocation

public abstract Point getLocation(Rectangle intialBounds,
                                  Rectangle endingBounds,
                                  double progress)

getStandardModifier

public static final AnimationPathModifier getStandardModifier()

getSineModifier

public static final AnimationPathModifier getSineModifier(int amp,
                                                          float periods)

getEllipticModifier

public static final AnimationPathModifier getEllipticModifier(int axis)

getCircularModifier

public static final AnimationPathModifier getCircularModifier()

getParabolicModifier

public static final AnimationPathModifier getParabolicModifier(int amp)

getRandomModifier

public static final AnimationPathModifier getRandomModifier(int max)

getOrthogonalShifted

protected static final Point getOrthogonalShifted(Point location,
                                                  Dimension direction,
                                                  double length)