Interface for grid path finder algorithms.
More...
#include <IPathFinderStrategy.h>
Interface for grid path finder algorithms.
Definition at line 39 of file IPathFinderStrategy.h.
◆ ~IPathFinderStrategy()
virtual ime::IPathFinderStrategy::~IPathFinderStrategy |
( |
| ) |
|
|
virtualdefault |
◆ backtrack()
std::stack< Index > ime::IPathFinderStrategy::backtrack |
( |
const std::vector< Node > & |
exploredNodes, |
|
|
const Index & |
target |
|
) |
| |
|
protected |
Generate path from the source to the target.
- Parameters
-
exploredNodes | Nodes explored after algorithm termination |
target | The index of the target tile in the grid |
- Returns
- The path from the source to the target tile if found, otherwise an empty path
◆ findPath()
virtual std::stack< Index > ime::IPathFinderStrategy::findPath |
( |
const Grid2D & |
grid, |
|
|
const Index & |
sourceNode, |
|
|
const Index & |
source |
|
) |
| |
|
pure virtual |
Find a path from a source tile to a target tile in a grid.
- Parameters
-
grid | Grid to find path in |
sourceNode | The starting tile |
source | The destination tile |
- Returns
- The path from the source to the destination if the destination is reachable from the source, otherwise an empty path
Implemented in ime::BFS, and ime::DFS.
◆ getType()
virtual std::string ime::IPathFinderStrategy::getType |
( |
| ) |
const |
|
pure virtual |
Get the type of path finding algorithm.
- Returns
- The type of the path finding algorithm
Implemented in ime::BFS, and ime::DFS.
The documentation for this class was generated from the following file: