|
Grail (C++)
1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
3 #ifndef GRAIL_CONSTANT_FUNCTION_H
4 #define GRAIL_CONSTANT_FUNCTION_H
12 template <
typename ContextType>
26 :
Curve<ContextType>{childEvaluator}, constant{constant}
30 virtual float Sample(
float)
const override final
40 virtual data::EvaluatorType GetEvaluatorType() const override final {
return data::EvaluatorType::CURVE_CONSTANT; }
43 float constant = 0.0f;
47 #endif // GRAIL_CONSTANT_FUNCTION_H
virtual float Sample(float) const override final
Sample - Transforms argument into output value depending on the type of Curve.
Definition: ConstantFunction.hh:30
The ConstantFunction class - Constant function.
Definition: ConstantFunction.hh:17
ConstantFunction(std::shared_ptr< Evaluator< ContextType >> childEvaluator, float constant)
ConstantFunction - Constructor.
Definition: ConstantFunction.hh:25
The Evaluator class - base class being able to evaluate given context and output the result.
Definition: Evaluator.hh:25
float GetConstant() const
GetConstant.
Definition: ConstantFunction.hh:39
The Curve class - Defines objects transforming one value into the other.
Definition: Curve.hh:21