载入中...
搜索中...
未找到
CrowdInteraction.cpp
浏览该文件的文档.
7 return Result<void>::failure(Diagnostic::error(DiagnosticCode::NotFound, "Crowd agent not found", "id"));
11 Diagnostic::error(DiagnosticCode::InvalidArgument, "Invalid crowd interaction policy", "policy"));
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
static Status success(StatusCode code=StatusCode::Ok)
Construct a successful status with an explicit non-error outcome.
Definition Status.h:81
Result< void > setAgentInteraction(int id, AgentInteraction policy)
Atomically replace the local interaction policy for a current compact slot.
Definition CrowdInteraction.cpp:5
Result< AgentInteraction > getAgentInteraction(int id) const
Read an owning policy snapshot, or NotFound for an invalid compact slot. @thread Simulation thread on...
Definition CrowdInteraction.cpp:20
Definition Crowd.cpp:14
@ InvalidArgument
@ NotFound
@ Applied
Independent local interaction policy, copied into Crowd storage.
Definition Crowd.h:56
float pushability
Relative contact mobility in [0,1]; zero cannot be pushed by agents.
Definition Crowd.h:57
bool holdPosition
Suppress locomotion and agent pushes; terrain constraints still apply.
Definition Crowd.h:58