AGX Dynamics  2.37.2.0
SmoothingFilter.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 #ifndef AGXUTIL_SMOOTHINGFILTER_H
17 #define AGXUTIL_SMOOTHINGFILTER_H
18 
19 #include <agx/agxPhysics_export.h>
20 #include <agx/Math.h>
21 #include <agx/Referenced.h>
22 
23 namespace agxUtil
24 {
26  {
27  public:
29 
36  virtual agx::Real update( agx::Real observation, agx::Real s ) const = 0;
37 
38  protected:
39  virtual ~SmoothingFilter() {}
40  };
41 
43 
50  {
51  public:
56  VariableSmoothingFactorFilter( agx::Real maximumSmoothingFactor )
57  : m_maxSmoothingFactor( maximumSmoothingFactor ) {}
58 
66  virtual agx::Real update( agx::Real observation, agx::Real s ) const;
67 
72  {
73  return m_maxSmoothingFactor;
74  }
75 
80  void setMaximumSmoothingFactor( agx::Real maxSmoothingFactor )
81  {
82  m_maxSmoothingFactor = maxSmoothingFactor;
83  }
84 
85  protected:
87 
88  protected:
90  };
91 
93 
94 }
95 #endif
#define AGXPHYSICS_EXPORT
void setMaximumSmoothingFactor(agx::Real maxSmoothingFactor)
Set the maximum smoothing factor for this filter.
Base class providing referencing counted objects.
Definition: Referenced.h:119
Variable Smooth Factor Exponential Moving Average filter.
agx::ref_ptr< VariableSmoothingFactorFilter > VariableSmoothingFactorFilterRef
double Real
Definition: Real.h:42
VariableSmoothingFactorFilter(agx::Real maximumSmoothingFactor)
Construct given maximum smoothing factor.
agx::ref_ptr< SmoothingFilter > SmoothingFilterRef
The agxUtil namespace contain classes and methods for utility functionality.