![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <CpuParticleSystem.hpp>


Public Member Functions | |
| C3D_API | CpuParticleSystem (ParticleSystem &parent) |
| Constructor. More... | |
| C3D_API bool | initialise (RenderDevice const &device) override |
| Initialises the implementation. More... | |
| C3D_API void | cleanup (RenderDevice const &device) override |
| Cleans the implementation. More... | |
| C3D_API void | update (castor3d::CpuUpdater &updater) override |
| Updates the render pass, CPU wise. More... | |
| C3D_API uint32_t | update (castor3d::GpuUpdater &updater) override |
| Updates the render pass, CPU wise. More... | |
| C3D_API void | addParticleVariable (castor::String const &name, ParticleFormat type, castor::String const &defaultValue) override |
| adds a particle variable. More... | |
Public Member Functions inherited from castor3d::ParticleSystemImpl | |
| C3D_API | ParticleSystemImpl (Type type, ParticleSystem &parent) |
| Constructor. More... | |
| virtual C3D_API | ~ParticleSystemImpl () |
| Destructor. More... | |
| virtual C3D_API bool | initialise (RenderDevice const &device)=0 |
| Initialises the implementation. More... | |
| virtual C3D_API void | cleanup (RenderDevice const &device)=0 |
| Cleans the implementation. More... | |
| virtual C3D_API void | addParticleVariable (castor::String const &name, ParticleFormat type, castor::String const &defaultValue)=0 |
| adds a particle variable. More... | |
| virtual C3D_API void | update (CpuUpdater &updater)=0 |
| Updates the render pass, CPU wise. More... | |
| virtual C3D_API uint32_t | update (GpuUpdater &updater)=0 |
| Updates the render pass, GPU wise. More... | |
| Type | getType () |
| ParticleSystem const & | getParent () const |
Protected Member Functions | |
| C3D_API ParticleEmitter * | addEmitter (ParticleEmitterUPtr emitter) |
| Adds the given emitter to the list. More... | |
| C3D_API ParticleUpdater * | addUpdater (ParticleUpdaterUPtr updater) |
| Adds the given updater to the list. More... | |
| C3D_API void | onEmit (Particle const &particle) |
| Called when a particle is emitted. More... | |
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 , eTransformFeedback , eComputeShader , eCount , eMin = eCpu , eMax =eCount-1 } |
| 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.