ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
MouthTrack.h
Go to the documentation of this file.
1/**
2 * @file MouthTrack.h
3 * @brief Declares the MouthTrack template class for animating mouth movements.
4 *
5 * This file defines the MouthTrack class, which inherits from AnimationTrack
6 * and provides a predefined animation sequence for simulating mouth 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 MouthTrack
18 * @brief A template class for animating mouth movements using keyframes.
19 *
20 * The MouthTrack class inherits from AnimationTrack and provides a specific
21 * keyframe animation sequence to simulate the opening and closing of a mouth.
22 *
23 * @tparam parameters The number of parameters for the mouth movement animation.
24 */
25template<size_t parameters>
26class MouthTrack : public AnimationTrack<parameters, 5> {
27private:
28 /**
29 * @brief Adds predefined keyframes for the mouth movement animation.
30 *
31 * This function initializes the keyframes to create the mouth movement sequence,
32 * including timings for opening and closing.
33 */
34 void AddKeyFrames() {
35 this->track.AddKeyFrame(0.0f, 0.0f); ///< Mouth closed at time 0.0.
36 this->track.AddKeyFrame(1.5f, 1.0f); ///< Mouth fully open at time 1.5.
37 this->track.AddKeyFrame(4.0f, 0.0f); ///< Mouth closed again at time 4.0.
38 }
39
40public:
41 /**
42 * @brief Default constructor.
43 *
44 * Constructs a MouthTrack object and initializes the mouth movement animation keyframes.
45 */
48 }
49};
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 mouth movements using keyframes.
Definition MouthTrack.h:26
MouthTrack()
Default constructor.
Definition MouthTrack.h:46
void AddKeyFrames()
Adds predefined keyframes for the mouth movement animation.
Definition MouthTrack.h:34