double Map::handleObstacles(Robot& robot, const vector<Point>& obstacles) { double robotX = robot.getX(); double robotY = robot.getY(); Point initalPoint(robotX, robotY); double matchPercent = handleObstacles(initalPoint, obstacles); return matchPercent; }
double Map::update(double x, double y, double yaw, const Laser& laser) { // Handle new Obstacles vector<Point> obstacles; laser.getObstacles(x, y, yaw, obstacles); Point initalPoint(x, y); double matchPercent = handleObstacles(initalPoint, obstacles); return matchPercent; }
void displace() { if(angry > 0) angry -= 0.0001; flapWing(); flapWingPred(); handlePaths(); handleObstacles(); predatorPolygonCollision(); handleFlockingPhysics(); eggManagement(); handlePredatoryBehavior(); rotateToLeader(); glutPostRedisplay(); }