#include <AStar.hpp>
◆ euclidean()
static uint32_t Horizon::Zone::AStar::Heuristic::euclidean |
( |
MapCoords |
source_, |
|
|
MapCoords |
target_ |
|
) |
| |
|
inlinestatic |
62 {
63 auto delta =
getDelta(source_, target_);
64 return static_cast<uint32_t>(10 * std::sqrt(std::pow(delta.x(), 2) + std::pow(delta.y(), 2)));
65 }
static MapCoords getDelta(MapCoords source_, MapCoords target_)
Definition: AStar.hpp:52
References getDelta().
◆ getDelta()
◆ manhattan()
static uint32_t Horizon::Zone::AStar::Heuristic::manhattan |
( |
MapCoords |
source_, |
|
|
MapCoords |
target_ |
|
) |
| |
|
inlinestatic |
◆ octagonal()
static uint32_t Horizon::Zone::AStar::Heuristic::octagonal |
( |
MapCoords |
source_, |
|
|
MapCoords |
target_ |
|
) |
| |
|
inlinestatic |
68 {
69 auto delta =
getDelta(source_, target_);
70 return 10 * (delta.x() + delta.y()) + (-6) * std::min(delta.x(), delta.y());
71 }
References getDelta().
The documentation for this class was generated from the following file: