Share via


CAccelerateDecelerateTransition Class

Implements an accelerate-decelerate transition.

class CAccelerateDecelerateTransition : public CBaseTransition;

Members

Public Constructors

Name

Description

CAccelerateDecelerateTransition::CAccelerateDecelerateTransition

Constructs a transition object.

Public Methods

Name

Description

CAccelerateDecelerateTransition::Create

Calls the transition library to create encapsulated transition COM object. (Overrides CBaseTransition::Create.)

Public Data Members

Name

Description

CAccelerateDecelerateTransition::m_accelerationRatio

The ratio of the time spent accelerating to the duration.

CAccelerateDecelerateTransition::m_decelerationRatio

The ratio of the time spent decelerating to the duration.

CAccelerateDecelerateTransition::m_duration

The duration of the transition.

CAccelerateDecelerateTransition::m_finalValue

The value of the animation variable at the end of the transition.

Remarks

During an accelerate-decelerate transition, the animation variable speeds up and then slows down over the duration of the transition, ending at a specified value. You can control how quickly the variable accelerates and decelerates independently, by specifying different acceleration and deceleration ratios. When the initial velocity is zero, the acceleration ratio is the fraction of the duration that the variable will spend accelerating; likewise with the deceleration ratio. If the initial velocity is non-zero, it is the fraction of the time between the velocity reaching zero and the end of transition. The acceleration ratio and the deceleration ratio should sum to a maximum of 1.0. Because all transitions are cleared automatically, it's recommended to allocated them using operator new. The encapsulated IUIAnimationTransition COM object is created by CAnimationController::AnimateGroup, until then it's NULL. Changing member variables after creation of this COM object has no effect.

Inheritance Hierarchy

CObject

CBaseTransition

CAccelerateDecelerateTransition

Requirements

Header: afxanimationcontroller.h

See Also

Other Resources

MFC Classes