libgdx API

com.badlogic.gdx.scenes.scene2d
Interface Interpolator

All Known Implementing Classes:
AccelerateDecelerateInterpolator, AccelerateInterpolator, AnticipateInterpolator, DecelerateInterpolator, LinearInterpolator, OvershootInterpolator

public interface Interpolator

An interpolator defines the rate of change of an animation. This allows the basic animation effects (alpha, scale, translate, rotate) to be accelerated, decelerated etc.

Author:
Moritz Post

Method Summary
 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 input)
          Maps a point in the animation duration to a multiplier to be applied to the transformations of an animation.
 

Method Detail

getInterpolation

float getInterpolation(float input)
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.

Parameters:
input - 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.

finished

void finished()
Called when the animation has finished and the Interpolator is no longer needed.


copy

Interpolator copy()
Creates a copy of this interpolator.

Returns:
the copy.

libgdx API

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