public class NodePathFinder extends java.lang.Object implements PathFinder
| Constructor and Description |
|---|
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) |
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