public class PathElement
extends java.lang.Object
Constructor and Description |
---|
PathElement(EntityID areaID,
Line2D edgeLine,
Point2D goalPoint,
Point2D... wayPoints)
Construct a PathElement.
|
Modifier and Type | Method and Description |
---|---|
EntityID |
getAreaID() |
Line2D |
getEdgeLine()
Get the target edge line, if any.
|
Point2D |
getGoal()
Get the goal point.
|
java.util.List<Point2D> |
getWaypoints()
Get the list of waypoints in preferred order.
|
void |
removeWaypoint(Point2D p)
Remove a waypoint.
|
java.lang.String |
toString() |
public PathElement(EntityID areaID, Line2D edgeLine, Point2D goalPoint, Point2D... wayPoints)
areaID
- The ID of the area this element refers to.edgeLine
- The line of the edge we're heading for (if any).goalPoint
- The goal of the path element.wayPoints
- Zero or more intermediate points that can be used if there is no line-of-sight to the goal.public java.lang.String toString()
toString
in class java.lang.Object
public Point2D getGoal()
public Line2D getEdgeLine()
public java.util.List<Point2D> getWaypoints()
public void removeWaypoint(Point2D p)
p
- The waypoint to remove.public EntityID getAreaID()