ProtoTracer
1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
EffectChangeTrack.h
Go to the documentation of this file.
1
/**
2
* @file EffectChangeTrack.h
3
* @brief Declares the EffectChangeTrack template class for animating effect changes.
4
*
5
* This file defines the EffectChangeTrack class, which inherits from AnimationTrack
6
* and provides a predefined animation sequence for transitioning effects.
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 EffectChangeTrack
18
* @brief A template class for animating effect transitions using keyframes.
19
*
20
* The EffectChangeTrack class inherits from AnimationTrack and provides a specific
21
* keyframe animation sequence to simulate the transition of effects. This includes
22
* changes in intensity over time.
23
*
24
* @tparam parameters The number of parameters for the effect animation.
25
*/
26
template
<
size_t
parameters>
27
class
EffectChangeTrack
:
public
AnimationTrack
<parameters, 5> {
28
private
:
29
/**
30
* @brief Adds predefined keyframes for the effect animation.
31
*
32
* This function initializes the keyframes to create the effect transition,
33
* including the timing for intensity changes.
34
*/
35
void
AddKeyFrames
() {
36
this->
track
.AddKeyFrame(0.0f, 0.0f);
///< Effect off at time 0.0.
37
this->
track
.AddKeyFrame(0.5f, 1.0f);
///< Effect fully active at time 0.5.
38
this->
track
.AddKeyFrame(1.0f, 0.0f);
///< Effect turns off at time 1.0.
39
this->
track
.AddKeyFrame(1000000.0f, 0.0f);
///< Effect remains off indefinitely after time 1,000,000.0.
40
}
41
42
public
:
43
/**
44
* @brief Default constructor.
45
*
46
* Constructs an EffectChangeTrack object and initializes the effect animation keyframes.
47
*/
48
EffectChangeTrack
() {
49
AddKeyFrames
();
50
}
51
};
AnimationTrack.h
Declares the AnimationTrack template class for managing animation tracks with keyframes.
AnimationTrack
A template class for managing animation tracks with keyframes.
Definition
AnimationTrack.h:29
AnimationTrack< parameters, 5 >::track
KeyFrameTrack< maxParameters, maxKeyFrames > track
Internal track object for keyframe management.
Definition
AnimationTrack.h:37
EffectChangeTrack
A template class for animating effect transitions using keyframes.
Definition
EffectChangeTrack.h:27
EffectChangeTrack::AddKeyFrames
void AddKeyFrames()
Adds predefined keyframes for the effect animation.
Definition
EffectChangeTrack.h:35
EffectChangeTrack::EffectChangeTrack
EffectChangeTrack()
Default constructor.
Definition
EffectChangeTrack.h:48
lib
ProtoTracer
Animation
AnimationTracks
EffectChangeTrack.h
Generated by
1.9.8