#include <ParticleSystem.hpp>
|
C3D_API | ParticleSystem (castor::String const &name, Scene &scene, SceneNode &parent, uint32_t count) |
| Constructor. More...
|
|
C3D_API bool | initialise (RenderDevice const &device) |
| Initialises GPU side elements. More...
|
|
C3D_API void | cleanup (RenderDevice const &device) |
| Cleans GPU side elements up. More...
|
|
C3D_API void | update (CpuUpdater &updater) |
| CPU Update. More...
|
|
C3D_API void | update (GpuUpdater &updater) |
| GPU Update. More...
|
|
C3D_API void | setMaterial (MaterialRPtr value) |
| Sets the material. More...
|
|
C3D_API void | setDimensions (castor::Point2f const &value) |
| Sets the particles dimensions. More...
|
|
C3D_API void | setParticleType (castor::String const &value) |
| Sets the particles type name. More...
|
|
C3D_API MaterialRPtr | getMaterial () const |
|
C3D_API castor::Point2f const & | getDimensions () const |
|
C3D_API void | addParticleVariable (castor::String const &name, ParticleFormat type, castor::String const &defaultValue) |
| adds a particle variable. More...
|
|
C3D_API void | setCSUpdateProgram (ShaderProgramSPtr program) |
| Defines the program used to update the particles through compute shader. More...
|
|
C3D_API void | setCSGroupSizes (castor::Point3i sizes) |
| Defines the workgroup sizes, as defined inside the compute shader. More...
|
|
C3D_API uint32_t | getParticlesCount () const |
|
C3D_API uint32_t | getMaxParticlesCount () const |
|
BillboardBaseSPtr | getBillboards () const |
|
castor::StrStrMap const & | getDefaultValues () const |
|
castor::String const & | getParticleType () const |
|
ParticleDeclaration const & | getParticleVariables () const |
|
ComputeParticleSystem const & | getCompute () const |
|
C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type, SceneNode &node) |
| Constructor. More...
|
|
C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type) |
| Constructor. More...
|
|
virtual C3D_API | ~MovableObject () |
| Destructor. More...
|
|
C3D_API void | detach () |
| Detaches the movable object from it's parent. More...
|
|
virtual C3D_API void | attachTo (SceneNode &node) |
| Attaches the movable object to a node. More...
|
|
C3D_API EngineRPtr | getEngine () const |
|
SceneNode * | getParent () const |
|
MovableType | getType () const |
|
◆ ParticleSystem()
C3D_API castor3d::ParticleSystem::ParticleSystem |
( |
castor::String const & |
name, |
|
|
Scene & |
scene, |
|
|
SceneNode & |
parent, |
|
|
uint32_t |
count |
|
) |
| |
Constructor.
- Parameters
-
[in] | name | The name. |
[in] | scene | The parent scene. |
[in] | parent | The parent scene node. |
[in] | count | The particles count. |
◆ addParticleVariable()
C3D_API void castor3d::ParticleSystem::addParticleVariable |
( |
castor::String const & |
name, |
|
|
ParticleFormat |
type, |
|
|
castor::String const & |
defaultValue |
|
) |
| |
adds a particle variable.
- Parameters
-
[in] | name | The variable name. |
[in] | type | The variable type. |
[in] | defaultValue | The variable default value. |
◆ cleanup()
Cleans GPU side elements up.
- Parameters
-
[in] | device | The GPU device. |
◆ getBillboards()
BillboardBaseSPtr castor3d::ParticleSystem::getBillboards |
( |
| ) |
const |
|
inline |
◆ getCompute()
- Returns
- The compute shader based implementation.
References m_csImpl.
◆ getDefaultValues()
castor::StrStrMap const & castor3d::ParticleSystem::getDefaultValues |
( |
| ) |
const |
|
inline |
- Returns
- The particle's components default values.
References m_defaultValues.
◆ getDimensions()
C3D_API castor::Point2f const & castor3d::ParticleSystem::getDimensions |
( |
| ) |
const |
- Returns
- The billboards dimensions.
◆ getMaterial()
C3D_API MaterialRPtr castor3d::ParticleSystem::getMaterial |
( |
| ) |
const |
◆ getMaxParticlesCount()
C3D_API uint32_t castor3d::ParticleSystem::getMaxParticlesCount |
( |
| ) |
const |
|
inline |
◆ getParticlesCount()
C3D_API uint32_t castor3d::ParticleSystem::getParticlesCount |
( |
| ) |
const |
|
inline |
◆ getParticleType()
castor::String const & castor3d::ParticleSystem::getParticleType |
( |
| ) |
const |
|
inline |
◆ getParticleVariables()
- Returns
- The particles variables.
References m_inputs.
◆ initialise()
Initialises GPU side elements.
- Parameters
-
[in] | device | The GPU device. |
- Returns
true
if all is OK.
◆ setCSGroupSizes()
C3D_API void castor3d::ParticleSystem::setCSGroupSizes |
( |
castor::Point3i |
sizes | ) |
|
Defines the workgroup sizes, as defined inside the compute shader.
- Parameters
-
◆ setCSUpdateProgram()
C3D_API void castor3d::ParticleSystem::setCSUpdateProgram |
( |
ShaderProgramSPtr |
program | ) |
|
Defines the program used to update the particles through compute shader.
- Parameters
-
◆ setDimensions()
C3D_API void castor3d::ParticleSystem::setDimensions |
( |
castor::Point2f const & |
value | ) |
|
Sets the particles dimensions.
- Parameters
-
◆ setMaterial()
C3D_API void castor3d::ParticleSystem::setMaterial |
( |
MaterialRPtr |
value | ) |
|
Sets the material.
- Parameters
-
◆ setParticleType()
C3D_API void castor3d::ParticleSystem::setParticleType |
( |
castor::String const & |
value | ) |
|
Sets the particles type name.
- Parameters
-
◆ update() [1/2]
CPU Update.
- Parameters
-
[in,out] | updater | The update data. |
◆ update() [2/2]
GPU Update.
- Parameters
-
[in,out] | updater | The update data. |
◆ m_activeParticlesCount
uint32_t castor3d::ParticleSystem::m_activeParticlesCount { 0u } |
|
protected |
◆ m_cpuImpl
CpuParticleSystemUPtr castor3d::ParticleSystem::m_cpuImpl |
|
protected |
◆ m_csImpl
ComputeParticleSystemUPtr castor3d::ParticleSystem::m_csImpl |
|
protected |
The implementation using compute shader.
Referenced by getCompute().
◆ m_defaultValues
castor::StrStrMap castor3d::ParticleSystem::m_defaultValues |
|
protected |
◆ m_dimensions
castor::Point2f castor3d::ParticleSystem::m_dimensions |
|
protected |
The billboards dimensions.
◆ m_firstUpdate
bool castor3d::ParticleSystem::m_firstUpdate { true } |
|
protected |
Tells that the next update is the first one.
◆ m_impl
The implementation chosen after initialisation.
◆ m_inputs
◆ m_material
MaterialRPtr castor3d::ParticleSystem::m_material |
|
protected |
◆ m_particlesBillboard
BillboardBaseSPtr castor3d::ParticleSystem::m_particlesBillboard |
|
protected |
◆ m_particlesCount
uint32_t castor3d::ParticleSystem::m_particlesCount { 0u } |
|
protected |
◆ m_particleType
castor::String castor3d::ParticleSystem::m_particleType |
|
protected |
◆ m_time
castor::Milliseconds castor3d::ParticleSystem::m_time { 0 } |
|
protected |
The time elapsed since last frame.
◆ m_timer
castor::PreciseTimer castor3d::ParticleSystem::m_timer |
|
protected |
The timer, for the particles update.
◆ m_totalTime
castor::Milliseconds castor3d::ParticleSystem::m_totalTime { 0 } |
|
protected |
The documentation for this class was generated from the following file: