#include <Direction.h>
Definition at line 6 of file Direction.h.
Public Member Functions | |
bool | isCardinal () const |
const Point & | offset () const |
bool | operator< (const Direction &dir) const |
bool | operator== (const Direction &dir) const |
const Direction & | opposite () const |
~Direction () | |
Static Public Member Functions | |
static vector< const Direction * > | getAllDirections () |
Static Public Attributes | |
static Direction | E |
static Direction | N |
static Direction | NE |
static Direction | NW |
static Direction | S |
static Direction | SE |
static Direction | SW |
static Direction | W |
Private Member Functions | |
Direction (int x, int y, Direction &opp, bool cardinal) | |
Private Attributes | |
bool | _cardinal |
Point | _offset |
Direction * | _opposite |
Direction::~Direction | ( | ) |
Definition at line 21 of file Direction.cpp.
Direction::Direction | ( | int | x, | |
int | y, | |||
Direction & | opp, | |||
bool | cardinal | |||
) | [private] |
Definition at line 12 of file Direction.cpp.
vector< const Direction * > Direction::getAllDirections | ( | ) | [static] |
Definition at line 25 of file Direction.cpp.
References E, N, NE, NW, S, SE, SW, and W.
Referenced by Unit::computeMovePathHelper(), Map::populateTileNeighbors(), and Unit::updatePossibleMoves().
Here is the caller graph for this function:
bool Direction::isCardinal | ( | ) | const |
const Point & Direction::offset | ( | ) | const |
Definition at line 43 of file Direction.cpp.
References _offset.
Referenced by operator<().
Here is the caller graph for this function:
bool Direction::operator< | ( | const Direction & | dir | ) | const |
Definition at line 58 of file Direction.cpp.
References offset().
Here is the call graph for this function:
bool Direction::operator== | ( | const Direction & | dir | ) | const |
const Direction & Direction::opposite | ( | ) | const |
bool Direction::_cardinal [private] |
Point Direction::_offset [private] |
Direction* Direction::_opposite [private] |
Direction Direction::E [static] |
Definition at line 13 of file Direction.h.
Referenced by Unit::canMoveInDirection(), getAllDirections(), and MainGameState::processSDLEvent().
Direction Direction::N [static] |
Definition at line 11 of file Direction.h.
Referenced by Unit::canMoveInDirection(), getAllDirections(), and MainGameState::processSDLEvent().
Direction Direction::NE [static] |
Definition at line 12 of file Direction.h.
Referenced by Unit::canMoveInDirection(), Wall::draw(), getAllDirections(), Map::load(), and MainGameState::processSDLEvent().
Direction Direction::NW [static] |
Definition at line 18 of file Direction.h.
Referenced by Unit::canMoveInDirection(), Wall::draw(), getAllDirections(), Map::load(), and MainGameState::processSDLEvent().
Direction Direction::S [static] |
Definition at line 15 of file Direction.h.
Referenced by Unit::canMoveInDirection(), getAllDirections(), and MainGameState::processSDLEvent().
Direction Direction::SE [static] |
Definition at line 14 of file Direction.h.
Referenced by Unit::canMoveInDirection(), Wall::draw(), getAllDirections(), Map::load(), and MainGameState::processSDLEvent().
Direction Direction::SW [static] |
Definition at line 16 of file Direction.h.
Referenced by Unit::canMoveInDirection(), Wall::draw(), getAllDirections(), Map::load(), and MainGameState::processSDLEvent().
Direction Direction::W [static] |
Definition at line 17 of file Direction.h.
Referenced by Unit::canMoveInDirection(), getAllDirections(), and MainGameState::processSDLEvent().