Class KeyFrame

KeyFrame class

A key frame is mainly defined by a time and a value, for some interpolation types, tangent/tension/bias/continuity is also used by calculating the final sampled value. Sampled values in a non-key-frame time position is interpolated by key-frames between the previous and next key-frames Value before/after the first/last key-frame are calculated by the Extrapolation class.

public class KeyFrame


KeyFrame(KeyframeSequence, double)Create a new key frame on specified curve


Bias { get; set; }Gets or sets the bias used in TCB spline
Continuity { get; set; }Gets or sets the continuity used in TCB spline
Flat { get; set; }Get or set if the key frame is flat. Key frame should be flat if next or previous key frame has the same value. Flat key frame has flat tangents and fixed interpolation.
IndependentTangent { get; set; }Gets or sets the out and next in tangents are independent.
Interpolation { get; set; }Gets or sets the key’s interpolation type,[index] defines the algorithm how the sampled value is calculated.
NextInTangent { get; set; }Gets or sets the next in(left) tangent on this key frame.
NextInWeight { get; set; }Gets or sets the next in(left) weight on this key frame.
OutTangent { get; set; }Gets or sets the out(right) tangent on this key frame.
OutWeight { get; set; }Gets or sets the out(right) weight on this key frame.
StepMode { get; set; }Gets or sets the key’s step mode. If the interpolation type is Constant,[index] decides which key-frame’s value will be used during interpolation. A PreviousValue means the left key-frame’s value will be used A NextValue means the next right key-frame’s value will be used
TangentWeightMode { get; set; }Gets or sets the key’s tangent weight mode. The out tangent or the next in tangent can be customized by select correct WeightedMode
Tension { get; set; }Gets or sets tension used in TCB spline
Time { get; set; }Gets or sets the time position of[index] key frame, measured in seconds.
TimeIndependentTangent { get; set; }Gets or sets the tangent is time-independent
Value { get; set; }Gets or sets the key-frame’s value.


override ToString()Gets the string representation of the key frame

See Also