ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::aoi Class Reference

AOI基类 More...

#include <aoi.h>

Inheritance diagram for ngl::aoi:
ngl::grids ngl::obstacles

Public Member Functions

virtual void init (int32_t aw, int32_t al, int32_t anx, int32_t any)
int32_t nx ()
int32_t ny ()
int32_t grid_count ()
int32_t grid_w ()
int32_t grid_l ()
int32_t idx (uint32_t aid)
int32_t idy (uint32_t aid)
int32_t id (uint32_t aidx, uint32_t aidy)
int32_t idbyxy (float ax, float ay)
void idaround_list (int32_t aid, std::set< int32_t > &avec)
int32_t idaround_array (int32_t aid, std::array< int32_t, 9 > &aout)
void idaround_foreach (int32_t aid, const std::function< void(int32_t)> &afun)
void idaround_find (int32_t aid, const std::function< bool(int32_t)> &afun)

Static Public Member Functions

static float distance (aoi *aaoi, int aid1, int aid2)
static float distance (float ax1, float ay1, float ax2, float ay2)
static float distance (const pbdb::VECTOR2 &apos1, const pbdb::VECTOR2 &apos2)
static float distance (const pbdb::VECTOR3 &apos1, const pbdb::VECTOR3 &apos2)

Protected Attributes

int32_t m_nx
int32_t m_ny
int32_t m_w
int32_t m_l

Detailed Description

AOI基类

管理网格空间分区,提供九宫格查询和距离计算


The documentation for this class was generated from the following files: