载入中...
搜索中...
未找到
eve::crowd 命名空间参考

类

struct  AdvanceBudget
 Deterministic operation budgets; exhaustion rejects the entire step before publication. 更多...
 
struct  AgentBatchReceipt
 Owning receipt for a committed update or removal batch. 更多...
 
struct  AgentFrame
 Caller-owned frame storage; no pointers into Crowd are retained. 更多...
 
struct  AgentFrameEntry
 Owning row for a reusable renderer-neutral output frame. 更多...
 
struct  AgentInteraction
 Independent local interaction policy, copied into Crowd storage. 更多...
 
struct  AgentRef
 Agent identity qualified by the Crowd instance that owns its registry. @ownership Value only; it neither owns nor keeps the Crowd alive. @lifetime Survives swap-pop of other agents; invalid after removal, clear, restore or owner destruction. @thread Resolve on the simulation owner thread. @reentrancy No callbacks. 更多...
 
struct  AgentRelocation
 Explicit relocation of one live agent; velocity resets while identity and intent remain. 更多...
 
struct  AgentRelocationBatch
 Atomic exact placement batch; rejects terrain/contact violations without pushing neighbors. 更多...
 
struct  AgentRemovalBatch
 Owned identities to remove atomically; duplicate and stale references are rejected. 更多...
 
struct  AgentState
 单个单位的状态快照(脚本 getAgentState 返回值)。 action: 0=idle, 1=flow, 2=seek, 3=boids。 更多...
 
struct  AgentUpdate
 Owned changes for one live agent. Absent fields keep their existing values. 更多...
 
struct  AgentUpdateBatch
 Caller-built atomic update batch; duplicate agent references are rejected. 更多...
 
struct  AvoidanceSettings
 Optional bounded velocity sampling for RTS local avoidance. 更多...
 
class  Crowd
 群体行为模块:连续流场寻路 + 海量单位移动/转向/行动 + Boids 鸟群。 更多...
 
struct  CrowdAgentTag
 Owner-local registry identity for a Crowd agent, independent of dense storage. 更多...
 
class  CrowdField
 连续流场(flow field)。 更多...
 
class  CrowdSpatialIndex
 Owning sparse broadphase workspace; integer cell/row order and stable tie-key bucket order. @ownership Contains numeric slots only, no borrowed positions or entity pointers. @thread Owner thread. @reentrancy Queries cannot mutate the index or call unknown callbacks. @cost Storage scales with agents and occupied cells, not their bounding rectangle. 更多...
 
struct  CrowdStep
 Explicit owner step; positive duration consumes the next contiguous tick. Zero reconciles current tick. 更多...
 
struct  CrowdTieKey
 Canonical in-process tie ordering; named identities sort before anonymous admission ordinals. 更多...
 
class  CrowdWorkScheduler
 Synchronous scheduler for fixed logical partitions, independent of worker identity. @ownership Caller retains shared adapter lease; callbacks are borrowed only until execute returns. @thread Invoked by the Crowd owner; bodies may run concurrently on workers. @reentrancy Bodies must not reenter or mutate Crowd through public APIs. No callbacks under a lock. 更多...
 
struct  FieldObservation
 Owning navigation metadata; no arrays or pointers are borrowed. 更多...
 
struct  FlowCacheObservation
 Retained navigation-storage accounting; excludes allocator bookkeeping and pending builds. 更多...
 
struct  FlowGoal
 Logical grid destination; canonical request sets sort lexicographically and remove duplicates. 更多...
 
class  FlowLease
 Owning immutable field lease; copies pin storage, never the Crowd provider. @thread Copy/release/query on the simulation owner thread for deterministic eviction. Owner/input/generation identify in-process use. Destruction releases the pin; never persist this value. 更多...
 
struct  FlowSample
 Owning lease sample with explicit reachability. 更多...
 
struct  FlowVec
 流场采样结果(脚本 flowAtWorld / flowAtCell 返回值)。 更多...
 
struct  InteractionPolicy
 Canonical independent predictive-steering and body-contact policy; both filters are symmetric. 更多...
 
