类 | |
| struct | Candidate |
| A deterministic candidate returned by a spatial query. 更多... | |
| class | CandidateQueryResult |
| Owning ranked result; does not assign a primary target. 更多... | |
| class | GridArea |
| An integer grid area constraint, kept separate from WorldArea. 更多... | |
| class | GridPoint |
| Integer grid point tagged as Grid2D or Grid3D. 更多... | |
| class | ILineOfSightQuery |
| Consumer-owned line-of-sight capability. 更多... | |
| class | ISensingCandidateProvider |
| Candidate discovery capability consumed by TargetingResolver. 更多... | |
| class | ITargetingTask |
| Pluggable Select/Filter/Sort task. 更多... | |
| struct | LineOfSightResult |
| Result of one injected line-of-sight query. 更多... | |
| class | LineOfSightRouter |
| Routes each line-of-sight query to the backend that claimed its coordinate space. 更多... | |
| struct | PerceptionFact |
| Neutral perception fact projected from a ranked sensing candidate. 更多... | |
| struct | QueryBox |
| Inclusive axis-aligned box shape for QuerySpec (World2D). 更多... | |
| struct | QueryCircle |
| Circle shape for QuerySpec (World2D). 更多... | |
| struct | QueryCone |
| 2D cone/sector shape for QuerySpec (World2D). 更多... | |
| struct | QueryOrigin |
| World2D origin used for range tests and distance sorting. 更多... | |
| struct | QuerySpec |
| Configurable candidate query against SensingWorld. 更多... | |
| struct | RankedCandidate |
| One ranked candidate produced by SensingWorld::query. 更多... | |
| struct | ScriptSensingWorld |
| class | Sensing |
| Script factory for independent sensing worlds. 更多... | |
| class | SensingCandidateProvider |
| Pure CPU sensing candidate provider with deterministic map-backed storage. 更多... | |
| class | SensingWorld |
| Gameplay-facing 2D candidate query service; it never values or selects targets. 更多... | |
| class | SensingWorldCandidateProvider |
| ISensingCandidateProvider adapter over a SensingWorld fact mirror. 更多... | |
| struct | SensingWorldHandleTag |
| Handle domain for module-owned sensing worlds. 更多... | |
| struct | Subject |
| Mirrored gameplay facts used by candidate queries. 更多... | |
| struct | TargetCandidate |
| Candidate facts returned by sensing. 更多... | |
| class | TargetingPipeline |
| In-memory task + preset registry and synchronous executor. 更多... | |
| struct | TargetingPreset |
| Named ordered list of targeting tasks. 更多... | |
| struct | TargetingQuery |
| A query passed from a domain targeting algorithm to sensing. 更多... | |
| class | TargetingResolver |
| Generic constraint evaluator that composes candidate and LOS capabilities. 更多... | |
| struct | TargetingSourceContext |
| Runtime source for one pipeline execution. 更多... | |
| struct | TargetingSpec |
| A checked target-count and spatial constraint description. 更多... | |
| struct | TargetingTaskStep |
| Per-step parameters for a preset entry. 更多... | |
| class | TargetSet |
| Owning target result containing primary-independent subjects and optional geometry. 更多... | |
| class | WorldArea |
| A world-space area constraint. 更多... | |
| class | WorldPoint |
| Finite world-space point tagged as either World2D or World3D. 更多... | |
| class | ZoneRef |
| Strong reference to a named spatial zone. 更多... | |
类型定义 | |
| using | QueryShape = std::variant< std::monostate, QueryCircle, QueryBox, QueryCone > |
| Optional broad-phase shape; monostate means range-only around the origin. | |
| using | SensingWorldHandleRef = eve::script::RuntimeHandleRef< SensingWorldHandleTag > |
| Generation- and module-epoch-qualified sensing-world reference. | |
| using | SubjectRef = ::eve::SubjectRef |
| Strong reference to a runtime subject. | |
| using | TargetLocation = std::variant< WorldPoint, GridPoint > |
| Either a world point or a grid point, with the tag retained. | |
| using | FactionRelationFn = std::function< Result< TargetDomain >(std::string_view originFaction, std::string_view candidateFaction)> |
| Projects faction string pairs into TargetDomain for SensingWorld adapters. | |
枚举 | |
| enum class | CountPolicy : std::uint8_t { FailIfOutOfRange , TruncateToMax } |
| How candidate-count overflow relative to maxCount is handled. 更多... | |
| enum class | SortKey : std::uint8_t { None , DistanceAscending } |
| Ordering applied to ranked query results. 更多... | |
| enum class | CoordinateSpace : std::uint8_t { World2D , World3D , Grid2D , Grid3D } |
| Coordinate spaces are not interchangeable, even when dimensions match. 更多... | |
| enum class | TargetDomain : std::uint8_t { Any , Self , Ally , Enemy , Neutral } |
| Stable relationship class used by generic domain constraints. 更多... | |
| enum class | LineOfSightMode : std::uint8_t { NotRequired , Required } |
| Whether a candidate must be visible from the query origin. 更多... | |
| enum class | TargetingTaskKind : std::uint8_t { Select , Filter , Sort } |
| Task role inside a TargetingPreset. 更多... | |
函数 | |
| Result< LineOfSightRouter * > | ensureLineOfSightRouter () |
The process-wide router, registered as the ILineOfSightQuery capability. | |
| Module_IMPL (Sensing, new Sensing()) | |
| std::vector< PerceptionFact > | perceptionFactsFrom (const CandidateQueryResult &result) |
| Projects ranked query results into adapter-neutral perception facts. | |
| std::string_view | coordinateSpaceName (CoordinateSpace space) noexcept |
| Returns the stable protocol name for a coordinate space. | |
| std::ostream & | operator<< (std::ostream &stream, CoordinateSpace space) |
| Writes the stable coordinate-space protocol name. | |
类型定义说明
◆ FactionRelationFn
| using eve::sensing::FactionRelationFn = typedef std::function<Result<TargetDomain>(std::string_view originFaction, std::string_view candidateFaction)> |
Projects faction string pairs into TargetDomain for SensingWorld adapters.
Missing relations must not be invented by sensing: callers that request domain != Any without a relation receive Unsupported.
在文件 Targeting.h 第 504 行定义.
◆ QueryShape
| using eve::sensing::QueryShape = typedef std::variant<std::monostate, QueryCircle, QueryBox, QueryCone> |
◆ SensingWorldHandleRef
◆ SubjectRef
| using eve::sensing::SubjectRef = typedef ::eve::SubjectRef |
Strong reference to a runtime subject.
This is a persistent identity, not an ECS entity handle. The nil value is rejected by all targeting operations. There is no implicit conversion to or from PersistentId, which prevents an AssetId/SubjectRef mix at call sites.
Compatibility spelling for the common subject reference.
在文件 Targeting.h 第 76 行定义.
◆ TargetLocation
| using eve::sensing::TargetLocation = typedef std::variant<WorldPoint, GridPoint> |
Either a world point or a grid point, with the tag retained.
在文件 Targeting.h 第 198 行定义.
枚举类型说明
◆ CoordinateSpace
|
strong |
Coordinate spaces are not interchangeable, even when dimensions match.
| 枚举值 | |
|---|---|
| World2D | |
| World3D | |
| Grid2D | |
| Grid3D | |
在文件 Targeting.h 第 37 行定义.
◆ CountPolicy
|
strong |
◆ LineOfSightMode
|
strong |
Whether a candidate must be visible from the query origin.
| 枚举值 | |
|---|---|
| NotRequired | |
| Required | |
在文件 Targeting.h 第 63 行定义.
◆ SortKey
|
strong |
◆ TargetDomain
|
strong |
Stable relationship class used by generic domain constraints.
| 枚举值 | |
|---|---|
| Any | |
| Self | |
| Ally | |
| Enemy | |
| Neutral | |
在文件 Targeting.h 第 54 行定义.
◆ TargetingTaskKind
|
strong |
函数说明
◆ coordinateSpaceName()
|
noexcept |
Returns the stable protocol name for a coordinate space.
在文件 Targeting.cpp 第 556 行定义.
引用了 Grid2D, Grid3D, World2D , 以及 World3D.
被这些函数引用 operator<<() , 以及 eve::sensing::LineOfSightRouter::query().
◆ ensureLineOfSightRouter()
| EVENGINE_API_PLATFORM Result< LineOfSightRouter * > eve::sensing::ensureLineOfSightRouter | ( | ) |
The process-wide router, registered as the ILineOfSightQuery capability.
Backends claim their spaces through this function instead of registering the capability themselves, which is what keeps the routing table in one place:
- 返回
- Applied when this call registered the router, NoOp when the router was already the registered provider, or Conflict when some other provider holds the slot.
- 备注
- A foreign provider holding the slot is left alone: a project that deliberately registered its own line-of-sight implementation keeps it, and the caller gets a Conflict it can report rather than a silent replacement. @ownership The router is process-wide and immutably owned by this translation unit; callers borrow the pointer and must not delete it. @lifetime Valid for the rest of the process. @thread Call during startup, before queries run.
在文件 LineOfSightRouter.cpp 第 33 行定义.
引用了 eve::Applied, eve::Conflict, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 eve::physics::registerPhysicsCapabilities() , 以及 eve::tactics::registerTacticsLineOfSightProvider().
◆ Module_IMPL()
| eve::sensing::Module_IMPL | ( | Sensing | , |
| new | Sensing() | ||
| ) |
◆ operator<<()
|
inline |
◆ perceptionFactsFrom()
|
inline |
Projects ranked query results into adapter-neutral perception facts.
- 参数
-
result Borrowed ranked candidates from SensingWorld::query / executePreset.
- 返回
- Owning facts in the same order as
result.ranked().
引用了 eve::sensing::PerceptionFact::distance, eve::sensing::CandidateQueryResult::ranked(), eve::sensing::PerceptionFact::score, eve::sensing::PerceptionFact::scoreReason, eve::sensing::CandidateQueryResult::size(), eve::sensing::PerceptionFact::subjectId, eve::sensing::PerceptionFact::x , 以及 eve::sensing::PerceptionFact::y.