NASA World Wind

gov.nasa.worldwind.animation
Class CompoundAnimator

java.lang.Object
  extended by gov.nasa.worldwind.animation.BasicAnimator
      extended by gov.nasa.worldwind.animation.CompoundAnimator
All Implemented Interfaces:
Animator
Direct Known Subclasses:
FlyToFlyViewAnimator, FlyToOrbitViewAnimator

public class CompoundAnimator
extends BasicAnimator

A group of two or more Animators. Can be used to animate more than one value at a time, driven by a single Interpolator.


Field Summary
protected  Animator[] animators
           
 
Fields inherited from class gov.nasa.worldwind.animation.BasicAnimator
interpolator
 
Constructor Summary
CompoundAnimator(Interpolator interpolator)
          Construct a CompoundAnimator with the given Interpolator
CompoundAnimator(Interpolator interpolator, Animator... animators)
          Construct a CompoundAnimator with the given Interpolator, and the given Animators.
 
Method Summary
 Iterable<Animator> getAnimators()
          Get an Iterable list of the Animator
 void setAnimators(Animator... animators)
          Set the Animators to be driven by this CompoundAnimator
protected  void setImpl(double interpolant)
          Set the values attached to each of the Animators using the given interpolant.
 
Methods inherited from class gov.nasa.worldwind.animation.BasicAnimator
flagLastStateInvalid, hasNext, isLastStateValid, isStopOnInvalidState, next, set, setStopOnInvalidState, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

animators

protected Animator[] animators
Constructor Detail

CompoundAnimator

public CompoundAnimator(Interpolator interpolator)
Construct a CompoundAnimator with the given Interpolator

Parameters:
interpolator - the Interpolator to use to drive the animation.

CompoundAnimator

public CompoundAnimator(Interpolator interpolator,
                        Animator... animators)
Construct a CompoundAnimator with the given Interpolator, and the given Animators.

Parameters:
interpolator - The Interpolator to use to drive the Animators
animators - The Animators that will be driven by this CompoundAnimator
Method Detail

getAnimators

public final Iterable<Animator> getAnimators()
Get an Iterable list of the Animator

Returns:
the list of Animators

setAnimators

public void setAnimators(Animator... animators)
Set the Animators to be driven by this CompoundAnimator

Parameters:
animators - the Animators to be driven by this CompoundAnimator

setImpl

protected void setImpl(double interpolant)
Set the values attached to each of the Animators using the given interpolant.

Overrides:
setImpl in class BasicAnimator
Parameters:
interpolant - A value between 0 and 1.

NASA World Wind