vmm.planecurve.parametric
Class ParallelCurveAnimation

java.lang.Object
  extended by vmm.core.ThreadedAnimation
      extended by vmm.planecurve.parametric.ParallelCurveAnimation
All Implemented Interfaces:
Animation

public class ParallelCurveAnimation
extends ThreadedAnimation

Shows a moving set of parallel curves to a PlaneCurveParametric curve. Optionally, it first shows the construction fo the normal bundle to the curve. The evolute is also shown. (The animation uses a NormalBundleDecoration for the actual work.)


Nested Class Summary
 
Nested classes/interfaces inherited from class vmm.core.ThreadedAnimation
ThreadedAnimation.AnimationCanceledException
 
Constructor Summary
ParallelCurveAnimation(Decorateable owner, PlaneCurveParametric curve)
          Create an animation that will show the animation on the specified curve.
ParallelCurveAnimation(Decorateable owner, PlaneCurveParametric curve, boolean showNormals, double offsetMax, double offsetIncrement)
          Create an animation that will show the animation on the specified curve.
ParallelCurveAnimation(PlaneCurveParametric curve)
          Create an Animation that will show the animation on the specified curve.
 
Method Summary
protected  void runAnimation()
          Run the paralleCurveAnimation.
 
Methods inherited from class vmm.core.ThreadedAnimation
addChangeListener, cancel, fireAnimationChangeEvent, getStatusText, getTimeDilation, isPaused, isRunning, pause, removeChangeListener, setPaused, setTimeDilation, start, wasCanceled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParallelCurveAnimation

public ParallelCurveAnimation(PlaneCurveParametric curve)
Create an Animation that will show the animation on the specified curve. The curve should be non-null. The NormalBundleDecoration is added to the curve itself.

A default offsetMax of 10 is used, meaning that parallel curves are drawn with offsets ranging from 0 up to 10. A default offsetIncrement of 0.05 is used, meaning that the increment of the offset from one parallel curve to the next is 0.05.


ParallelCurveAnimation

public ParallelCurveAnimation(Decorateable owner,
                              PlaneCurveParametric curve)
Create an animation that will show the animation on the specified curve. The curve should be non-null. The NormalBundleDecoration is added to the specified Decorateable owner, which should be either the curve itself or a View containing the curve.

A default offsetMax of 10 is used, meaning that parallel curves are drawn with offsets ranging from 0 up to 10. A default offsetIncrement of 0.05 is used, meaning that the increment of the offset from one parallel curve to the next is 0.05.

Parameters:
owner - The Decorateable object to which the NormalBundleDecoration is to be added. If the value is null, then the curve will be used as the owner. If the value is not null, it should be equal to either the curve or to a View that is showing the curve.
curve - The curve to which parallel curves are to be drawn.

ParallelCurveAnimation

public ParallelCurveAnimation(Decorateable owner,
                              PlaneCurveParametric curve,
                              boolean showNormals,
                              double offsetMax,
                              double offsetIncrement)
Create an animation that will show the animation on the specified curve. The curve should be non-null. The NormalBundleDecoration is added to the specified Decorateable owner, which should be either the curve itself or a View containing the curve.

Parameters:
owner - The Decorateable object to which the NormalBundleDecoration is to be added. If the value is null, then the curve will be used as the owner. If the value is not null, it should be equal to either the curve or to a View that is showing the curve.
curve - The curve to which parallel curves are to be drawn.
showNormals - If set to true, then the animation will first add the normal vectors to the curve, before drawing the parallel curves.
offsetMax - Parallel curves are drawn with offsets ranging from 0 up to this value.
offsetIncrement - This is the increment of the offset between one parallel curve and the next.
Method Detail

runAnimation

protected void runAnimation()
Run the paralleCurveAnimation.

Specified by:
runAnimation in class ThreadedAnimation
See Also:
ThreadedAnimation.pause(int), ThreadedAnimation.cancel()