Package gov.nasa.worldwind.animation
Class CompoundAnimator
- java.lang.Object
-
- gov.nasa.worldwind.animation.BasicAnimator
-
- gov.nasa.worldwind.animation.CompoundAnimator
-
- All Implemented Interfaces:
Animator
- Direct Known Subclasses:
FlyToFlyViewAnimator
,FlyToOrbitViewAnimator
public class CompoundAnimator extends BasicAnimator
A group of two or moreAnimator
s. Can be used to animate more than one value at a time, driven by a singleInterpolator
.
-
-
Field Summary
Fields Modifier and Type Field Description protected Animator[]
animators
-
Fields inherited from class gov.nasa.worldwind.animation.BasicAnimator
interpolator
-
-
Constructor Summary
Constructors Constructor Description CompoundAnimator(Interpolator interpolator)
Construct a CompoundAnimator with the givenInterpolator
CompoundAnimator(Interpolator interpolator, Animator... animators)
Construct a CompoundAnimator with the givenInterpolator
, and the givenAnimator
s.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<Animator>
getAnimators()
Get anIterable
list of theAnimator
void
setAnimators(Animator... animators)
Set theAnimator
s to be driven by thisCompoundAnimator
protected void
setImpl(double interpolant)
Set the values attached to each of theAnimator
s using the given interpolant.-
Methods inherited from class gov.nasa.worldwind.animation.BasicAnimator
flagLastStateInvalid, hasNext, isLastStateValid, isStopOnInvalidState, next, set, setStopOnInvalidState, start, stop
-
-
-
-
Field Detail
-
animators
protected Animator[] animators
-
-
Constructor Detail
-
CompoundAnimator
public CompoundAnimator(Interpolator interpolator)
Construct a CompoundAnimator with the givenInterpolator
- Parameters:
interpolator
- theInterpolator
to use to drive the animation.
-
CompoundAnimator
public CompoundAnimator(Interpolator interpolator, Animator... animators)
Construct a CompoundAnimator with the givenInterpolator
, and the givenAnimator
s.- Parameters:
interpolator
- TheInterpolator
to use to drive theAnimator
sanimators
- TheAnimator
s that will be driven by thisCompoundAnimator
-
-
Method Detail
-
setAnimators
public void setAnimators(Animator... animators)
Set theAnimator
s to be driven by thisCompoundAnimator
- Parameters:
animators
- theAnimator
s to be driven by thisCompoundAnimator
-
getAnimators
public final java.lang.Iterable<Animator> getAnimators()
Get anIterable
list of theAnimator
- Returns:
- the list of
Animator
s
-
setImpl
protected void setImpl(double interpolant)
Set the values attached to each of theAnimator
s using the given interpolant.- Overrides:
setImpl
in classBasicAnimator
- Parameters:
interpolant
- A value between 0 and 1.
-
-