#include <position.h>
|
| | Position () |
| |
| | Position (uint16 x, uint16 y, uint8 z) |
| |
| | Position (const Position &position)=default |
| |
| Position | translatedToDirection (Otc::Direction direction) |
| |
| Position | translatedToReverseDirection (Otc::Direction direction) |
| |
| std::vector< Position > | translatedToDirections (const std::vector< Otc::Direction > &dirs) const |
| |
| double | getAngleFromPosition (const Position &position) const |
| |
| Otc::Direction | getDirectionFromPosition (const Position &position) const |
| |
| bool | isMapPosition () const |
| |
| bool | isValid () const |
| |
| float | distance (const Position &pos) const |
| |
| int | manhattanDistance (const Position &pos) const |
| |
| void | translate (int dx, int dy, short dz=0) |
| |
| Position | translated (int dx, int dy, short dz=0) const |
| |
| Position | operator+ (const Position &other) const |
| |
| Position & | operator+= (const Position &other) |
| |
| Position | operator- (const Position &other) const |
| |
| Position & | operator-= (const Position &other) |
| |
| Position | operator+ (const Point &other) const |
| |
| Position & | operator+= (const Point &other) |
| |
| Position & | operator= (const Position &other) |
| |
| bool | operator== (const Position &other) const |
| |
| bool | operator!= (const Position &other) const |
| |
| bool | isInRange (const Position &pos, int xRange, int yRange) const |
| |
| bool | isInRange (const Position &pos, int minXRange, int maxXRange, int minYRange, int maxYRange) const |
| |
| bool | operator< (const Position &other) const |
| |
| bool | up (int n=1) |
| |
| bool | down (int n=1) |
| |
| bool | coveredUp (int n=1) |
| |
| bool | coveredDown (int n=1) |
| |
Definition at line 33 of file position.h.
◆ Position() [1/3]
◆ Position() [2/3]
◆ Position() [3/3]
| Position::Position |
( |
const Position & |
position | ) |
|
|
default |
◆ coveredDown()
| bool Position::coveredDown |
( |
int |
n = 1 | ) |
|
|
inline |
◆ coveredUp()
| bool Position::coveredUp |
( |
int |
n = 1 | ) |
|
|
inline |
◆ distance()
| float Position::distance |
( |
const Position & |
pos | ) |
const |
|
inline |
◆ down()
| bool Position::down |
( |
int |
n = 1 | ) |
|
|
inline |
◆ getAngleFromPosition()
| double Position::getAngleFromPosition |
( |
const Position & |
position | ) |
const |
|
inline |
◆ getAngleFromPositions()
| static double Position::getAngleFromPositions |
( |
const Position & |
fromPos, |
|
|
const Position & |
toPos |
|
) |
| |
|
inlinestatic |
◆ getDirectionFromPosition()
◆ getDirectionFromPositions()
◆ isDiagonal()
◆ isInRange() [1/2]
| bool Position::isInRange |
( |
const Position & |
pos, |
|
|
int |
minXRange, |
|
|
int |
maxXRange, |
|
|
int |
minYRange, |
|
|
int |
maxYRange |
|
) |
| const |
|
inline |
◆ isInRange() [2/2]
| bool Position::isInRange |
( |
const Position & |
pos, |
|
|
int |
xRange, |
|
|
int |
yRange |
|
) |
| const |
|
inline |
◆ isMapPosition()
| bool Position::isMapPosition |
( |
| ) |
const |
|
inline |
◆ isValid()
| bool Position::isValid |
( |
| ) |
const |
|
inline |
◆ manhattanDistance()
| int Position::manhattanDistance |
( |
const Position & |
pos | ) |
const |
|
inline |
◆ operator!=()
| bool Position::operator!= |
( |
const Position & |
other | ) |
const |
|
inline |
◆ operator+() [1/2]
◆ operator+() [2/2]
◆ operator+=() [1/2]
◆ operator+=() [2/2]
◆ operator-()
◆ operator-=()
◆ operator<()
| bool Position::operator< |
( |
const Position & |
other | ) |
const |
|
inline |
◆ operator=()
◆ operator==()
| bool Position::operator== |
( |
const Position & |
other | ) |
const |
|
inline |
◆ translate()
| void Position::translate |
( |
int |
dx, |
|
|
int |
dy, |
|
|
short |
dz = 0 |
|
) |
| |
|
inline |
◆ translated()
| Position Position::translated |
( |
int |
dx, |
|
|
int |
dy, |
|
|
short |
dz = 0 |
|
) |
| const |
|
inline |
◆ translatedToDirection()
◆ translatedToDirections()
◆ translatedToReverseDirection()
◆ up()
| bool Position::up |
( |
int |
n = 1 | ) |
|
|
inline |
The documentation for this class was generated from the following file: