diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-13 16:20:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-13 16:20:25 +0200 |
commit | 463737c1b50246c56a67c35c1116732006348593 (patch) | |
tree | 2bb7d1721f24a06ef1b0fcc264326ff0db9057cf /ftnoir_filter_ewma2 | |
parent | 04c1f89044a6abc7f922cc8981e74872d63a1bff (diff) |
Don't expose filter internal state. Sprinkle some const
Diffstat (limited to 'ftnoir_filter_ewma2')
-rw-r--r-- | ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp | 5 | ||||
-rw-r--r-- | ftnoir_filter_ewma2/ftnoir_filter_ewma2.h | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp index 43cfd102..11af77f7 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp @@ -79,10 +79,9 @@ void FTNoIR_Filter::loadSettings() { iniFile.endGroup ();
}
-void FTNoIR_Filter::FilterHeadPoseData(double *current_camera_position,
- double *target_camera_position,
+void FTNoIR_Filter::FilterHeadPoseData(const double *target_camera_position,
double *new_camera_position,
- double *last_post_filter)
+ const double *last_post_filter)
{
double delta;
double new_alpha;
diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h index 18fec8d4..e3a264be 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h @@ -44,10 +44,9 @@ public: ~FTNoIR_Filter();
void Initialize() {}
- void FilterHeadPoseData(double *current_camera_position,
- double *target_camera_position,
+ void FilterHeadPoseData(const double *target_camera_position,
double *new_camera_position,
- double *last_post_filter);
+ const double *last_post_filter);
void receiveSettings(double smin, double smax, double sexpt);
private:
@@ -61,7 +60,7 @@ private: double kMinSmoothing;
double kMaxSmoothing;
double kSmoothingScaleCurve;
-
+ double current_camera_position[6];
QMutex mutex;
};
|