ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
AnimationTrack< maxParameters, maxKeyFrames > Class Template Referenceabstract

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, maxKeyFramestrack
 Internal track object for keyframe management.
 

Private Member Functions

virtual void AddKeyFrames ()=0
 Pure virtual function to add keyframes to the track.
 

Detailed Description

template<size_t maxParameters, size_t maxKeyFrames>
class AnimationTrack< maxParameters, maxKeyFrames >

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.

Template Parameters
maxParametersThe maximum number of parameters this animation track can handle.
maxKeyFramesThe maximum number of keyframes this animation track can contain.

Definition at line 29 of file AnimationTrack.h.

Constructor & Destructor Documentation

◆ AnimationTrack() [1/2]

template<size_t maxParameters, size_t maxKeyFrames>
AnimationTrack ( )

Default constructor.

Constructs an AnimationTrack object with default settings.

◆ AnimationTrack() [2/2]

template<size_t maxParameters, size_t maxKeyFrames>
AnimationTrack ( float  min,
float  max,
KeyFrameInterpolation::InterpolationMethod  interpMethod 
)

Parameterized constructor.

Initializes an AnimationTrack object with the given range and interpolation method.

Parameters
minThe minimum value of the parameter range.
maxThe maximum value of the parameter range.
interpMethodThe interpolation method to be used for the track.

Member Function Documentation

◆ AddKeyFrames()

template<size_t maxParameters, size_t maxKeyFrames>
virtual void AddKeyFrames ( )
privatepure virtual

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 >.

◆ AddParameter()

◆ GetParameterValue()

template<size_t maxParameters, size_t maxKeyFrames>
float GetParameterValue ( )

Retrieves the current parameter value of the animation track.

Returns
The current value of the parameter being animated.

◆ Pause()

template<size_t maxParameters, size_t maxKeyFrames>
void Pause ( )

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().

◆ Play()

◆ PrintTime()

template<size_t maxParameters, size_t maxKeyFrames>
void PrintTime ( )

Prints the current time of the animation track.

This function outputs the current time of the track for debugging purposes.

◆ Reset()

template<size_t maxParameters, size_t maxKeyFrames>
void Reset ( )

Resets the animation track to its initial state.

Referenced by ProtogenProject::DisableBlinking(), and ProtogenProject::EnableBlinking().

◆ RestartTime()

template<size_t maxParameters, size_t maxKeyFrames>
void RestartTime ( )

Restarts the animation track's time to the beginning.

Referenced by Menu::Update().

◆ Update()

Member Data Documentation

◆ track

template<size_t maxParameters, size_t maxKeyFrames>
KeyFrameTrack<maxParameters, maxKeyFrames> track
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.


The documentation for this class was generated from the following file: