15#include "../Utils/Math/Mathematics.h"
49template<
size_t maxParameters,
size_t maxKeyFrames>
Declares the KeyFrame class for representing individual animation keyframes.
Base class providing interpolation methods for keyframe animations.
InterpolationMethod
Enumeration of interpolation methods.
@ Linear
Linear interpolation.
@ Step
Step interpolation (discrete transitions).
@ Cosine
Smooth cosine interpolation.
A template class for managing animations with multiple parameters and keyframes.
void AddParameter(float *parameter)
Adds a parameter to the track.
float GetCurrentTime()
Retrieves the current animation time.
void Play()
Resumes the animation.
float max
Maximum value for the parameters.
void Reset()
Resets the animation track to its initial state.
void AddKeyFrame(float time, float value)
Adds a keyframe to the track.
float GetParameterValue()
Retrieves the current interpolated parameter value.
float stopFrameTime
End time of the animation (initialized out of bounds).
uint8_t currentParameters
Current number of parameters.
void Pause()
Pauses the animation.
void ShiftKeyFrameArray(int position)
Shifts the keyframe array starting at a specific position.
KeyFrame keyFrames[maxKeyFrames]
Array of keyframes defining the animation.
uint8_t currentFrames
Current number of keyframes.
float Update()
Updates the animation track and computes the new parameter value.
bool isActive
Indicates whether the track is active.
float currentTime
Current time of the animation.
InterpolationMethod interpMethod
The interpolation method for the track.
float * parameters[maxParameters]
Array of pointers to parameters being animated.
KeyFrameTrack(float min, float max, InterpolationMethod interpMethod)
Constructs a KeyFrameTrack object with the specified settings.
float startFrameTime
Start time of the animation (initialized out of bounds).
float min
Minimum value for the parameters.
void SetCurrentTime(float setTime)
Sets the current animation time.
float parameterValue
Current interpolated parameter value.
float timeOffset
Offset for the animation time.
Represents a single keyframe in an animation.
static const float FLTMIN
Minimum float value (shortcut to a very small or near-zero number).
static const float FLTMAX
Maximum float value (shortcut to a large number).