#include <MPxAnimCurveInterpolator.h>
Base Class for User-defined Animation Curve Interpolation Types.
MPxAnimCurveInterpolator is the base class for user defined Anim Curve Interpolation Types. It allows for the creation and evaluation of customized animation curves, in addition to determination of the type ID and name of the curve. The evaluation of an animCurve between two of its keyframes is determined by interpolators (also known as "tangent types") at those keyframes. This class allows for the creation of custom tangent types. Note that the valid type ranges are:
Types 1 to 18 Maya's built-in tangent types. See MFnAnimCurve::TangentType. Types 19 to 26 Custom tangent types which are available to all users, and should only be used internally. Types 27 to 63 Maya's built-in tangent types. See MFnAnimCurve::TangentType. Types 64 to 32767 Custom tangent types which can be reserved by customers. You can request between 1 to 8 id's per request. Visit Autodesk Maya Developer Tangent Types ID Block Registration to submit your request. See also Autodesk Developer Network for more information.
Public Types | |
enum | InterpolatorFlags { kEvaluateAtKey = 0x001, kLockType = 0x002 } |
Defines the flags used when registering a new animation curve iterpolator. More... | |
Public Member Functions | |
virtual void | initialize (const MObject &animCurve, unsigned int keyIndex) |
Initialize the interpolator to evaluate keyframe values within the time span of the given interval. More... | |
virtual double | evaluate (const MTime &val)=0 |
Compute an interpolated keyframe value at the given time, which is an absolute time between the start and end times. More... | |
MFnAnimCurve::TangentType | typeId () const |
Returns the tangent type of this curve. More... | |
MString | typeName () const |
Returns the name under which the interpolator type was registered. More... | |
enum InterpolatorFlags |
Defines the flags used when registering a new animation curve iterpolator.
|
virtual |
Initialize the interpolator to evaluate keyframe values within the time span of the given interval.
The interval starts at the keyframe denoted by the value of the interval and continues to the next keyframe.
It is not necessary to override this method.
[in] | animCurve | |
[in] | keyIndex |
|
pure virtual |
Compute an interpolated keyframe value at the given time, which is an absolute time between the start and end times.
[in] | val | specified time value |
MFnAnimCurve::TangentType typeId | ( | ) | const |
Returns the tangent type of this curve.
MString typeName | ( | ) | const |
Returns the name under which the interpolator type was registered.
The name is used in the UI and when specifying a tangent type to the keyTangent command.
It is not necessary to override this method.