public class ChokePointImpl extends java.lang.Object implements ChokePoint
ChokePoint.Node| Constructor and Description |
|---|
ChokePointImpl(Graph graph,
Index index,
Area area1,
Area area2,
java.util.List<WalkPosition> geometry) |
ChokePointImpl(Graph graph,
Index index,
Area area1,
Area area2,
java.util.List<WalkPosition> geometry,
Neutral blockingNeutral) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accessibleFrom(ChokePoint chokePoint)
Returns whether this ChokePoint is accessible from cp (through a walkable path).
|
int |
distanceFrom(ChokePoint chokePoint)
If accessibleFrom(cp) == false, returns -1.
|
boolean |
equals(java.lang.Object object) |
Pair<Area,Area> |
getAreas()
Returns the two areas of this ChokePoint.
|
Neutral |
getBlockingNeutral()
If !
|
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.
|
Index |
getIndex() |
WalkPosition |
getNodePosition(ChokePoint.Node node)
Returns the position of one of the 3 nodes of this ChokePoint (Cf. node definition).
|
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.
|
ChokePoint |
getPathBackTrace() |
CPPath |
getPathTo(ChokePoint cp)
Returns a list of getChokePoints, which is intended to be the shortest walking path from this
ChokePoint to cp.
|
int |
hashCode() |
boolean |
isBlocked()
If !
|
boolean |
isPseudo()
Tells whether this ChokePoint is a pseudo ChokePoint, i.e., it was created on top of a blocking
Neutral.
|
void |
onBlockingNeutralDestroyed(Neutral pBlocking) |
void |
setPathBackTrace(ChokePoint pathBackTrace) |
public ChokePointImpl(Graph graph, Index index, Area area1, Area area2, java.util.List<WalkPosition> geometry, Neutral blockingNeutral)
public ChokePointImpl(Graph graph, Index index, Area area1, Area area2, java.util.List<WalkPosition> geometry)
public boolean isPseudo()
ChokePointisPseudo in interface ChokePointpublic Pair<Area,Area> getAreas()
ChokePointgetAreas in interface ChokePointpublic WalkPosition getCenter()
ChokePointgetCenter in interface ChokePointpublic WalkPosition getNodePosition(ChokePoint.Node node)
ChokePointgetNodePosition in interface ChokePointpublic WalkPosition getNodePositionInArea(ChokePoint.Node node, Area area)
ChokePointgetNodePositionInArea in interface ChokePointpublic java.util.List<WalkPosition> getGeometry()
ChokePointgetGeometry in interface ChokePointpublic boolean isBlocked()
ChokePointisBlocked in interface ChokePointpublic Neutral getBlockingNeutral()
ChokePointgetBlockingNeutral in interface ChokePointpublic int distanceFrom(ChokePoint chokePoint)
ChokePointdistanceFrom in interface ChokePointpublic boolean accessibleFrom(ChokePoint chokePoint)
ChokePointaccessibleFrom in interface ChokePointpublic CPPath getPathTo(ChokePoint cp)
ChokePointgetPathTo in interface ChokePointpublic void onBlockingNeutralDestroyed(Neutral pBlocking)
public Index getIndex()
public ChokePoint getPathBackTrace()
public void setPathBackTrace(ChokePoint pathBackTrace)
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object