|
CellModules
|
Class for managing grid-based diffusion. More...
#include <PluginDiffusion.hpp>
Public Member Functions | |
| PluginDiffusion () | |
| Default constructor. More... | |
| PluginDiffusion (int w, int h) | |
| Constructor with grid dimensions. More... | |
| PluginDiffusion (int size) | |
| Constructor with grid size. More... | |
| DiffusionGrid * | getDiffusionGrid () |
| Gets the diffusion grid. More... | |
| void | addMolecule (int id, Molecule m) |
| Adds a molecule to the grid. More... | |
| void | initDiffusionGrid (int size) |
| Initializes the square diffusion grid. More... | |
| void | initDiffusionGrid (int w, int h) |
| Initializes the diffusion grid with dimensions. More... | |
| void | setToreX (bool b) |
| Sets the toroidal property on the x-axis. More... | |
| void | setToreY (bool b) |
| Sets the toroidal property on the y-axis. More... | |
| void | setTore (bool x, bool y) |
| Sets the toroidal properties on both axes. More... | |
| template<typename world_t > | |
| void | preBehaviorUpdate (world_t *w) |
| Pre-behavior update hook for MecaCell. More... | |
Private Attributes | |
| DiffusionGrid | grid |
Class for managing grid-based diffusion.
| cell_t | Type of the cell. |
Definition at line 27 of file PluginDiffusion.hpp.
|
inline |
Default constructor.
Definition at line 37 of file PluginDiffusion.hpp.
|
inline |
Constructor with grid dimensions.
| w | Width of the grid. |
| h | Height of the grid. |
Definition at line 45 of file PluginDiffusion.hpp.
|
inline |
Constructor with grid size.
| size | Size of the square grid. |
Definition at line 54 of file PluginDiffusion.hpp.
|
inline |
Adds a molecule to the grid.
| id | id of the molecule. if you use Enum, you can cast it to int. |
| m | Molecule to be added. |
Definition at line 71 of file PluginDiffusion.hpp.
|
inline |
Gets the diffusion grid.
Definition at line 63 of file PluginDiffusion.hpp.
|
inline |
Initializes the square diffusion grid.
| size | Size of the grid. |
Definition at line 78 of file PluginDiffusion.hpp.
|
inline |
Initializes the diffusion grid with dimensions.
| w | Width of the grid. |
| h | Height of the grid. |
Definition at line 86 of file PluginDiffusion.hpp.
|
inline |
Pre-behavior update hook for MecaCell.
Computes and updates the molecule quantity for each cell.
| world_t | Type of the world. |
| w | Pointer to the world. |
Definition at line 119 of file PluginDiffusion.hpp.
|
inline |
Sets the toroidal properties on both axes.
| x | Boolean value for the x-axis. |
| y | Boolean value for the y-axis. |
Definition at line 108 of file PluginDiffusion.hpp.
|
inline |
Sets the toroidal property on the x-axis.
| b | Boolean value for the toroidal property. |
Definition at line 93 of file PluginDiffusion.hpp.
|
inline |
Sets the toroidal property on the y-axis.
| b | Boolean value for the toroidal property. |
Definition at line 100 of file PluginDiffusion.hpp.
|
private |
Molecule grid
Definition at line 30 of file PluginDiffusion.hpp.