载入中...
搜索中...
未找到
eve::map::Path类 参考
Ordered tile-index waypoints from start to goal (inclusive). 更多...
#include <Path.h>
类 | |
| struct | Cell |
| One waypoint. 更多... | |
Public 成员函数 | |
| void | clear () |
| Clears all waypoints and cost. | |
| void | add (int x, int y) |
| Appends a waypoint tile. | |
| void | reverse () |
| Reverses the waypoint order. | |
| int | getLength () const |
| Number of waypoints (0 = empty/unreachable). | |
| int | getX (int index) const |
| Waypoint tile coordinates. | |
| int | getY (int index) const |
| float | getTotalCost () const |
| Total path cost (A* heuristic + movement cost). | |
| void | setTotalCost (float cost) |
| bool | empty () const |
| True when there are no waypoints. | |
| const std::vector< Cell > & | cells () const |
| Raw waypoint vector. | |
详细描述
成员函数说明
◆ add()
| void eve::map::Path::add | ( | int | x, |
| int | y | ||
| ) |
◆ cells()
|
inline |
◆ clear()
| void eve::map::Path::clear | ( | ) |
Clears all waypoints and cost.
在文件 Pathfinder.cpp 第 586 行定义.
◆ empty()
◆ getLength()
| int eve::map::Path::getLength | ( | ) | const |
Number of waypoints (0 = empty/unreachable).
在文件 Pathfinder.cpp 第 597 行定义.
◆ getTotalCost()
| float eve::map::Path::getTotalCost | ( | ) | const |
Total path cost (A* heuristic + movement cost).
在文件 Pathfinder.cpp 第 609 行定义.
◆ getX()
| int eve::map::Path::getX | ( | int | index | ) | const |
Waypoint tile coordinates.
在文件 Pathfinder.cpp 第 599 行定义.
◆ getY()
| int eve::map::Path::getY | ( | int | index | ) | const |
在文件 Pathfinder.cpp 第 604 行定义.
◆ reverse()
| void eve::map::Path::reverse | ( | ) |
Reverses the waypoint order.
在文件 Pathfinder.cpp 第 593 行定义.
◆ setTotalCost()
| void eve::map::Path::setTotalCost | ( | float | cost | ) |
在文件 Pathfinder.cpp 第 611 行定义.
引用了 cost.
该类的文档由以下文件生成:
- src/modules/map/Path.h
- src/modules/map/Pathfinder.cpp