载入中...
搜索中...
未找到
eve::physics::ParticleTrack类 参考

Immutable particle trajectories independent of live simulation, ECS and graphics resources. @ownership Shares frozen values and provenance. No input aliases or resource pointers are retained. @thread Const sampling is reentrant with independent output buffers; no callbacks or implicit time source. 更多...

#include <ParticleTrack.h>

类

struct  Data
 

Public 成员函数

bool isSameAsset (const ParticleTrack &other) const noexcept
 Whether both views share the same frozen asset; constant-time identity query.
 
Result< void > save (std::string_view path) const
 Publish EVEPART1 v1 with provenance and whole-file checksum, without overwriting any target. @cost Linear in asset bytes plus durable file publication, once outside playback.
 
Result< std::size_t > sample (float seconds, std::span< BakedParticleSample > output) const
 Sample visible births into a caller buffer of at least capacity() entries; no allocation. @ownership Borrows output only during this call. Failure leaves all entries unchanged; unused tail is untouched.
 
std::size_t capacity () const noexcept
 Maximum output extent, equal to the total birth count.
 
float duration () const noexcept
 Explicit clip duration including silent intervals.
 
std::shared_ptr< const BakeRecipe > recipe () const noexcept
 Owning shared immutable provenance.
 

静态 Public 成员函数

static Result< ParticleTrack > prepare (float duration, std::vector< ParticleTrajectory > trajectories, const BakeRecipe &recipe)
 Validate and freeze trajectories in deterministic identity order and an explicit clip duration. @cost Linear in keys plus trajectory sorting, once before playback. Limited to 2 million keys and 65536 births.
 
static Result< ParticleTrack > load (std::string_view path)
 Load a bounded EVEPART1 v1 asset and validate all trajectories before publication. @cost Linear in file bytes plus validation/sorting, once per load outside playback.
 
static Result< ParticleTrack > loadForRecipe (std::string_view path, const BakeRecipe &expected)
 Load and require an exact canonical provenance match for cache admission. @cost Linear in asset bytes plus validation, once per admission outside playback.
 

详细描述

Immutable particle trajectories independent of live simulation, ECS and graphics resources. @ownership Shares frozen values and provenance. No input aliases or resource pointers are retained. @thread Const sampling is reentrant with independent output buffers; no callbacks or implicit time source.

在文件 ParticleTrack.h 第 42 行定义.

成员函数说明

◆ capacity()

std::size_t eve::physics::ParticleTrack::capacity ( ) const
noexcept

Maximum output extent, equal to the total birth count.

在文件 ParticleTrack.cpp 第 75 行定义.

被这些函数引用 eve::physics::BakedParticlePlayback::prepare() , 以及 save().

◆ duration()

float eve::physics::ParticleTrack::duration ( ) const
noexcept

Explicit clip duration including silent intervals.

在文件 ParticleTrack.cpp 第 76 行定义.

被这些函数引用 load() , 以及 save().

◆ isSameAsset()

bool eve::physics::ParticleTrack::isSameAsset ( const ParticleTrack &  other) const
inlinenoexcept

Whether both views share the same frozen asset; constant-time identity query.

在文件 ParticleTrack.h 第 45 行定义.

◆ load()

Result< ParticleTrack > eve::physics::ParticleTrack::load ( std::string_view  path)
static

Load a bounded EVEPART1 v1 asset and validate all trajectories before publication. @cost Linear in file bytes plus validation/sorting, once per load outside playback.

返回
Complete owning track or diagnostic. Unknown versions/fields and trailing bytes are rejected. No earlier schema exists; future migration must be explicit.

在文件 ParticleTrackFile.cpp 第 59 行定义.

引用了 eve::physics::bakedAssetContentKey(), eve::physics::ParticleTrajectory::birthSerial, bytes, count, eve::physics::BakeRecipe::decode(), duration(), eve::physics::ParticleTrajectory::emitter, error, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), file, eve::HashMismatch, identity, key, eve::physics::ParticleTrajectory::keys, eve::NotFound, p, path, payload, prepare(), recipe(), eve::physics::ParticleTrackKey::seconds, size , 以及 status.

被这些函数引用 loadForRecipe().

◆ loadForRecipe()

Result< ParticleTrack > eve::physics::ParticleTrack::loadForRecipe ( std::string_view  path,
const BakeRecipe &  expected 
)
static

Load and require an exact canonical provenance match for cache admission. @cost Linear in asset bytes plus validation, once per admission outside playback.

返回
Track or checked failure; never implicitly rebakes or replaces another asset.

在文件 ParticleTrackFile.cpp 第 133 行定义.

引用了 eve::physics::BakeRecipe::encode(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::HashMismatch, load(), loaded , 以及 path.

◆ prepare()

Result< ParticleTrack > eve::physics::ParticleTrack::prepare ( float  duration,
std::vector< ParticleTrajectory >  trajectories,
const BakeRecipe &  recipe 
)
static

Validate and freeze trajectories in deterministic identity order and an explicit clip duration. @cost Linear in keys plus trajectory sorting, once before playback. Limited to 2 million keys and 65536 births.

返回
Complete planar-pixel track or diagnostic; failure publishes no partial state.

在文件 ParticleTrack.cpp 第 19 行定义.

引用了 a, b, duration, key, previous, recipe , 以及 t.

被这些函数引用 load().

◆ recipe()

std::shared_ptr< const BakeRecipe > eve::physics::ParticleTrack::recipe ( ) const
noexcept

Owning shared immutable provenance.

在文件 ParticleTrack.cpp 第 77 行定义.

被这些函数引用 load().

◆ sample()

Result< std::size_t > eve::physics::ParticleTrack::sample ( float  seconds,
std::span< BakedParticleSample >  output 
) const

Sample visible births into a caller buffer of at least capacity() entries; no allocation. @ownership Borrows output only during this call. Failure leaves all entries unchanged; unused tail is untouched.

返回
Number of written entries or diagnostic. Time clamps to the clip; deaths are exclusive even at its end.
备注
Position, size, unwrapped rotation and RGBA interpolate linearly. Atlas UV holds the preceding key. @cost Linear in births plus logarithmic search per visible trajectory, per presentation frame.

在文件 ParticleTrack.cpp 第 48 行定义.

引用了 a, b, blend, capacity, count, f, key, output, pose, time, x , 以及 y.

◆ save()

Result< void > eve::physics::ParticleTrack::save ( std::string_view  path) const

Publish EVEPART1 v1 with provenance and whole-file checksum, without overwriting any target. @cost Linear in asset bytes plus durable file publication, once outside playback.

返回
Checked publication result; uses publishBakedAsset platform durability semantics.

在文件 ParticleTrackFile.cpp 第 35 行定义.

引用了 eve::physics::bakedAssetContentKey(), bytes, capacity(), duration(), eve::Result< T >::failure(), key, p, path, eve::physics::publishBakedAsset(), value , 以及 word.


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