Curve2F Class |
Namespace: DigitalRune.Mathematics.Interpolation
The Curve2F type exposes the following members.
Name | Description | |
---|---|---|
Add | Adds an object to the end of the CollectionT. (Inherited from CollectionCurveKey2F.) | |
Clear | Removes all elements from the CollectionT. (Inherited from CollectionCurveKey2F.) | |
ClearItems | Removes all elements from the CollectionT. (Inherited from CollectionCurveKey2F.) | |
Contains | Determines whether an element is in the CollectionT. (Inherited from CollectionCurveKey2F.) | |
CopyTo | Copies the entire CollectionT to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from CollectionCurveKey2F.) | |
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.) | |
Flatten |
Not supported.
(Overrides PiecewiseCurveTParam, TPoint, TCurveKeyFlatten(ICollectionTPoint, Int32, TParam).) | |
GetEnumerator |
Returns an enumerator that iterates through the curve keys of the
PiecewiseCurveFTPoint, TCurveKey.
(Inherited from PiecewiseCurveTParam, TPoint, TCurveKey.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetKeyIndex |
Gets the index of the curve key before or at the given parameter value.
(Inherited from PiecewiseCurveFTPoint, TCurveKey.) | |
GetLength |
Not supported.
(Overrides PiecewiseCurveTParam, TPoint, TCurveKeyGetLength(TParam, TParam, Int32, TParam).) | |
GetPoint |
Computes a point on the curve.
(Overrides PiecewiseCurveTParam, TPoint, TCurveKeyGetPoint(TParam).) | |
GetTangent |
Computes the tangent for a point on the curve.
(Overrides PiecewiseCurveTParam, TPoint, TCurveKeyGetTangent(TParam).) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IndexOf | Searches for the specified object and returns the zero-based index of the first occurrence within the entire CollectionT. (Inherited from CollectionCurveKey2F.) | |
Insert | Inserts an element into the CollectionT at the specified index. (Inherited from CollectionCurveKey2F.) | |
InsertItem |
Inserts an element into the CollectionT at the specified index.
(Inherited from PiecewiseCurveTParam, TPoint, TCurveKey.) | |
IsInMirroredOscillation |
Determines whether the given parameter corresponds to a mirrored oscillation loop.
(Inherited from PiecewiseCurveFTPoint, TCurveKey.) | |
LoopParameter |
Handles pre- and post-looping by changing the given parameter so that it lies on the curve.
(Inherited from PiecewiseCurveFTPoint, TCurveKey.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ReadXml |
Generates an object from its XML representation.
(Inherited from PiecewiseCurveTParam, TPoint, TCurveKey.) | |
Remove | Removes the first occurrence of a specific object from the CollectionT. (Inherited from CollectionCurveKey2F.) | |
RemoveAt | Removes the element at the specified index of the CollectionT. (Inherited from CollectionCurveKey2F.) | |
RemoveItem | Removes the element at the specified index of the CollectionT. (Inherited from CollectionCurveKey2F.) | |
SetItem |
Replaces the element at the specified index.
(Inherited from PiecewiseCurveTParam, TPoint, TCurveKey.) | |
Sort |
Sorts the curve keys in the collection by their parameter (see
Parameter).
(Inherited from PiecewiseCurveTParam, TPoint, TCurveKey.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
WriteXml |
Converts an object into its XML representation.
(Inherited from PiecewiseCurveTParam, TPoint, TCurveKey.) |
Name | Description | |
---|---|---|
Count | Gets the number of elements actually contained in the CollectionT. (Inherited from CollectionCurveKey2F.) | |
Item | Gets or sets the element at the specified index. (Inherited from CollectionCurveKey2F.) | |
Items | Gets a IListT wrapper around the CollectionT. (Inherited from CollectionCurveKey2F.) | |
PostLoop |
Gets or sets a value that defines how the curve looks after the last curve key.
(Inherited from PiecewiseCurveTParam, TPoint, TCurveKey.) | |
PreLoop |
Gets or sets a value that defines how the curve looks before the first path key.
(Inherited from PiecewiseCurveTParam, TPoint, TCurveKey.) | |
SmoothEnds |
Gets or sets a value indicating whether the curve ends are smoothed.
(Inherited from PiecewiseCurveTParam, TPoint, TCurveKey.) |
Name | Description | |
---|---|---|
IXmlSerializableGetSchema |
This method is reserved and should not be used. When implementing the
IXmlSerializable interface, you should return from this
method, and instead, if specifying a custom schema is required, apply the
XmlSchemaProviderAttribute to the class.
| |
IXmlSerializableReadXml |
Generates an object from its XML representation.
| |
IXmlSerializableWriteXml |
Converts an object into its XML representation.
| |
IListAdd | Adds an item to the IList. (Inherited from CollectionCurveKey2F.) | |
IListContains | Determines whether the IList contains a specific value. (Inherited from CollectionCurveKey2F.) | |
ICollectionCopyTo | (Inherited from CollectionCurveKey2F.) | |
IEnumerableGetEnumerator | Returns an enumerator that iterates through a collection. (Inherited from CollectionCurveKey2F.) | |
IListIndexOf | Determines the index of a specific item in the IList. (Inherited from CollectionCurveKey2F.) | |
IListInsert | Inserts an item into the IList at the specified index. (Inherited from CollectionCurveKey2F.) | |
IListIsFixedSize | Gets a value indicating whether the IList has a fixed size. (Inherited from CollectionCurveKey2F.) | |
ICollectionTIsReadOnly | Gets a value indicating whether the ICollectionT is read-only. (Inherited from CollectionCurveKey2F.) | |
IListIsReadOnly | Gets a value indicating whether the IList is read-only. (Inherited from CollectionCurveKey2F.) | |
ICollectionIsSynchronized | Gets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from CollectionCurveKey2F.) | |
IListItem | Gets or sets the element at the specified index. (Inherited from CollectionCurveKey2F.) | |
IListRemove | Removes the first occurrence of a specific object from the IList. (Inherited from CollectionCurveKey2F.) | |
ICollectionSyncRoot | Gets an object that can be used to synchronize access to the ICollection. (Inherited from CollectionCurveKey2F.) |
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.