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

网格集合类 More...

#include <grids.h>

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

Public Member Functions

virtual void init (int32_t aw, int32_t al, int32_t anx, int32_t any)
bool enter (i64_actorid aunitid, int32_t ax, int32_t ay)
bool enter (i64_actorid aunitid, int32_t agid)
void leave (i64_actorid aunitid, int32_t ax, int32_t ay)
void leave (i64_actorid aunitid, int32_t agid)
gridget_grid (int32_t agid)
gridget_grid (int32_t ax, int32_t ay)
Public Member Functions inherited from ngl::aoi
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)

Additional Inherited Members

Static Public Member Functions inherited from ngl::aoi
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 inherited from ngl::aoi
int32_t m_nx
int32_t m_ny
int32_t m_w
int32_t m_l

Detailed Description

网格集合类

继承自aoi,管理多个网格单元

Member Function Documentation

◆ init()

void ngl::grids::init ( int32_t aw,
int32_t al,
int32_t anx,
int32_t any )
virtual

Reimplemented from ngl::aoi.


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