The Battle for Wesnoth  1.19.7+dev
Classes | Namespaces | Enumerations | Functions
pathfind.hpp File Reference

This module contains various pathfinding functions and utilities. More...

#include "map/location.hpp"
#include "movetype.hpp"
#include <vector>
#include <map>
#include <set>
Include dependency graph for pathfind.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pathfind::cost_calculator
 
struct  pathfind::paths
 Object which contains all the possible locations a unit can move to, with associated best routes to those locations. More...
 
struct  pathfind::paths::step
 
struct  pathfind::paths::dest_vect
 Ordered vector of possible destinations. More...
 
struct  pathfind::vision_path
 A refinement of paths for use when calculating vision. More...
 
struct  pathfind::jamming_path
 A refinement of paths for use when calculating jamming. More...
 
struct  pathfind::plain_route
 Structure which holds a single route between one location and another. More...
 
struct  pathfind::marked_route
 Structure which holds a single route and marks for special events. More...
 
struct  pathfind::marked_route::mark
 
struct  pathfind::shortest_path_calculator
 
struct  pathfind::move_type_path_calculator
 
struct  pathfind::emergency_path_calculator
 Function which only uses terrain, ignoring shroud, enemies, etc. More...
 
struct  pathfind::dummy_path_calculator
 Function which doesn't take anything into account. More...
 
struct  pathfind::full_cost_map
 Structure which uses find_routes() to build a cost map This maps each hex to a the movements a unit will need to reach this hex. More...
 

Namespaces

 pathfind
 

Enumerations

enum  pathfind::VACANT_TILE_TYPE { pathfind::VACANT_CASTLE , pathfind::VACANT_ANY }
 

Functions

map_location pathfind::find_vacant_tile (const map_location &loc, VACANT_TILE_TYPE vacancy, const unit *pass_check, const team *shroud_check, const game_board *board)
 Function that will find a location on the board that is as near to loc as possible, but which is unoccupied by any units. More...
 
map_location pathfind::find_vacant_castle (const unit &leader)
 Wrapper for find_vacant_tile() when looking for a vacant castle tile near a leader. More...
 
bool pathfind::enemy_zoc (const team &current_team, const map_location &loc, const team &viewing_team, bool see_all)
 Determines if a given location is in an enemy zone of control. More...
 
plain_route pathfind::a_star_search (const map_location &src, const map_location &dst, double stop_at, const cost_calculator &calc, const std::size_t width, const std::size_t height, const teleport_map *teleports, bool border)
 
marked_route pathfind::mark_route (const plain_route &rt, bool update_move_cost=false)
 Add marks on a route rt assuming that the unit located at the first hex of rt travels along it. More...
 

Detailed Description

This module contains various pathfinding functions and utilities.

Definition in file pathfind.hpp.