libgdx API

com.badlogic.gdx.scenes.scene2d.interpolators
Class AnticipateInterpolator

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.interpolators.AnticipateInterpolator
All Implemented Interfaces:
Interpolator

public class AnticipateInterpolator
extends java.lang.Object
implements Interpolator

An Interpolator where the changes start backwards and than spring forward as the time progresses.

Author:
Moritz Post

Method Summary
static AnticipateInterpolator $()
          Gets a new AnticipateInterpolator from a maintained pool of Interpolators.
static AnticipateInterpolator $(float tension)
          Gets a new AnticipateInterpolator from a maintained pool of Interpolators.
 Interpolator copy()
          Creates a copy of this interpolator.
 void finished()
          Called when the animation has finished and the Interpolator is no longer needed.
 float getInterpolation(float t)
          Maps a point in the animation duration to a multiplier to be applied to the transformations of an animation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

$

public static AnticipateInterpolator $(float tension)
Gets a new AnticipateInterpolator from a maintained pool of Interpolators.

Parameters:
tension - the tension controlling the rate spring effect of the animation
Returns:
the obtained AccelerateInterpolator

$

public static AnticipateInterpolator $()
Gets a new AnticipateInterpolator from a maintained pool of Interpolators.

The initial tension is set to .

Returns:
the obtained AnticipateInterpolator

finished

public void finished()
Description copied from interface: Interpolator
Called when the animation has finished and the Interpolator is no longer needed.

Specified by:
finished in interface Interpolator

getInterpolation

public float getInterpolation(float t)
Description copied from interface: Interpolator
Maps a point in the animation duration to a multiplier to be applied to the transformations of an animation. The Input is a percentage of the elapsed animation duration.

Specified by:
getInterpolation in interface Interpolator
Parameters:
t - A value between 0 and 1.0 indicating our current point in the animation where 0 represents the start and 1.0 represents the end
Returns:
The interpolation value. This value can be more than 1.0 for Interpolators which overshoot their targets, or less than 0 for Interpolators that undershoot their targets.

copy

public Interpolator copy()
Description copied from interface: Interpolator
Creates a copy of this interpolator.

Specified by:
copy in interface Interpolator
Returns:
the copy.

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)