public class AStarClosedListReferencing<T extends AStarNodeBase<T>> extends java.lang.Object implements AStarClosedListBase<T>
Constructor and Description |
---|
AStarClosedListReferencing() |
Modifier and Type | Method and Description |
---|---|
void |
addNodeToClosedList(T node)
Marks a node as been visited and expanded, which means that his neighbour
nodes have been added to the open list.
|
void |
clearClosedList()
Removes all nodes from the closed list.
|
java.util.Collection<T> |
dumpClosedList() |
T |
findClosedNode(int x,
int y,
int z)
If this position has already been visited by the A* search, and its nodes
neighbours have been added to the open list, this method returns the node
associated with the given position.
|
void |
removeNodeFromClosedList(T node)
If contained in the list of visited and expanded nodes, the given node is
removed.
|
void |
setMap(AStarMapBase<T> map) |
public void setMap(AStarMapBase<T> map)
public void addNodeToClosedList(T node)
AStarClosedListBase
addNodeToClosedList
in interface AStarClosedListBase<T extends AStarNodeBase<T>>
node
- The node to add.public T findClosedNode(int x, int y, int z)
AStarClosedListBase
findClosedNode
in interface AStarClosedListBase<T extends AStarNodeBase<T>>
x
- X-position of the map to be checked.y
- Y-position of the map to be checked.z
- Z-position of the map to be checked.null
otherwise.public java.util.Collection<T> dumpClosedList()
public void removeNodeFromClosedList(T node)
AStarClosedListBase
removeNodeFromClosedList
in interface AStarClosedListBase<T extends AStarNodeBase<T>>
node
- The node to be removed.public void clearClosedList()
AStarClosedListBase
clearClosedList
in interface AStarClosedListBase<T extends AStarNodeBase<T>>