17 # include "Graphics/factory_object.h"
18 # include "Graphics/i_collider.h"
19 # include "Graphics/i_sensor.h"
20 # include "GA/i_dna.h"
48 std::vector<ICollider *>
const&
getColliders(
void)
const;
53 std::vector<ISensor *>
const&
getSensors(
void)
const;
136 std::vector<ICollider *> _colls;
137 std::vector<ISensor *> _sensors;
138 std::map<std::string, int> _env_settings;
139 std::map<std::string, bool> _gen_settings;
140 std::map<std::string, int> _cur_settings;
void addCollider(ICollider *collider)
Add a new collider to the physics engine.
Definition: physics.cc:73
void LoadEnvironmentSettings(std::list< IObject * > &env)
Load the environment settings from the environment.
Definition: physics.cc:107
std::map< std::string, int > const & getEnvironmentSettings(void) const
Get the environment settings that are contained in a map.
Definition: physics.cc:55
std::map< std::string, bool > const & getGenerationSettings(void) const
Get the generation settings that are contained in a map.
Definition: physics.cc:65
void addGenerationSetting(std::string type, bool generate)
Add a new generator setting to the physics engine.
Definition: physics.cc:85
void GenerateEnvironment(std::list< IObject * > &env, std::list< GA::IDNA * > &brains)
Generate the environment in terms of the environment settings.
Definition: physics.cc:206
std::vector< ISensor * > const & getSensors(void) const
Get all the sensors that are managed by the physics engine.
Definition: physics.cc:50
Define the interface of a sensor.
Definition: i_sensor.h:25
void addSensor(ISensor *sensor)
Add a new sensor to the physics engine.
Definition: physics.cc:79
~Physics(void)
Destructor.
Definition: physics.cc:34
std::vector< ICollider * > const & getColliders(void) const
Get all the colliders that are managed by the physics engine.
Definition: physics.cc:45
void UpdateSensors(std::list< IObject * > &env) const
Update all the sensors in the physics engine.
Definition: physics.cc:194
Define a factory of objects that will fill the environment in term of the environment file...
Definition: factory_object.h:23
Contains all the class that define the graphic environment.
void GenerateTournament(std::list< IObject * > &env, std::list< GA::IDNA * > &brains)
Generate the environment in terms of the environment settings for the tournament. ...
Definition: physics.cc:239
Define the interface for the collider object.
Definition: i_collider.h:22
Physics(void)
Constructor.
Definition: physics.cc:30
std::map< std::string, int > const & getCurrentEnvironment(void) const
Get the current state of the environment settings that are contained in a map.
Definition: physics.cc:60
void UpdateColliders(std::list< IObject * > &env) const
Update all the colliders in the physics engine.
Definition: physics.cc:170
void UpdateEnvironment(std::list< IObject * > &env)
Update the environment.
Definition: physics.cc:130
Define the physics engine used by the environment.
Definition: physics.h:28