aboutsummaryrefslogtreecommitdiff
path: root/java/api/src/aurelienribon/tweenengine/TweenPath.java
blob: 724741b1f65361cc06098499e139bd850c6f5f80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package aurelienribon.tweenengine;

/**
 * Base class for every paths. You can create your own paths and directly use
 * them in the Tween engine by inheriting from this class.
 *
 * @author Aurelien Ribon | http://www.aurelienribon.com/
 */
public interface TweenPath {

	/**
	 * Computes the next value of the interpolation, based on its waypoints and
	 * the current progress.
	 *
	 * @param t The progress of the interpolation, between 0 and 1. May be out
	 * of these bounds if the easing equation involves some kind of rebounds.
	 * @param points The waypoints of the tween, from start to target values.
	 * @param pointsCnt The number of valid points in the array.
	 * @return The next value of the interpolation.
	 */
	public float compute(float t, float[] points, int pointsCnt);
}