The Battle for Wesnoth  1.15.2+dev
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 70 of file pathfind.hpp.

Constructor & Destructor Documentation

◆ paths() [1/2]

pathfind::paths::paths ( )
inline

Definition at line 72 of file pathfind.hpp.

◆ paths() [2/2]

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 538 of file pathfind.cpp.

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

◆ ~paths()

pathfind::paths::~paths ( )
virtual

Virtual destructor (default processing).

Virtual destructor to support child classes.

Definition at line 566 of file pathfind.cpp.

Member Data Documentation

◆ destinations

dest_vect pathfind::paths::destinations

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