载入中...
搜索中...
未找到
eve::physics::TargetingLineOfSightAdapter类 参考final

Read-only 3D physics implementation of sensing's LOS capability. 更多...

#include <TargetingLineOfSightAdapter.h>

类 eve::physics::TargetingLineOfSightAdapter 继承关系图:
eve::sensing::ILineOfSightQuery

Public 成员函数

Result< void > addWorld (World3D *world)
 Registers a borrowed live World3D as the sole active LOS world.
 
Result< void > removeWorld (World3D *world)
 Removes a previously registered world; repeated removal is a NoOp.
 
Result< sensing::LineOfSightResult > query (const sensing::TargetLocation &from, const sensing::TargetLocation &to) const override
 Tests the segment between two same-space locations.
 
- Public 成员函数 继承自 eve::sensing::ILineOfSightQuery
virtual ~ILineOfSightQuery ()=default
 Releases ILineOfSightQuery resources.
 

额外继承的成员函数

- 静态 Public 属性 继承自 eve::sensing::ILineOfSightQuery
static constexpr const char * capabilityName = "eve.sensing.ILineOfSightQuery"
 

详细描述

Read-only 3D physics implementation of sensing's LOS capability.

World3D owns the solver and registers itself for the duration of its valid lifetime. The adapter owns neither worlds nor bodies; registrations carry a weak lifetime token, so stale worlds are skipped without dereferencing them. At most one valid world may be active. A second different world is rejected with Conflict; callers must explicitly choose which world supplies targeting LOS. The adapter supports World3D locations only and never converts grid coordinates. Calls are synchronous on the simulation thread.

在文件 TargetingLineOfSightAdapter.h 第 30 行定义.

成员函数说明

◆ addWorld()

eve::Result< void > eve::physics::TargetingLineOfSightAdapter::addWorld ( World3D *  world)

Registers a borrowed live World3D as the sole active LOS world.

参数
worldNon-null live World3D. Its lifetime is tracked weakly.
返回
Applied, NoOp for the same world, or Conflict for another world.
注解
This synchronous method must be called on the simulation thread.

在文件 TargetingLineOfSightAdapter.cpp 第 15 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, lifetime, eve::NoOp, eve::NotFound, eve::Status::success(), eve::Result< T >::success() , 以及 world.

◆ query()

eve::Result< sensing::LineOfSightResult > eve::physics::TargetingLineOfSightAdapter::query ( const sensing::TargetLocation &  from,
const sensing::TargetLocation &  to 
) const
overridevirtual

Tests the segment between two same-space locations.

参数
fromBorrowed value location of the observer.
toBorrowed value location of the candidate.
返回
Visibility or Unsupported/Rejected with structured diagnostics.
备注
Synchronous; callers must invoke on the provider's documented simulation thread.

Queries .

实现了 eve::sensing::ILineOfSightQuery.

在文件 TargetingLineOfSightAdapter.cpp 第 47 行定义.

引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), from, eve::physics::World3D::hasRayHit(), eve::InvalidArgument, lifetime, eve::physics::World3D::rayCast(), eve::Result< T >::success(), to, eve::Unsupported, world , 以及 eve::sensing::World3D.

◆ removeWorld()

eve::Result< void > eve::physics::TargetingLineOfSightAdapter::removeWorld ( World3D *  world)

Removes a previously registered world; repeated removal is a NoOp.

参数
worldNon-null World3D previously passed to addWorld.
返回
Applied, NoOp, or InvalidArgument for a null world.
注解
This synchronous method must be called on the simulation thread and does not destroy the borrowed world.

在文件 TargetingLineOfSightAdapter.cpp 第 37 行定义.

引用了 eve::Applied, code, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::NoOp, eve::Status::success(), eve::Result< T >::success() , 以及 world.


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