Classes | Public Member Functions | Public Attributes

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
[legend]
Collaboration diagram for pathfind::paths:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
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().

Here is the call graph for this function:

pathfind::paths::~paths (  )  [virtual]

Virtual destructor (default processing).

Virtual destructor to support child classes.

Definition at line 439 of file pathfind.cpp.


Member Data Documentation


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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