载入中...
搜索中...
未找到
eve::weapon::CombatCarrierRuntime类 参考

Owner-thread deterministic carrier simulator with composable behaviors. 更多...

#include <CombatCarrier.h>

Public 成员函数

 CombatCarrierRuntime ()
 Combat carrier runtime.
 
Result< void > configurePool (std::uint32_t capacity)
 Resize the pool while empty; capacity must be in 1..1048576.
 
Result< void > registerRecipe (const CarrierRecipe &recipe)
 Register or replace a recipe by id. @ownership Runtime copies the recipe; callers may discard their instance.
 
std::optional< CarrierRecipe > findRecipe (const LogicalId &id) const
 Look up a previously registered recipe by id.
 
Result< CarrierHandle > spawn (const LogicalId &recipeId, const CarrierSpawnRequest &request)
 Spawn one carrier from a registered recipe id.
 
Result< CarrierHandle > spawn (const CarrierRecipe &recipe, const CarrierSpawnRequest &request)
 Spawn one carrier from an inline validated recipe (also registers it).
 
Result< std::vector< CarrierHandle > > spawnVolley (const LogicalId &recipeId, const CarrierSpawnRequest &request, const CarrierVolleySpec &volley)
 Spawn multiple carriers in deterministic Fan/Ring directions.
 
Result< std::vector< CarrierHandle > > spawnVolley (const CarrierRecipe &recipe, const CarrierSpawnRequest &request, const CarrierVolleySpec &volley)
 Spawn volley.
 
Result< CarrierFrame > update (Duration delta, const IProjectileTargetProvider *targets=nullptr, const ICarrierHitProbe *hits=nullptr, const ICarrierBodyDefenseProvider *bodies=nullptr)
 Atomically advance all live carriers by supplied deterministic time.
 
Result< void > release (CarrierHandle handle)
 Explicitly release one live handle; stale handles are rejected.
 
std::optional< CarrierState > find (CarrierHandle handle) const
 Return an owning state copy, or empty for a stale/released handle.
 
std::vector< CarrierState > states () const
 Return owning live states in stable slot order.
 
CarrierRuntimeSnapshot snapshot () const
 Capture live carriers plus empty-slot generations.
 
Result< void > restore (const CarrierRuntimeSnapshot &snapshot)
 Atomically replace this pool from a validated snapshot.
 
std::size_t activeCount () const noexcept
 Number of live carriers.
 
std::size_t capacity () const noexcept
 Current fixed pool capacity.
 

详细描述

Owner-thread deterministic carrier simulator with composable behaviors.

update stages every live carrier on a candidate copy and publishes only after all target/hit lookups succeed. Child spawns are attempted at frame end; pool exhaustion fails the whole frame without partial publish.

在文件 CombatCarrier.h 第 293 行定义.

构造及析构函数说明

◆ CombatCarrierRuntime()

eve::weapon::CombatCarrierRuntime::CombatCarrierRuntime ( )

Combat carrier runtime.

在文件 CombatCarrier.cpp 第 278 行定义.

成员函数说明

◆ activeCount()

std::size_t eve::weapon::CombatCarrierRuntime::activeCount ( ) const
inlinenoexcept

Number of live carriers.

在文件 CombatCarrier.h 第 358 行定义.

◆ capacity()

std::size_t eve::weapon::CombatCarrierRuntime::capacity ( ) const
inlinenoexcept

Current fixed pool capacity.

在文件 CombatCarrier.h 第 361 行定义.

被这些函数引用 configurePool().

◆ configurePool()

Result< void > eve::weapon::CombatCarrierRuntime::configurePool ( std::uint32_t  capacity)

Resize the pool while empty; capacity must be in 1..1048576.

在文件 CombatCarrier.cpp 第 280 行定义.

引用了 capacity(), eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::Result< T >::success().

◆ find()

std::optional< CarrierState > eve::weapon::CombatCarrierRuntime::find ( CarrierHandle  handle) const

Return an owning state copy, or empty for a stale/released handle.

在文件 CombatCarrier.cpp 第 826 行定义.

引用了 cell , 以及 handle.

◆ findRecipe()

std::optional< CarrierRecipe > eve::weapon::CombatCarrierRuntime::findRecipe ( const LogicalId &  id) const

Look up a previously registered recipe by id.

在文件 CombatCarrier.cpp 第 326 行定义.

◆ registerRecipe()

Result< void > eve::weapon::CombatCarrierRuntime::registerRecipe ( const CarrierRecipe &  recipe)

Register or replace a recipe by id. @ownership Runtime copies the recipe; callers may discard their instance.

在文件 CombatCarrier.cpp 第 312 行定义.

引用了 eve::Result< T >::failure(), eve::weapon::CarrierRecipe::id , 以及 eve::Result< T >::success().

被这些函数引用 spawn() , 以及 spawnVolley().

◆ release()

Result< void > eve::weapon::CombatCarrierRuntime::release ( CarrierHandle  handle)

Explicitly release one live handle; stale handles are rejected.

在文件 CombatCarrier.cpp 第 815 行定义.

