载入中...
搜索中...
未找到
Sensing.h
浏览该文件的文档.
178 explicit CandidateQueryResult(std::vector<RankedCandidate> ranked) : ranked_(std::move(ranked)) {}
203 [[nodiscard]] Result<void> upsertPosition(std::string_view id, float x, float y, float z, std::string_view faction,
206 [[nodiscard]] eve::Result<void> upsert(std::string_view id, float x, float y, std::string_view faction,
226 [[nodiscard]] eve::Result<void> setMetrics(std::string_view id, float pathProgress, float strength);
256 [[nodiscard]] eve::Result<CandidateQueryResult> query(const QueryOrigin& origin, const QuerySpec& spec);
263 [[nodiscard]] Result<CandidateQueryResult> query(const QueryOrigin& origin, const QuerySpec& spec,
278 [[nodiscard]] Result<EnvironmentRequest> environmentInput(const QueryOrigin& origin, const QuerySpec& spec) const;
285 [[nodiscard]] Result<EnvironmentQueryResult> executeEnvironmentQuery(const EnvironmentQueryPlan& plan,
293 [[nodiscard]] Result<Value> queryPositions(float originX, float originY, float targetX, float targetY, float radius,
297 [[nodiscard]] eve::Result<int> circle(float x, float y, float radius, std::string_view requireTagsCsv,
304 [[nodiscard]] eve::Result<int> circleSorted(float x, float y, float radius, std::string_view requireTagsCsv,
309 [[nodiscard]] eve::Result<int> box(float minX, float minY, float maxX, float maxY, std::string_view requireTagsCsv,
322 [[nodiscard]] eve::Result<int> executePreset(std::string_view presetId, float originX, float originY, float dirX,
418 [[nodiscard]] static eve::script::Borrowed<SensingWorld> resolve(SensingWorldHandleRef reference) noexcept;
457[[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.
Owning, renderer-independent dynamic values.
Runtime sensing read surface (provided by the sensing module).
Definition SensingQuery.h:32
Non-owning observation of a registry-owned object.
Definition RuntimeBorrow.h:27
Slot/generation registry whose objects are exclusively unique-owned.
Definition RuntimeRegistry.h:292
Owning ranked result; does not assign a primary target.
Definition Sensing.h:173
CandidateQueryResult(std::vector< RankedCandidate > ranked)
Constructs a CandidateQueryResult.
Definition Sensing.h:178
CandidateQueryResult()=default
Constructs a CandidateQueryResult.
Immutable resolved plan, safe to reuse after definitions are edited or destroyed. @ownership Shares i...
Definition EnvironmentQuery.h:202
Mirrored world positions and query composition; consumers decide gameplay actions from results.
Definition Sensing.h:197
const std::map< std::string, Subject > & subjects() const noexcept
Returns a borrowed view of stored subjects for adapters; valid until mutation.
Definition Sensing.h:345
SensingWorld(const SensingWorld &)=delete
SensingWorld()
SensingWorld & operator=(const SensingWorld &)=delete
Module_REG(Sensing)
Definition RTSSystems.h:258
@ StrengthDescending
@ DistanceAscending
@ PathProgressAscending
@ StrengthAscending
@ DistanceDescending
@ PathProgressDescending
std::vector< PerceptionFact > perceptionFactsFrom(const CandidateQueryResult &result)
Projects ranked query results into adapter-neutral perception facts.
Definition Sensing.h:457
CoordinateSpace
Coordinate spaces are not interchangeable, even when dimensions match.
Definition CoordinateSpace.h:5
QueryAxes
Independent distance/projection semantics; planar shapes use these two axes.
Definition Sensing.h:113
std::variant< std::monostate, QueryCircle, QueryBox, QueryCone, QuerySphere > QueryShape
Optional broad-phase shape; monostate means range-only around the origin.
Definition Sensing.h:118
@ TruncateToMax
Keep the best maxCount candidates after sorting (legacy circle/box limit).
@ FailIfOutOfRange
Fail the query when the filtered set is outside [minCount, maxCount].
SpatialIndexKind
Broad-phase implementation; selecting an index never changes query semantics.
Definition Sensing.h:115
Definition Scene.h:37
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
Owning broad-phase output; collection never publishes or applies result limits.
Definition Sensing.h:190
std::vector< RankedCandidate > candidates
Definition Sensing.h:191
A deterministic candidate returned by a spatial query.
Definition Sensing.h:53
Per-execution values. No world pointers or callbacks are retained.
Definition EnvironmentQuery.h:26
Borrowed providers for this synchronous execution only.
Definition EnvironmentQuery.h:32
Neutral perception fact projected from a ranked sensing candidate.
Definition Sensing.h:441
Inclusive axis-aligned box shape for QuerySpec (World2D).
Definition Sensing.h:86
World origin used for range tests, distance sorting and LOS.
Definition Sensing.h:150
std::vector< std::string > excludedTags
Definition Sensing.h:133
std::vector< std::string > excludeFactions
Definition Sensing.h:135
EVENGINE_API_PLATFORM eve::Result< void > validate() const
Validates ranges, counts, tags and shape invariants.
Definition Sensing.cpp:242
std::vector< std::string > requiredTags
Definition Sensing.h:132
std::vector< std::string > includeFactions
Definition Sensing.h:134
One ranked candidate produced by SensingWorld::query.
Definition Sensing.h:159
Handle domain for module-owned sensing worlds.
Definition Sensing.h:396