One registered line-of-sight provider that dispatches to backends by coordinate space. 更多...
#include "common/Export.h"#include "common/Result.h"#include "sensing/Targeting.h"#include <array>#include <string_view>#include <vector>类 | |
| class | eve::sensing::LineOfSightRouter |
| Routes each line-of-sight query to the backend that claimed its coordinate space. 更多... | |
命名空间 | |
| namespace | eve |
| Build metadata (engine git commit, build time, third-party version). | |
| namespace | eve::sensing |
函数 | |
| Result< LineOfSightRouter * > | eve::sensing::ensureLineOfSightRouter () |
The process-wide router, registered as the ILineOfSightQuery capability. | |
详细描述
One registered line-of-sight provider that dispatches to backends by coordinate space.
eve.sensing.ILineOfSightQuery is a single-slot capability, and its own contract already says a provider may support only some coordinate spaces and must return Unsupported for the rest — the class remarks in Targeting.h state it. A project normally has several unrelated sight implementations - the 3D physics probe for world points, a grid walk for a hex or square board - and registering them directly against the capability means the last registration wins and the effective behaviour depends on module load order.
This router is the provider that gets registered once. Each backend claims the coordinate spaces it can interpret; a space with no backend is answered with Unsupported (naming the space), and a query whose endpoints are in different spaces is rejected rather than converted, because the interface forbids implicit conversion between spaces.
在文件 LineOfSightRouter.h 中定义.