Object which contains all the possible locations a unit can move to, with associated best routes to those locations. More...
#include <pathfind.hpp>


Classes | |
| struct | dest_vect |
| Ordered vector of possible destinations. More... | |
| struct | step |
Public Member Functions | |
| paths () | |
| paths (gamemap const &map, unit_map const &, const unit &u, std::vector< team > const &teams, bool force_ignore_zocs, bool allow_teleport, const team &viewing_team, int additional_turns=0, bool see_all=false, bool ignore_units=false) | |
| Construct a list of paths for the specified unit. | |
| virtual | ~paths () |
| Virtual destructor (default processing). | |
Public Attributes | |
| dest_vect | destinations |
Object which contains all the possible locations a unit can move to, with associated best routes to those locations.
Definition at line 73 of file pathfind.hpp.
| pathfind::paths::paths | ( | ) | [inline] |
Definition at line 75 of file pathfind.hpp.
| pathfind::paths::paths | ( | gamemap const & | map, | |
| unit_map const & | , | |||
| const unit & | u, | |||
| std::vector< team > const & | teams, | |||
| bool | force_ignore_zoc, | |||
| bool | allow_teleport, | |||
| const team & | viewing_team, | |||
| int | additional_turns = 0, |
|||
| bool | see_all = false, |
|||
| bool | ignore_units = false | |||
| ) |
Construct a list of paths for the specified unit.
This function is used for several purposes, including showing a unit's potential moves and generating currently possible paths.
| map | The gamemap to use (for identifying terrain). | |
| units | The unit_map to use (for identifying units). | |
| u | The unit whose moves and movement type will be used. | |
| teams | The teams of the game (for recognizing enemies). | |
| force_ignore_zoc | Set to true to completely ignore zones of control. | |
| allow_teleport | Set to true to consider teleportation abilities. | |
| viewing_team | Usually the current team, except for "show enemy moves", etc. | |
| additional_turns | The number of turns to account for, in addition to the current. | |
| see_all | Set to true to remove unit visibility from consideration. | |
| ignore_units | Set to true if units should never obstruct paths (implies ignoring ZoC as well). |
Definition at line 421 of file pathfind.cpp.
References destinations, find_routes(), unit::get_location(), unit::movement_left(), and unit::side().

| pathfind::paths::~paths | ( | ) | [virtual] |
Virtual destructor (default processing).
Virtual destructor to support child classes.
Definition at line 439 of file pathfind.cpp.
Definition at line 104 of file pathfind.hpp.
Referenced by events::mouse_handler::current_unit_attacks_from(), ai::testing_ai_default::move_leader_to_keep_phase::evaluate(), ai::testing_ai_default::move_leader_to_goals_phase::evaluate(), game_display::highlight_another_reach(), pathfind::jamming_path::jamming_path(), ai::readonly_context_impl::leader_can_reach_keep(), events::mouse_handler::left_click(), events::mouse_handler::mouse_motion(), paths(), events::mouse_handler::show_attack_options(), ai::readonly_context_impl::suitable_keep(), and pathfind::vision_path::vision_path().
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:24:41 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |