|
Rehti MMORPG
1.0.0
Rehti MMORPG is a free and open source MMORPG game.
|
#include <algorithm>#include <array>#include <cmath>#include <iostream>#include <queue>#include <set>#include "Utils.hpp"
Classes | |
| struct | nodeCompare |
Functions | |
| bool | isValidCell (const std::vector< std::vector< uint8_t >> &map, std::pair< int, int > coords, Direction dir) |
| Check if cell is valid and accessible from given direction. More... | |
| unsigned int | euclideanDistance (std::pair< int, int > start, std::pair< int, int > end) |
| Calculate the euclidean distance between two points. More... | |
| std::vector< std::pair< int, int > > | astar (const std::vector< std::vector< uint8_t >> &map, std::pair< int, int > start, std::pair< int, int > end) |
| A-star algorithm made to work with the access map format. Allows diagonal movement and has a heuristic of euclidean distance. More... | |
| std::vector<std::pair<int, int> > astar | ( | const std::vector< std::vector< uint8_t >> & | map, |
| std::pair< int, int > | start, | ||
| std::pair< int, int > | end | ||
| ) |
A-star algorithm made to work with the access map format. Allows diagonal movement and has a heuristic of euclidean distance.
| map | |
| start | |
| end |


| unsigned int euclideanDistance | ( | std::pair< int, int > | start, |
| std::pair< int, int > | end | ||
| ) |
Calculate the euclidean distance between two points.
| start | pair (x, y) |
| end | pair (x, y) |

| bool isValidCell | ( | const std::vector< std::vector< uint8_t >> & | map, |
| std::pair< int, int > | cell, | ||
| Direction | dir | ||
| ) |
Check if cell is valid and accessible from given direction.
| map | The access map of the map. |
| cell | The cell to check. |
| dir | The direction from which the cell is accessed. |
