public class NodePathFinder extends java.lang.Object implements PathFinder
| Modifier and Type | Field and Description |
|---|---|
private SearchAlgorithm |
alg |
private java.util.ArrayList<WaypointListener> |
listeners |
private NavigationMesh |
mesh |
| Modifier | Constructor and Description |
|---|---|
private |
NodePathFinder(SearchAlgorithm alg)
Instantiates a NodePathFinder object using a specified algorithm.
|
|
NodePathFinder(SearchAlgorithm alg,
NavigationMesh mesh)
Instantiates a NodePathFinder object using a specified algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(WaypointListener wpl) |
Path |
findRoute(Pose start,
Waypoint goal) |
void |
setNavMesh(NavigationMesh mesh)
Method for changing the navigation mesh after this has been instantiated.
|
void |
setSearchAlgorithm(SearchAlgorithm alg)
Method for changing the search algorithm after this has been instantiated.
|
void |
startPathFinding(Pose start,
Waypoint end) |
private java.util.ArrayList<WaypointListener> listeners
private SearchAlgorithm alg
private NavigationMesh mesh
private NodePathFinder(SearchAlgorithm alg)
alg - public NodePathFinder(SearchAlgorithm alg, NavigationMesh mesh)
alg - The search algorithm.mesh - The navigation mesh is a set of nodes in various configurations (e.g. grid).public void setNavMesh(NavigationMesh mesh)
mesh - public void setSearchAlgorithm(SearchAlgorithm alg)
alg - public void addListener(WaypointListener wpl)
addListener in interface PathFinderpublic Path findRoute(Pose start, Waypoint goal) throws DestinationUnreachableException
findRoute in interface PathFinderDestinationUnreachableExceptionpublic void startPathFinding(Pose start, Waypoint end)
startPathFinding in interface PathFinder