ProtoTracer
1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
KeyFrame.h
Go to the documentation of this file.
1
/**
2
* @file KeyFrame.h
3
* @brief Declares the KeyFrame class for representing individual animation keyframes.
4
*
5
* This file defines the KeyFrame class, which encapsulates the properties of a single
6
* keyframe in an animation, including its time and value.
7
*
8
* @author Coela Can't
9
* @date 22/12/2024
10
*/
11
12
#pragma once
13
14
/**
15
* @class KeyFrame
16
* @brief Represents a single keyframe in an animation.
17
*
18
* The KeyFrame class stores the time and value for a specific point in an animation.
19
* It provides methods for initialization and updating keyframe data.
20
*/
21
class
KeyFrame
{
22
public
:
23
float
Time
= 0.0f;
///< The time of the keyframe.
24
float
Value
= 0.0f;
///< The value of the keyframe.
25
26
/**
27
* @brief Default constructor.
28
*
29
* Constructs a KeyFrame object with default time and value (0.0f).
30
*/
31
KeyFrame
();
32
33
/**
34
* @brief Parameterized constructor.
35
*
36
* Constructs a KeyFrame object with specified time and value.
37
*
38
* @param time The time of the keyframe.
39
* @param value The value of the keyframe.
40
*/
41
KeyFrame
(
float
time,
float
value);
42
43
/**
44
* @brief Sets the time and value of the keyframe.
45
*
46
* Updates the properties of the keyframe to the specified time and value.
47
*
48
* @param time The new time of the keyframe.
49
* @param value The new value of the keyframe.
50
*/
51
void
Set
(
float
time,
float
value);
52
};
KeyFrame::Set
void Set(float time, float value)
Sets the time and value of the keyframe.
Definition
KeyFrame.cpp:10
KeyFrame::Value
float Value
The value of the keyframe.
Definition
KeyFrame.h:24
KeyFrame::Time
float Time
The time of the keyframe.
Definition
KeyFrame.h:23
KeyFrame::KeyFrame
KeyFrame()
Default constructor.
Definition
KeyFrame.cpp:3
lib
ProtoTracer
Animation
KeyFrame.h
Generated by
1.15.0