引用了 cell, eve::Diagnostic::error(), eve::Result< T >::failure(), handle, eve::StaleHandle , 以及 eve::Result< T >::success().

◆ restore()

Result< void > eve::weapon::CombatCarrierRuntime::restore ( const CarrierRuntimeSnapshot &  snapshot)

◆ snapshot()

CarrierRuntimeSnapshot eve::weapon::CombatCarrierRuntime::snapshot ( ) const

Capture live carriers plus empty-slot generations.

在文件 CombatCarrier.cpp 第 842 行定义.

引用了 eve::weapon::CarrierRuntimeSnapshot::slots.

◆ spawn() [1/2]

Result< CarrierHandle > eve::weapon::CombatCarrierRuntime::spawn ( const CarrierRecipe &  recipe,
const CarrierSpawnRequest &  request 
)

Spawn one carrier from an inline validated recipe (also registers it).

在文件 CombatCarrier.cpp 第 393 行定义.

引用了 eve::Result< T >::failure(), eve::weapon::CarrierRecipe::id, registerRecipe(), request , 以及 spawn().

◆ spawn() [2/2]

Result< CarrierHandle > eve::weapon::CombatCarrierRuntime::spawn ( const LogicalId &  recipeId,
const CarrierSpawnRequest &  request 
)

Spawn one carrier from a registered recipe id.

在文件 CombatCarrier.cpp 第 385 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound , 以及 request.

被这些函数引用 spawn() , 以及 spawnVolley().

◆ spawnVolley() [1/2]

Result< std::vector< CarrierHandle > > eve::weapon::CombatCarrierRuntime::spawnVolley ( const CarrierRecipe &  recipe,
const CarrierSpawnRequest &  request,
const CarrierVolleySpec &  volley 
)

Spawn volley.

在文件 CombatCarrier.cpp 第 426 行定义.

引用了 eve::weapon::CarrierRecipe::id, registerRecipe(), request, spawnVolley() , 以及 volley.

◆ spawnVolley() [2/2]

Result< std::vector< CarrierHandle > > eve::weapon::CombatCarrierRuntime::spawnVolley ( const LogicalId &  recipeId,
const CarrierSpawnRequest &  request,
const CarrierVolleySpec &  volley 
)

Spawn multiple carriers in deterministic Fan/Ring directions.

Each projectile shares the base position/target/source and receives a rotated aim vector. Fails without partial spawns when the pool cannot fit the full volley or any single spawn is invalid.

在文件 CombatCarrier.cpp 第 399 行定义.

引用了 eve::Conflict, direction, eve::weapon::CarrierSpawnRequest::direction, eve::Diagnostic::error(), request, spawn(), spawned , 以及 volley.

被这些函数引用 spawnVolley().

◆ states()

std::vector< CarrierState > eve::weapon::CombatCarrierRuntime::states ( ) const

Return owning live states in stable slot order.

在文件 CombatCarrier.cpp 第 833 行定义.

◆ update()

Result< CarrierFrame > eve::weapon::CombatCarrierRuntime::update ( Duration  delta,
const IProjectileTargetProvider *  targets = nullptr,
const ICarrierHitProbe *  hits = nullptr,
const ICarrierBodyDefenseProvider *  bodies = nullptr 
)

Atomically advance all live carriers by supplied deterministic time.

参数
targetsOptional provider required when any live recipe uses homing/proximity.
hitsOptional probe required when any live recipe uses OnHit.
bodiesOptional provider required when any live recipe uses SteerAvoidBody.

在文件 CombatCarrier.cpp 第 434 行定义.

引用了 eve::weapon::Accelerate, eve::weapon::ApplyGravity, body, eve::weapon::CurveHelix, eve::weapon::CurveSway, dir, eve::Diagnostic::error(), events, eve::Failed, eve::Result< T >::failure(), finite, id, eve::weapon::IntegrateLinear, eve::InvalidArgument, eve::Duration::isZero(), kind, left, length, eve::NoOp, eve::NotFound, eve::weapon::OnExpire, eve::weapon::OnFuse, eve::weapon::OnHit, eve::weapon::OnInterval, eve::weapon::OnProximity, phase, eve::weapon::CarrierMotion::position, eve::weapon::IProjectileTargetProvider::position(), previous, eve::weapon::ICarrierHitProbe::query(), release, right, eve::weapon::ICarrierBodyDefenseProvider::sample(), eve::Duration::seconds(), side, state, eve::weapon::SteerAvoidBody, eve::weapon::SteerHoming, eve::Status::success(), eve::Result< T >::success(), eve::Duration::tryAdd(), eve::Unsupported, up, eve::weapon::CarrierMotion::velocity, weight, eve::math::steering::Vector2::x, eve::weapon::ProjectilePoint::x, eve::weapon::ProjectileVector::x, eve::math::steering::Vector2::y, eve::weapon::ProjectilePoint::y, eve::weapon::ProjectileVector::y, eve::weapon::ProjectilePoint::z, eve::weapon::ProjectileVector::z , 以及 eve::Duration::zero().


该类的文档由以下文件生成: