Soft pool of idle emitters for short-lived gameplay VFX. 更多...
#include <ParticleEmitterPool.h>
Public 成员函数 | |
| ParticleEmitterPool ()=default | |
| Particle emitter pool. | |
| ~ParticleEmitterPool () | |
| Particle emitter pool. | |
| ParticleEmitterPool (const ParticleEmitterPool &)=delete | |
| ParticleEmitterPool & | operator= (const ParticleEmitterPool &)=delete |
| Result< ParticleEmitter * > | acquire (int minBuffer=64) |
| Borrow a reset emitter with capacity >= minBuffer. | |
| Result< void > | recycle (ParticleEmitter *emitter) |
| Return a previously acquired emitter to the idle list. | |
| void | clear () |
| Release every idle emitter and clear the pool. | |
| std::size_t | idleCount () const |
| Number of idle emitters currently retained. | |
详细描述
Soft pool of idle emitters for short-lived gameplay VFX.
Acquire returns a reset emitter with at least minBuffer capacity. Recycle stops the emitter, clears live particles, and returns it to the idle list. Destroying the pool releases every retained emitter.
@ownership The pool owns idle emitters. Callers borrow acquired emitters until they recycle or release them outside the pool. @thread Owner thread only.
在文件 ParticleEmitterPool.h 第 24 行定义.
构造及析构函数说明
◆ ParticleEmitterPool() [1/2]
|
default |
Particle emitter pool.
◆ ~ParticleEmitterPool()
| eve::particles::ParticleEmitterPool::~ParticleEmitterPool | ( | ) |
◆ ParticleEmitterPool() [2/2]
|
delete |
成员函数说明
◆ acquire()
| Result< ParticleEmitter * > eve::particles::ParticleEmitterPool::acquire | ( | int | minBuffer = 64 | ) |
Borrow a reset emitter with capacity >= minBuffer.
- 返回
- Borrowed emitter pointer on success.
在文件 ParticleEmitterPool.cpp 第 11 行定义.
引用了 buffer, created, eve::particles::ParticleEmitter::createEmitter(), emitter, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure() , 以及 eve::Result< T >::success().
◆ clear()
| void eve::particles::ParticleEmitterPool::clear | ( | ) |
Release every idle emitter and clear the pool.
在文件 ParticleEmitterPool.cpp 第 46 行定义.
引用了 emitter.
被这些函数引用 ~ParticleEmitterPool().
◆ idleCount()
|
inline |
Number of idle emitters currently retained.
在文件 ParticleEmitterPool.h 第 50 行定义.
◆ operator=()
|
delete |
◆ recycle()
| Result< void > eve::particles::ParticleEmitterPool::recycle | ( | ParticleEmitter * | emitter | ) |
Return a previously acquired emitter to the idle list.
- 返回
- Applied when recycled, InvalidArgument when emitter is null.
在文件 ParticleEmitterPool.cpp 第 30 行定义.
引用了 eve::Applied, emitter, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Status::success() , 以及 eve::Result< T >::success().
该类的文档由以下文件生成:
- src/modules/particles/ParticleEmitterPool.h
- src/modules/particles/ParticleEmitterPool.cpp