struct  MovementBinding
 Agent-owned selection of a provider-defined movement policy. Zero identity and revision mean compatibility mode; otherwise both must be positive. A binding does not own a provider or a field. Stale/missing policies suspend Flow steering. 更多...
 
struct  MovementClassTag
 Movement policy identity; the provider owns its stable definition. 更多...
 
struct  NavigationSurfaceSnapshot
 Owning adapter input: raw physical terrain and separately inflated navigation costs. @ownership Copies are values; prepare never retains caller arrays. @thread Prepare/publish on the simulation owner thread; source ownership remains with the map provider. 更多...
 
struct  NavigationSurfaceStamp
 Provenance of one immutable navigation projection. 更多...
 
struct  NavigationSurfaceTag
 Domain tags for world-owned navigation identities. 更多...
 
struct  SpawnBatch
 Caller-built transaction; positive budgets bound search and relaxation. @cost Linear in requested agents plus bounded candidate/contact checks; callers amortize by batching spawns. 更多...
 
struct  SpawnPlacement
 Owning placement result, independent of compact slots and subsequent removal. 更多...
 
struct  SpawnReceipt
 Observations from a committed spawn transaction. @cost Linear in created placement count; returned by value once per spawn batch. 更多...
 
struct  SpawnRequest
 One named agent to create; all fields are owned values. 更多...
 
struct  SteeringIntent
 Owning local steering request; does not retain navigation or gameplay objects. 更多...
 
struct  StepReport
 Owning observations of one completed advance; simulation-thread only. 更多...
 
struct  WorkLimit
 Non-allocating internal unwind signal, translated at the checked simulation boundary. 更多...
 

类型定义

using AgentCreateBatch = SpawnBatch
 Canonical creation batch; reuses the existing atomic placement policies and budgets.
 
using NavigationSurfaceId = detail::StrongUint64< NavigationSurfaceTag >
 
using MovementClassId = detail::StrongUint64< MovementClassTag >
 
using AgentHandle = RuntimeHandle< CrowdAgentTag >
 Generation-qualified runtime agent identity; never persist its packed representation.
 

枚举

enum class  FlowSampleState { Reachable , Unreachable }
 Reachability is distinct from gameplay arrival. 更多...
 
enum class  SolveQuality : std::uint32_t { Complete = 0 , PredictionTruncated = 1 , ContactResidual = 2 , WallResidual = 4 }
 Independent quality flags; complete is zero, truncation/residuals may coexist. 更多...
 
enum class  AgentAction : std::int32_t { Idle = 0 , Flow = 1 , Seek = 2 , Boids = 3 }
 Strong locomotion intent; numeric values retain compatibility action codes. 更多...
 
enum class  SpawnPolicy { RejectOverlap , NearestFree , PushNeighbors }
 Placement policy for an atomic spawn batch. 更多...
 
enum class  FieldState { Unconfigured , Unbuilt , Ready , Stale }
 Navigation readiness relative to the current terrain and goals. 更多...
 
enum class  CrowdExecution { Serial , Parallel }
 Explicit execution selection; serial does not require a provider. 更多...
 

函数

 Module_IMPL (Crowd, new Crowd())
 
bool validAgentUpdate (const AgentUpdate &update)
 
MovementBinding parseMovementBinding (const ssq::Table &table)
 Decode exact integer movement identities; no floating-point identity coercion.
 
InteractionPolicy parseInteractionPolicy (ssq::Table table)
 Decode a canonical policy at the script boundary; throws on missing or wrongly typed fields.
 
void exposeAgentBatches (ssq::Class &cls)
 Compose public numeric identity/batch bindings without accessing private storage.
 
Result< std::vector< int > > canonicalFlowCoordinates (std::span< const FlowGoal > goals, const CrowdField &field)
 Copy validated goals into their unique canonical coordinates.
 
bool isFlowPointReachable (const CrowdField &field, float x, float y) noexcept
 Observe exact containing-cell reachability, independent of interpolation across blocked cells. @ownership Borrows immutable field only during call. @thread Owner thread. @reentrancy No callbacks.
 
