Overte C++ Documentation
HysteresisFilter.h
1 //
2 // Created by Bradley Austin Davis 2015/10/25
3 // Copyright 2015 High Fidelity, Inc.
4 //
5 // Distributed under the Apache License, Version 2.0.
6 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
7 //
8 
9 #pragma once
10 #ifndef hifi_Controllers_Filters_Hysteresis_h
11 #define hifi_Controllers_Filters_Hysteresis_h
12 
13 #include "../Filter.h"
14 
15 namespace controller {
16 
17 class HysteresisFilter : public Filter {
18  REGISTER_FILTER_CLASS(HysteresisFilter);
19 public:
20  HysteresisFilter(float min = 0.25, float max = 0.75);
21  virtual AxisValue apply(AxisValue value) const override;
22 
23  virtual Pose apply(Pose value) const override { return value; }
24 
25  virtual bool parseParameters(const QJsonValue& parameters) override;
26 protected:
27  float _min;
28  float _max;
29  mutable bool _signaled { false };
30 };
31 
32 }
33 
34 #endif