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

Prepared sprite-batch consumer of recorded particles, independent of source emitters. @ownership Owns immutable asset and CPU buffers only; caller owns playback state; never retains graphics or material resource references between calls. @thread Render-owner thread with exclusive access; no scripts or simulation calls. 更多...

#include <ParticleBakePresentation.h>

类

struct  Impl
 

Public 成员函数

 ~ParticleBakePresentation ()
 
 ParticleBakePresentation (const ParticleBakePresentation &)=delete
 
ParticleBakePresentation & operator= (const ParticleBakePresentation &)=delete
 
Result< std::size_t > draw (BakedParticlePlayback &player, graphics::Graphics &graphics, const graphics::DrawItem2D &material)
 Sample and submit sprites through the ordinary 2D batch renderer. @ownership Borrows Graphics and material only during the call; caller supplies live resource references. @lifetime Textures, shaders, camera and canvas in material must remain valid through Graphics frame completion.
 
Result< std::size_t > draw (BakedParticlePlayback &player, graphics::Graphics &graphics, std::span< const ParticleBakeMaterial > materials)
 Draw using strictly identity-sorted, unique per-emitter material templates. @ownership Borrows bindings and templates only during this call; no resource references retained afterward. @lifetime Every supplied graphics resource must remain live through Graphics frame completion. @cost Linear binding validation plus logarithmic lookup per visible birth and renderer sorting/upload.
 

静态 Public 成员函数

static Result< std::unique_ptr< ParticleBakePresentation > > prepare (ParticleTrack track)
 Allocate reusable presentation buffers for a frozen asset. @cost Linear in recorded births for buffer reservation, once per instance outside playback.
 

详细描述

Prepared sprite-batch consumer of recorded particles, independent of source emitters. @ownership Owns immutable asset and CPU buffers only; caller owns playback state; never retains graphics or material resource references between calls. @thread Render-owner thread with exclusive access; no scripts or simulation calls.

在文件 ParticleBakePresentation.h 第 26 行定义.

构造及析构函数说明

◆ ~ParticleBakePresentation()

eve::physics::ParticleBakePresentation::~ParticleBakePresentation ( )
default

◆ ParticleBakePresentation()

eve::physics::ParticleBakePresentation::ParticleBakePresentation ( const ParticleBakePresentation &  )
delete

成员函数说明

◆ draw() [1/2]

Result< std::size_t > eve::physics::ParticleBakePresentation::draw ( BakedParticlePlayback &  player,
graphics::Graphics &  graphics,
const graphics::DrawItem2D &  material 
)

Sample and submit sprites through the ordinary 2D batch renderer. @ownership Borrows Graphics and material only during the call; caller supplies live resource references. @lifetime Textures, shaders, camera and canvas in material must remain valid through Graphics frame completion.

备注
Material supplies resource/layer/blend/light policy. Recorded geometry, color, UV and identity order replace those fields. Anchor is center, flip flags are disabled. No implicit time advance or source simulation access. @cost Linear in visible births plus existing renderer sorting/upload, per presented frame; CPU buffers reused.
返回
Submitted count or sampling failure before submission. The renderer owns backend diagnostics; successful submission does not by itself establish GPU completion. Canvas selection is restored to screen.

在文件 ParticleBakePresentation.cpp 第 30 行定义.

引用了 graphics , 以及 material.

◆ draw() [2/2]

Result< std::size_t > eve::physics::ParticleBakePresentation::draw ( BakedParticlePlayback &  player,
graphics::Graphics &  graphics,
std::span< const ParticleBakeMaterial >  materials 
)

Draw using strictly identity-sorted, unique per-emitter material templates. @ownership Borrows bindings and templates only during this call; no resource references retained afterward. @lifetime Every supplied graphics resource must remain live through Graphics frame completion. @cost Linear binding validation plus logarithmic lookup per visible birth and renderer sorting/upload.

返回
Submitted count or invalid/missing binding/sample failure before any draw submission.
备注
Up to 65536 bindings. Every visible emitter must be bound; extra bindings are allowed for dead emitters.

在文件 ParticleBakePresentation.cpp 第 34 行定义.

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

◆ operator=()

ParticleBakePresentation & eve::physics::ParticleBakePresentation::operator= ( const ParticleBakePresentation &  )
delete

◆ prepare()

Result< std::unique_ptr< ParticleBakePresentation > > eve::physics::ParticleBakePresentation::prepare ( ParticleTrack  track)
static

Allocate reusable presentation buffers for a frozen asset. @cost Linear in recorded births for buffer reservation, once per instance outside playback.

返回
Owning presentation or allocation diagnostic.

在文件 ParticleBakePresentation.cpp 第 21 行定义.

引用了 eve::Diagnostic::error() , 以及 eve::Failed.


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