The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Public Attributes | List of all members
pathfind::paths Struct Reference

Object which contains all the possible locations a unit can move to, with associated best routes to those locations. More...

#include <pathfind.hpp>

Inheritance diagram for pathfind::paths:
Inheritance graph

Classes

struct  dest_vect
 Ordered vector of possible destinations. More...
 
struct  step
 

Public Member Functions

 paths ()
 
 paths (const unit &u, 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. More...
 
virtual ~paths ()
 Virtual destructor (default processing). More...
 

Public Attributes

dest_vect destinations
 

Detailed Description

Object which contains all the possible locations a unit can move to, with associated best routes to those locations.

Definition at line 71 of file pathfind.hpp.

Constructor & Destructor Documentation

pathfind::paths::paths ( )
inline

Definition at line 73 of file pathfind.hpp.

pathfind::paths::paths ( const unit u,
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.

Parameters
uThe unit whose moves and movement type will be used.
force_ignore_zocSet to true to completely ignore zones of control.
allow_teleportSet to true to consider teleportation abilities.
viewing_teamUsually the current team, except for "show enemy moves", etc.
additional_turnsThe number of turns to account for, in addition to the current.
see_allSet to true to remove unit visibility from consideration.
ignore_unitsSet to true if units should never obstruct paths (implies ignoring ZoC as well).

Definition at line 528 of file pathfind.cpp.

References destinations, pathfind::find_routes(), unit::get_location(), movetype::get_movement(), unit::get_state(), int(), unit::movement_left(), unit::movement_type(), unit::side(), unit::STATE_SLOWED, resources::teams, teams, and unit::total_movement().

pathfind::paths::~paths ( )
virtual

Virtual destructor (default processing).

Virtual destructor to support child classes.

Definition at line 550 of file pathfind.cpp.

Member Data Documentation

dest_vect pathfind::paths::destinations

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