InteractionPolicy canonicalInteraction (AgentInteraction policy)
 Normalize a compatibility filter into the canonical two-filter policy.
 
bool validInteraction (InteractionPolicy policy)
 Check finite mobility and nonnegative filter masks without modifying state.
 
void exposeNavigationRequests (ssq::Class &cls)
 Register generation-qualified transient navigation request bindings.
 
Result< FlowLease > resolveFlowRequestLease (Crowd &crowd, const ssq::Table &token)
 Resolve a checked request-owned lease without retaining script table references.
 
bool isTerrainClear (const CrowdField &field, bool clamp, float x, float y, float radius)
 Shared exact-placement geometry predicate for creation and relocation transactions.
 
std::uint64_t namedTieValue (std::string_view identity)
 Hash UTF-8 identity bytes once at admission; collisions are rejected by the registry.
 

变量

constexpr std::uint32_t flowBuildAlgorithmVersion = 1
 Increment when the navigation construction algorithm changes its observable output.
 

类型定义说明

◆ AgentCreateBatch

Canonical creation batch; reuses the existing atomic placement policies and budgets.

在文件 Crowd.h 第 233 行定义.

◆ AgentHandle

Generation-qualified runtime agent identity; never persist its packed representation.

在文件 CrowdTypes.h 第 82 行定义.

◆ MovementClassId

◆ NavigationSurfaceId

枚举类型说明

◆ AgentAction

enum class eve::crowd::AgentAction : std::int32_t
strong

Strong locomotion intent; numeric values retain compatibility action codes.

枚举值
Idle 
Flow 
Seek 
Boids 

在文件 Crowd.h 第 153 行定义.

◆ CrowdExecution

enum class eve::crowd::CrowdExecution
strong

Explicit execution selection; serial does not require a provider.

枚举值
Serial 
Parallel 

在文件 CrowdWorkScheduler.h 第 7 行定义.

◆ FieldState

enum class eve::crowd::FieldState
strong

Navigation readiness relative to the current terrain and goals.

枚举值
Unconfigured 
Unbuilt 
Ready 
Stale 

在文件 CrowdField.h 第 15 行定义.

◆ FlowSampleState

enum class eve::crowd::FlowSampleState
strong

Reachability is distinct from gameplay arrival.

枚举值
Reachable 
Unreachable 

在文件 Crowd.h 第 48 行定义.

◆ SolveQuality

enum class eve::crowd::SolveQuality : std::uint32_t
strong

Independent quality flags; complete is zero, truncation/residuals may coexist.

枚举值
Complete 
PredictionTruncated 
ContactResidual 
WallResidual 

在文件 Crowd.h 第 64 行定义.

◆ SpawnPolicy

enum class eve::crowd::SpawnPolicy
strong

Placement policy for an atomic spawn batch.

枚举值
RejectOverlap 
NearestFree 
PushNeighbors 

在文件 Crowd.h 第 207 行定义.

函数说明

◆ canonicalFlowCoordinates()

Result< std::vector< int > > eve::crowd::canonicalFlowCoordinates ( std::span< const FlowGoal >  goals,
const CrowdField &  field 
)

Copy validated goals into their unique canonical coordinates.

返回
Owning coordinates or invalid input. @ownership Retains no caller span. @thread Owner thread. @reentrancy No callbacks. @cost Bounded sorting/copying per goal set; amortize per navigation request.

在文件 CrowdFlowCache.cpp 第 13 行定义.

引用了 eve::InvalidArgument, result , 以及 eve::json::Value::size().

被这些函数引用 eve::crowd::Crowd::acquireFlowField() , 以及 eve::crowd::Crowd::prepareFlowBuild().

◆ canonicalInteraction()

◆ exposeAgentBatches()

void eve::crowd::exposeAgentBatches ( ssq::Class &  cls)

Compose public numeric identity/batch bindings without accessing private storage.

在文件 CrowdBatchBindings.cpp 第 134 行定义.

