CurveKey2F Class |
Namespace: DigitalRune.Mathematics.Interpolation
The CurveKey2F type exposes the following members.
Name | Description | |
---|---|---|
CurveKey2F | Initializes a new instance of the CurveKey2F class |
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetParameter |
Gets the parameter.
(Overrides CurveKeyTParam, TPointGetParameter.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetParameter |
Sets the parameter.
(Overrides CurveKeyTParam, TPointSetParameter(TParam).) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Interpolation |
Gets or sets the type of interpolation (the spline type) used for the current curve segment
between this key and the next key.
(Inherited from CurveKeyTParam, TPoint.) | |
Parameter |
Gets or sets a value that defines where this curve key is positioned on the curve.
(Inherited from CurveKeyTParam, TPoint.) | |
Point |
Gets or sets the curve point for this curve key.
(Inherited from CurveKeyTParam, TPoint.) | |
TangentIn |
Gets or sets the incoming tangent or the control point before this curve key.
(Inherited from CurveKeyTParam, TPoint.) | |
TangentOut |
Gets or sets the outgoing tangent or the control point after this curve key.
(Inherited from CurveKeyTParam, TPoint.) |
In contrast to general curves, the Curve2F is a specialized type of curve that is used to define a function y = f(x).
A general curve is function of the form p = C(u). The curve parameter u is a scalar. The result of C(u) is a point p on the curve. In the 2-dimensional case (see Path2F) the function can be written as (x, y) = C(u).
The Curve2F is a special type of curve where the curve parameter and the x-component of the resulting points are identical: (x, y) = C(x).
Application: A Curve2F can be used to define an animation curve. An animation curve describes how a quantity y (size, offset, etc.) evolves over time. the curve parameter is typically time. These curves must be monotonic in the parameter axis (x-axis). There can only be one valid y value for each curve parameter x.
Curve Keys: The curve keys (CurveKey2F) define the control points of the curve. The parameter of the curve keys (see Parameter) are always identical to the x-component of the points (see Point). Therefore, it is not necessary to set the curve parameter manually.
The curve keys are interpolated using spline interpolation. Each curve key defines the type of spline interpolation that is used from this curve key to the next (see Interpolation). Some types of interpolation require additional information: Bezier requires additional control points and Hermite requires tangents. These values are stored in the properties TangentIn and TangentOut of the curve keys.
It is possible to specify invalid control points or tangents. Neither Curve2F nor CurveKey2F checks whether the values in TangentIn or TangentOut are a valid. In general, the results are undefined if a curve contains invalid tangents.