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

障碍物管理类 More...

#include <grids.h>

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

Public Member Functions

virtual void init (int32_t aw, int32_t al, int32_t anx, int32_t any)
void set_obstacles (const std::vector< obstacles_data > &aobstacles)
void set_grid_type (int32_t aid, int32_t atype)
int32_t get_grid_type (int32_t aid) const
void clear ()
bool is_pass (int32_t aid)
bool is_pass (int32_t ax, int32_t ay)
bool find_path (int32_t ax1, int32_t ay1, int32_t ax2, int32_t ay2, std::list< int > &apath)
bool find_path (int32_t aid1, int32_t aid2, std::list< int > &apath)
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)

Public Attributes

std::vector< obstaclem_grid

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()

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

Reimplemented from ngl::aoi.


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