|
Army ant simulation
|
Implementation of the Demo class and the MyContactListener_v2 class. More...
#include "Box2D/Box2D.h"#include "SFML/Graphics.hpp"#include "SFML/Window.hpp"#include <iostream>#include "Robot.h"#include "RobotController.h"#include "Vterrain.h"#include "V2BLTerrain.h"#include "Ramp.h"#include "VStepper.h"#include <fstream>#include "Config.h"#include <random>#include "BoxTerrain.h"

Go to the source code of this file.
Classes | |
| class | MyContactListener_v2 |
| class | Demo |
Implementation of the Demo class and the MyContactListener_v2 class.
The Demo class gather all the elements of the simulation: the terrain, the robot controller and the robots and implement more abstract simulation methods. Those methods handle the robot interaction with the terrain and between themselves ie the group behavior. This is why the robots are only created via the robot controller. The demo class also synchronized the physics and simulation step.
The MyContactListener_v2 class is used to create a listener on the contact between the physics elements (robots and terrain).
Definition in file Demo.h.
1.8.14