26template<
size_t maxParameters>
59 void SetConstants(uint16_t dictionaryValue,
float springConstant,
float damping)
override;
67 float GetValue(uint16_t dictionaryValue)
override;
86 void AddParameter(
float* parameter, uint16_t dictionaryValue, uint16_t frames,
float basis,
float goal)
override;
Declares the IEasyEaseAnimator interface for defining animation behaviors.
Simulates the motion of a damped spring.
A template class for implementing advanced animation easing.
DampedSpring dampedSpring[maxParameters]
Array of damped springs for smooth animations.
uint16_t dictionary[maxParameters]
Dictionary mapping for parameter lookup.
uint16_t currentParameters
Number of currently active parameters.
EasyEaseAnimator(InterpolationMethod interpMethod, float springConstant=1.0f, float dampingConstant=0.5f)
Constructs an EasyEaseAnimator object with the specified interpolation method.
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 SetParameters() override
Applies the current animation values to the parameters.
void AddParameterFrame(uint16_t dictionaryValue, float value) override
Adds a single frame value for a parameter.
float parameterFrame[maxParameters]
Current frame values for each parameter.
bool isActive
Indicates whether the animator is active.
void SetConstants(uint16_t dictionaryValue, float springConstant, float damping) override
Sets spring and damping constants for a specific parameter.
InterpolationMethod interpMethod
The global interpolation method for the animator.
float goal[maxParameters]
Target values for each parameter.
float * parameters[maxParameters]
Array of pointers to animated parameters.
void Update() override
Updates the animator, advancing all animations.
float basis[maxParameters]
Basis values for each parameter.
void SetInterpolationMethod(uint16_t dictionaryValue, InterpolationMethod interpMethod) override
Sets the interpolation method for a specific parameter.
uint8_t interpolationMethods[maxParameters]
Interpolation methods for each parameter.
RampFilter rampFilter[maxParameters]
Array of ramp filters for controlling transitions.
void Reset() override
Resets the animator to its initial state.
float previousSet[maxParameters]
Previous set values for each parameter.
void AddParameter(float *parameter, uint16_t dictionaryValue, uint16_t frames, float basis, float goal) override
Adds a parameter to the animator.
Interface for defining animation behaviors with easing and interpolation.
InterpolationMethod
Enumeration of interpolation methods for animations.
Smooths transitions between values using a linear ramp approach.