|
Unravel Engine C++ Reference
|
#include <bx/allocator.h>#include <bx/bounds.h>#include <bx/easing.h>#include <bx/rng.h>#include <bgfx/bgfx.h>#include <math/gradient.h>#include <math/math.h>#include <math/bbox.h>#include <core/base/basetypes.hpp>Go to the source code of this file.
Classes | |
| struct | EmitterHandle |
| struct | EmitterShape |
| struct | EmitterDirection |
| struct | SimulationSpace |
| struct | EmitterUniforms |
Functions | |
| template<typename Ty > | |
| bool | isValid (Ty _handle) |
| void | psInit (uint16_t _maxEmitters=64, bx::AllocatorI *_allocator=nullptr) |
| void | psShutdown () |
| EmitterHandle | psCreateEmitter (EmitterShape::Enum _shape, EmitterDirection::Enum _direction, uint32_t _maxParticles) |
| void | psUpdateEmitter (EmitterHandle _handle, float _dt, EmitterUniforms *_uniforms=nullptr) |
| bool | psHasUpdated (EmitterHandle _handle) |
| void | psResetEmitter (EmitterHandle _handle) |
| void | psGetAabb (EmitterHandle _handle, math::bbox &_outAabb) |
| uint32_t | psGetNumParticles (EmitterHandle _handle) |
| void | psDestroyEmitter (EmitterHandle _handle) |
| void | psRenderEmitter (EmitterHandle _handle, uint8_t _view, bgfx::ProgramHandle _program, const float *_mtxView, const math::vec3 &_eye, bgfx::TextureHandle _texture) |
| uint32_t | psRenderEmitterBatch (const EmitterHandle *_handles, uint32_t _count, uint8_t _view, bgfx::ProgramHandle _program, const float *_mtxView, const math::vec3 &_eye, bgfx::TextureHandle _texture) |
|
inline |
Definition at line 22 of file particle_system.h.
| EmitterHandle psCreateEmitter | ( | EmitterShape::Enum | _shape, |
| EmitterDirection::Enum | _direction, | ||
| uint32_t | _maxParticles ) |
Definition at line 1053 of file particle_system.cpp.
| void psDestroyEmitter | ( | EmitterHandle | _handle | ) |
Definition at line 1085 of file particle_system.cpp.
| void psGetAabb | ( | EmitterHandle | _handle, |
| math::bbox & | _outAabb ) |
Definition at line 1070 of file particle_system.cpp.
| uint32_t psGetNumParticles | ( | EmitterHandle | _handle | ) |
Definition at line 1075 of file particle_system.cpp.
| bool psHasUpdated | ( | EmitterHandle | _handle | ) |
Definition at line 1080 of file particle_system.cpp.
| void psInit | ( | uint16_t | _maxEmitters = 64, |
| bx::AllocatorI * | _allocator = nullptr ) |
Definition at line 1041 of file particle_system.cpp.
| void psRenderEmitter | ( | EmitterHandle | _handle, |
| uint8_t | _view, | ||
| bgfx::ProgramHandle | _program, | ||
| const float * | _mtxView, | ||
| const math::vec3 & | _eye, | ||
| bgfx::TextureHandle | _texture ) |
Definition at line 1090 of file particle_system.cpp.
| uint32_t psRenderEmitterBatch | ( | const EmitterHandle * | _handles, |
| uint32_t | _count, | ||
| uint8_t | _view, | ||
| bgfx::ProgramHandle | _program, | ||
| const float * | _mtxView, | ||
| const math::vec3 & | _eye, | ||
| bgfx::TextureHandle | _texture ) |
Render multiple emitters in a single batched draw call (all must use the same texture) This is much more efficient than calling psRenderEmitter multiple times as it:
Example usage: EmitterHandle handles[] = {fire_emitter, smoke_emitter, spark_emitter}; psRenderEmitterBatch(handles, 3, view, program, viewMatrix, cameraPos, fireTexture);
Definition at line 1100 of file particle_system.cpp.
| void psResetEmitter | ( | EmitterHandle | _handle | ) |
Definition at line 1063 of file particle_system.cpp.
| void psShutdown | ( | ) |
Definition at line 1046 of file particle_system.cpp.
| void psUpdateEmitter | ( | EmitterHandle | _handle, |
| float | _dt, | ||
| EmitterUniforms * | _uniforms = nullptr ) |
Definition at line 1058 of file particle_system.cpp.