Click or drag to resize
DigitalRuneCurveKey2F Class
Defines a control point on a Curve2F (single-precision).
Inheritance Hierarchy
SystemObject
  DigitalRune.Mathematics.InterpolationCurveKeySingle, Vector2F
    DigitalRune.Mathematics.InterpolationCurveKey2F

Namespace: DigitalRune.Mathematics.Interpolation
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
[SerializableAttribute]
public class CurveKey2F : CurveKey<float, Vector2F>

The CurveKey2F type exposes the following members.

Constructors
  NameDescription
Public methodCurveKey2F
Initializes a new instance of the CurveKey2F class
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Protected methodGetParameter
Gets the parameter.
(Overrides CurveKeyTParam, TPointGetParameter.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodSetParameter
Sets the parameter.
(Overrides CurveKeyTParam, TPointSetParameter(TParam).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyInterpolation
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.)
Public propertyParameter
Gets or sets a value that defines where this curve key is positioned on the curve.
(Inherited from CurveKeyTParam, TPoint.)
Public propertyPoint
Gets or sets the curve point for this curve key.
(Inherited from CurveKeyTParam, TPoint.)
Public propertyTangentIn
Gets or sets the incoming tangent or the control point before this curve key.
(Inherited from CurveKeyTParam, TPoint.)
Public propertyTangentOut
Gets or sets the outgoing tangent or the control point after this curve key.
(Inherited from CurveKeyTParam, TPoint.)
Top
Remarks

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.

See Also