CMGDK r49-rc2
组合类型 | 公有成员 | 公有属性 | 保护成员 | 保护属性
hgl::FindPath类参考

寻路模块基类 更多...

#include <FindPath.H>

继承图,类hgl::FindPath
hgl::findpath::AStarFindPath hgl::findpath::LineFindPath hgl::findpath::AStar4FindPath hgl::findpath::AStar8FindPath

所有成员的列表。

组合类型

struct  StepCoord
class  StepList

公有成员

 DefEvent (bool, CheckPoint,(int, int, int, int))
 检查一个点是否可走事件
 FindPath (int w, int h)
virtual ~FindPath ()
void SetStart (int x, int y)
 设置起始点
void SetEnd (int x, int y)
 设置目标点
bool Find ()
 开始查找
bool Find (int l, int t, int sx, int sy, int ex, int ey)
 开始查找
bool Find (int sx, int sy, int ex, int ey)
 开始查找

公有属性

StepList Steps
 查找的步子结果
int MaxFind
 最大查找节点数,默认128

保护成员

virtual bool find_path ()=0

保护属性

int Left
int Top
int StartX
int StartY
int EndX
int EndY
int Width
int Height

详细描述

寻路模块基类

寻路模块基类描述


构造及析构函数文档

hgl::FindPath::FindPath ( int  w,
int  h 
)

本类构造函数

参数:
w查找范围宽度
h查找范围高度
virtual hgl::FindPath::~FindPath ( ) [inline, virtual]

成员函数文档

hgl::FindPath::DefEvent ( bool  ,
CheckPoint  ,
(int, int, int, int  
)

检查一个点是否可走事件

bool hgl::FindPath::Find ( int  sx,
int  sy,
int  ex,
int  ey 
)

开始查找

开始查找路线

参数:
sx起始点X坐标
sy起始点Y坐标
ex目标点X坐标
ey目标点Y坐标
bool hgl::FindPath::Find ( )

开始查找

bool hgl::FindPath::Find ( int  l,
int  t,
int  sx,
int  sy,
int  ex,
int  ey 
)

开始查找

开始查找路线
(sx,sy)、(ex,ey)会被减去(l,t)
主要用于超大地图,但只在一部分范围内寻路的处理

参数:
l左边界
t上边界
sx起始点X坐标
sy起始点Y坐标
ex目标点X坐标
ey目标点Y坐标
virtual bool hgl::FindPath::find_path ( ) [protected, pure virtual]
void hgl::FindPath::SetEnd ( int  x,
int  y 
)

设置目标点

void hgl::FindPath::SetStart ( int  x,
int  y 
)

设置起始点


成员数据文档

int hgl::FindPath::EndX [protected]
int hgl::FindPath::EndY [protected]
int hgl::FindPath::Left [protected]

最大查找节点数,默认128

查找的步子结果

int hgl::FindPath::Top [protected]

该类的文档由以下文件生成:
 全部  名字空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义