public class AStarRegionNode extends AStarNodeBase<AStarRegionNode>
Modifier and Type | Field and Description |
---|---|
protected int |
hCap |
int |
height |
FieldMap<AStarNode> |
routingMap
is used for checking blockages and giving the router a clean map to route
on.
|
protected int |
vCap |
java.util.HashSet<AStarNode> |
vPortals |
int |
width |
costFromStart, costToGoal, origin, pq_i, state, totalCost, x, y, z
Constructor and Description |
---|
AStarRegionNode() |
AStarRegionNode(FieldMap<AStarNode> map,
int width,
int height)
This class expects that (0,0) is in the upper left corner of the map.
The capacity is calculated from x = 0 to x = width -1 and y = 0
to y = height -1. |
AStarRegionNode(FieldMap<AStarNode> map,
int width,
int height,
int x,
int y,
int z) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AStarRegionNode o) |
AStarNode |
getEntryPoint() |
AStarNode |
getExitPoint() |
int |
getHorizontalCapacity()
Returns the number of wires that can successfully be routed through this
section of the cell horizontally.
|
FieldMap<AStarNode> |
getMap(boolean vertical) |
int |
getVerticalCapacity()
Returns the number of wires that can successfully be routed through this
section of the cell vertically.
|
protected boolean |
isPortal(int x,
int y,
boolean vertical) |
boolean |
isPortalWithPath(int x,
int y,
boolean calcVertical) |
boolean |
isTerminalRegion() |
boolean |
isTileBlocked(int x,
int y) |
void |
print() |
void |
removePathForNode(int x,
int y)
removes a path from the path list.
|
void |
setAsGoalRegion(boolean isGoalRegion) |
void |
setAsStartRegion(boolean isStartRegion) |
void |
setEntryPoint(AStarNode node) |
void |
setExitPoint(AStarNode node) |
void |
setPortal(int x,
int y,
boolean vertical) |
equals, getCostFromStart, getCostToGoal, getTotalCost, getX, getY, getZ, initialize, isClosed, isOpen, markAsClosed, markAsNoList, markAsOpen, toString
public FieldMap<AStarNode> routingMap
protected int hCap
protected int vCap
public java.util.HashSet<AStarNode> vPortals
public int height
public int width
public AStarRegionNode()
public AStarRegionNode(FieldMap<AStarNode> map, int width, int height)
width
-1 and y = 0
to y = height
-1. hPaths
and vPaths
) contain lists of
AStarNodes
connected by their origin
-pointermap
- The sub-map of the cell this AStarRegionNode represents a layer
from.height
- width
- public void setAsStartRegion(boolean isStartRegion)
public void setAsGoalRegion(boolean isGoalRegion)
public boolean isTerminalRegion()
public int getHorizontalCapacity()
public int getVerticalCapacity()
protected boolean isPortal(int x, int y, boolean vertical)
public void setPortal(int x, int y, boolean vertical)
public boolean isPortalWithPath(int x, int y, boolean calcVertical)
public void removePathForNode(int x, int y)
x
- y
- public int compareTo(AStarRegionNode o)
public boolean isTileBlocked(int x, int y)
public AStarNode getEntryPoint()
public void setEntryPoint(AStarNode node)
public AStarNode getExitPoint()
public void setExitPoint(AStarNode node)
public void print()