|
CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
|
#include <th_pathfind.h>
Public Member Functions | |
| int | value () const |
| Total cost of this node. | |
Public Attributes | |
| const path_node * | prev |
| Pointer to the previous node in the path to this cell. | |
| int | x |
| X-position of this cell (constant) | |
| int | y |
| Y-position of this cell (constant) | |
| int | distance |
| Current shortest distance to this cell. | |
| int | guess |
| Minimum distance from this cell to the goal. | |
| size_t | open_idx |
| Index of this cell in the open heap. | |
| bool | visited |
| True if the cell has already been visited (popped from the open heap) | |
Node in the path finder routines.
|
inline |
Total cost of this node.
| int path_node::distance |
Current shortest distance to this cell.
Defined as prev->distance + 1 (or 0 if prev == nullptr). Value is undefined if not part of a path.
| int path_node::guess |
Minimum distance from this cell to the goal.
Value is only dependent upon the cell position and the goal position, and is undefined if not part of a path.
| size_t path_node::open_idx |
Index of this cell in the open heap.
If the cell is not in the open heap, then this value is undefined.
Pointer to the previous node in the path to this cell.
Points to nullptr if this is the first cell in the path, or points to itself if it is not part of a path.
| bool path_node::visited |
True if the cell has already been visited (popped from the open heap)
| int path_node::x |
X-position of this cell (constant)
| int path_node::y |
Y-position of this cell (constant)