class

AnimationBlender

Blends between two animation clips, producing interpolated local transforms Used for crossfading between animations (e.g., Walk -> Run transition)

Module
Animation
Header
#include "Animation/AnimationBlender.h"
Namespace
Mowo

Constructors

SignatureNameDescription
AnimationBlender() = defaultAnimationBlender

Public functions

ReturnsNameDescription
voidBlendTransformsBlend two sets of local transforms by weight weight = 0.0 -> fully 'a', weight = 1.0 -> fully 'b'
voidSampleAndBlendrequiredBones forwards to both samples — see AnimationSampler::Sample.
voidAdditiveBlendAdditive blend: base + (additive - reference) * weight Useful for layered animation (e.g., breathing on top of idle)

Function details

AnimationBlender

C++
AnimationBlender() = default

BlendTransforms

C++
static void BlendTransforms(const std::vector<Mat4>& a, const std::vector<Mat4>& b, float weight, std::vector<Mat4>& out)

Blend two sets of local transforms by weight weight = 0.0 -> fully 'a', weight = 1.0 -> fully 'b'

SampleAndBlend

C++
static void SampleAndBlend(const AnimationClip& clipA, float timeA, const AnimationClip& clipB, float timeB, const Skeleton& skeleton, float blendWeight, std::vector<Mat4>& outLocalTransforms, const std::vector<uint8_t>* requiredBones = nullptr)

requiredBones forwards to both samples — see AnimationSampler::Sample. Both poses then carry the bind local for an excluded bone, so blending them is a no-op there and the exclusion survives the blend.

AdditiveBlend

C++
static void AdditiveBlend(const std::vector<Mat4>& base, const std::vector<Mat4>& additive, const std::vector<Mat4>& reference, float weight, std::vector<Mat4>& out)

Additive blend: base + (additive - reference) * weight Useful for layered animation (e.g., breathing on top of idle)

Generated from Animation/AnimationBlender.h via animation.json · Oct 26, 2026Version 1.0.0