载入中...
搜索中...
未找到
Sensing.h
浏览该文件的文档.
139 explicit CandidateQueryResult(std::vector<RankedCandidate> ranked) : ranked_(std::move(ranked)) {}
154 [[nodiscard]] eve::Result<void> upsert(std::string_view id, float x, float y, std::string_view faction,
185 [[nodiscard]] eve::Result<CandidateQueryResult> query(const QueryOrigin& origin, const QuerySpec& spec);
188 [[nodiscard]] eve::Result<int> circle(float x, float y, float radius, std::string_view requireTagsCsv,
192 [[nodiscard]] eve::Result<int> box(float minX, float minY, float maxX, float maxY, std::string_view requireTagsCsv,
205 [[nodiscard]] eve::Result<int> executePreset(std::string_view presetId, float originX, float originY, float dirX,
294 [[nodiscard]] static eve::script::Borrowed<SensingWorld> resolve(SensingWorldHandleRef reference) noexcept;
331[[nodiscard]] inline std::vector<PerceptionFact> perceptionFactsFrom(const CandidateQueryResult& result) {
Vocabulary aliases for nullable and checked borrowed references.
Move-only, checked operation results for the common layer.
Explicit Value/Owned/Borrowed semantics at the Squirrel boundary.
Runtime sensing read surface (provided by the sensing module).
Definition SensingQuery.h:32
Non-owning C++ observation with no implicit lifetime extension.
Definition RuntimeRegistry.h:42
Slot/generation registry whose objects are exclusively unique-owned.
Definition RuntimeRegistry.h:359
Owning ranked result; does not assign a primary target.
Definition Sensing.h:134
CandidateQueryResult(std::vector< RankedCandidate > ranked)
Constructs a CandidateQueryResult.
Definition Sensing.h:139
CandidateQueryResult()=default
Constructs a CandidateQueryResult.
Gameplay-facing 2D candidate query service; it never values or selects targets.
Definition Sensing.h:151
const std::map< std::string, Subject > & subjects() const noexcept
Returns a borrowed view of stored subjects for adapters; valid until mutation.
Definition Sensing.h:228
SensingWorld(const SensingWorld &)=delete
SensingWorld()=default
SensingWorld(SensingWorld &&) noexcept=default
Sensing world.
SensingWorld & operator=(const SensingWorld &)=delete
Module_REG(Sensing)
Definition RTSSystems.h:257
@ DistanceAscending
std::vector< PerceptionFact > perceptionFactsFrom(const CandidateQueryResult &result)
Projects ranked query results into adapter-neutral perception facts.
Definition Sensing.h:331
@ TruncateToMax
Keep the best maxCount candidates after sorting (legacy circle/box limit).
@ FailIfOutOfRange
Fail the query when the filtered set is outside [minCount, maxCount].
std::variant< std::monostate, QueryCircle, QueryBox, QueryCone > QueryShape
Optional broad-phase shape; monostate means range-only around the origin.
Definition Sensing.h:88
std::optional< std::reference_wrapper< T > > OptionalRef
Optional borrowed reference; it does not extend T's lifetime.
Definition BorrowedRef.h:24
Definition Container.h:602
A deterministic candidate returned by a spatial query.
Definition Sensing.h:38
Neutral perception fact projected from a ranked sensing candidate.
Definition Sensing.h:317
Inclusive axis-aligned box shape for QuerySpec (World2D).
Definition Sensing.h:65
World2D origin used for range tests and distance sorting.
Definition Sensing.h:117
std::vector< std::string > excludedTags
Definition Sensing.h:103
std::vector< std::string > excludeFactions
Definition Sensing.h:105
eve::Result< void > validate() const
Validates ranges, counts, tags and shape invariants.
Definition Sensing.cpp:161
std::vector< std::string > requiredTags
Definition Sensing.h:102
std::vector< std::string > includeFactions
Definition Sensing.h:104
One ranked candidate produced by SensingWorld::query.
Definition Sensing.h:124
Handle domain for module-owned sensing worlds.
Definition Sensing.h:272