Owner-thread derived shared static-goal navigation service; retains no ECS pointers. 更多...
#include <RTSCrowdFlowNavigationInternal.h>
类 | |
| struct | GroupInput |
| Owning group projection prepared once before the motion phase. 更多... | |
| struct | GroupMember |
| Transient group member binding; RTS remains the membership authority. 更多... | |
| struct | Notice |
| Owning deferred notification; stale handles are resolved at delivery. 更多... | |
| class | Route |
| Opaque owning steering selection, valid only for the captured Crowd input epoch. 更多... | |
Public 类型 | |
| enum class | InputChange { Unchanged , Changed } |
| enum class | DriveState { Pending , Ready , Unreachable , Unavailable } |
Public 成员函数 | |
| EVENGINE_API_DOMAINS Result< void > | replaceGroups (crowd::Crowd &crowd, std::vector< GroupInput > groups) |
| Atomically replace derived group bindings after validating the complete projection. @ownership Consumes owning input, retains handles and immutable keys, no ECS pointers. @thread Owner thread. @reentrancy No callbacks. @cost Sorting per group and member lookup table, amortized once per group phase. | |
| EVENGINE_API_DOMAINS Result< Route > | requestRoute (crowd::Crowd &crowd, ecs::EntityHandle unit, std::string_view orderId, WorldPosition position, WorldPosition target, SimulationTick tick) |
| Collect the applicable group or exact-terminal request for one current order. @ownership Borrows inputs only for this call; returned route owns its immutable key. @thread Owner thread. @reentrancy No callbacks. @cost Logarithmic member lookup and bounded cell lookup; no repeated group sorting. | |
| EVENGINE_API_DOMAINS Result< DriveState > | steerRoute (crowd::Crowd &crowd, WorldPosition position, const Route &route, float radius, crowd::MovementBinding movement, crowd::AgentUpdate &update) |
| Steer a previously collected route without repeating target-set conversion. @ownership Borrows route for this call; update receives an owning lease. @thread Owner thread. @reentrancy No callbacks. @cost Bounded canonical job lookup per unit. | |
| CrowdFlowNavigation (CrowdFlowNavigationSettings settings) | |
| Store cheap owning quotas without preparing graph work. | |
| bool | enabled () const noexcept |
| Observe policy enablement; owner thread, no callbacks or provider access. | |
| EVENGINE_API_DOMAINS Result< void > | configure (CrowdFlowNavigationSettings settings) noexcept |
| Change cheap quotas without losing jobs or the owner/tick spending latch. @ownership Stores values only. @thread Owner thread. @reentrancy No callbacks. | |
| EVENGINE_API_DOMAINS void | disable () noexcept |
| Disable policy and release jobs/leases while retaining the current spending boundary. @thread Owner thread. @reentrancy No callbacks. No provider pointer is retained. | |
| EVENGINE_API_DOMAINS Result< InputChange > | begin (crowd::Crowd &crowd, const SimulationStep &step) |
| Reconcile owner/input epochs and retire unused goals; owner thread, no callbacks. | |
| EVENGINE_API_DOMAINS Result< void > | request (crowd::Crowd &crowd, WorldPosition target, SimulationTick tick) |
| EVENGINE_API_DOMAINS Result< void > | pump (crowd::Crowd &crowd, const SimulationStep &step) |
| EVENGINE_API_DOMAINS Result< DriveState > | steer (crowd::Crowd &crowd, WorldPosition position, WorldPosition target, float radius, crowd::MovementBinding movement, crowd::AgentUpdate &update) |
| EVENGINE_API_DOMAINS Result< void > | request (crowd::Crowd &crowd, std::span< const WorldPosition > targets, SimulationTick tick) |
| Collect a canonical multi-slot target set into the same quota service. @ownership Copies input values, retaining no spans. @thread Owner thread. @reentrancy No callbacks. @cost Bounded goal conversion/sort; amortize per shared group request. | |
| EVENGINE_API_DOMAINS Result< DriveState > | steer (crowd::Crowd &crowd, WorldPosition position, std::span< const WorldPosition > targets, WorldPosition exactTarget, float radius, crowd::MovementBinding movement, crowd::AgentUpdate &update) |
| Select a multi-slot shared field while preserving this unit's exact destination. @ownership Borrows inputs for this call; only an owning lease enters update. @thread Owner thread. @reentrancy No callbacks. @cost Bounded canonical key lookup; amortize at shared steering boundaries. | |
| EVENGINE_API_DOMAINS CrowdFlowNavigationObservation | observation () const noexcept |
| Observe bounded work metadata without field copies; owner thread only. | |
| void | queueNotice (ecs::EntityHandle unit, const OrderRecord &order) |
| Append an owning post-commit event; failure leaves this notice unpublished. | |
| std::vector< Notice > | takeNotices () |
| Transfer committed notices to caller before invoking unknown callbacks. @ownership Caller owns moved records/handles and resolves liveness before delivery. @cost Constant-time buffer ownership transfer, amortized per motion phase; delivery is separate. | |
详细描述
Owner-thread derived shared static-goal navigation service; retains no ECS pointers.
在文件 RTSCrowdFlowNavigationInternal.h 第 7 行定义.
成员枚举类型说明
◆ DriveState
|
strong |
| 枚举值 | |
|---|---|
| Pending | |
| Ready | |
| Unreachable | |
| Unavailable | |
在文件 RTSCrowdFlowNavigationInternal.h 第 10 行定义.
◆ InputChange
|
strong |
| 枚举值 | |
|---|---|
| Unchanged | |
| Changed | |
在文件 RTSCrowdFlowNavigationInternal.h 第 9 行定义.
构造及析构函数说明
◆ CrowdFlowNavigation()
|
inlineexplicit |
Store cheap owning quotas without preparing graph work.
在文件 RTSCrowdFlowNavigationInternal.h 第 52 行定义.
成员函数说明
◆ begin()
| Result< CrowdFlowNavigation::InputChange > eve::rts::CrowdFlowNavigation::begin | ( | crowd::Crowd & | crowd, |
| const SimulationStep & | step | ||
| ) |
Reconcile owner/input epochs and retire unused goals; owner thread, no callbacks.
在文件 RTSCrowdFlowNavigation.cpp 第 28 行定义.
引用了 changed, Changed, eve::crowd::Crowd::getFieldStatus(), eve::PreconditionViolation, source, step, eve::Result< T >::success() , 以及 Unchanged.
◆ configure()
|
noexcept |
Change cheap quotas without losing jobs or the owner/tick spending latch. @ownership Stores values only. @thread Owner thread. @reentrancy No callbacks.
- 返回
- Applied/NoOp; caller validates quota ranges before entry.
在文件 RTSCrowdFlowNavigation.cpp 第 13 行定义.
引用了 eve::Applied, eve::NoOp, settings, eve::Status::success() , 以及 eve::Result< T >::success().
◆ disable()
|
noexcept |
Disable policy and release jobs/leases while retaining the current spending boundary. @thread Owner thread. @reentrancy No callbacks. No provider pointer is retained.
在文件 RTSCrowdFlowNavigation.cpp 第 21 行定义.
◆ enabled()
|
inlinenoexcept |
Observe policy enablement; owner thread, no callbacks or provider access.
在文件 RTSCrowdFlowNavigationInternal.h 第 54 行定义.
◆ observation()
|
noexcept |
Observe bounded work metadata without field copies; owner thread only.
在文件 RTSCrowdFlowNavigation.cpp 第 271 行定义.
引用了 eve::rts::CrowdFlowNavigationObservation::pendingGoals , 以及 result.
◆ pump()
| Result< void > eve::rts::CrowdFlowNavigation::pump | ( | crowd::Crowd & | crowd, |
| const SimulationStep & | step | ||
| ) |
在文件 RTSCrowdFlowNavigation.cpp 第 113 行定义.
引用了 eve::crowd::Crowd::acquireFlowField(), eve::crowd::Crowd::advanceFlowBuild(), eve::rts::CrowdFlowNavigationObservation::cacheHits, eve::rts::CrowdFlowNavigationObservation::cachePressure, cancelled, eve::crowd::Crowd::Cancelled, count, eve::Result< T >::failure(), index, eve::rts::CrowdFlowNavigationObservation::lastStarts, eve::rts::CrowdFlowNavigationObservation::lastWork, left, eve::rts::CrowdFlowNavigationSettings::maxStartsPerTick, eve::rts::CrowdFlowNavigationSettings::maxWorkPerTick, eve::NoOp, eve::NotFound, ordered, eve::crowd::Crowd::Pending, eve::rts::CrowdFlowNavigationObservation::prepared, eve::crowd::Crowd::prepareFlowBuild(), eve::crowd::Crowd::Ready, eve::Rejected, right, selected, state, step, eve::Status::success(), eve::Result< T >::success() , 以及 eve::crowd::Crowd::Unreachable.
◆ queueNotice()
|
inline |
Append an owning post-commit event; failure leaves this notice unpublished.
在文件 RTSCrowdFlowNavigationInternal.h 第 97 行定义.
◆ replaceGroups()
| Result< void > eve::rts::CrowdFlowNavigation::replaceGroups | ( | crowd::Crowd & | crowd, |
| std::vector< GroupInput > | groups | ||
| ) |
Atomically replace derived group bindings after validating the complete projection. @ownership Consumes owning input, retains handles and immutable keys, no ECS pointers. @thread Owner thread. @reentrancy No callbacks. @cost Sorting per group and member lookup table, amortized once per group phase.
在文件 RTSCrowdFlowGroups.cpp 第 19 行定义.
引用了 binding, eve::Conflict, eve::Result< T >::failure(), eve::crowd::Crowd::getFieldStatus(), group, groups, handle, eve::InvalidArgument, left, member, previous, right, source , 以及 eve::Result< T >::success().
◆ request() [1/2]
| Result< void > eve::rts::CrowdFlowNavigation::request | ( | crowd::Crowd & | crowd, |
| std::span< const WorldPosition > | targets, | ||
| SimulationTick | tick | ||
| ) |
Collect a canonical multi-slot target set into the same quota service. @ownership Copies input values, retaining no spans. @thread Owner thread. @reentrancy No callbacks. @cost Bounded goal conversion/sort; amortize per shared group request.
在文件 RTSCrowdFlowNavigation.cpp 第 82 行定义.
引用了 eve::Result< T >::failure(), targets , 以及 tick.
◆ request() [2/2]
| Result< void > eve::rts::CrowdFlowNavigation::request | ( | crowd::Crowd & | crowd, |
| WorldPosition | target, | ||
| SimulationTick | tick | ||
| ) |
在文件 RTSCrowdFlowNavigation.cpp 第 79 行定义.
◆ requestRoute()
| Result< CrowdFlowNavigation::Route > eve::rts::CrowdFlowNavigation::requestRoute | ( | crowd::Crowd & | crowd, |
| ecs::EntityHandle | unit, | ||
| std::string_view | orderId, | ||
| WorldPosition | position, | ||
| WorldPosition | target, | ||
| SimulationTick | tick | ||
| ) |
Collect the applicable group or exact-terminal request for one current order. @ownership Borrows inputs only for this call; returned route owns its immutable key. @thread Owner thread. @reentrancy No callbacks. @cost Logarithmic member lookup and bounded cell lookup; no repeated group sorting.
在文件 RTSCrowdFlowGroups.cpp 第 67 行定义.
引用了 binding, cell, eve::Result< T >::failure(), eve::crowd::Crowd::getFieldStatus(), handle, member, position, source, eve::Result< T >::success(), target, tick , 以及 unit.
◆ steer() [1/2]
| Result< CrowdFlowNavigation::DriveState > eve::rts::CrowdFlowNavigation::steer | ( | crowd::Crowd & | crowd, |
| WorldPosition | position, | ||
| std::span< const WorldPosition > | targets, | ||
| WorldPosition | exactTarget, | ||
| float | radius, | ||
| crowd::MovementBinding | movement, | ||
| crowd::AgentUpdate & | update | ||
| ) |
Select a multi-slot shared field while preserving this unit's exact destination. @ownership Borrows inputs for this call; only an owning lease enters update. @thread Owner thread. @reentrancy No callbacks. @cost Bounded canonical key lookup; amortize at shared steering boundaries.
在文件 RTSCrowdFlowNavigation.cpp 第 218 行定义.
引用了 eve::Result< T >::failure(), position, radius, target , 以及 targets.
◆ steer() [2/2]
| Result< CrowdFlowNavigation::DriveState > eve::rts::CrowdFlowNavigation::steer | ( | crowd::Crowd & | crowd, |
| WorldPosition | position, | ||
| WorldPosition | target, | ||
| float | radius, | ||
| crowd::MovementBinding | movement, | ||
| crowd::AgentUpdate & | update | ||
| ) |
◆ steerRoute()
| Result< CrowdFlowNavigation::DriveState > eve::rts::CrowdFlowNavigation::steerRoute | ( | crowd::Crowd & | crowd, |
| WorldPosition | position, | ||
| const Route & | route, | ||
| float | radius, | ||
| crowd::MovementBinding | movement, | ||
| crowd::AgentUpdate & | update | ||
| ) |
Steer a previously collected route without repeating target-set conversion. @ownership Borrows route for this call; update receives an owning lease. @thread Owner thread. @reentrancy No callbacks. @cost Bounded canonical job lookup per unit.
在文件 RTSCrowdFlowGroups.cpp 第 102 行定义.
引用了 eve::crowd::Crowd::getFieldStatus(), position, radius, source , 以及 eve::StaleHandle.
◆ takeNotices()
|
inline |
Transfer committed notices to caller before invoking unknown callbacks. @ownership Caller owns moved records/handles and resolves liveness before delivery. @cost Constant-time buffer ownership transfer, amortized per motion phase; delivery is separate.
在文件 RTSCrowdFlowNavigationInternal.h 第 102 行定义.
该类的文档由以下文件生成:
- src/modules/rts/RTSCrowdFlowNavigationInternal.h
- src/modules/rts/RTSCrowdFlowGroups.cpp
- src/modules/rts/RTSCrowdFlowNavigation.cpp