public static class PoseBlendThe four things that are ever done to a pose: interpolate it, average several of them, replace part of it, and add a difference on top.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Free functions over spans rather than methods on SkeletonPose, because the buffers a blend tree works in are scratch — a stack of them, reused every frame — and making each one a SkeletonPose would mean a class per intermediate result. Everything here writes into the destination it is handed and allocates nothing.
Methods (5)
public static void Lerp(Span<BoneTransform> destination, ReadOnlySpan<BoneTransform> from, ReadOnlySpan<BoneTransform> to, float amount)Interpolates one pose towards another.
public static void LerpMasked(Span<BoneTransform> destination, ReadOnlySpan<BoneTransform> from, ReadOnlySpan<BoneTransform> to, BoneMask mask, float weight = 1)Interpolates one pose towards another, joint by joint, through a mask.
public static void MakeAdditive(Span<BoneTransform> destination, ReadOnlySpan<BoneTransform> pose, ReadOnlySpan<BoneTransform> reference)Turns a posed clip into the difference an additive layer applies.
public static void Add(Span<BoneTransform> destination, ReadOnlySpan<BoneTransform> additive, float weight, BoneMask? mask = null)Applies an additive difference on top of a pose.
public static PoseBlend.Accumulator Average(Span<BoneTransform> destination)Averages any number of poses by weight, without ever holding all of them at once.
Used by (6)
- AnimationLayerVixen.Animation
- BlendEvaluatorVixen.Animation
- ClipMotionVixen.Animation
- MoveSetMotionVixen.Animation
- PoseBlendTestsVixen.Animation.Tests
- StateMachineInstanceVixen.Animation