public class Obstacles extends Object
Modifier and Type | Field and Description |
---|---|
static double |
BYPASS_DISTANCE
Distance by which agent calculates how far from obstacle
should he go, when he wants to pass it by.
|
static double |
HALF_FIELD_LENGTH
Half field length.
|
static double |
HALF_FIELD_WIDTH
Half field width.
|
static double |
ROBOT_RADIUS
Radius where it is possible the robot can touch something by its body.
|
Constructor and Description |
---|
Obstacles() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkInField(Vector3D position)
Checks if specified position is in the area of field.
|
static Vector3D |
checkIntersection(Vector3D start,
Vector3D end,
LinkedList<Vector3D> obstacles,
boolean flag)
Checks the intersection with robots way and obstacles in
the way.
|
static Vector3D |
findLeftBypassPoint(double phi,
Vector3D obstacle)
Finds the way to the left from obstacle by which agent can
pass obstacle by.
|
static Vector3D |
findRightBypassPoint(double phi,
Vector3D obstacle)
Finds the way to the right from obstacle by which agent can
pass obstacle by.
|
static LinkedList<Vector3D> |
getRealObstacles()
Returns list of all seen players as obstacles.
|
public static final double HALF_FIELD_LENGTH
public static final double HALF_FIELD_WIDTH
public static final double ROBOT_RADIUS
public static final double BYPASS_DISTANCE
public static Vector3D checkIntersection(Vector3D start, Vector3D end, LinkedList<Vector3D> obstacles, boolean flag)
start
- end
- obstacles
- flag
- public static boolean checkInField(Vector3D position)
position
- public static Vector3D findLeftBypassPoint(double phi, Vector3D obstacle)
phi
- obstacle
- public static Vector3D findRightBypassPoint(double phi, Vector3D obstacle)
phi
- obstacle
- public static LinkedList<Vector3D> getRealObstacles()