DDraceNetwork Docs
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 <base/bezier.h>
5
6#include "component.h"
7
12{
13public:
14 CSmoothValue(float InitialValue, float MinValue, float MaxValue);
15
19 void SetValue(float Target);
20
24 void ChangeValue(float Amount);
25
30 void SetValueInstant(float Target);
31
32 bool UpdateValue();
33
34 float GetValue() const;
35 void SetValueRange(float MinValue, float MaxValue);
36 float GetMinValue() const;
37 float GetMaxValue() const;
38
39private:
40 float ZoomProgress(float CurrentTime) const;
41
43 float m_Value;
48
51};
52
53#endif
Definition: bezier.h:10
Definition: component.h:9
Definition: smooth_value.h:12
void SetValue(float Target)
Definition: smooth_value.cpp:9
bool UpdateValue()
Definition: smooth_value.cpp:37
float m_ValueSmoothingEnd
Definition: smooth_value.h:47
float m_MaxValue
Definition: smooth_value.h:50
void SetValueRange(float MinValue, float MaxValue)
Definition: smooth_value.cpp:81
float m_MinValue
Definition: smooth_value.h:49
float m_Value
Definition: smooth_value.h:43
void ChangeValue(float Amount)
Definition: smooth_value.cpp:31
float m_ValueSmoothingTarget
Definition: smooth_value.h:45
float GetValue() const
Definition: smooth_value.cpp:70
void SetValueInstant(float Target)
Definition: smooth_value.cpp:75
float GetMinValue() const
Definition: smooth_value.cpp:87
float ZoomProgress(float CurrentTime) const
Definition: smooth_value.cpp:65
CCubicBezier m_ValueSmoothing
Definition: smooth_value.h:44
float m_ValueSmoothingStart
Definition: smooth_value.h:46
CSmoothValue(float InitialValue, float MinValue, float MaxValue)
Definition: smooth_value.cpp:6
bool m_Smoothing
Definition: smooth_value.h:42
float GetMaxValue() const
Definition: smooth_value.cpp:92