ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
EyeMoveTrack.h
Go to the documentation of this file.
1/**
2 * @file EyeMoveTrack.h
3 * @brief Declares the EyeMoveTrack template class for animating eye movements.
4 *
5 * This file defines the EyeMoveTrack class, which inherits from AnimationTrack
6 * and provides a predefined animation sequence for simulating eye movements.
7 *
8 * @author Coela Can't
9 * @date 22/12/2024
10 */
11
12#pragma once
13
14#include "AnimationTrack.h" // Include for base AnimationTrack class.
15
16/**
17 * @class EyeMoveTrack
18 * @brief A template class for animating eye movements using keyframes.
19 *
20 * The EyeMoveTrack class inherits from AnimationTrack and provides a specific
21 * keyframe animation sequence to simulate smooth and controlled eye movements.
22 *
23 * @tparam parameters The number of parameters for the eye movement animation.
24 */
25template<size_t parameters>
26class EyeMoveTrack : public AnimationTrack<parameters, 10> {
27private:
28 /**
29 * @brief Adds predefined keyframes for the eye movement animation.
30 *
31 * This function initializes the keyframes to create the eye movement sequence,
32 * including timings for directional changes and pauses.
33 */
34 void AddKeyFrames() {
35 this->track.AddKeyFrame(0.0f, 0.0f); ///< Eyes at initial position at time 0.0.
36 this->track.AddKeyFrame(2.5f, 1.0f); ///< Eyes move to position 1.0 at time 2.5.
37 this->track.AddKeyFrame(5.0f, 0.0f); ///< Eyes return to initial position at time 5.0.
38 this->track.AddKeyFrame(25.0f, 0.0f); ///< Eyes remain stationary until time 25.0.
39 }
40
41public:
42 /**
43 * @brief Default constructor.
44 *
45 * Constructs an EyeMoveTrack object and initializes the eye movement animation keyframes.
46 */
49 }
50};
Declares the AnimationTrack template class for managing animation tracks with keyframes.
A template class for managing animation tracks with keyframes.
KeyFrameTrack< maxParameters, maxKeyFrames > track
Internal track object for keyframe management.
A template class for animating eye movements using keyframes.
void AddKeyFrames()
Adds predefined keyframes for the eye movement animation.
EyeMoveTrack()
Default constructor.