LoveBrains
1.0.0
|
Define the physics engine used by the environment. More...
#include <physics.h>
Public Member Functions | |
Physics (void) | |
Constructor. | |
~Physics (void) | |
Destructor. | |
std::vector< ICollider * > const & | getColliders (void) const |
Get all the colliders that are managed by the physics engine. More... | |
std::vector< ISensor * > const & | getSensors (void) const |
Get all the sensors that are managed by the physics engine. More... | |
std::map< std::string, int > const & | getEnvironmentSettings (void) const |
Get the environment settings that are contained in a map. More... | |
std::map< std::string, int > const & | getCurrentEnvironment (void) const |
Get the current state of the environment settings that are contained in a map. More... | |
std::map< std::string, bool > const & | getGenerationSettings (void) const |
Get the generation settings that are contained in a map. More... | |
void | addCollider (ICollider *collider) |
Add a new collider to the physics engine. More... | |
void | addSensor (ISensor *sensor) |
Add a new sensor to the physics engine. More... | |
void | addGenerationSetting (std::string type, bool generate) |
Add a new generator setting to the physics engine. More... | |
void | LoadEnvironmentSettings (std::list< IObject * > &env) |
Load the environment settings from the environment. More... | |
void | UpdateEnvironment (std::list< IObject * > &env) |
Update the environment. More... | |
void | UpdateColliders (std::list< IObject * > &env) const |
Update all the colliders in the physics engine. More... | |
void | UpdateSensors (std::list< IObject * > &env) const |
Update all the sensors in the physics engine. More... | |
void | GenerateEnvironment (std::list< IObject * > &env, std::list< GA::IDNA * > &brains) |
Generate the environment in terms of the environment settings. More... | |
void | GenerateTournament (std::list< IObject * > &env, std::list< GA::IDNA * > &brains) |
Generate the environment in terms of the environment settings for the tournament. More... | |
Physics & | operator= (Physics const &physics) |
Define the physics engine used by the environment.
void Graphics::Physics::addCollider | ( | ICollider * | collider | ) |
Add a new collider to the physics engine.
collider | : Contains the new ICollider. |
void Graphics::Physics::addGenerationSetting | ( | std::string | type, |
bool | generate | ||
) |
Add a new generator setting to the physics engine.
type | : Contains the key of the setting. |
generate | : true if it's generated on each death, or false. |
void Graphics::Physics::addSensor | ( | ISensor * | sensor | ) |
Add a new sensor to the physics engine.
sensor | : Contains the new ISensor. |
void Graphics::Physics::GenerateEnvironment | ( | std::list< IObject * > & | env, |
std::list< GA::IDNA * > & | brains | ||
) |
Generate the environment in terms of the environment settings.
env | : Contains all the objects in the environment. |
brains | : Contains all the neural networks. |
void Graphics::Physics::GenerateTournament | ( | std::list< IObject * > & | env, |
std::list< GA::IDNA * > & | brains | ||
) |
Generate the environment in terms of the environment settings for the tournament.
env | : Contains all the objects in the environment. |
brains | : Contains all the neural networks. |
std::vector< ICollider * > const & Graphics::Physics::getColliders | ( | void | ) | const |
Get all the colliders that are managed by the physics engine.
std::map< std::string, int > const & Graphics::Physics::getCurrentEnvironment | ( | void | ) | const |
Get the current state of the environment settings that are contained in a map.
std::map< std::string, int > const & Graphics::Physics::getEnvironmentSettings | ( | void | ) | const |
Get the environment settings that are contained in a map.
std::map< std::string, bool > const & Graphics::Physics::getGenerationSettings | ( | void | ) | const |
Get the generation settings that are contained in a map.
std::vector< ISensor * > const & Graphics::Physics::getSensors | ( | void | ) | const |
Get all the sensors that are managed by the physics engine.
void Graphics::Physics::LoadEnvironmentSettings | ( | std::list< IObject * > & | env | ) |
Load the environment settings from the environment.
env | : Contains all the objects in the environment. |
void Graphics::Physics::UpdateColliders | ( | std::list< IObject * > & | env | ) | const |
Update all the colliders in the physics engine.
env | : Contains all the objects in the environment. |
void Graphics::Physics::UpdateEnvironment | ( | std::list< IObject * > & | env | ) |
Update the environment.
env | : Contains all the objects in the environment. |
void Graphics::Physics::UpdateSensors | ( | std::list< IObject * > & | env | ) | const |
Update all the sensors in the physics engine.
env | : Contains all the objects in the environment. |