Filter.h
Go to the documentation of this file.
00001 
00002 
00003 #ifndef _TRACKING_SMOOTH_FILTER_
00004 #define _TRACKING_SMOOTH_FILTER_
00005 
00006  
00007 namespace Tracking{
00008 
00009 class SmoothFilter
00010 {
00011 public:
00012     SmoothFilter(){ a = 0.0f; b = 1.f - a; z = 0; };
00013     SmoothFilter(float a){ this->a = a; b = 1.f - a; z = 0; };
00014     inline void reset(float a) { this->a = a; b = 1.f - a; z = 0; };
00015     inline float Process(float in) { z = (in * b) + (z * a); return z; }
00016         inline void Set(const float &z) { this->z = z; }
00017         inline void Set(const float &z, float delay) { this->z = z; a = delay; b = 1.f - delay; }
00018         inline void SetDelay(float d) { a = d; b = 1.f- d; }
00019 private:
00020     float a, b, z;
00021 };
00022 
00023 
00024 } 
00025  
00026 #endif


blort
Author(s): Thomas Mörwald , Michael Zillich , Andreas Richtsfeld , Johann Prankl , Markus Vincze , Bence Magyar
autogenerated on Wed Aug 26 2015 15:24:12