A class that wraps a callable entity taking three floats and returning a float.
More...
#include <functions.hpp>
|
| | Function () |
| | Default constructor. Initializes the delegate function to a default that returns 0.
|
| |
| virtual | ~Function ()=default |
| | Virtual destructor to ensure proper cleanup in derived classes.
|
| |
| | Function (HMAP_FCT_XY_TYPE delegate) |
| | Constructor to initialize with a specific delegate function.
|
| |
| HMAP_FCT_XY_TYPE | get_delegate () const |
| | Get the current delegate function.
|
| |
| float | get_value (float x, float y, float ctrl_param) const |
| | Call the delegate function with given arguments.
|
| |
| void | set_delegate (HMAP_FCT_XY_TYPE new_delegate) |
| | Set a new delegate function.
|
| |
A class that wraps a callable entity taking three floats and returning a float.
◆ Function() [1/2]
| hmap::Function::Function |
( |
| ) |
|
|
inline |
Default constructor. Initializes the delegate function to a default that returns 0.
◆ ~Function()
| virtual hmap::Function::~Function |
( |
| ) |
|
|
virtualdefault |
Virtual destructor to ensure proper cleanup in derived classes.
◆ Function() [2/2]
| hmap::Function::Function |
( |
HMAP_FCT_XY_TYPE |
delegate | ) |
|
|
inlineexplicit |
Constructor to initialize with a specific delegate function.
- Parameters
-
| delegate | The delegate function to initialize with. |
◆ get_delegate()
| HMAP_FCT_XY_TYPE hmap::Function::get_delegate |
( |
| ) |
const |
Get the current delegate function.
- Returns
- The current delegate function.
◆ get_value()
| float hmap::Function::get_value |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
ctrl_param |
|
) |
| const |
Call the delegate function with given arguments.
- Parameters
-
| x | The first float parameter. |
| y | The second float parameter. |
| ctrl_param | The third float parameter. |
- Returns
- The result of the delegate function call.
◆ set_delegate()
| void hmap::Function::set_delegate |
( |
HMAP_FCT_XY_TYPE |
new_delegate | ) |
|
Set a new delegate function.
- Parameters
-
| new_delegate | The new delegate function to set. |
The documentation for this class was generated from the following files: