FInertializer
- Module
- Animation
- Header
#include "Animation/Inertialization.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
void | Begin | source/sourcePrev: the pose that was on screen at the switch instant and one tick earlier. |
void | Cancel | |
bool | IsActive | |
float | Elapsed | |
float | BlendTime | |
void | Apply | Advances the blend clock by dt and adds the decayed offset onto pose (the freshly sampled target pose, modified in place). |
Function details
Begin
void Begin(const std::vector<Mat4>& source, const std::vector<Mat4>& sourcePrev, const std::vector<Mat4>& target, const std::vector<Mat4>& targetPrev, float dt, float blendTime, const std::vector<float>* boneBlendTimes = nullptr)source/sourcePrev: the pose that was on screen at the switch instant and one tick earlier. target/targetPrev: the incoming pose sampled at the same two times. dt must be the tick that separates them (> 0). boneBlendTimes (optional, one entry per bone — a blend profile's TimeFactor output) gives each bone its OWN window, which is the whole point of a blend profile: the legs are already on the new state while the torso is still catching up. The blend as a whole runs until the LONGEST of them, so a bone with a short window finishes early rather than being cut off. A shorter-than-bone-count array is ignored — a half-applied profile would silently snap the bones it did not cover.
Cancel
void Cancel()IsActive
bool IsActive() constElapsed
float Elapsed() constBlendTime
float BlendTime() constApply
void Apply(float dt, std::vector<Mat4>& pose)Advances the blend clock by dt and adds the decayed offset onto pose (the freshly sampled target pose, modified in place). A no-op while inactive, so it is safe to call every frame.