NASA World Wind

gov.nasa.worldwind.animation
Class AngleAnimator

java.lang.Object
  extended by gov.nasa.worldwind.animation.BasicAnimator
      extended by gov.nasa.worldwind.animation.AngleAnimator
All Implemented Interfaces:
Animator
Direct Known Subclasses:
RotateToAngleAnimator

public class AngleAnimator
extends BasicAnimator

Animates angles, via an interpolator. begin and end values can be reset once the animation is already in motion.


Field Summary
protected  Angle begin
          The angle the animation begins at.
protected  Angle end
          The angle the animation ends at.
protected  PropertyAccessor.AngleAccessor propertyAccessor
          The @link gov.nasa.worldwind.util.PropertyAccessor used to modify the data value being animated.
 
Fields inherited from class gov.nasa.worldwind.animation.BasicAnimator
interpolator
 
Constructor Summary
AngleAnimator(Interpolator interpolator, Angle begin, Angle end, PropertyAccessor.AngleAccessor propertyAccessor)
          Construct an AngleAnimator
 
Method Summary
 Angle getBegin()
          Get the current begin value.
 Angle getEnd()
          Get the current end value.
 PropertyAccessor.AngleAccessor getPropertyAccessor()
          Get the PropertyAccessor in use by this animation
 void setBegin(Angle begin)
          Set the begin value.
 void setEnd(Angle end)
          Set the end value.
protected  void setImpl(double interpolant)
          Set the value being animated via the PropertyAccessor using the passed 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

begin

protected Angle begin
The angle the animation begins at.


end

protected Angle end
The angle the animation ends at.


propertyAccessor

protected final PropertyAccessor.AngleAccessor propertyAccessor
The @link gov.nasa.worldwind.util.PropertyAccessor used to modify the data value being animated.

Constructor Detail

AngleAnimator

public AngleAnimator(Interpolator interpolator,
                     Angle begin,
                     Angle end,
                     PropertyAccessor.AngleAccessor propertyAccessor)
Construct an AngleAnimator

Parameters:
interpolator - the Interpolator
begin - angle the animation begins at
end - The angle the animation ends at.
propertyAccessor - The PropertyAccessor used to modify the data value being animated.
Method Detail

getBegin

public Angle getBegin()
Get the current begin value.

Returns:
the current begin value.

getEnd

public Angle getEnd()
Get the current end value.

Returns:
the current end value.

getPropertyAccessor

public PropertyAccessor.AngleAccessor getPropertyAccessor()
Get the PropertyAccessor in use by this animation

Returns:
the PropertyAccessor in use by this animation

setBegin

public void setBegin(Angle begin)
Set the begin value.

Parameters:
begin - the new begin value.

setEnd

public void setEnd(Angle end)
Set the end value.

Parameters:
end - the new end value.

setImpl

protected void setImpl(double interpolant)
Set the value being animated via the PropertyAccessor using the passed interpolant. This implementation just does a straight liner interpolation between the begin and end values.

Overrides:
setImpl in class BasicAnimator
Parameters:
interpolant - the interpolant used to generate the next value that will be set by the PropertyAccessor

NASA World Wind