CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
Loading...
Searching...
No Matches
Public Member Functions | List of all members
hospital_finder Class Reference

#include <th_pathfind.h>

Inheritance diagram for hospital_finder:
abstract_pathfinder

Public Member Functions

 hospital_finder (pathfinder *pf)
 
int guess_distance (path_node *pNode) override
 Guess distance to the destination for pNode.
 
bool try_node (path_node *pNode, map_tile_flags flags, path_node *pNeighbour, travel_direction direction) override
 Try the pNeighbour node.
 
bool find_path_to_hospital (const level_map *pMap, int iStartX, int iStartY)
 
- Public Member Functions inherited from abstract_pathfinder
 abstract_pathfinder (pathfinder *pf)
 
virtual ~abstract_pathfinder ()=default
 
path_nodeinit (const level_map *pMap, int iStartX, int iStarty)
 Initialize the path finder.
 
bool search_neighbours (path_node *pNode, map_tile_flags flags, int iWidth)
 Expand the pNode to its neighbours.
 
void record_neighbour_if_passable (path_node *pNode, map_tile_flags neighbour_flags, bool passable, path_node *pNeighbour)
 

Additional Inherited Members

- Protected Attributes inherited from abstract_pathfinder
pathfinderparent
 Path finder parent object, containing shared data.
 
const level_mapmap
 Map being searched.
 

Constructor & Destructor Documentation

◆ hospital_finder()

hospital_finder::hospital_finder ( pathfinder pf)
inlineexplicit

Member Function Documentation

◆ find_path_to_hospital()

bool hospital_finder::find_path_to_hospital ( const level_map pMap,
int  iStartX,
int  iStartY 
)

◆ guess_distance()

int hospital_finder::guess_distance ( path_node pNode)
overridevirtual

Guess distance to the destination for pNode.

Parameters
pNodeNode to fill.

Implements abstract_pathfinder.

◆ try_node()

bool hospital_finder::try_node ( path_node pNode,
map_tile_flags  flags,
path_node pNeighbour,
travel_direction  direction 
)
overridevirtual

Try the pNeighbour node.

Parameters
pNodeSource node.
flagsFlags of the node.
pNeighbourNeighbour of pNode to try.
directionDirection of travel.
Returns
Whether the search is done.

Implements abstract_pathfinder.


The documentation for this class was generated from the following files: