Castor3D 0.16.0
Multiplatform 3D engine
|
#include <ParticleSystemImpl.hpp>
Public Types | |
enum class | Type { eCpu = 0 , eComputeShader = 1 , eCount , eMin = eCpu } |
Particle system implementation types enumeration. More... | |
Public Member Functions | |
C3D_API | ParticleSystemImpl (Type type, ParticleSystem &parent) |
Constructor. | |
virtual C3D_API | ~ParticleSystemImpl () noexcept=default |
Destructor. | |
virtual C3D_API bool | initialise (RenderDevice const &device)=0 |
Initialises the implementation. | |
virtual C3D_API void | cleanup (RenderDevice const &device)=0 |
Cleans the implementation. | |
virtual C3D_API void | addParticleVariable (castor::String const &name, ParticleFormat type, castor::String const &defaultValue)=0 |
adds a particle variable. | |
virtual C3D_API void | update (CpuUpdater &updater)=0 |
Updates the render pass, CPU wise. | |
virtual C3D_API uint32_t | update (GpuUpdater &updater)=0 |
Updates the render pass, GPU wise. | |
Type | getType () |
ParticleSystem const & | getParent () const |
Protected Attributes | |
ParticleSystem & | m_parent |
Type | m_type |
|
strong |
Particle system implementation types enumeration.
Enumerator | |
---|---|
eCpu | Particles are updated on CPU. |
eComputeShader | Particles are updated using a compute shader. |
eCount | |
eMin |
C3D_API castor3d::ParticleSystemImpl::ParticleSystemImpl | ( | Type | type, |
ParticleSystem & | parent ) |
Constructor.
[in] | type | The implementation type. |
[in] | parent | The parent particle system. |
|
virtualdefaultnoexcept |
Destructor.
|
pure virtual |
adds a particle variable.
[in] | name | The variable name. |
[in] | type | The variable type. |
[in] | defaultValue | The variable default value. |
Implemented in castor3d::ComputeParticleSystem, and castor3d::CpuParticleSystem.
|
pure virtual |
Cleans the implementation.
device | The current device. |
Implemented in castor3d::ComputeParticleSystem, and castor3d::CpuParticleSystem.
|
inline |
References m_parent.
|
inline |
References m_type.
|
pure virtual |
Initialises the implementation.
device | The current device. |
true
if all is OK. Implemented in castor3d::ComputeParticleSystem, and castor3d::CpuParticleSystem.
|
pure virtual |
Updates the render pass, CPU wise.
[in,out] | updater | The update data. |
Implemented in castor3d::CpuParticleSystem, and castor3d::ComputeParticleSystem.
|
pure virtual |
Updates the render pass, GPU wise.
[in,out] | updater | The update data. |
Implemented in castor3d::CpuParticleSystem, and castor3d::ComputeParticleSystem.
|
protected |
The parent particle system.
Referenced by getParent().
|
protected |
The implementation type.
Referenced by getType().