载入中...
搜索中...
未找到
eve::tactics::ILineOfSightPolicy类 参考abstract
Answers "can @p from see @p to" for one board. 更多...
#include <LineOfSight.h>
类 eve::tactics::ILineOfSightPolicy 继承关系图:
Public 成员函数 | |
| virtual | ~ILineOfSightPolicy ()=default |
| Releases ILineOfSightPolicy resources. | |
| virtual std::string_view | id () const noexcept=0 |
| Stable id of this implementation, for diagnostics and configuration. | |
| virtual Result< bool > | visible (const BoardState &board, Cell from, Cell to) const =0 |
Report whether from can see to. | |
静态 Public 属性 | |
| static constexpr const char * | capabilityName = "eve.tactics.ILineOfSightPolicy" |
| Capability name a provider registers under. | |
详细描述
Answers "can @p from see @p to" for one board.
- 备注
- Implementations must be pure and deterministic: the answer feeds replay, so it may not depend on a clock, a random draw or mutable state. Symmetry is a property of an implementation, not something the caller may assume.
在文件 LineOfSight.h 第 61 行定义.
构造及析构函数说明
◆ ~ILineOfSightPolicy()
|
virtualdefault |
Releases ILineOfSightPolicy resources.
成员函数说明
◆ id()
|
pure virtualnoexcept |
Stable id of this implementation, for diagnostics and configuration.
◆ visible()
|
pure virtual |
Report whether from can see to.
- 返回
- Whether sight is unobstructed, or a structured refusal for inputs the policy cannot answer (cells on different layers, or cells the board does not contain).
- 备注
- Endpoints never block: a unit standing in smoke can still see out of its own cell, and a blocker on the target cell protects the target without hiding it.
在 eve::tactics::GridLineOfSightPolicy 内被实现.
被这些函数引用 eve::tactics::TacticsLineOfSightAdapter::query() , 以及 eve::tactics::visibleCellsInRange().
类成员变量说明
◆ capabilityName
|
staticconstexpr |
Capability name a provider registers under.
在文件 LineOfSight.h 第 64 行定义.
该类的文档由以下文件生成:
- src/modules/tactics/LineOfSight.h