Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CSmoothedValue Class Reference

A value with exponential decay towards the target value. More...

#include <SmoothedValue.h>

Public Member Functions

 CSmoothedValue (float value, float smoothness, float minDelta)
 
float GetSmoothedValue () const
 
void SetValueSmoothly (float value)
 
void AddSmoothly (float value)
 
void Add (float value)
 
float GetValue () const
 
void SetValue (float value)
 
float GetSmoothness () const
 
void SetSmoothness (float smoothness)
 
void ClampSmoothly (float min, float max)
 
float Update (float time)
 
void Wrap (float min, float max)
 

Private Attributes

float m_Smoothness
 
double m_Target
 
double m_Current
 
float m_MinDelta
 

Detailed Description

A value with exponential decay towards the target value.

Constructor & Destructor Documentation

◆ CSmoothedValue()

CSmoothedValue::CSmoothedValue ( float  value,
float  smoothness,
float  minDelta 
)

Member Function Documentation

◆ Add()

void CSmoothedValue::Add ( float  value)
inline

◆ AddSmoothly()

void CSmoothedValue::AddSmoothly ( float  value)
inline

◆ ClampSmoothly()

void CSmoothedValue::ClampSmoothly ( float  min,
float  max 
)
inline

◆ GetSmoothedValue()

float CSmoothedValue::GetSmoothedValue ( ) const
inline

◆ GetSmoothness()

float CSmoothedValue::GetSmoothness ( ) const
inline

◆ GetValue()

float CSmoothedValue::GetValue ( ) const
inline

◆ SetSmoothness()

void CSmoothedValue::SetSmoothness ( float  smoothness)
inline

◆ SetValue()

void CSmoothedValue::SetValue ( float  value)
inline

◆ SetValueSmoothly()

void CSmoothedValue::SetValueSmoothly ( float  value)
inline

◆ Update()

float CSmoothedValue::Update ( float  time)

◆ Wrap()

void CSmoothedValue::Wrap ( float  min,
float  max 
)

Member Data Documentation

◆ m_Current

double CSmoothedValue::m_Current
private

◆ m_MinDelta

float CSmoothedValue::m_MinDelta
private

◆ m_Smoothness

float CSmoothedValue::m_Smoothness
private

◆ m_Target

double CSmoothedValue::m_Target
private

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