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

类

struct  AgentArchive
 Versioned, owning NPC state used for save/load and hot-reload handoff. 更多...
 
struct  AgentHandleTag
 AgentHandleTag public API. 更多...
 
struct  AgentSnapshot
 AgentSnapshot public API. 更多...
 
struct  BehaviorDefinition
 Immutable, validated source data for one hierarchical NPC state tree. 更多...
 
struct  BlackboardKeySpec
 BlackboardKeySpec public API. 更多...
 
struct  BlackboardPredicate
 BlackboardPredicate public API. 更多...
 
class  INavigationProvider
 Narrow asynchronous pathfinding and locomotion provider contract. @thread Calls are simulation-thread-affine unless an implementation documents stronger guarantees. @reentrancy Implementations must not call back into NpcAiWorld or NavigationTaskService. 更多...
 
class  INavigationRequestFactory
 Builds a typed navigation request from an authored task and current agent projection. 更多...
 
class  ITaskService
 Owned extension point for navigation, animation, combat and gameplay tasks. @thread All calls are simulation-thread-affine. @reentrancy Implementations must not call back into the owning NpcAiWorld. 更多...
 
struct  NavigationProgress
 NavigationProgress public API. 更多...
 
struct  NavigationRequest
 NavigationRequest public API. 更多...
 
class  NavigationTaskService
 ITaskService adapter for asynchronous move-to requests. 更多...
 
struct  NavigationTicketTag
 NavigationTicketTag public API. 更多...
 
struct  NpcAgentState
 Authoritative gameplay-entity link to one module-owned NPC agent. 更多...
 
class  NpcAi
 Factory module for script-owned NPC AI worlds. 更多...
 
struct  NpcAiEcsStepReport
 NpcAiEcsStepReport public API. 更多...
 
class  NpcAiEcsSystem
 Gameplay-decision phase adapter over a caller-selected existing entity root. 更多...
 
struct  NpcAiProjection
 Cold derived, local-only projection for rendering, editor and gameplay inspection. 更多...
 
struct  NpcAiSystemContract
 NpcAiSystemContract public API. 更多...
 
class  NpcAiWorld
 Authoritative owner and deterministic scheduler for NPC AI agents. 更多...
 
struct  NpcAiWorldConfig
 NpcAiWorldConfig public API. 更多...
 
struct  PerceptionMemory
 One bounded, expiring item of NPC perception memory. 更多...
 
struct  SmartObjectCandidate
 SmartObjectCandidate public API. 更多...
 
struct  SmartObjectClaimHandleTag
 SmartObjectClaimHandleTag public API. 更多...
 
struct  SmartObjectClaimSnapshot
 SmartObjectClaimSnapshot public API. 更多...
 
struct  SmartObjectDefinition
 SmartObjectDefinition public API. 更多...
 
struct  SmartObjectExpirationReport
 SmartObjectExpirationReport public API. 更多...
 
struct  SmartObjectHandleTag
 SmartObjectHandleTag public API. 更多...
 
struct  SmartObjectQuery
 SmartObjectQuery public API. 更多...
 
struct  SmartObjectSlotDefinition
 SmartObjectSlotDefinition public API. 更多...
 
class  SmartObjectWorld
 Authoritative registry and lease manager for reservable world interactions. 更多...
 
struct  StateDefinition
 StateDefinition public API. 更多...
 
struct  TaskArchive
 Portable task state stored inside an NPC archive. 更多...
 
struct  TaskContext
 TaskContext public API. 更多...
 
struct  TaskSpec
 TaskSpec public API. 更多...
 
struct  TickContext
 Input time and work limits for one deterministic simulation update. 更多...
 
struct  TickReport
 TickReport public API. 更多...
 
struct  TraceEvent
 TraceEvent public API. 更多...
 
struct  Transition
 Transition public API. 更多...
 

类型定义

using NavigationTicket = RuntimeHandle< NavigationTicketTag >
 
using BlackboardValue = std::variant< bool, std::int64_t, double, std::string >
 
using AgentHandle = eve::RuntimeHandle< AgentHandleTag >
 
using SmartObjectHandle = RuntimeHandle< SmartObjectHandleTag >
 
using SmartObjectClaimHandle = RuntimeHandle< SmartObjectClaimHandleTag >
 

枚举

enum class  NavigationPhase : std::uint8_t {
  Pending , Moving , Arrived , Unreachable ,
  Cancelled
}
 NavigationPhase public API. 更多...
 
enum class  BlackboardType : std::uint8_t { Boolean , Integer , Number , String }
 BlackboardType public API. 更多...
 
enum class  CompareOp : std::uint8_t {
  Exists , Equal , NotEqual , Less ,
  LessEqual , Greater , GreaterEqual
}
 CompareOp public API. 更多...
 
enum class  TaskStatus : std::uint8_t { Running , Succeeded , Failed }
 TaskStatus public API. 更多...
 
enum class  StopReason : std::uint8_t {
  Completed , Transition , StartupRollback , AgentDestroyed ,
  DefinitionReplaced
}
 StopReason public API. 更多...
 
enum class  TraceKind : std::uint8_t {
  AgentCreated , AgentDestroyed , AgentRestored , BlackboardChanged ,
  SignalQueued , TransitionApplied , TaskStarted , TaskCompleted ,
  TaskFailed , PerceptionUpdated , PerceptionForgotten
}
 TraceKind public API. 更多...
 
enum class  SmartObjectRemoval : std::uint8_t { RejectClaimed , CancelClaims }
 SmartObjectRemoval public API. 更多...
 

函数

