Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
CSmoothedValue Class Reference

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

Public Member Functions

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

Public Attributes

float m_Smoothness
 

Private Attributes

double m_Target
 
double m_Current
 
float m_MinDelta
 

Detailed Description

A value with exponential decay towards the target value.

Definition at line 71 of file GameView.cpp.

Constructor & Destructor Documentation

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

Definition at line 74 of file GameView.cpp.

Member Function Documentation

void CSmoothedValue::Add ( float  value)
inline

Definition at line 94 of file GameView.cpp.

void CSmoothedValue::AddSmoothly ( float  value)
inline

Definition at line 89 of file GameView.cpp.

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

Definition at line 124 of file GameView.cpp.

float CSmoothedValue::GetSmoothedValue ( )
inline

Definition at line 79 of file GameView.cpp.

float CSmoothedValue::GetValue ( )
inline

Definition at line 100 of file GameView.cpp.

void CSmoothedValue::SetValue ( float  value)
inline

Definition at line 105 of file GameView.cpp.

void CSmoothedValue::SetValueSmoothly ( float  value)
inline

Definition at line 84 of file GameView.cpp.

float CSmoothedValue::Update ( float  time)
inline

Definition at line 111 of file GameView.cpp.

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

Definition at line 130 of file GameView.cpp.

Member Data Documentation

double CSmoothedValue::m_Current
private

Definition at line 143 of file GameView.cpp.

float CSmoothedValue::m_MinDelta
private

Definition at line 146 of file GameView.cpp.

float CSmoothedValue::m_Smoothness

Definition at line 148 of file GameView.cpp.

double CSmoothedValue::m_Target
private

Definition at line 142 of file GameView.cpp.


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