public class KeyFrame
extends java.lang.Object
Extrapolation
class.Constructor and Description |
---|
KeyFrame(KeyframeSequence curve,
double time)
Create a new key frame on specified curve
|
Modifier and Type | Method and Description |
---|---|
float |
getBias()
Gets the bias used in TCB spline
|
float |
getContinuity()
Gets the continuity used in TCB spline
|
boolean |
getFlat()
Get or set if the key frame is flat.
|
boolean |
getIndependentTangent()
Gets the out and next in tangents are independent.
|
Interpolation |
getInterpolation()
Gets the key's interpolation type, list.data[index] defines the algorithm how the sampled value is calculated.
|
Vector2 |
getNextInTangent()
Gets the next in(left) tangent on this key frame.
|
float |
getNextInWeight()
Gets the next in(left) weight on this key frame.
|
Vector2 |
getOutTangent()
Gets the out(right) tangent on this key frame.
|
float |
getOutWeight()
Gets the out(right) weight on this key frame.
|
StepMode |
getStepMode()
Gets the key's step mode.
|
int |
getTangentWeightMode()
Gets the key's tangent weight mode.
|
float |
getTension()
Gets tension used in TCB spline
|
double |
getTime()
Gets the time position of list.data[index] key frame, measured in seconds.
|
boolean |
getTimeIndependentTangent()
Gets the tangent is time-independent
|
float |
getValue()
Gets the key-frame's value.
|
void |
setBias(float value)
Sets the bias used in TCB spline
|
void |
setContinuity(float value)
Sets the continuity used in TCB spline
|
void |
setFlat(boolean value)
Get or set if the key frame is flat.
|
void |
setIndependentTangent(boolean value)
Sets the out and next in tangents are independent.
|
void |
setInterpolation(Interpolation value)
Sets the key's interpolation type, list.data[index] defines the algorithm how the sampled value is calculated.
|
void |
setNextInTangent(Vector2 value)
Sets the next in(left) tangent on this key frame.
|
void |
setNextInWeight(float value)
Sets the next in(left) weight on this key frame.
|
void |
setOutTangent(Vector2 value)
Sets the out(right) tangent on this key frame.
|
void |
setOutWeight(float value)
Sets the out(right) weight on this key frame.
|
void |
setStepMode(StepMode value)
Sets the key's step mode.
|
void |
setTangentWeightMode(int value)
Sets the key's tangent weight mode.
|
void |
setTension(float value)
Sets tension used in TCB spline
|
void |
setTime(double value)
Sets the time position of list.data[index] key frame, measured in seconds.
|
void |
setTimeIndependentTangent(boolean value)
Sets the tangent is time-independent
|
void |
setValue(float value)
Sets the key-frame's value.
|
java.lang.String |
toString()
Gets the string representation of the key frame
|
public KeyFrame(KeyframeSequence curve, double time)
curve
- The curve that the key frame will be created ontime
- The time position of the key framepublic java.lang.String toString()
toString
in class java.lang.Object
public double getTime()
public void setTime(double value)
value
- New valuepublic float getValue()
public void setValue(float value)
value
- New valuepublic Interpolation getInterpolation()
public void setInterpolation(Interpolation value)
value
- New valuepublic int getTangentWeightMode()
WeightedMode
public void setTangentWeightMode(int value)
WeightedMode
value
- New valuepublic StepMode getStepMode()
Interpolation.CONSTANT
, list.data[index] decides which key-frame's value will be used during interpolation.
A StepMode.PREVIOUS_VALUE
means the left key-frame's value will be used
A StepMode.NEXT_VALUE
means the next right key-frame's value will be usedpublic void setStepMode(StepMode value)
Interpolation.CONSTANT
, list.data[index] decides which key-frame's value will be used during interpolation.
A StepMode.PREVIOUS_VALUE
means the left key-frame's value will be used
A StepMode.NEXT_VALUE
means the next right key-frame's value will be usedvalue
- New valuepublic Vector2 getNextInTangent()
public void setNextInTangent(Vector2 value)
value
- New valuepublic Vector2 getOutTangent()
public void setOutTangent(Vector2 value)
value
- New valuepublic float getOutWeight()
public void setOutWeight(float value)
value
- New valuepublic float getNextInWeight()
public void setNextInWeight(float value)
value
- New valuepublic float getTension()
public void setTension(float value)
value
- New valuepublic float getContinuity()
public void setContinuity(float value)
value
- New valuepublic float getBias()
public void setBias(float value)
value
- New valuepublic boolean getIndependentTangent()
public void setIndependentTangent(boolean value)
value
- New valuepublic boolean getFlat()
public void setFlat(boolean value)
value
- New valuepublic boolean getTimeIndependentTangent()
public void setTimeIndependentTangent(boolean value)
value
- New value