C4 Engine
C4 Engine API Documentation

class BlendAnimator

Defined in:  C4Animation.h
The BlendAnimator class is an animator that blends outputs from its subanimators.
Definition

class BlendAnimator : public Animator

Constructor

BlendAnimator(Model *model, Node *node = nullptr);

Parameters
model The model to which the animator applies.
node The target node, which is the root of the subtree within the model that is affected by the animator. If this is nullptr, then the root is the same as the model parameter.
Description
The BlendAnimator class is used to blend the outputs of two subanimators based on their current weights. The range of nodes affected by a blend animator is the union of the ranges affected by its immediate subanimators, restricted to the range of the blend animator itself. Blending takes place only inside the intersection of these ranges, and nodes outside of the intersection have their transforms passed through from the subanimators.

The weights used by the blend animator are given by the current values of the weight interpolators belonging to the two subanimators. These interpolators are retrieved by calling the Animator::GetWeightInterpolator function. The weights are always normalized by the blend animator, so they do not need to sum to one.

If a blend animator has only one subanimator, then the transforms output by the subanimator are simply passed through.
Base Classes
Animator The BlendAnimator class is a special type of animator.
See Also

MergeAnimator