Пример #1
0
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;
}
Пример #2
0
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;
}
Пример #3
0
void displace() {
	if(angry > 0)
		angry -= 0.0001;
	flapWing();
	flapWingPred();
	handlePaths();
	handleObstacles();
	predatorPolygonCollision();
	handleFlockingPhysics();
	eggManagement();
	handlePredatoryBehavior();
	rotateToLeader();
	glutPostRedisplay();
}