11 #ifndef ROBOTCONTROLLER_H_ 12 #define ROBOTCONTROLLER_H_ 56 bool createRobot(b2World* world,
int delay,
double posX,
double posY,
double angle = 0);
70 void drawRobots(sf::RenderWindow& window,
double m_to_px);
168 void robotOut(
double end_x,
int id);
227 void step(
double end_x);
248 std::vector<Robot*> m_robotVector;
249 std::vector<int> m_robotToDestroy;
252 int m_idLastRobot = 0;
253 int m_nbRobInBridge = 0;
254 double m_stableTime = 0;
255 bool m_isStable =
false;
256 bool m_isDissolved =
false;
257 double m_dissolutionTime = 0;
264 double m_angle_min= PI/8;
266 b2Body* m_terrainBody=
nullptr;
bool robotStacking(Robot *r, float posX)
void robotOut(double end_x, int id)
void findContactRobots(b2Contact *contact)
double getDissolutionTime()
Implement the Robot class and define enum linked to a robot object: e_state and side.
int getNbRobots(e_state s)
Robot * getRobotWithId(int id)
void setBridgeStability(bool stable)
bool checkGrabbed(Robot &robot)
void setNbRobots(int nb_robots)
void drawRobots(sf::RenderWindow &window, double m_to_px)
Robot * getRobot(int pos_id)
void addRobot(Robot *robot)
bool createRobot(b2World *world, int delay, double posX, double posY, double angle=0)
void wait_delay(Robot &robot)
void setRobotState(Robot &robot, e_state robotState)
void destroyJoints(Robot &robot, side s)
void invertMovingWheel(Robot &robot)
void setScale(double m_to_px)
double getStabilizationTime()
bool robotPushing(Robot &r)
void createGripRobots(Robot &robot)