Deterministic pooled runtime for AttackVfxRecipe instances. 更多...
#include <AttackVfxRuntime.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| AttackVfxRuntime () | |
| Construct with a default pool capacity of 32. | |
| ~AttackVfxRuntime () | |
| Attack vfx runtime. | |
| AttackVfxRuntime (const AttackVfxRuntime &)=delete | |
| AttackVfxRuntime & | operator= (const AttackVfxRuntime &)=delete |
| Result< void > | configurePool (std::uint32_t capacity) |
| Resize the instance pool. Fails when any slot is occupied. | |
| Result< void > | registerRecipe (const AttackVfxRecipe &recipe) |
| Validate and store an immutable recipe copy keyed by recipe.id. | |
| Result< void > | registerSkin (const AttackVfxSkin &skin) |
| Validate and store a reusable skin keyed by skin.id. | |
| std::optional< AttackVfxRecipe > | findRecipe (const LogicalId &id) const |
| Return a copy of a registered recipe when present. | |
| std::optional< AttackVfxSkin > | findSkin (const LogicalId &id) const |
| Return a copy of a registered skin when present. | |
| Result< AttackVfxHandle > | play (const LogicalId &recipeId, const AttackVfxRequest &request) |
| Spawn one instance from a registered recipe. | |
| Result< AttackVfxFrame > | signal (AttackVfxHandle handle, std::string_view cue) |
| Deliver a named cue to one live instance (e.g. "impact", "cancel"). | |
| Result< AttackVfxFrame > | advance (double dtSeconds) |
| Advance all live instances by injected simulation seconds. | |
| Result< AttackVfxFrame > | stop (AttackVfxHandle handle, AttackVfxStopMode mode) |
| Stop one instance using the requested teardown mode. | |
| std::optional< AttackVfxInstanceState > | inspect (AttackVfxHandle handle) const |
| Snapshot one live instance; empty when the handle is stale. | |
| std::size_t | activeCount () const noexcept |
| Number of occupied slots. | |
| std::size_t | capacity () const noexcept |
| Configured pool capacity. | |
详细描述
Deterministic pooled runtime for AttackVfxRecipe instances.
@ownership Owns live instance slots and registered recipe copies. Layer GPU resources are owned by IAttackVfxLayerExecutor implementations. @thread Simulation-thread affine. No internal synchronization. @reentrancy Does not invoke user callbacks; may call registered executors.
在文件 AttackVfxRuntime.h 第 115 行定义.
构造及析构函数说明
◆ AttackVfxRuntime() [1/2]
| eve::stylize::AttackVfxRuntime::AttackVfxRuntime | ( | ) |
Construct with a default pool capacity of 32.
在文件 AttackVfxRuntime.cpp 第 419 行定义.
◆ ~AttackVfxRuntime()
| eve::stylize::AttackVfxRuntime::~AttackVfxRuntime | ( | ) |
Attack vfx runtime.
在文件 AttackVfxRuntime.cpp 第 420 行定义.
◆ AttackVfxRuntime() [2/2]
|
delete |
成员函数说明
◆ activeCount()
|
noexcept |
◆ advance()
| Result< AttackVfxFrame > eve::stylize::AttackVfxRuntime::advance | ( | double | dtSeconds | ) |
Advance all live instances by injected simulation seconds.
- 参数
-
dtSeconds Finite, non-negative simulation delta.
在文件 AttackVfxRuntime.cpp 第 573 行定义.
引用了 eve::stylize::AttackVfxFrame::advanced, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, state, eve::Result< T >::status(), eve::Result< T >::success() , 以及 updated.
◆ capacity()
|
noexcept |
◆ configurePool()
| Result< void > eve::stylize::AttackVfxRuntime::configurePool | ( | std::uint32_t | capacity | ) |
Resize the instance pool. Fails when any slot is occupied.
- 参数
-
capacity New slot count; must be > 0.
在文件 AttackVfxRuntime.cpp 第 430 行定义.
引用了 capacity(), eve::Diagnostic::error(), eve::Result< T >::failure(), generation, eve::InvalidArgument, eve::InvariantViolation, slots , 以及 eve::Result< T >::success().
◆ findRecipe()
| std::optional< AttackVfxRecipe > eve::stylize::AttackVfxRuntime::findRecipe | ( | const LogicalId & | id | ) | const |
Return a copy of a registered recipe when present.
在文件 AttackVfxRuntime.cpp 第 478 行定义.
◆ findSkin()
| std::optional< AttackVfxSkin > eve::stylize::AttackVfxRuntime::findSkin | ( | const LogicalId & | id | ) | const |
Return a copy of a registered skin when present.
在文件 AttackVfxRuntime.cpp 第 484 行定义.
◆ inspect()
| std::optional< AttackVfxInstanceState > eve::stylize::AttackVfxRuntime::inspect | ( | AttackVfxHandle | handle | ) | const |
Snapshot one live instance; empty when the handle is stale.
在文件 AttackVfxRuntime.cpp 第 693 行定义.
◆ operator=()
|
delete |
◆ play()
| Result< AttackVfxHandle > eve::stylize::AttackVfxRuntime::play | ( | const LogicalId & | recipeId, |
| const AttackVfxRequest & | request | ||
| ) |
Spawn one instance from a registered recipe.
- 返回
- Generation-qualified handle or a structured diagnostic.
在文件 AttackVfxRuntime.cpp 第 490 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::LogicalId::format(), eve::stylize::AttackVfxPhaseState::kind, eve::stylize::AttackVfxPhaseState::layerCount, eve::NotFound, phase, request, state , 以及 eve::Result< T >::success().
◆ registerRecipe()
| Result< void > eve::stylize::AttackVfxRuntime::registerRecipe | ( | const AttackVfxRecipe & | recipe | ) |
Validate and store an immutable recipe copy keyed by recipe.id.
在文件 AttackVfxRuntime.cpp 第 455 行定义.
引用了 eve::Conflict, eve::Diagnostic::error(), eve::LogicalId::format(), eve::stylize::AttackVfxRecipe::id, key, registerSkin(), eve::stylize::AttackVfxRecipe::skin, eve::Result< T >::success(), valid , 以及 eve::stylize::AttackVfxRecipe::validate().
被这些函数引用 eve::stylize_action::StylizeAction::registerRecipeJson().
◆ registerSkin()
| Result< void > eve::stylize::AttackVfxRuntime::registerSkin | ( | const AttackVfxSkin & | skin | ) |
Validate and store a reusable skin keyed by skin.id.
在文件 AttackVfxRuntime.cpp 第 471 行定义.
引用了 eve::LogicalId::format(), eve::stylize::AttackVfxSkin::id, eve::Result< T >::success(), valid , 以及 eve::stylize::AttackVfxSkin::validate().
被这些函数引用 registerRecipe() , 以及 eve::stylize_action::StylizeAction::registerSkinJson().
◆ signal()
| Result< AttackVfxFrame > eve::stylize::AttackVfxRuntime::signal | ( | AttackVfxHandle | handle, |
| std::string_view | cue | ||
| ) |
Deliver a named cue to one live instance (e.g. "impact", "cancel").
- 备注
- The reserved cue "cancel" finishes the instance immediately.
- 返回
- Frame events produced by the cue (phase enter/exit, cue consumed/ignored).
在文件 AttackVfxRuntime.cpp 第 555 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), handle, eve::InvalidArgument , 以及 eve::Result< T >::success().
◆ stop()
| Result< AttackVfxFrame > eve::stylize::AttackVfxRuntime::stop | ( | AttackVfxHandle | handle, |
| AttackVfxStopMode | mode | ||
| ) |
Stop one instance using the requested teardown mode.
在文件 AttackVfxRuntime.cpp 第 678 行定义.
引用了 eve::stylize::Cancel, eve::Result< T >::failure(), handle, state, eve::stylize::StopEmitting , 以及 eve::Result< T >::success().
该类的文档由以下文件生成:
- src/modules/stylize/AttackVfxRuntime.h
- src/modules/stylize/AttackVfxRuntime.cpp