ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
BlinkTrack< parameters > Class Template Reference

A template class for animating eye blinking using keyframes. More...

#include <BlinkTrack.h>

Inheritance diagram for BlinkTrack< parameters >:
Collaboration diagram for BlinkTrack< parameters >:

Public Member Functions

 BlinkTrack ()
 Default constructor.
 
- Public Member Functions inherited from AnimationTrack< parameters, 10 >
 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.
 

Private Member Functions

void AddKeyFrames ()
 Adds predefined keyframes for the blink animation.
 

Additional Inherited Members

- Protected Attributes inherited from AnimationTrack< parameters, 10 >
KeyFrameTrack< maxParameters, maxKeyFramestrack
 Internal track object for keyframe management.
 

Detailed Description

template<size_t parameters>
class BlinkTrack< parameters >

A template class for animating eye blinking using keyframes.

The BlinkTrack class inherits from AnimationTrack and provides a specific keyframe animation sequence to simulate eye blinking. The animation defines keyframes for opening and closing the eyes at precise time intervals.

Template Parameters
parametersThe number of parameters for the blink animation.

Definition at line 27 of file BlinkTrack.h.

Constructor & Destructor Documentation

◆ BlinkTrack()

template<size_t parameters>
BlinkTrack ( )
inline

Default constructor.

Constructs a BlinkTrack object and initializes the blink animation keyframes.

Definition at line 55 of file BlinkTrack.h.

References BlinkTrack< parameters >::AddKeyFrames().

Member Function Documentation

◆ AddKeyFrames()

template<size_t parameters>
void AddKeyFrames ( )
inlineprivatevirtual

Adds predefined keyframes for the blink animation.

This function initializes the keyframes to create the blinking effect, including the timing for opening and closing the eyes.

< Eyes fully open at time 0.0.

< Eyes remain open until time 2.75.

< Eyes start to close at time 3.0.

< Eyes fully open again at time 3.25.

< Eyes remain open until time 9.75.

< Eyes start to close at time 10.0.

< Eyes fully open again at time 10.25.

< Eyes remain open until time 10.75.

< Eyes start to close at time 11.0.

< Eyes fully open again at time 11.25.

< Eyes remain open until time 15.0.

Implements AnimationTrack< parameters, 10 >.

Definition at line 35 of file BlinkTrack.h.

References AnimationTrack< parameters, 10 >::track.

Referenced by BlinkTrack< parameters >::BlinkTrack().


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