DDNet documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
smooth_value.h
Go to the documentation of this file.
1
#ifndef GAME_EDITOR_SMOOTH_VALUE_H
2
#define GAME_EDITOR_SMOOTH_VALUE_H
3
4
#include "
editor_object.h
"
5
6
#include <
base/bezier.h
>
7
11
class
CSmoothValue
:
public
CEditorObject
12
{
13
public
:
14
CSmoothValue
() =
default
;
15
CSmoothValue
(
float
InitialValue,
float
MinValue,
float
MaxValue);
16
20
void
SetValue
(
float
Target);
21
25
void
ScaleValue
(
float
Factor);
26
31
void
SetValueInstant
(
float
Target);
32
33
bool
UpdateValue
();
34
35
float
GetValue
()
const
;
36
void
SetValueRange
(
float
MinValue,
float
MaxValue);
37
float
GetMinValue
()
const
;
38
float
GetMaxValue
()
const
;
39
40
private
:
41
float
Progress
(
float
CurrentTime)
const
;
42
43
bool
m_Smoothing
;
44
float
m_Value
;
45
CCubicBezier
m_ValueSmoothing
;
46
float
m_ValueSmoothingTarget
;
47
float
m_ValueSmoothingStart
;
48
float
m_ValueSmoothingEnd
;
49
50
float
m_MinValue
;
51
float
m_MaxValue
;
52
};
53
54
#endif
bezier.h
CCubicBezier
Definition
bezier.h:10
CEditorObject
Definition
editor_object.h:19
CSmoothValue::CSmoothValue
CSmoothValue()=default
CSmoothValue::SetValue
void SetValue(float Target)
Definition
smooth_value.cpp:9
CSmoothValue::UpdateValue
bool UpdateValue()
Definition
smooth_value.cpp:40
CSmoothValue::m_ValueSmoothingEnd
float m_ValueSmoothingEnd
Definition
smooth_value.h:48
CSmoothValue::m_MaxValue
float m_MaxValue
Definition
smooth_value.h:51
CSmoothValue::SetValueRange
void SetValueRange(float MinValue, float MaxValue)
Definition
smooth_value.cpp:84
CSmoothValue::m_MinValue
float m_MinValue
Definition
smooth_value.h:50
CSmoothValue::m_Value
float m_Value
Definition
smooth_value.h:44
CSmoothValue::m_ValueSmoothingTarget
float m_ValueSmoothingTarget
Definition
smooth_value.h:46
CSmoothValue::ScaleValue
void ScaleValue(float Factor)
Definition
smooth_value.cpp:34
CSmoothValue::GetValue
float GetValue() const
Definition
smooth_value.cpp:73
CSmoothValue::SetValueInstant
void SetValueInstant(float Target)
Definition
smooth_value.cpp:78
CSmoothValue::Progress
float Progress(float CurrentTime) const
Definition
smooth_value.cpp:68
CSmoothValue::GetMinValue
float GetMinValue() const
Definition
smooth_value.cpp:90
CSmoothValue::m_ValueSmoothing
CCubicBezier m_ValueSmoothing
Definition
smooth_value.h:45
CSmoothValue::m_ValueSmoothingStart
float m_ValueSmoothingStart
Definition
smooth_value.h:47
CSmoothValue::m_Smoothing
bool m_Smoothing
Definition
smooth_value.h:43
CSmoothValue::GetMaxValue
float GetMaxValue() const
Definition
smooth_value.cpp:95
editor_object.h
src
game
editor
smooth_value.h
Generated by
1.18.0