引用了 eve::crowd::Crowd::advance(), cls, error, exposeAgentBatches(), input, step , 以及 vm.

被这些函数引用 exposeAgentBatches().

◆ exposeNavigationRequests()

void eve::crowd::exposeNavigationRequests ( ssq::Class &  cls)

Register generation-qualified transient navigation request bindings.

在文件 CrowdNavigationBindings.cpp 第 73 行定义.

◆ isFlowPointReachable()

bool eve::crowd::isFlowPointReachable ( const CrowdField &  field,
float  x,
float  y 
)
noexcept

Observe exact containing-cell reachability, independent of interpolation across blocked cells. @ownership Borrows immutable field only during call. @thread Owner thread. @reentrancy No callbacks.

在文件 CrowdFlowCache.cpp 第 31 行定义.

引用了 cx, cy, x , 以及 y.

被这些函数引用 eve::crowd::Crowd::Impl::preparePreferredVelocities() , 以及 eve::crowd::Crowd::sampleFlowField().

◆ isTerrainClear()

bool eve::crowd::isTerrainClear ( const CrowdField &  field,
bool  clamp,
float  x,
float  y,
float  radius 
)

Shared exact-placement geometry predicate for creation and relocation transactions.

在文件 CrowdSpawn.cpp 第 6 行定义.

引用了 radius, x , 以及 y.

被这些函数引用 eve::crowd::Crowd::createAgents() , 以及 eve::crowd::Crowd::relocateAgents().

◆ Module_IMPL()

eve::crowd::Module_IMPL ( Crowd  ,
new   Crowd() 
)

◆ namedTieValue()

std::uint64_t eve::crowd::namedTieValue ( std::string_view  identity)

Hash UTF-8 identity bytes once at admission; collisions are rejected by the registry.

在文件 CrowdRegistry.cpp 第 23 行定义.

引用了 identity , 以及 value.

被这些函数引用 eve::crowd::Crowd::addNamedAgent() , 以及 eve::crowd::Crowd::createAgents().

◆ parseInteractionPolicy()

InteractionPolicy eve::crowd::parseInteractionPolicy ( ssq::Table  table)

Decode a canonical policy at the script boundary; throws on missing or wrongly typed fields.

在文件 CrowdBatchBindings.cpp 第 119 行定义.

引用了 key, mask, parseInteractionPolicy() , 以及 value.

被这些函数引用 parseInteractionPolicy().

◆ parseMovementBinding()

MovementBinding eve::crowd::parseMovementBinding ( const ssq::Table &  table)

Decode exact integer movement identities; no floating-point identity coercion.

在文件 CrowdBatchBindings.cpp 第 112 行定义.

引用了 identity, parseMovementBinding() , 以及 revision.

被这些函数引用 parseMovementBinding().

◆ resolveFlowRequestLease()

Result< FlowLease > eve::crowd::resolveFlowRequestLease ( Crowd &  crowd,
const ssq::Table &  token 
)

Resolve a checked request-owned lease without retaining script table references.

返回
Owning pin copy or structured invalid/stale failure. @ownership Copies only the lease. @thread Owner thread. @reentrancy No callbacks.

在文件 CrowdNavigationBindings.cpp 第 61 行定义.

◆ validAgentUpdate()

bool eve::crowd::validAgentUpdate ( const AgentUpdate &  update)

在文件 CrowdBatch.cpp 第 41 行定义.

被这些函数引用 eve::crowd::Crowd::prepareAgentUpdates().

◆ validInteraction()

变量说明

◆ flowBuildAlgorithmVersion

constexpr std::uint32_t eve::crowd::flowBuildAlgorithmVersion = 1
inlineconstexpr

Increment when the navigation construction algorithm changes its observable output.

在文件 CrowdTypes.h 第 41 行定义.

被这些函数引用 eve::crowd::Crowd::acquireFlowField(), eve::crowd::Crowd::acquireFlowField() , 以及 eve::crowd::Crowd::Impl::isFlowLeaseCurrent().