7#include <glm/gtc/quaternion.hpp>
9#include "core/reflect.h"
11#include "resource/asset/animation_clip_asset.h"
12#include "resource/asset/skeleton_asset.h"
14namespace Vkm::Engine {
What drives a rig: the skeleton, the clip playing on it, and the playback position.
Definition animator.h:45
float fadeRemaining
Simulation seconds of blend left.
Definition animator.h:79
bool started
Whether playOnStart has been honoured this session. Session state.
Definition animator.h:75
std::vector< BoneAdjust > adjust
Per-bone additions on top of the clip; session state.
Definition animator.h:94
float fadeTime
Its own playback head; it keeps playing while it fades.
Definition animator.h:78
float fadeDuration
fadeRemaining's start; the weight divides by it.
Definition animator.h:80
float speed
Multiplies the simulation delta.
Definition animator.h:55
SkeletonHandle skeleton
The rig posed; nothing is posed without it.
Definition animator.h:46
bool fadeLooping
Whether the outgoing clip wraps while it fades out; parked here by crossFadeTo.
Definition animator.h:85
bool playing
Session state.
Definition animator.h:72
bool playOnStart
Start playing on the first frame the simulation runs.
Definition animator.h:69
AnimationClipHandle clip
Clip playing on it; empty holds the bind pose.
Definition animator.h:47
static void crossFadeTo(Animator &animator, AnimationClipHandle clip, float seconds, bool looping)
Start playing clip, blending out of whatever is playing now.
float time
Playback head in seconds; session state, not serialized.
Definition animator.h:54
bool looping
Whether the clip in clip wraps at its end or stops there.
Definition animator.h:61
AnimationClipHandle fadeFrom
Clip being left; empty when nothing is fading.
Definition animator.h:77
What a behavior adds to one bone on top of the clip, this frame.
Definition animator.h:28
int32_t bone
Into the rig's bones; out of range adjusts nothing.
Definition animator.h:29
glm::vec3 offset
Model space, added to the bone's origin.
Definition animator.h:31
glm::quat rotation
Model space, about the bone's origin.
Definition animator.h:30
bool absolute
True: rotation replaces the clip's orientation.
Definition animator.h:33
float scale
Multiplies the bone's scale; children inherit.
Definition animator.h:32