![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
A template class for managing animation tracks with keyframes. More...
#include <AnimationTrack.h>
Public Member Functions | |
AnimationTrack () | |
Default constructor. | |
AnimationTrack (float min, float max, KeyFrameInterpolation::InterpolationMethod interpMethod) | |
Parameterized constructor. | |
void | Play () |
Starts or resumes playback of the animation track. | |
void | Pause () |
Pauses playback of the animation track. | |
void | RestartTime () |
Restarts the animation track's time to the beginning. | |
void | PrintTime () |
Prints the current time of the animation track. | |
void | Reset () |
Resets the animation track to its initial state. | |
float | GetParameterValue () |
Retrieves the current parameter value of the animation track. | |
float | Update () |
Updates the animation track and returns the current parameter value. | |
void | AddParameter (float *parameter) |
Adds a parameter to the animation track. | |
Protected Attributes | |
KeyFrameTrack< maxParameters, maxKeyFrames > | track |
Internal track object for keyframe management. | |
Private Member Functions | |
virtual void | AddKeyFrames ()=0 |
Pure virtual function to add keyframes to the track. | |
A template class for managing animation tracks with keyframes.
This class handles the management of animation parameters and their associated keyframes, supporting playback controls, parameter updates, and interpolation.
maxParameters | The maximum number of parameters this animation track can handle. |
maxKeyFrames | The maximum number of keyframes this animation track can contain. |
Definition at line 29 of file AnimationTrack.h.
AnimationTrack | ( | ) |
Default constructor.
Constructs an AnimationTrack object with default settings.
AnimationTrack | ( | float | min, |
float | max, | ||
KeyFrameInterpolation::InterpolationMethod | interpMethod | ||
) |
Parameterized constructor.
Initializes an AnimationTrack object with the given range and interpolation method.
min | The minimum value of the parameter range. |
max | The maximum value of the parameter range. |
interpMethod | The interpolation method to be used for the track. |
Pure virtual function to add keyframes to the track.
This function must be implemented by derived classes to define how keyframes are added to the animation track.
Implemented in BlinkTrack< parameters >, BlinkTrack< 1 >, BlinkTrack< 2 >, EffectChangeTrack< parameters >, EffectChangeTrack< 1 >, EyeMoveTrack< parameters >, EyeMoveTrack< 1 >, and MouthTrack< parameters >.
Adds a parameter to the animation track.
parameter | A pointer to the parameter to be animated. |
Referenced by ProtogenProject::AddBlinkParameter(), Menu::Initialize(), AphoriAnimation::LinkParameters(), ArtleckAnimationV2::LinkParameters(), BasilGardenAnimation::LinkParameters(), BroookAnimation::LinkParameters(), ElGatoAnimation::LinkParameters(), GalaxyAnimation::LinkParameters(), HertzzAnimation::LinkParameters(), InfraredAnimation::LinkParameters(), LeonHuskyAnimation::LinkParameters(), MyntAnimation::LinkParameters(), ProtobottAnimation::LinkParameters(), SammyAnimation::LinkParameters(), SergaliciousAnimation::LinkParameters(), StrawberryAnimation::LinkParameters(), TamamoAnimation::LinkParameters(), TechSaneAnimation::LinkParameters(), VesperAnimation::LinkParameters(), WarzoneAnimation::LinkParameters(), Warzone2Animation::LinkParameters(), XenraxAnimation::LinkParameters(), GammaAnimation::LinkParameters(), HUB75AnimationSplit::LinkParameters(), and WS35AnimationSplit::LinkParameters().
Retrieves the current parameter value of the animation track.
Pauses playback of the animation track.
Referenced by InfraredAnimation::AudioReactiveGradientFace(), SergaliciousAnimation::AudioReactiveGradientFace(), XenraxAnimation::Battery(), StrawberryAnimation::Blush(), Warzone2Animation::Blush(), SergaliciousAnimation::BSOD(), XenraxAnimation::BSOD(), Warzone2Animation::Circle(), BroookAnimation::Dead(), MyntAnimation::Dead(), Warzone2Animation::Dead(), XenraxAnimation::Dead(), GammaAnimation::Dead(), SergaliciousAnimation::Default(), StrawberryAnimation::Default(), ProtogenProject::DisableBlinking(), BroookAnimation::Flustered(), BroookAnimation::Happy(), InfraredAnimation::Happy(), SergaliciousAnimation::Happy(), StrawberryAnimation::HappyOpen(), StrawberryAnimation::HappyPOG(), StrawberryAnimation::HappyTooth(), BroookAnimation::Heart(), SergaliciousAnimation::Heart(), GammaAnimation::Heart(), StrawberryAnimation::HeartPOG(), XenraxAnimation::Hypno(), SergaliciousAnimation::Idle(), SergaliciousAnimation::Loading(), StrawberryAnimation::Nervous(), InfraredAnimation::OscilloscopeFace(), SergaliciousAnimation::OscilloscopeFace(), SergaliciousAnimation::OwO(), GammaAnimation::OwO(), GammaAnimation::OwO2(), MyntAnimation::PacmanFace(), BroookAnimation::Question(), SergaliciousAnimation::Question(), InfraredAnimation::Sad(), SergaliciousAnimation::Sad(), Warzone2Animation::Sleep(), XenraxAnimation::Sleeping(), BroookAnimation::Sleepy(), MyntAnimation::Sleepy(), MyntAnimation::SleepyZZZ(), MyntAnimation::SOSFace(), InfraredAnimation::SpectrumAnalyzerFace(), MyntAnimation::SpectrumAnalyzerFace(), SergaliciousAnimation::SpectrumAnalyzerFace(), Warzone2Animation::Spiral(), SergaliciousAnimation::Squint(), StrawberryAnimation::Stinky(), InfraredAnimation::Surprised(), Warzone2Animation::Upset(), and Warzone2Animation::UwU().
Starts or resumes playback of the animation track.
Referenced by GammaAnimation::AlphaGenCircle(), InfraredAnimation::Angry(), XenraxAnimation::Angry(), GammaAnimation::AngryFace(), XenraxAnimation::Boop(), InfraredAnimation::Calm(), BroookAnimation::Default(), InfraredAnimation::Default(), SergaliciousAnimation::Default(), Warzone2Animation::Default(), XenraxAnimation::Default(), GammaAnimation::Default(), InfraredAnimation::Determination(), BroookAnimation::Determined(), BroookAnimation::Dot(), ProtogenProject::EnableBlinking(), Warzone2Animation::Happy(), StrawberryAnimation::HappyCalm(), Warzone2Animation::HappyClosed(), StrawberryAnimation::HappyEyeOpen(), XenraxAnimation::Hearts(), SergaliciousAnimation::Idle(), InfraredAnimation::Mad(), BroookAnimation::Sad(), SergaliciousAnimation::Sad(), GammaAnimation::Sad(), MyntAnimation::Update(), and BroookAnimation::Upset().
Prints the current time of the animation track.
This function outputs the current time of the track for debugging purposes.
Resets the animation track to its initial state.
Referenced by ProtogenProject::DisableBlinking(), and ProtogenProject::EnableBlinking().
Restarts the animation track's time to the beginning.
Referenced by Menu::Update().
Updates the animation track and returns the current parameter value.
This function advances the animation track based on the elapsed time and computes the interpolated parameter value.
Referenced by Menu::Update(), AphoriAnimation::UpdateKeyFrameTracks(), ArtleckAnimationV2::UpdateKeyFrameTracks(), BasilGardenAnimation::UpdateKeyFrameTracks(), BroookAnimation::UpdateKeyFrameTracks(), ElGatoAnimation::UpdateKeyFrameTracks(), GalaxyAnimation::UpdateKeyFrameTracks(), HertzzAnimation::UpdateKeyFrameTracks(), InfraredAnimation::UpdateKeyFrameTracks(), LeonHuskyAnimation::UpdateKeyFrameTracks(), MyntAnimation::UpdateKeyFrameTracks(), ProtobottAnimation::UpdateKeyFrameTracks(), SammyAnimation::UpdateKeyFrameTracks(), SergaliciousAnimation::UpdateKeyFrameTracks(), StrawberryAnimation::UpdateKeyFrameTracks(), TamamoAnimation::UpdateKeyFrameTracks(), TechSaneAnimation::UpdateKeyFrameTracks(), VesperAnimation::UpdateKeyFrameTracks(), WarzoneAnimation::UpdateKeyFrameTracks(), Warzone2Animation::UpdateKeyFrameTracks(), XenraxAnimation::UpdateKeyFrameTracks(), GammaAnimation::UpdateKeyFrameTracks(), HUB75AnimationSplit::UpdateKeyFrameTracks(), WS35AnimationSplit::UpdateKeyFrameTracks(), and ProtogenProject::UpdateKeyFrameTracks().
|
protected |
Internal track object for keyframe management.
This KeyFrameTrack instance handles the underlying keyframe operations for the AnimationTrack class.
Definition at line 37 of file AnimationTrack.h.