Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | Protected Attributes | List of all members
castor3d::ParticleSystemImpl Class Referenceabstract

#include <ParticleSystemImpl.hpp>

Inheritance diagram for castor3d::ParticleSystemImpl:
Inheritance graph
[legend]
Collaboration diagram for castor3d::ParticleSystemImpl:
Collaboration graph
[legend]

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

ParticleSystemm_parent
 
Type m_type
 

Member Enumeration Documentation

◆ Type

Particle system implementation types enumeration.

Enumerator
eCpu 

Particles are updated on CPU.

eComputeShader 

Particles are updated using a compute shader.

eCount 
eMin 

Constructor & Destructor Documentation

◆ ParticleSystemImpl()

C3D_API castor3d::ParticleSystemImpl::ParticleSystemImpl ( Type type,
ParticleSystem & parent )

Constructor.

Parameters
[in]typeThe implementation type.
[in]parentThe parent particle system.

◆ ~ParticleSystemImpl()

virtual C3D_API castor3d::ParticleSystemImpl::~ParticleSystemImpl ( )
virtualdefaultnoexcept

Destructor.

Member Function Documentation

◆ addParticleVariable()

virtual C3D_API void castor3d::ParticleSystemImpl::addParticleVariable ( castor::String const & name,
ParticleFormat type,
castor::String const & defaultValue )
pure virtual

adds a particle variable.

Parameters
[in]nameThe variable name.
[in]typeThe variable type.
[in]defaultValueThe variable default value.

Implemented in castor3d::ComputeParticleSystem, and castor3d::CpuParticleSystem.

◆ cleanup()

virtual C3D_API void castor3d::ParticleSystemImpl::cleanup ( RenderDevice const & device)
pure virtual

Cleans the implementation.

Parameters
deviceThe current device.

Implemented in castor3d::ComputeParticleSystem, and castor3d::CpuParticleSystem.

◆ getParent()

ParticleSystem const & castor3d::ParticleSystemImpl::getParent ( ) const
inline
Returns
The parent particle system.

References m_parent.

◆ getType()

Type castor3d::ParticleSystemImpl::getType ( )
inline
Returns
The implementation type.

References m_type.

◆ initialise()

virtual C3D_API bool castor3d::ParticleSystemImpl::initialise ( RenderDevice const & device)
pure virtual

Initialises the implementation.

Parameters
deviceThe current device.
Returns
true if all is OK.

Implemented in castor3d::ComputeParticleSystem, and castor3d::CpuParticleSystem.

◆ update() [1/2]

virtual C3D_API void castor3d::ParticleSystemImpl::update ( CpuUpdater & updater)
pure virtual

Updates the render pass, CPU wise.

Parameters
[in,out]updaterThe update data.

Implemented in castor3d::CpuParticleSystem, and castor3d::ComputeParticleSystem.

◆ update() [2/2]

virtual C3D_API uint32_t castor3d::ParticleSystemImpl::update ( GpuUpdater & updater)
pure virtual

Updates the render pass, GPU wise.

Parameters
[in,out]updaterThe update data.

Implemented in castor3d::CpuParticleSystem, and castor3d::ComputeParticleSystem.

Member Data Documentation

◆ m_parent

ParticleSystem& castor3d::ParticleSystemImpl::m_parent
protected

The parent particle system.

Referenced by getParent().

◆ m_type

Type castor3d::ParticleSystemImpl::m_type
protected

The implementation type.

Referenced by getType().


The documentation for this class was generated from the following file: