All Packages Class Hierarchy This Package Previous Next Index
Class improv.util.EditableCurve
java.lang.Object
|
+----improv.util.Curve
|
+----improv.util.EditableCurve
- public abstract class EditableCurve
- extends Curve
This is the base class of all Keyframe-style Curves.
- See Also:
- SplineCurve, SquareCurve, LinearCurve
-
BOUNCE
-
-
LOOP
-
-
RUN_ONCE
-
-
STEP
-
-
EditableCurve()
-
-
animate(double)
-
-
animate(double, double)
-
-
animate(double, double, int)
-
-
animate(double, int)
-
-
copy()
- Create a duplicate of this curve.
-
copyInto(EditableCurve)
- Copy the parameters of one EditableCurve into another.
-
getMode()
-
-
getXPoints()
-
-
getYPoints()
-
-
insertPoint(double, double)
- Insert a new keypoint into the curve
-
movePoint(int, double, double)
- Move a specific keypoint on the curve
-
removePoint(int)
- Remove a specific keypoint from the curve.
-
setMode(int)
-
-
setPoints(double[], double[])
-
RUN_ONCE
public static final int RUN_ONCE
LOOP
public static final int LOOP
BOUNCE
public static final int BOUNCE
STEP
public static final int STEP
EditableCurve
public EditableCurve()
copy
public abstract EditableCurve copy()
- Create a duplicate of this curve.
copyInto
public void copyInto(EditableCurve curve)
- Copy the parameters of one EditableCurve into another. The curve specified need not be the same type as the
curve being copied.
getXPoints
public double[] getXPoints()
- Returns:
- the array of x values (keys)
getYPoints
public double[] getYPoints()
- Returns:
- the array of y values (key values)
setPoints
public void setPoints(double x[],
double y[])
- Parameters:
- x - an array of keys
- y - an array of key values
setMode
public void setMode(int mode)
- Parameters:
- mode - the cycle mode of the curve (LOOP,BOUNCE,RUN_ONCE,STEP)
movePoint
public void movePoint(int keyNum,
double x,
double y)
- Move a specific keypoint on the curve
- Parameters:
- keyNum - which keypoint to move
- x - the new x position
- y - the new y position
insertPoint
public void insertPoint(double x,
double y)
- Insert a new keypoint into the curve
- Parameters:
- x - the x position
- y - the y position
removePoint
public void removePoint(int keyNum)
- Remove a specific keypoint from the curve.
- Parameters:
- keyNum - which keypoint to delete
animate
public double animate(double x,
int mode)
- Parameters:
- x - the position being evaluated.
- mode - the cycle mode. Overrides the mode previously set for the curve.
- Returns:
- the value for the curve at the x position, given the curve's cycle mode
animate
public double animate(double x,
double weight,
int mode)
animate
public double animate(double time)
- Parameters:
- x - the curve position being evaluated.
- Returns:
- the value for the curve at the x position, given the curve's cycle mode
- Overrides:
- animate in class Curve
animate
public double animate(double time,
double weight)
- Overrides:
- animate in class Curve
getMode
public int getMode()
- Returns:
- the curve's cycle mode.
All Packages Class Hierarchy This Package Previous Next Index