Read-only 3D physics implementation of sensing's LOS capability. 更多...
#include <TargetingLineOfSightAdapter.h>
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.
- 参数
-
world Non-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()
|
overridevirtual |
Tests the segment between two same-space locations.
- 参数
-
from Borrowed value location of the observer. to Borrowed 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.
- 参数
-
world Non-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.
该类的文档由以下文件生成:
- src/modules/physics/TargetingLineOfSightAdapter.h
- src/modules/physics/TargetingLineOfSightAdapter.cpp
Public 成员函数 继承自