std::span< const NpcAiSystemContract > npcAiSystemContracts () noexcept
 Returns immutable process-lifetime metadata for the NPC AI ECS phase.
 
 Module_IMPL (NpcAi, new NpcAi())
 
PerceptionMemory perceptionMemoryFrom (const eve::sensing::PerceptionFact &fact, std::uint64_t observedTick, std::uint64_t forgetAfterTicks, std::string_view sense="sensing.query")
 Builds one PerceptionMemory from a neutral sensing fact.
 
std::vector< PerceptionMemory > perceptionMemoriesFrom (std::span< const eve::sensing::PerceptionFact > facts, std::uint64_t observedTick, std::uint64_t forgetAfterTicks, std::string_view sense="sensing.query")
 Projects a sequence of sensing facts into npc_ai perception memories.
 

类型定义说明

◆ AgentHandle

在文件 NpcAi.h 第 97 行定义.

◆ BlackboardValue

using eve::npc_ai::BlackboardValue = typedef std::variant<bool, std::int64_t, double, std::string>

在文件 NpcAi.h 第 22 行定义.

◆ NavigationTicket

◆ SmartObjectClaimHandle

◆ SmartObjectHandle

枚举类型说明

◆ BlackboardType

enum class eve::npc_ai::BlackboardType : std::uint8_t
strong

BlackboardType public API.

枚举值
Boolean 
Integer 
Number 
String 

在文件 NpcAi.h 第 25 行定义.

◆ CompareOp

enum class eve::npc_ai::CompareOp : std::uint8_t
strong

CompareOp public API.

枚举值
Exists 
Equal 
NotEqual 
Less 
LessEqual 
Greater 
GreaterEqual 

在文件 NpcAi.h 第 27 行定义.

◆ NavigationPhase

enum class eve::npc_ai::NavigationPhase : std::uint8_t
strong

NavigationPhase public API.

枚举值
Pending 
Moving 
Arrived 
Unreachable 
Cancelled 

在文件 Navigation.h 第 25 行定义.

◆ SmartObjectRemoval

enum class eve::npc_ai::SmartObjectRemoval : std::uint8_t
strong

SmartObjectRemoval public API.

枚举值
RejectClaimed 
CancelClaims 

在文件 SmartObject.h 第 28 行定义.

◆ StopReason

enum class eve::npc_ai::StopReason : std::uint8_t
strong

StopReason public API.

枚举值
Completed 
Transition 
StartupRollback 
AgentDestroyed 
DefinitionReplaced 

在文件 NpcAi.h 第 31 行定义.

◆ TaskStatus

enum class eve::npc_ai::TaskStatus : std::uint8_t
strong

TaskStatus public API.

枚举值
Running 
Succeeded 
Failed 

在文件 NpcAi.h 第 29 行定义.

◆ TraceKind

enum class eve::npc_ai::TraceKind : std::uint8_t
strong

TraceKind public API.

枚举值
AgentCreated 
AgentDestroyed 
AgentRestored 
BlackboardChanged 
SignalQueued 
TransitionApplied 
TaskStarted 
TaskCompleted 
TaskFailed 
PerceptionUpdated 
PerceptionForgotten 

在文件 NpcAi.h 第 33 行定义.

函数说明

◆ Module_IMPL()

eve::npc_ai::Module_IMPL ( NpcAi  ,
new   NpcAi() 
)

◆ npcAiSystemContracts()

std::span< const NpcAiSystemContract > eve::npc_ai::npcAiSystemContracts ( )
noexcept

Returns immutable process-lifetime metadata for the NPC AI ECS phase.

在文件 NpcAiECS.cpp 第 25 行定义.

◆ perceptionMemoriesFrom()

std::vector< PerceptionMemory > eve::npc_ai::perceptionMemoriesFrom ( std::span< const eve::sensing::PerceptionFact >  facts,
std::uint64_t  observedTick,
std::uint64_t  forgetAfterTicks,
std::string_view  sense = "sensing.query" 
)
inline

Projects a sequence of sensing facts into npc_ai perception memories.

参数
factsBorrowed sensing facts in ranked order.
observedTickSimulation tick when the facts were observed.
forgetAfterTicksExclusive forget tick; must be > observedTick.
senseStable sense key shared by all projected memories.
返回
Owning memories in the same order as facts.

在文件 SensingPerception.h 第 61 行定义.

引用了 perceptionMemoryFrom().

◆ perceptionMemoryFrom()

PerceptionMemory eve::npc_ai::perceptionMemoryFrom ( const eve::sensing::PerceptionFact &  fact,
std::uint64_t  observedTick,
std::uint64_t  forgetAfterTicks,
std::string_view  sense = "sensing.query" 
)
inline

Builds one PerceptionMemory from a neutral sensing fact.

参数
factBorrowed sensing projection (no ownership transfer).
observedTickSimulation tick when the fact was observed.
forgetAfterTicksExclusive forget tick; must be > observedTick.
senseStable sense key; defaults to "sensing.query".
返回
Owning memory ready for NpcAiWorld::remember.
备注
Confidence maps score through a soft logistic so distance scores stay in (0,1]. @thread Call on the npc_ai world's owning simulation thread.

在文件 SensingPerception.h 第 35 行定义.

引用了 eve::sensing::PerceptionFact::distance, memory, payload, eve::sensing::PerceptionFact::score, eve::sensing::PerceptionFact::scoreReason, eve::npc_ai::PerceptionMemory::subject, eve::sensing::PerceptionFact::subjectId, eve::sensing::PerceptionFact::x , 以及 eve::sensing::PerceptionFact::y.

被这些函数引用 perceptionMemoriesFrom().