C4 Engine
C4 Engine API Documentation

class FrameAnimator

Defined in:  C4Animation.h
The FrameAnimator class is an animator that outputs transforms from frame data in an animation resource.

class FrameAnimator : public Animator, public ExclusiveObservable<FrameAnimator, CueType>

Member Functions
FrameAnimator::SetAnimation Sets the animation resource from which the animator generates its output.
FrameAnimator::GetFrameInterpolator Returns the interpolator used to play animation frames.

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

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.
The FrameAnimator class is used to apply the data stored in an animation resource to a model. A particular anaimation resource is specified by calling the FrameAnimator::SetAnimation function, and animation playback is controlled through the Interpolator object returned by the FrameAnimator::GetFrameInterpolator function.

An animation resource may contain cues that are triggered at specific points in the animation. When a cue is passed in the playback of an animation, the FrameAnimator class sends an event to its observer. An observer is installed by passing a pointer to a FrameAnimatorObserver object to the ExclusiveObservable::SetObserver function, called for the FrameAnimator object.
Base Classes
Animator The FrameAnimator class is a special type of animator.
ExclusiveObservable<FrameAnimator, CueType> A FrameAnimator object can be observed for animation cue events.