载入中...
搜索中...
未找到
eve::tactics::GridLineOfSightPolicy类 参考final
The built-in grid policy: a straight-line trace over the board's own topology. 更多...
#include <LineOfSight.h>
类 eve::tactics::GridLineOfSightPolicy 继承关系图:
Public 成员函数 | |
| std::string_view | id () const noexcept override |
| Id. | |
| Result< bool > | visible (const BoardState &board, Cell from, Cell to) const override |
| Visible. | |
Public 成员函数 继承自 eve::tactics::ILineOfSightPolicy | |
| virtual | ~ILineOfSightPolicy ()=default |
| Releases ILineOfSightPolicy resources. | |
额外继承的成员函数 | |
静态 Public 属性 继承自 eve::tactics::ILineOfSightPolicy | |
| static constexpr const char * | capabilityName = "eve.tactics.ILineOfSightPolicy" |
| Capability name a provider registers under. | |
详细描述
The built-in grid policy: a straight-line trace over the board's own topology.
Rules, all deterministic and topology-aware:
- the trace runs between the endpoints only; both endpoints are ignored, so standing in or behind a blocker never hides the cells themselves;
- any traced cell that is tagged kSightBlockerTag blocks the trace;
- a traced cell the board does not contain blocks as well, so an unused part of the grid is not a free firing lane;
- different layers are refused rather than projected, because "seeing between floors" is a rule this policy does not own.
The trace is computed from the canonical cell order and then oriented to the query, which makes visible(a, b) and visible(b, a) agree by construction rather than by two implementations happening to match.
在文件 LineOfSight.h 第 123 行定义.
成员函数说明
◆ id()
|
inlineoverridevirtualnoexcept |
◆ visible()
|
overridevirtual |
Visible.
实现了 eve::tactics::ILineOfSightPolicy.
在文件 LineOfSight.cpp 第 131 行定义.
引用了 board, cell, eve::Diagnostic::error(), eve::tactics::ExplicitGraph, eve::Result< T >::failure(), from, eve::NotFound, eve::Result< T >::success(), to , 以及 eve::Unsupported.
该类的文档由以下文件生成:
- src/modules/tactics/LineOfSight.h
- src/modules/tactics/LineOfSight.cpp
Public 成员函数 继承自