Various pathfinding functions and utilities. More...
#include "global.hpp"#include "pathutils.hpp"#include "map.hpp"
Go to the source code of this file.
Functions | |
| void | get_tile_ring (const map_location &a, const int r, std::vector< map_location > &res) |
| Function which, given a location, will place all locations in a ring of distance r in res. | |
| void | get_tiles_in_radius (const map_location &a, const int r, std::vector< map_location > &res) |
| Function which, given a location, will place all locations in the radius of r in res res must be a std::vector of location. | |
| static void | get_tiles_radius_internal (const map_location &a, size_t radius, std::set< map_location > &res, std::map< map_location, int > &visited) |
| void | get_tiles_radius (const map_location &a, size_t radius, std::set< map_location > &res) |
| Function which, given a location, will find all tiles within 'radius' of that tile. | |
| void | get_tiles_radius (gamemap const &map, std::vector< map_location > const &locs, size_t radius, std::set< map_location > &res, bool with_border, xy_pred *pred) |
| Function which, given a set of locations, will find all tiles within 'radius' of those tiles. | |
Various pathfinding functions and utilities.
Definition in file pathutils.cpp.
| void get_tile_ring | ( | const map_location & | a, | |
| const int | r, | |||
| std::vector< map_location > & | res | |||
| ) |
Function which, given a location, will place all locations in a ring of distance r in res.
res must be a std::vector of location
Definition at line 27 of file pathutils.cpp.
References map_location::get_direction(), and map_location::SOUTH_WEST.
Referenced by get_tiles_in_radius().


| void get_tiles_in_radius | ( | const map_location & | a, | |
| const int | r, | |||
| std::vector< map_location > & | res | |||
| ) |
Function which, given a location, will place all locations in the radius of r in res res must be a std::vector of location.
Definition at line 44 of file pathutils.cpp.
References get_tile_ring().
Referenced by editor::brush::brush().


| void get_tiles_radius | ( | const map_location & | a, | |
| size_t | radius, | |||
| std::set< map_location > & | res | |||
| ) |
Function which, given a location, will find all tiles within 'radius' of that tile.
Definition at line 70 of file pathutils.cpp.
References get_tiles_radius_internal().
Referenced by terrain_filter::get_locations(), terrain_filter::match(), and place_village().


| void get_tiles_radius | ( | gamemap const & | map, | |
| std::vector< map_location > const & | locs, | |||
| size_t | radius, | |||
| std::set< map_location > & | res, | |||
| bool | with_border, | |||
| xy_pred * | pred | |||
| ) |
Function which, given a set of locations, will find all tiles within 'radius' of those tiles.
Definition at line 77 of file pathutils.cpp.
References get_adjacent_tiles(), gamemap::on_board(), and gamemap::on_board_with_border().

| static void get_tiles_radius_internal | ( | const map_location & | a, | |
| size_t | radius, | |||
| std::set< map_location > & | res, | |||
| std::map< map_location, int > & | visited | |||
| ) | [static] |
Definition at line 51 of file pathutils.cpp.
References get_adjacent_tiles().
Referenced by get_tiles_radius().


| Generated by doxygen 1.7.1 on Fri May 25 2012 01:08:38 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |