16 #include "Box2D/Box2D.h" 17 #include "SFML/Graphics.hpp" 18 #include "SFML/Window.hpp" 31 #include "BoxTerrain.h" 41 void BeginContact(b2Contact* contact){
45 void EndContact(b2Contact* contact) {
149 sf::RenderWindow window;
157 double m_elapsedTime = 0;
158 double m_elapsedTimeDissolution = 0;
159 double m_elapsedTimeBridge = 0;
163 int m_nbRobotsInBridge = 0;
164 int m_nbRobotsInBridgeState = 0;
166 bool m_stacking =
false;
167 bool m_stableBridge =
false;
176 std::ofstream m_logFile;
177 std::ofstream m_bridgeFile;
183 std::random_device m_rd;
187 double m_std_dev=0.25;
189 std::normal_distribution<double> m_gauss_delay;
192 b2World* m_world =
nullptr;
RobotController getController()
void findContactRobots(b2Contact *contact)
Implement the Robot class and define enum linked to a robot object: e_state and side.
sf::RenderWindow * getWindow()
Implementation of the Ramp class which inherit from the Terrain class.
Implementation of the Configuration class used to parse the configuration file and the sConfig struct...
bool addRobotWithDistance()
Implementation of the Vterrain class which inherit from the Terrain class.
Implementation of the V2BLTerrain class which inherit from the Terrain class.
Implement the RobotController class. This class act as a supervisor for the Robots.
Demo(b2World *m_world, config::sConfig cfg)
void takeScreenshot(bool draw, int step)
double getNewPathLength()