Click or drag to resize
DigitalRunePiecewiseCurveTParam, TPoint, TCurveKey Class
Represents a curve that is defined by piecewise interpolation of curve keys (control points).
Inheritance Hierarchy
SystemObject
  System.Collections.ObjectModelCollectionTCurveKey
    DigitalRune.Mathematics.InterpolationPiecewiseCurveTParam, TPoint, TCurveKey
      DigitalRune.Mathematics.InterpolationPiecewiseCurveFTPoint, TCurveKey

Namespace: DigitalRune.Mathematics.Interpolation
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
[SerializableAttribute]
public abstract class PiecewiseCurve<TParam, TPoint, TCurveKey> : Collection<TCurveKey>, 
	ICurve<TParam, TPoint>
where TCurveKey : CurveKey<TParam, TPoint>

Type Parameters

TParam
The type of the curve parameter (usually Single or Double).
TPoint
The type of the curve points (such as Vector2F, Vector3F, etc.).
TCurveKey
The type of the curve key. (A type derived from CurveKeyTParam, TPoint.)

The PiecewiseCurveTParam, TPoint, TCurveKey type exposes the following members.

Constructors
  NameDescription
Protected methodPiecewiseCurveTParam, TPoint, TCurveKey
Initializes a new instance of the PiecewiseCurveTParam, TPoint, TCurveKey class
Top
Methods
  NameDescription
Public methodAdd (Inherited from CollectionTCurveKey.)
Public methodClear (Inherited from CollectionTCurveKey.)
Protected methodClearItems (Inherited from CollectionTCurveKey.)
Public methodContains (Inherited from CollectionTCurveKey.)
Public methodCopyTo (Inherited from CollectionTCurveKey.)
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 methodFlatten
Computes the points of a sequence of line segments which approximate the curve.
Public methodGetEnumerator
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetKeyIndex
Gets the index of the curve key before or at the given parameter value.
Public methodGetLength
Computes the approximated length of the curve for the parameter interval [start, end].
Public methodGetPoint
Computes a point on the curve.
Public methodGetTangent
Computes the tangent for a point on the curve.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf (Inherited from CollectionTCurveKey.)
Public methodInsert (Inherited from CollectionTCurveKey.)
Protected methodInsertItem (Overrides CollectionTInsertItem(Int32, T).)
Public methodIsInMirroredOscillation
Determines whether the given parameter corresponds to a mirrored oscillation loop.
Public methodLoopParameter
Handles pre- and post-looping by changing the given parameter so that it lies on the curve.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodReadXml
Generates an object from its XML representation.
Public methodRemove (Inherited from CollectionTCurveKey.)
Public methodRemoveAt (Inherited from CollectionTCurveKey.)
Protected methodRemoveItem (Inherited from CollectionTCurveKey.)
Protected methodSetItem
Replaces the element at the specified index.
(Overrides CollectionTSetItem(Int32, T).)
Public methodSort
Sorts the curve keys in the collection by their parameter (see Parameter).
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodWriteXml
Converts an object into its XML representation.
Top
Properties
  NameDescription
Public propertyCount (Inherited from CollectionTCurveKey.)
Public propertyItem
Gets or sets the element at the specified index.
(Inherited from CollectionTCurveKey.)
Protected propertyItems (Inherited from CollectionTCurveKey.)
Public propertyPostLoop
Gets or sets a value that defines how the curve looks after the last curve key.
Public propertyPreLoop
Gets or sets a value that defines how the curve looks before the first path key.
Public propertySmoothEnds
Gets or sets a value indicating whether the curve ends are smoothed.
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodIListAdd
Adds an item to the IList.
(Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate methodIListContains
Determines whether the IList contains a specific value.
(Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate methodICollectionCopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
(Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate methodIEnumerableGetEnumerator
Returns an enumerator that iterates through a collection.
(Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate methodIListIndexOf
Determines the index of a specific item in the IList.
(Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate methodIListInsert
Inserts an item into the IList at the specified index.
(Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate propertyIListIsFixedSize
Gets a value indicating whether the IList has a fixed size.
(Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate propertyICollectionTIsReadOnly (Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate propertyIListIsReadOnly
Gets a value indicating whether the IList is read-only.
(Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate propertyICollectionIsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
(Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate propertyIListItem
Gets or sets the element at the specified index.
(Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate methodIListRemove
Removes the first occurrence of a specific object from the IList.
(Inherited from CollectionTCurveKey.)
Explicit interface implementationPrivate propertyICollectionSyncRoot
Gets an object that can be used to synchronize access to the ICollection.
(Inherited from CollectionTCurveKey.)
Top
Remarks

A "piecewise curve", also known as "spline", is a curve with arbitrary length that is defined by concatenating multiple curve segments.

The PiecewiseCurveTParam, TPoint, TCurveKey is a collection of curve keys (CurveKeyTParam, TPoint). Each curve key is a control point that defines a point on the curve. The points between curve keys are created by spline interpolation of the curve keys.

The curve keys are also called "key frames" if the path represents an animation curve, or "waypoints" if the path represents a 2-dimensional or 3-dimensional path.

Curve keys in a PiecewiseCurveTParam, TPoint, TCurveKey must not be .

The methods in this interface assume that the curve keys are sorted ascending by the curve parameter (see Parameter). If this is not the case, you can call Sort to sort keys.

See Also