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


Public Member Functions | |
| C3D_API | ParticleSystem (castor::String const &name, Scene &scene, SceneNode &parent, uint32_t count) |
| Constructor. | |
| C3D_API bool | initialise (RenderDevice const &device) |
| Initialises GPU side elements. | |
| C3D_API void | cleanup (RenderDevice const &device) |
| Cleans GPU side elements up. | |
| C3D_API void | update (CpuUpdater &updater) |
| CPU Update. | |
| C3D_API void | update (GpuUpdater &updater) |
| GPU Update. | |
| C3D_API void | setMaterial (MaterialObs value) |
| Sets the material. | |
| C3D_API void | setDimensions (castor::Point2f const &value) |
| Sets the particles dimensions. | |
| C3D_API void | setParticleType (castor::String const &value) |
| Sets the particles type name. | |
| C3D_API MaterialObs | 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. | |
| C3D_API void | setCSUpdateProgram (ShaderProgramRPtr program) |
| Defines the program used to update the particles through compute shader. | |
| C3D_API void | setCSGroupSizes (castor::Point3i sizes) |
| Defines the workgroup sizes, as defined inside the compute shader. | |
| C3D_API uint32_t | getParticlesCount () const |
| C3D_API uint32_t | getMaxParticlesCount () const |
| BillboardBaseRPtr | getBillboards () const |
| castor::StrStrMap const & | getDefaultValues () const |
| castor::String const & | getParticleType () const |
| ParticleDeclaration const & | getParticleVariables () const |
| ComputeParticleSystem const & | getCompute () const |
Public Member Functions inherited from castor3d::MovableObject | |
| C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type, SceneNode &node) |
| Constructor. | |
| C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type) |
| Constructor. | |
| virtual C3D_API | ~MovableObject () noexcept |
| Destructor. | |
| C3D_API void | detach () |
| Detaches the movable object from it's parent. | |
| virtual C3D_API void | attachTo (SceneNode &node) |
| Attaches the movable object to a node. | |
| C3D_API void | markDirty () |
| Adds the object to dirty object list in the scene. | |
| C3D_API EngineRPtr | getEngine () const noexcept |
| SceneNode * | getParent () const noexcept |
| MovableType | getMovableType () const noexcept |
Public Member Functions inherited from castor::OwnedBy< Scene > | |
| Scene * | getOwner () const noexcept |
| void | setOwner (Scene &owner) noexcept |
Public Member Functions inherited from castor::NamedBaseT< T > | |
| NamedBaseT (T name) noexcept | |
| Constructor. | |
| T const & | getName () const noexcept |
| Retrieves the name. | |
| void | rename (T name) noexcept |
Static Public Member Functions | |
| static C3D_API void | addParsers (castor::AttributeParsers &result) |
Protected Attributes | |
| castor::String | m_particleType |
| castor::StrStrMap | m_defaultValues |
| ParticleDeclaration | m_inputs |
| BillboardBaseUPtr | m_particlesBillboard |
| castor::Point2f | m_dimensions |
| MaterialObs | m_material |
| uint32_t | m_particlesCount { 0u } |
| uint32_t | m_activeParticlesCount { 0u } |
| castor::PreciseTimer | m_timer |
| bool | m_firstUpdate { true } |
| castor::Milliseconds | m_time { 0 } |
| castor::Milliseconds | m_totalTime { 0 } |
| CpuParticleSystemUPtr | m_cpuImpl |
| ComputeParticleSystemUPtr | m_csImpl |
| ParticleSystemImpl * | m_impl { nullptr } |
Protected Attributes inherited from castor3d::MovableObject | |
| MovableType | m_type |
| SceneNode * | m_sceneNode {} |
| OnSceneNodeChangedConnection | m_notifyIndex |
| bool | m_dirty { true } |
Protected Attributes inherited from castor::NamedBaseT< T > | |
| T | m_name |
Additional Inherited Members | |
Protected Member Functions inherited from castor::OwnedBy< Scene > | |
| OwnedBy (Scene &owner) noexcept | |
| Constructor. | |
| C3D_API castor3d::ParticleSystem::ParticleSystem | ( | castor::String const & | name, |
| Scene & | scene, | ||
| SceneNode & | parent, | ||
| uint32_t | count ) |
Constructor.
| [in] | name | The name. |
| [in] | scene | The parent scene. |
| [in] | parent | The parent scene node. |
| [in] | count | The particles count. |
|
static |
| C3D_API void castor3d::ParticleSystem::addParticleVariable | ( | castor::String const & | name, |
| ParticleFormat | type, | ||
| castor::String const & | defaultValue ) |
adds a particle variable.
| [in] | name | The variable name. |
| [in] | type | The variable type. |
| [in] | defaultValue | The variable default value. |
| C3D_API void castor3d::ParticleSystem::cleanup | ( | RenderDevice const & | device | ) |
Cleans GPU side elements up.
| [in] | device | The GPU device. |
|
inline |
References m_particlesBillboard.
|
inline |
References m_csImpl.
|
inline |
References m_defaultValues.
| C3D_API castor::Point2f const & castor3d::ParticleSystem::getDimensions | ( | ) | const |
| C3D_API MaterialObs castor3d::ParticleSystem::getMaterial | ( | ) | const |
|
inline |
References m_particlesCount.
|
inline |
References m_activeParticlesCount.
|
inline |
References m_particleType.
|
inline |
References m_inputs.
| C3D_API bool castor3d::ParticleSystem::initialise | ( | RenderDevice const & | device | ) |
Initialises GPU side elements.
| [in] | device | The GPU device. |
true if all is OK. | C3D_API void castor3d::ParticleSystem::setCSGroupSizes | ( | castor::Point3i | sizes | ) |
Defines the workgroup sizes, as defined inside the compute shader.
| [in] | sizes | The sizes. |
| C3D_API void castor3d::ParticleSystem::setCSUpdateProgram | ( | ShaderProgramRPtr | program | ) |
Defines the program used to update the particles through compute shader.
| [in] | program | The program. |
| C3D_API void castor3d::ParticleSystem::setDimensions | ( | castor::Point2f const & | value | ) |
Sets the particles dimensions.
| [in] | value | The new value. |
| C3D_API void castor3d::ParticleSystem::setMaterial | ( | MaterialObs | value | ) |
Sets the material.
| [in] | value | The new value |
| C3D_API void castor3d::ParticleSystem::setParticleType | ( | castor::String const & | value | ) |
Sets the particles type name.
| [in] | value | The new value. |
| C3D_API void castor3d::ParticleSystem::update | ( | CpuUpdater & | updater | ) |
CPU Update.
| [in,out] | updater | The update data. |
| C3D_API void castor3d::ParticleSystem::update | ( | GpuUpdater & | updater | ) |
GPU Update.
| [in,out] | updater | The update data. |
|
protected |
The active particles count.
Referenced by getParticlesCount().
|
protected |
The CPU implementation.
|
protected |
The implementation using compute shader.
Referenced by getCompute().
|
protected |
The map of default value per variable name.
Referenced by getDefaultValues().
|
protected |
The billboards dimensions.
|
protected |
Tells that the next update is the first one.
|
protected |
The implementation chosen after initialisation.
|
protected |
The particle elements description.
Referenced by getParticleVariables().
|
protected |
The Material.
|
protected |
The billboards containing the particles.
Referenced by getBillboards().
|
protected |
The particles count.
Referenced by getMaxParticlesCount().
|
protected |
The particles type name.
Referenced by getParticleType().
|
protected |
The time elapsed since last frame.
|
protected |
The timer, for the particles update.
|
protected |
The total elapsed time.