Package gov.nasa.worldwind.animation
Class AngleAnimator
- java.lang.Object
-
- gov.nasa.worldwind.animation.BasicAnimator
-
- gov.nasa.worldwind.animation.AngleAnimator
-
- All Implemented Interfaces:
Animator
- Direct Known Subclasses:
RotateToAngleAnimator
public class AngleAnimator extends BasicAnimator
-
-
Field Summary
Fields Modifier and Type Field Description 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
Constructors Constructor Description AngleAnimator(Interpolator interpolator, Angle begin, Angle end, PropertyAccessor.AngleAccessor propertyAccessor)
Construct an AngleAnimator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Angle
getBegin()
Get the currentbegin
value.Angle
getEnd()
Get the currentend
value.PropertyAccessor.AngleAccessor
getPropertyAccessor()
Get thePropertyAccessor
in use by this animationvoid
setBegin(Angle begin)
Set thebegin
value.void
setEnd(Angle end)
Set theend
value.protected void
setImpl(double interpolant)
Set the value being animated via thePropertyAccessor
using the passed interpolant.-
Methods inherited from class gov.nasa.worldwind.animation.BasicAnimator
flagLastStateInvalid, hasNext, isLastStateValid, isStopOnInvalidState, next, set, setStopOnInvalidState, start, stop
-
-
-
-
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
- theInterpolator
begin
- angle the animation begins atend
- The angle the animation ends at.propertyAccessor
- ThePropertyAccessor
used to modify the data value being animated.
-
-
Method Detail
-
setBegin
public void setBegin(Angle begin)
Set thebegin
value.- Parameters:
begin
- the newbegin
value.
-
getPropertyAccessor
public PropertyAccessor.AngleAccessor getPropertyAccessor()
Get thePropertyAccessor
in use by this animation- Returns:
- the
PropertyAccessor
in use by this animation
-
setImpl
protected void setImpl(double interpolant)
Set the value being animated via thePropertyAccessor
using the passed interpolant. This implementation just does a straight liner interpolation between thebegin
andend
values.- Overrides:
setImpl
in classBasicAnimator
- Parameters:
interpolant
- the interpolant used to generate the next value that will be set by thePropertyAccessor
-
-