![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
A template class for implementing advanced animation easing. More...
#include <EasyEaseAnimator.h>
Public Member Functions | |
EasyEaseAnimator (InterpolationMethod interpMethod, float springConstant=1.0f, float dampingConstant=0.5f) | |
Constructs an EasyEaseAnimator object with the specified interpolation method. | |
void | SetConstants (uint16_t dictionaryValue, float springConstant, float damping) override |
Sets spring and damping constants for a specific parameter. | |
float | GetValue (uint16_t dictionaryValue) override |
Gets the current value of a parameter. | |
float | GetTarget (uint16_t dictionaryValue) override |
Gets the target value of a parameter. | |
void | AddParameter (float *parameter, uint16_t dictionaryValue, uint16_t frames, float basis, float goal) override |
Adds a parameter to the animator. | |
void | AddParameterFrame (uint16_t dictionaryValue, float value) override |
Adds a single frame value for a parameter. | |
void | SetInterpolationMethod (uint16_t dictionaryValue, InterpolationMethod interpMethod) override |
Sets the interpolation method for a specific parameter. | |
void | Reset () override |
Resets the animator to its initial state. | |
void | SetParameters () override |
Applies the current animation values to the parameters. | |
void | Update () override |
Updates the animator, advancing all animations. | |
Private Attributes | |
InterpolationMethod | interpMethod |
The global interpolation method for the animator. | |
DampedSpring | dampedSpring [maxParameters] |
Array of damped springs for smooth animations. | |
RampFilter | rampFilter [maxParameters] |
Array of ramp filters for controlling transitions. | |
float * | parameters [maxParameters] |
Array of pointers to animated parameters. | |
float | parameterFrame [maxParameters] |
Current frame values for each parameter. | |
float | previousSet [maxParameters] |
Previous set values for each parameter. | |
float | basis [maxParameters] |
Basis values for each parameter. | |
float | goal [maxParameters] |
Target values for each parameter. | |
uint8_t | interpolationMethods [maxParameters] |
Interpolation methods for each parameter. | |
uint16_t | dictionary [maxParameters] |
Dictionary mapping for parameter lookup. | |
uint16_t | currentParameters = 0 |
Number of currently active parameters. | |
bool | isActive = true |
Indicates whether the animator is active. | |
Additional Inherited Members | |
![]() | |
enum | InterpolationMethod { Cosine , Bounce , Linear , Overshoot } |
Enumeration of interpolation methods for animations. More... | |
A template class for implementing advanced animation easing.
The EasyEaseAnimator class provides a framework for animating parameters with smooth transitions using a combination of interpolation methods, damped springs, and ramp filters.
maxParameters | The maximum number of parameters this animator can handle. |
Definition at line 27 of file EasyEaseAnimator.h.
EasyEaseAnimator | ( | InterpolationMethod | interpMethod, |
float | springConstant = 1.0f , |
||
float | dampingConstant = 0.5f |
||
) |
Constructs an EasyEaseAnimator object with the specified interpolation method.
interpMethod | The default interpolation method. |
springConstant | The default spring constant for damped springs. |
dampingConstant | The default damping constant for damped springs. |
|
overridevirtual |
Adds a parameter to the animator.
parameter | A pointer to the parameter to animate. |
dictionaryValue | The parameter's dictionary identifier. |
frames | The number of frames for the transition. |
basis | The initial basis value. |
goal | The target goal value. |
Implements IEasyEaseAnimator.
Referenced by ProtogenProject::AddParameter(), ProtogenProject::AddViseme(), AphoriAnimation::LinkEasyEase(), ProtogenArtleckAnimation::LinkEasyEase(), ArtleckAnimationV2::LinkEasyEase(), BasilGardenAnimation::LinkEasyEase(), BroookAnimation::LinkEasyEase(), WaffleDaProtoAnimation::LinkEasyEase(), ElGatoAnimation::LinkEasyEase(), GalaxyAnimation::LinkEasyEase(), HertzzAnimation::LinkEasyEase(), InfraredAnimation::LinkEasyEase(), LeonHuskyAnimation::LinkEasyEase(), MyntAnimation::LinkEasyEase(), ProtobottAnimation::LinkEasyEase(), SammyAnimation::LinkEasyEase(), SergaliciousAnimation::LinkEasyEase(), StrawberryAnimation::LinkEasyEase(), TamamoAnimation::LinkEasyEase(), TechSaneAnimation::LinkEasyEase(), VesperAnimation::LinkEasyEase(), WarzoneAnimation::LinkEasyEase(), Warzone2Animation::LinkEasyEase(), XenraxAnimation::LinkEasyEase(), AlphaAnimation::LinkEasyEase(), GammaAnimation::LinkEasyEase(), HUB75AnimationSplit::LinkEasyEase(), WS35AnimationSplit::LinkEasyEase(), NukudeFaceAnimation::LinkEasyEase(), and ProtogenProject::LinkParameters().
|
overridevirtual |
Adds a single frame value for a parameter.
dictionaryValue | The parameter's dictionary identifier. |
value | The frame value to add. |
Implements IEasyEaseAnimator.
Referenced by ProtogenProject::AddParameterFrame(), AlphaAnimation::AlphaGenCircle(), GammaAnimation::AlphaGenCircle(), AlphaAnimation::AlphaGenSquare(), AphoriAnimation::Angry(), ProtogenArtleckAnimation::Angry(), ArtleckAnimationV2::Angry(), BasilGardenAnimation::Angry(), WaffleDaProtoAnimation::Angry(), ElGatoAnimation::Angry(), HertzzAnimation::Angry(), InfraredAnimation::Angry(), LeonHuskyAnimation::Angry(), MyntAnimation::Angry(), ProtobottAnimation::Angry(), SammyAnimation::Angry(), TamamoAnimation::Angry(), TechSaneAnimation::Angry(), VesperAnimation::Angry(), WarzoneAnimation::Angry(), XenraxAnimation::Angry(), HUB75AnimationSplit::Angry(), WS35AnimationSplit::Angry(), NukudeFaceAnimation::Angry(), AlphaAnimation::AngryFace(), GammaAnimation::AngryFace(), AlphaAnimation::AudioReactiveGradientDisplay(), AphoriAnimation::AudioReactiveGradientFace(), BasilGardenAnimation::AudioReactiveGradientFace(), BroookAnimation::AudioReactiveGradientFace(), GalaxyAnimation::AudioReactiveGradientFace(), HertzzAnimation::AudioReactiveGradientFace(), InfraredAnimation::AudioReactiveGradientFace(), SammyAnimation::AudioReactiveGradientFace(), SergaliciousAnimation::AudioReactiveGradientFace(), StrawberryAnimation::AudioReactiveGradientFace(), TamamoAnimation::AudioReactiveGradientFace(), TechSaneAnimation::AudioReactiveGradientFace(), Warzone2Animation::AudioReactiveGradientFace(), XenraxAnimation::AudioReactiveGradientFace(), GammaAnimation::AudioReactiveGradientFace(), HUB75AnimationSplit::AudioReactiveGradientFace(), WS35AnimationSplit::AudioReactiveGradientFace(), ProtogenProject::AudioReactiveGradientFace(), BroookAnimation::BadAppleFace(), XenraxAnimation::Battery(), AphoriAnimation::Blush(), GalaxyAnimation::Blush(), HertzzAnimation::Blush(), StrawberryAnimation::Blush(), Warzone2Animation::Blush(), AphoriAnimation::Boop(), TamamoAnimation::Boop(), XenraxAnimation::Boop(), SergaliciousAnimation::BSOD(), XenraxAnimation::BSOD(), InfraredAnimation::Calm(), Warzone2Animation::Circle(), AphoriAnimation::Concern(), TamamoAnimation::Confuse(), BasilGardenAnimation::Crabby(), BroookAnimation::Dead(), MyntAnimation::Dead(), Warzone2Animation::Dead(), XenraxAnimation::Dead(), AlphaAnimation::Dead(), GammaAnimation::Dead(), AphoriAnimation::Default(), BasilGardenAnimation::Default(), BroookAnimation::Default(), WaffleDaProtoAnimation::Default(), ElGatoAnimation::Default(), HertzzAnimation::Default(), StrawberryAnimation::Default(), Warzone2Animation::Default(), GammaAnimation::Default(), ElGatoAnimation::Default2(), InfraredAnimation::Determination(), BroookAnimation::Determined(), BasilGardenAnimation::Disappointed(), BroookAnimation::Dot(), ProtogenArtleckAnimation::Doubt(), ArtleckAnimationV2::Doubt(), WaffleDaProtoAnimation::Doubt(), ElGatoAnimation::Doubt(), LeonHuskyAnimation::Doubt(), ProtobottAnimation::Doubt(), SammyAnimation::Doubt(), TechSaneAnimation::Doubt(), VesperAnimation::Doubt(), WarzoneAnimation::Doubt(), HUB75AnimationSplit::Doubt(), WS35AnimationSplit::Doubt(), NukudeFaceAnimation::Doubt(), TamamoAnimation::Error(), GalaxyAnimation::EyeBack(), GalaxyAnimation::EyeBack2(), BroookAnimation::Flustered(), BasilGardenAnimation::ForReal(), ProtogenArtleckAnimation::Frown(), ArtleckAnimationV2::Frown(), WaffleDaProtoAnimation::Frown(), LeonHuskyAnimation::Frown(), ProtobottAnimation::Frown(), SammyAnimation::Frown(), TechSaneAnimation::Frown(), VesperAnimation::Frown(), WarzoneAnimation::Frown(), HUB75AnimationSplit::Frown(), WS35AnimationSplit::Frown(), NukudeFaceAnimation::Frown(), BasilGardenAnimation::Grimace(), BroookAnimation::Happy(), GalaxyAnimation::Happy(), HertzzAnimation::Happy(), InfraredAnimation::Happy(), MyntAnimation::Happy(), SergaliciousAnimation::Happy(), TamamoAnimation::Happy(), Warzone2Animation::Happy(), StrawberryAnimation::HappyCalm(), Warzone2Animation::HappyClosed(), StrawberryAnimation::HappyEyeOpen(), StrawberryAnimation::HappyOpen(), StrawberryAnimation::HappyPOG(), GalaxyAnimation::HappyRainbow(), StrawberryAnimation::HappyTooth(), BroookAnimation::Heart(), SergaliciousAnimation::Heart(), AlphaAnimation::Heart(), GammaAnimation::Heart(), StrawberryAnimation::HeartPOG(), XenraxAnimation::Hearts(), AlphaAnimation::HideAll(), ProtogenProject::HideFace(), XenraxAnimation::Hypno(), SergaliciousAnimation::Idle(), SergaliciousAnimation::Loading(), TamamoAnimation::Loading(), ProtogenArtleckAnimation::LookDown(), ArtleckAnimationV2::LookDown(), WaffleDaProtoAnimation::LookDown(), ElGatoAnimation::LookDown(), LeonHuskyAnimation::LookDown(), ProtobottAnimation::LookDown(), SammyAnimation::LookDown(), TechSaneAnimation::LookDown(), VesperAnimation::LookDown(), WarzoneAnimation::LookDown(), HUB75AnimationSplit::LookDown(), WS35AnimationSplit::LookDown(), NukudeFaceAnimation::LookDown(), ProtogenArtleckAnimation::LookUp(), ArtleckAnimationV2::LookUp(), WaffleDaProtoAnimation::LookUp(), ElGatoAnimation::LookUp(), LeonHuskyAnimation::LookUp(), ProtobottAnimation::LookUp(), SammyAnimation::LookUp(), TechSaneAnimation::LookUp(), VesperAnimation::LookUp(), WarzoneAnimation::LookUp(), HUB75AnimationSplit::LookUp(), WS35AnimationSplit::LookUp(), NukudeFaceAnimation::LookUp(), MyntAnimation::Love(), InfraredAnimation::Mad(), AphoriAnimation::Nervous(), StrawberryAnimation::Nervous(), AphoriAnimation::OscilloscopeFace(), BasilGardenAnimation::OscilloscopeFace(), BroookAnimation::OscilloscopeFace(), GalaxyAnimation::OscilloscopeFace(), HertzzAnimation::OscilloscopeFace(), InfraredAnimation::OscilloscopeFace(), SammyAnimation::OscilloscopeFace(), SergaliciousAnimation::OscilloscopeFace(), StrawberryAnimation::OscilloscopeFace(), TamamoAnimation::OscilloscopeFace(), TechSaneAnimation::OscilloscopeFace(), Warzone2Animation::OscilloscopeFace(), XenraxAnimation::OscilloscopeFace(), GammaAnimation::OscilloscopeFace(), HUB75AnimationSplit::OscilloscopeFace(), WS35AnimationSplit::OscilloscopeFace(), ProtogenProject::OscilloscopeFace(), SergaliciousAnimation::OwO(), AlphaAnimation::OwO(), GammaAnimation::OwO(), AlphaAnimation::OwO2(), GammaAnimation::OwO2(), MyntAnimation::PacmanFace(), BroookAnimation::Question(), SergaliciousAnimation::Question(), BasilGardenAnimation::Rage(), AphoriAnimation::Sad(), ProtogenArtleckAnimation::Sad(), ArtleckAnimationV2::Sad(), BasilGardenAnimation::Sad(), BroookAnimation::Sad(), WaffleDaProtoAnimation::Sad(), ElGatoAnimation::Sad(), HertzzAnimation::Sad(), InfraredAnimation::Sad(), LeonHuskyAnimation::Sad(), ProtobottAnimation::Sad(), SammyAnimation::Sad(), SergaliciousAnimation::Sad(), TechSaneAnimation::Sad(), VesperAnimation::Sad(), WarzoneAnimation::Sad(), AlphaAnimation::Sad(), GammaAnimation::Sad(), HUB75AnimationSplit::Sad(), WS35AnimationSplit::Sad(), NukudeFaceAnimation::Sad(), Warzone2Animation::Sleep(), XenraxAnimation::Sleeping(), BroookAnimation::Sleepy(), MyntAnimation::Sleepy(), TamamoAnimation::Sleepy(), MyntAnimation::SleepyZZZ(), BasilGardenAnimation::Smirk(), MyntAnimation::SOSFace(), AlphaAnimation::SpectrumAnalyzerDisplay(), AphoriAnimation::SpectrumAnalyzerFace(), BasilGardenAnimation::SpectrumAnalyzerFace(), BroookAnimation::SpectrumAnalyzerFace(), GalaxyAnimation::SpectrumAnalyzerFace(), HertzzAnimation::SpectrumAnalyzerFace(), InfraredAnimation::SpectrumAnalyzerFace(), SammyAnimation::SpectrumAnalyzerFace(), SergaliciousAnimation::SpectrumAnalyzerFace(), StrawberryAnimation::SpectrumAnalyzerFace(), TamamoAnimation::SpectrumAnalyzerFace(), TechSaneAnimation::SpectrumAnalyzerFace(), Warzone2Animation::SpectrumAnalyzerFace(), XenraxAnimation::SpectrumAnalyzerFace(), GammaAnimation::SpectrumAnalyzerFace(), HUB75AnimationSplit::SpectrumAnalyzerFace(), WS35AnimationSplit::SpectrumAnalyzerFace(), ProtogenProject::SpectrumAnalyzerFace(), Warzone2Animation::Spiral(), HertzzAnimation::Squint(), SergaliciousAnimation::Squint(), StrawberryAnimation::Stinky(), ProtogenArtleckAnimation::Surprised(), ArtleckAnimationV2::Surprised(), WaffleDaProtoAnimation::Surprised(), ElGatoAnimation::Surprised(), HertzzAnimation::Surprised(), InfraredAnimation::Surprised(), LeonHuskyAnimation::Surprised(), ProtobottAnimation::Surprised(), SammyAnimation::Surprised(), TechSaneAnimation::Surprised(), VesperAnimation::Surprised(), WarzoneAnimation::Surprised(), HUB75AnimationSplit::Surprised(), WS35AnimationSplit::Surprised(), NukudeFaceAnimation::Surprised(), TechSaneAnimation::TechSaneFace(), AphoriAnimation::Thrilled(), AphoriAnimation::Toast(), ProtogenArtleckAnimation::Update(), WaffleDaProtoAnimation::Update(), XenraxAnimation::Update(), AphoriAnimation::UpdateFFTVisemes(), ArtleckAnimationV2::UpdateFFTVisemes(), BasilGardenAnimation::UpdateFFTVisemes(), BroookAnimation::UpdateFFTVisemes(), ElGatoAnimation::UpdateFFTVisemes(), GalaxyAnimation::UpdateFFTVisemes(), InfraredAnimation::UpdateFFTVisemes(), LeonHuskyAnimation::UpdateFFTVisemes(), MyntAnimation::UpdateFFTVisemes(), ProtobottAnimation::UpdateFFTVisemes(), SammyAnimation::UpdateFFTVisemes(), SergaliciousAnimation::UpdateFFTVisemes(), StrawberryAnimation::UpdateFFTVisemes(), TamamoAnimation::UpdateFFTVisemes(), TechSaneAnimation::UpdateFFTVisemes(), VesperAnimation::UpdateFFTVisemes(), WaffleDaProtoAnimation::UpdateFFTVisemes(), WarzoneAnimation::UpdateFFTVisemes(), Warzone2Animation::UpdateFFTVisemes(), XenraxAnimation::UpdateFFTVisemes(), HUB75AnimationSplit::UpdateFFTVisemes(), WS35AnimationSplit::UpdateFFTVisemes(), ProtogenProject::UpdateFFTVisemes(), AphoriAnimation::Upset(), BroookAnimation::Upset(), TamamoAnimation::Upset(), Warzone2Animation::Upset(), Warzone2Animation::UwU(), HertzzAnimation::Whoop(), and BasilGardenAnimation::Whoops().
Gets the target value of a parameter.
dictionaryValue | The parameter's dictionary identifier. |
Implements IEasyEaseAnimator.
Gets the current value of a parameter.
dictionaryValue | The parameter's dictionary identifier. |
Implements IEasyEaseAnimator.
Referenced by BasilGardenAnimation::Update(), GalaxyAnimation::Update(), and WS35AnimationSplit::Update().
Resets the animator to its initial state.
Implements IEasyEaseAnimator.
|
overridevirtual |
Sets spring and damping constants for a specific parameter.
dictionaryValue | The parameter's dictionary identifier. |
springConstant | The spring constant to set. |
damping | The damping constant to set. |
Implements IEasyEaseAnimator.
|
overridevirtual |
Sets the interpolation method for a specific parameter.
dictionaryValue | The parameter's dictionary identifier. |
interpMethod | The interpolation method to set. |
Implements IEasyEaseAnimator.
Referenced by ProtogenProject::AddParameter(), ProtogenProject::AddViseme(), AphoriAnimation::ChangeInterpolationMethods(), ProtogenArtleckAnimation::ChangeInterpolationMethods(), ArtleckAnimationV2::ChangeInterpolationMethods(), BasilGardenAnimation::ChangeInterpolationMethods(), BroookAnimation::ChangeInterpolationMethods(), WaffleDaProtoAnimation::ChangeInterpolationMethods(), ElGatoAnimation::ChangeInterpolationMethods(), GalaxyAnimation::ChangeInterpolationMethods(), HertzzAnimation::ChangeInterpolationMethods(), InfraredAnimation::ChangeInterpolationMethods(), LeonHuskyAnimation::ChangeInterpolationMethods(), MyntAnimation::ChangeInterpolationMethods(), ProtobottAnimation::ChangeInterpolationMethods(), SammyAnimation::ChangeInterpolationMethods(), SergaliciousAnimation::ChangeInterpolationMethods(), StrawberryAnimation::ChangeInterpolationMethods(), TamamoAnimation::ChangeInterpolationMethods(), TechSaneAnimation::ChangeInterpolationMethods(), VesperAnimation::ChangeInterpolationMethods(), WarzoneAnimation::ChangeInterpolationMethods(), Warzone2Animation::ChangeInterpolationMethods(), XenraxAnimation::ChangeInterpolationMethods(), GammaAnimation::ChangeInterpolationMethods(), HUB75AnimationSplit::ChangeInterpolationMethods(), and WS35AnimationSplit::ChangeInterpolationMethods().
Applies the current animation values to the parameters.
Implements IEasyEaseAnimator.
Referenced by GalaxyAnimation::Update().
Updates the animator, advancing all animations.
Implements IEasyEaseAnimator.
Referenced by AphoriAnimation::Update(), ProtogenArtleckAnimation::Update(), ArtleckAnimationV2::Update(), BasilGardenAnimation::Update(), BroookAnimation::Update(), WaffleDaProtoAnimation::Update(), ElGatoAnimation::Update(), GalaxyAnimation::Update(), HertzzAnimation::Update(), InfraredAnimation::Update(), LeonHuskyAnimation::Update(), MyntAnimation::Update(), ProtobottAnimation::Update(), SammyAnimation::Update(), SergaliciousAnimation::Update(), StrawberryAnimation::Update(), TamamoAnimation::Update(), TechSaneAnimation::Update(), VesperAnimation::Update(), WarzoneAnimation::Update(), Warzone2Animation::Update(), XenraxAnimation::Update(), AlphaAnimation::Update(), GammaAnimation::Update(), HUB75AnimationSplit::Update(), WS35AnimationSplit::Update(), NukudeFaceAnimation::Update(), and ProtogenProject::UpdateFace().
|
private |
Basis values for each parameter.
Definition at line 35 of file EasyEaseAnimator.h.
Number of currently active parameters.
Definition at line 39 of file EasyEaseAnimator.h.
|
private |
Array of damped springs for smooth animations.
Definition at line 30 of file EasyEaseAnimator.h.
|
private |
Dictionary mapping for parameter lookup.
Definition at line 38 of file EasyEaseAnimator.h.
|
private |
Target values for each parameter.
Definition at line 36 of file EasyEaseAnimator.h.
|
private |
The global interpolation method for the animator.
Definition at line 29 of file EasyEaseAnimator.h.
|
private |
Interpolation methods for each parameter.
Definition at line 37 of file EasyEaseAnimator.h.
Indicates whether the animator is active.
Definition at line 40 of file EasyEaseAnimator.h.
|
private |
Current frame values for each parameter.
Definition at line 33 of file EasyEaseAnimator.h.
|
private |
Array of pointers to animated parameters.
Definition at line 32 of file EasyEaseAnimator.h.
|
private |
Previous set values for each parameter.
Definition at line 34 of file EasyEaseAnimator.h.
|
private |
Array of ramp filters for controlling transitions.
Definition at line 31 of file EasyEaseAnimator.h.