(C++)  1.0.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
UnitStepFunction.hh
1 #ifndef GRAIL_SINGLE_STEP_FUNCTION_H
2 #define GRAIL_SINGLE_STEP_FUNCTION_H
3 
4 #include "Curve.hh"
5 
6 
7 namespace grail
8 {
9  namespace curves
10  {
11  class UnitStepFunction final : public Curve
12  {
13  public:
14  UnitStepFunction(float initThreshold, float beforeThresholdValue, float afterThresholdValue);
15 
16  virtual float Sample(float argument) const override;
17 
18  float GetThreshold() const;
19  float GetBeforeThresholdValue() const;
20  float GetAfterThresholdValue() const;
21 
22  CurveTypeId GetTypeId() const override;
23 
24  private:
25  float threshold = 0.0f;
26  float beforeThresholdValue = 0.0f;
27  float afterThresholdValue = 0.0f;
28  };
29  }
30 }
31 
32 
33 #endif // GRAIL_SINGLE_STEP_FUNCTION_H
The Curve class - Defines objects transforming one value into the other.
Definition: Curve.hh:17
Definition: UnitStepFunction.hh:12
virtual float Sample(float argument) const override
Sample - User-defined method which processes provided value (currently vector of values - multidemens...
Definition: UnitStepFunction.cpp:15