Castor3D 0.16.0
Multiplatform 3D engine
|
#include <CpuParticleSystem.hpp>
Public Member Functions | |
C3D_API | CpuParticleSystem (ParticleSystem &parent) |
Constructor. | |
C3D_API bool | initialise (RenderDevice const &device) override |
Initialises the implementation. | |
C3D_API void | cleanup (RenderDevice const &device) override |
Cleans the implementation. | |
C3D_API void | update (castor3d::CpuUpdater &updater) override |
Updates the render pass, CPU wise. | |
C3D_API uint32_t | update (castor3d::GpuUpdater &updater) override |
Updates the render pass, CPU wise. | |
C3D_API void | addParticleVariable (castor::String const &name, ParticleFormat type, castor::String const &defaultValue) override |
adds a particle variable. | |
Public Member Functions inherited from castor3d::ParticleSystemImpl | |
C3D_API | ParticleSystemImpl (Type type, ParticleSystem &parent) |
Constructor. | |
virtual C3D_API | ~ParticleSystemImpl () noexcept=default |
Destructor. | |
Type | getType () |
ParticleSystem const & | getParent () const |
Protected Member Functions | |
C3D_API ParticleEmitter * | addEmitter (ParticleEmitterUPtr emitter) |
Adds the given emitter to the list. | |
C3D_API ParticleUpdater * | addUpdater (ParticleUpdaterUPtr updater) |
Adds the given updater to the list. | |
C3D_API void | onEmit (Particle const &particle) |
Called when a particle is emitted. | |
Protected Attributes | |
ParticleDeclaration | m_inputs |
ParticleArray | m_particles |
ParticleEmitterArray | m_emitters |
ParticleUpdaterArray | m_updaters |
uint32_t | m_firstUnused { 1u } |
Protected Attributes inherited from castor3d::ParticleSystemImpl | |
ParticleSystem & | m_parent |
Type | m_type |
Additional Inherited Members | |
Public Types inherited from castor3d::ParticleSystemImpl | |
enum class | Type { eCpu = 0 , eComputeShader = 1 , eCount , eMin = eCpu } |
Particle system implementation types enumeration. More... | |
|
explicit |
Constructor.
[in] | parent | The parent particle system. |
|
protected |
Adds the given emitter to the list.
|
overridevirtual |
adds a particle variable.
[in] | name | The variable name. |
[in] | type | The variable type. |
[in] | defaultValue | The variable default value. |
Implements castor3d::ParticleSystemImpl.
|
protected |
Adds the given updater to the list.
|
overridevirtual |
Cleans the implementation.
device | The current device. |
Implements castor3d::ParticleSystemImpl.
|
overridevirtual |
Initialises the implementation.
device | The current device. |
true
if all is OK. Implements castor3d::ParticleSystemImpl.
Called when a particle is emitted.
|
overridevirtual |
Updates the render pass, CPU wise.
[in,out] | updater | The update data. |
Implements castor3d::ParticleSystemImpl.
|
overridevirtual |
Updates the render pass, CPU wise.
[in,out] | updater | The update data. |
Implements castor3d::ParticleSystemImpl.
|
protected |
The particles emitters.
|
protected |
The first unused particle data.
|
protected |
The particle's elements description.
|
protected |
The particles.
|
protected |
The particles updaters.