|
void | Notify (AObserver::States state) |
| Notify to the observers that something has changed. More...
|
|
void | Notify (AObserver::States state) |
|
std::list< AObserver * > | _obs |
|
Graphics::Environment2D::Environment2D |
( |
unsigned int |
width, |
|
|
unsigned int |
height |
|
) |
| |
Constructor.
- Parameters
-
width | : window's width |
height | : window's height. |
std::list< IObject * > const & Graphics::Environment2D::getObjects |
( |
void |
| ) |
const |
Get all the objects of the environment.
- Returns
- std::list<IObject *> const&
std::list< IObject * > & Graphics::Environment2D::getObjects |
( |
void |
| ) |
|
Get all the objects of the environment.
- Returns
- std::list<IObject *> &
Physics const & Graphics::Environment2D::getPhysics |
( |
void |
| ) |
const |
Physics & Graphics::Environment2D::getPhysics |
( |
void |
| ) |
|
sf::RenderWindow & Graphics::Environment2D::getWindow |
( |
void |
| ) |
|
Get the sf::RenderWindow member.
- Returns
- sf::RenderWindow &
void Graphics::Environment2D::LoadFromFile |
( |
const char * |
path | ) |
|
Load the environment from the environment file given in parameters of LoveBrains.
- Parameters
-
path | : Contains the path of the environment file. |
void Graphics::Environment2D::Run |
( |
std::list< GA::IDNA * > & |
brains | ) |
|
Run the simulation with the graphic environment.
- Parameters
-
brains | : Contains all the neural networks used by the AI objects. |
void Graphics::Environment2D::setDisplay |
( |
bool |
display | ) |
|
Set if the environment has to create a window.
- Parameters
-
display | : (true) if the environment has to create a window. |
void Graphics::Environment2D::setIsTournament |
( |
bool |
isTournament | ) |
|
Set if the current environment is a tournament or not.
- Parameters
-
isTournament | : Contains the boolean that says if it's a tournament. |
void Graphics::Environment2D::Update |
( |
sf::Time |
elapsed | ) |
|
Update all the objects contains in the environment.
- Parameters
-
elapsed | : Contains the elapsed time between the current update and the previous update. |
The documentation for this class was generated from the following files:
- /home/robin_f/Programming/Git/CPP/LoveBrains/include/Graphics/environment.h
- /home/robin_f/Programming/Git/CPP/LoveBrains/src/Graphics/environment.cc