CCustomTransition Class
Implements a custom transition.
class CCustomTransition : public CBaseTransition;
Members
Public Constructors
Name |
Description |
---|---|
Constructs a custom transition object. |
Public Methods
Name |
Description |
---|---|
Calls the transition library to create encapsulated transition COM object. (Overrides CBaseTransition::Create.) |
|
Sets an initial value, which will be applied to an animation variable associated with this transition. |
|
Sets an initial velocity, which will be applied to an animation variable associated with this transition. |
Protected Data Members
Name |
Description |
---|---|
Specifies whether the initial value was specified with SetInitialValue. |
|
Specifies whether the initial velocity was specified with SetInitialVelocity. |
|
Stores the initial value. |
|
Stores the initial velocity. |
|
Stores a pointer to a custom interpolator. |
Remarks
The CCustomTransitions class allows developers to implement custom transitions. It's created and used as a standard transition, but its constructor accepts as parameter a pointer to a custom interpolator. Perform the following steps to use custom transitions: 1. Derive a class from CCustomInterpolator and implement at least InterpolateValue method. 2. Ensure that the lifetime of custom interpolator object must be longer than duration of animation where it's used. 3. Instantiate (using operator new) a CCustomTransition object and pass a pointer to custom interpolator in the constructor. 4. Call CCustomTransition::SetInitialValue and CCustomTransition::SetInitialVelocity if these parameters are required for custom interpolation. 5. Pass the pointer to custom transition to AddTransition method of animation object, whose value should be animated with the custom algorithm. 6. When the value of animation object should change Windows Animation API will call InterpolateValue (and other relevant methods) in CCustomInterpolator.
Inheritance Hierarchy
Requirements
Header: afxanimationcontroller.h