载入中...
搜索中...
未找到
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 继承关系图:
eve::tactics::ILineOfSightPolicy

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()

std::string_view eve::tactics::GridLineOfSightPolicy::id ( ) const
inlineoverridevirtualnoexcept

Id.

实现了 eve::tactics::ILineOfSightPolicy.

在文件 LineOfSight.h 第 126 行定义.

◆ visible()

Result< bool > eve::tactics::GridLineOfSightPolicy::visible ( const BoardState &  board,
Cell  from,
Cell  to 
) const
overridevirtual

该类的文档由以下文件生成: