DDraceNetwork Documentation
Loading...
Searching...
No Matches
CSmoothValue Class Reference

#include <smooth_value.h>

Inheritance diagram for CSmoothValue:
[legend]
Collaboration diagram for CSmoothValue:
[legend]

Public Member Functions

 CSmoothValue (float InitialValue, float MinValue, float MaxValue)
void SetValue (float Target)
void ChangeValue (float Amount)
void SetValueInstant (float Target)
bool UpdateValue ()
float GetValue () const
void SetValueRange (float MinValue, float MaxValue)
float GetMinValue () const
float GetMaxValue () const
Public Member Functions inherited from CEditorComponent
void OnInit (CEditor *pEditor) override
virtual void OnReset ()
virtual void OnMapLoad ()
virtual bool OnInput (const IInput::CEvent &Event)
virtual void OnUpdate ()
virtual void OnRender (CUIRect View)
void InitSubComponents ()
void RegisterSubComponent (CEditorComponent &Component)
Public Member Functions inherited from CEditorObject
virtual ~CEditorObject ()=default
CEditorEditor ()
const CEditorEditor () const
IInputInput ()
const IInputInput () const
IClientClient ()
const IClientClient () const
CConfigConfig ()
const CConfigConfig () const
IEngineEngine ()
const IEngineEngine () const
IGraphicsGraphics ()
const IGraphicsGraphics () const
ISoundSound ()
const ISoundSound () const
ITextRenderTextRender ()
const ITextRenderTextRender () const
IStorageStorage ()
const IStorageStorage () const
CUiUi ()
const CUiUi () const
CRenderMapRenderMap ()
const CRenderMapRenderMap () const

Private Member Functions

float ZoomProgress (float CurrentTime) const

Private Attributes

bool m_Smoothing
float m_Value
CCubicBezier m_ValueSmoothing
float m_ValueSmoothingTarget
float m_ValueSmoothingStart
float m_ValueSmoothingEnd
float m_MinValue
float m_MaxValue

Detailed Description

A value that is changed smoothly over time.

Constructor & Destructor Documentation

◆ CSmoothValue()

CSmoothValue::CSmoothValue ( float InitialValue,
float MinValue,
float MaxValue )

Member Function Documentation

◆ ChangeValue()

void CSmoothValue::ChangeValue ( float Amount)

Change the value by the given amount.

◆ GetMaxValue()

float CSmoothValue::GetMaxValue ( ) const

◆ GetMinValue()

float CSmoothValue::GetMinValue ( ) const

◆ GetValue()

float CSmoothValue::GetValue ( ) const

◆ SetValue()

void CSmoothValue::SetValue ( float Target)

Set a new target which the value should change to.

◆ SetValueInstant()

void CSmoothValue::SetValueInstant ( float Target)

Set the value to the target instantly. If the value was changing the target will be discarded.

◆ SetValueRange()

void CSmoothValue::SetValueRange ( float MinValue,
float MaxValue )

◆ UpdateValue()

bool CSmoothValue::UpdateValue ( )

◆ ZoomProgress()

float CSmoothValue::ZoomProgress ( float CurrentTime) const
private

Member Data Documentation

◆ m_MaxValue

float CSmoothValue::m_MaxValue
private

◆ m_MinValue

float CSmoothValue::m_MinValue
private

◆ m_Smoothing

bool CSmoothValue::m_Smoothing
private

◆ m_Value

float CSmoothValue::m_Value
private

◆ m_ValueSmoothing

CCubicBezier CSmoothValue::m_ValueSmoothing
private

◆ m_ValueSmoothingEnd

float CSmoothValue::m_ValueSmoothingEnd
private

◆ m_ValueSmoothingStart

float CSmoothValue::m_ValueSmoothingStart
private

◆ m_ValueSmoothingTarget

float CSmoothValue::m_ValueSmoothingTarget
private

The documentation for this class was generated from the following files: