Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
Controller Class Reference

regulate IIR gain for rapid but smooth tracking of a function. More...

Public Member Functions

 Controller (double initialValue)
 
int ComputeBias (double smoothedValue, double value)
 

Private Member Functions

bool WasOnSameSide (double value) const
 
bool WasSpike () const
 

Static Private Member Functions

static double Change (double from, double to)
 

Private Attributes

double m_history [m_historySize]
 
int m_timesOnSameSide
 

Static Private Attributes

static const size_t m_historySize = 3
 

Detailed Description

regulate IIR gain for rapid but smooth tracking of a function.

this is similar in principle to a PID controller but is tuned for the special case of FPS values to simplify stabilizing the filter.

Constructor & Destructor Documentation

◆ Controller()

Controller::Controller ( double  initialValue)
inline

Member Function Documentation

◆ Change()

static double Controller::Change ( double  from,
double  to 
)
inlinestaticprivate

◆ ComputeBias()

int Controller::ComputeBias ( double  smoothedValue,
double  value 
)
inline

◆ WasOnSameSide()

bool Controller::WasOnSameSide ( double  value) const
inlineprivate

◆ WasSpike()

bool Controller::WasSpike ( ) const
inlineprivate

Member Data Documentation

◆ m_history

double Controller::m_history[m_historySize]
private

◆ m_historySize

const size_t Controller::m_historySize = 3
staticprivate

◆ m_timesOnSameSide

int Controller::m_timesOnSameSide
private

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