载入中...
搜索中...
未找到
eve::map::FlowField类 参考
Integration + direction field for group pathfinding to a single goal. nextX/nextY point to the neighboring cell with lower cost (toward goal). At the goal, next points to itself. 更多...
#include <FlowField.h>
Public 成员函数 | |
| void | clear () |
| Clears . | |
| void | resize (int width, int height) |
| Resize. | |
| int | getWidth () const |
| Returns the width. | |
| int | getHeight () const |
| Returns the height. | |
| int | getGoalX () const |
| Returns the goal x. | |
| int | getGoalY () const |
| Returns the goal y. | |
| void | setGoal (int x, int y) |
| Sets the goal. | |
| float | costAt (int x, int y) const |
| Cost at. | |
| void | setCost (int x, int y, float cost) |
| Sets the cost. | |
| int | nextX (int x, int y) const |
| Next x. | |
| int | nextY (int x, int y) const |
| Next y. | |
| void | setNext (int x, int y, int nx, int ny) |
| Sets the next. | |
| bool | isReachable (int x, int y) const |
| True when reachable. | |
静态 Public 属性 | |
| static constexpr float | kUnreachable = std::numeric_limits<float>::infinity() |
详细描述
Integration + direction field for group pathfinding to a single goal. nextX/nextY point to the neighboring cell with lower cost (toward goal). At the goal, next points to itself.
在文件 FlowField.h 第 15 行定义.
成员函数说明
◆ clear()
| void eve::map::FlowField::clear | ( | ) |
Clears .
在文件 Pathfinder.cpp 第 668 行定义.
◆ costAt()
| float eve::map::FlowField::costAt | ( | int | x, |
| int | y | ||
| ) | const |
◆ getGoalX()
|
inline |
Returns the goal x.
在文件 FlowField.h 第 29 行定义.
◆ getGoalY()
|
inline |
Returns the goal y.
在文件 FlowField.h 第 31 行定义.
◆ getHeight()
|
inline |
Returns the height.
在文件 FlowField.h 第 26 行定义.
◆ getWidth()
|
inline |
Returns the width.
在文件 FlowField.h 第 24 行定义.
◆ isReachable()
| bool eve::map::FlowField::isReachable | ( | int | x, |
| int | y | ||
| ) | const |
◆ nextX()
| int eve::map::FlowField::nextX | ( | int | x, |
| int | y | ||
| ) | const |
◆ nextY()
| int eve::map::FlowField::nextY | ( | int | x, |
| int | y | ||
| ) | const |
◆ resize()
| void eve::map::FlowField::resize | ( | int | width, |
| int | height | ||
| ) |
◆ setCost()
| void eve::map::FlowField::setCost | ( | int | x, |
| int | y, | ||
| float | cost | ||
| ) |
◆ setGoal()
| void eve::map::FlowField::setGoal | ( | int | x, |
| int | y | ||
| ) |
◆ setNext()
| void eve::map::FlowField::setNext | ( | int | x, |
| int | y, | ||
| int | nx, | ||
| int | ny | ||
| ) |
类成员变量说明
◆ kUnreachable
|
staticconstexpr |
在文件 FlowField.h 第 17 行定义.
该类的文档由以下文件生成:
- src/modules/map/FlowField.h
- src/modules/map/Pathfinder.cpp