6#ifndef BASEPROJECT_BASESCENARIO_HPP
7#define BASEPROJECT_BASESCENARIO_HPP
10#include "../cells/PrimoCell.hpp"
11#include "../core/CellBody.hpp"
12#include "../tools/TimeConvert.hpp"
13#include "../tools/RandomManager.hpp"
PrimoCell< CellBody > Cell
general purpose 3D vector/point class.
Where "everything" happens.
void setUpdateBehaviorPeriod(size_t p)
sets the period at which the world must call the updateBehavior method of each cell....
size_t getNbUpdates() const
get the number of update since the creation of the world
void setDt(double d)
sets the amount by which time is increased at each update() call.
void addNewCells()
effectively adds the new cells that were registered by addCell triggers addCell hooks if there is som...
void update()
main update method
void addCell(Cell *c)
adds a cell to the new cells batch (which will be added to the main cells container at the end of the...
void initScenario(Scenario *s)
void loadModel(nlohmann::json config)
Represents a cell in the simulation.
void init()
Initializes the cell.
void setType(Type t)
Sets the type of the cell and modifies parameters accordingly.
Manages the simulation scenario.
Cell * createCell()
Creates a cell.
World & getWorld()
Gets the world of the scenario.
void init(nlohmann::json config)
Initializes the scenario with a configuration.
Cell * createCell(MecaCell::Vec pos, Type t)
Creates a cell at a specific position and type, adds it to the world, and initializes it.
double getDt() const
Gets the time step of the world.
Cell * createCell(Type t)
Creates a cell of a specific type, adds it to the world, and initializes it.
void loop()
Runs the main loop of the scenario.
void setUpdateBehaviorPeriod(int n)
Sets the update behavior period of the world.
void addCell(Cell *c)
Adds a cell to the world.
void setDt(double dt)
Sets the time step of the world.
Cell * createCell(MecaCell::Vec pos)
Creates a cell at a specific position, adds it to the world, and initializes it.
bool stop()
Checks if the scenario should stop.
a class to store JSON values
Vector3D Vec
alias for Vector3D