public interface ChokePoint
Modifier and Type | Interface and Description |
---|---|
static class |
ChokePoint.Node
ChokePoint::middle denotes the "middle" MiniTile of Geometry(), while ChokePoint::END_1 and
ChokePoint::END_2 denote its "ends".
|
Modifier and Type | Method and Description |
---|---|
boolean |
accessibleFrom(ChokePoint chokePoint)
Returns whether this ChokePoint is accessible from cp (through a walkable path).
- Note: the relation is symmetric: this->accessibleFrom(cp) == cp->accessibleFrom(this) - Note: if this == cp, returns true. - Time complexity: O(1) |
int |
distanceFrom(ChokePoint chokePoint)
If accessibleFrom(cp) == false, returns -1.
|
Pair<Area,Area> |
getAreas()
Returns the two areas of this ChokePoint.
|
Neutral |
getBlockingNeutral()
If !isPseudo(), returns nullptr.
|
WalkPosition |
getCenter()
Returns the center of this ChokePoint.
|
java.util.List<WalkPosition> |
getGeometry()
Returns the set of positions that defines the shape of this ChokePoint.
- Note: none of these miniTiles actually belongs to this ChokePoint (a ChokePoint doesn't contain any MiniTile). |
WalkPosition |
getNodePosition(ChokePoint.Node node)
Returns the position of one of the 3 nodes of this ChokePoint (Cf.
|
WalkPosition |
getNodePositionInArea(ChokePoint.Node node,
Area area)
Pretty much the same as pos(n), except that the returned MiniTile position is guaranteed to be
part of pArea.
|
CPPath |
getPathTo(ChokePoint cp)
Returns a list of getChokePoints, which is intended to be the shortest walking path from this
ChokePoint to cp.
|
boolean |
isBlocked()
If !isPseudo(), returns false.
|
boolean |
isPseudo()
Tells whether this ChokePoint is a pseudo ChokePoint, i.e., it was created on top of a blocking
Neutral.
|
boolean isPseudo()
WalkPosition getCenter()
WalkPosition getNodePosition(ChokePoint.Node node)
WalkPosition getNodePositionInArea(ChokePoint.Node node, Area area)
java.util.List<WalkPosition> getGeometry()
boolean isBlocked()
Neutral getBlockingNeutral()
int distanceFrom(ChokePoint chokePoint)
boolean accessibleFrom(ChokePoint chokePoint)
CPPath getPathTo(ChokePoint cp)