13 bool at(
int x,
int z)
const {
return x < 0 || z < 0 || x >=
n || z >=
n ||
blocked[
static_cast<size_t>(z) *
n + x]; }
17NavGrid
nav_parse(
const std::vector<uint8_t>& data,
float world_size);
19NavGrid
nav_coarse(
const NavGrid& g,
int factor);
22std::vector<float>
nav_path(
const NavGrid& g,
float ax,
float az,
float bx,
float bz,
int max_expand = 200000);
NavGrid nav_parse(const std::vector< uint8_t > &d, float world_size)
Definition nav.cpp:11
NavGrid nav_coarse(const NavGrid &g, int f)
Definition nav.cpp:49
std::vector< float > nav_path(const NavGrid &g, float ax, float az, float bx, float bz, int max_expand)
Definition nav.cpp:90
std::vector< uint8_t > blocked
Definition nav.h:12
bool at(int x, int z) const
Definition nav.h:13
float cell
Definition nav.h:11