RavEngine
Loading...
Searching...
No Matches
RavEngine::ParticleEmitter Struct Reference
Inheritance diagram for RavEngine::ParticleEmitter:
[legend]
Collaboration diagram for RavEngine::ParticleEmitter:
[legend]

Public Types

enum class  Mode : uint8_t { Stream , Burst }
 
- Public Types inherited from RavEngine::Queryable< ParticleEmitter >
typedef std::array< ctti_t, ntypes > arraytype
 

Public Member Functions

 ParticleEmitter (Entity owner, uint32_t maxParticles, uint16_t sizeOfEachParticle, const Ref< ParticleUpdateMaterialInstance > updateMat, const ParticleRenderMaterialVariant &mat)
 
 MOVE_NO_COPY (ParticleEmitter)
 
void Destroy ()
 
const auto GetRenderMaterial () const
 
const auto GetUpdateMaterial () const
 
void Play ()
 
void Stop ()
 
void Reset ()
 
bool IsEmitting () const
 
auto GetMaxParticles () const
 
void SetEmissionRate (uint32_t rate)
 
uint32_t GetNextParticleSpawnCount ()
 
void SetFrozen (bool frozen)
 
void SetVisibility (bool visible)
 
bool GetFrozen () const
 
bool GetVisible () const
 
- Public Member Functions inherited from RavEngine::ComponentWithOwner
 ComponentWithOwner (const decltype(owner) o)
 
Entity GetOwner () const
 

Public Attributes

enum RavEngine::ParticleEmitter::Mode mode = Mode::Stream
 
- Public Attributes inherited from RavEngine::Queryable< ParticleEmitter >
constexpr q_qt_def
 

Friends

class RenderEngine
 

Additional Inherited Members

- Static Public Member Functions inherited from RavEngine::Queryable< ParticleEmitter >
static constexpr const arraytype & GetQueryTypes ()
 
- Static Public Attributes inherited from RavEngine::Queryable< ParticleEmitter >
static constexpr std::size_t ntypes
 
- Protected Attributes inherited from RavEngine::ComponentWithOwner
Entity owner
 

Member Function Documentation

◆ Play()

void RavEngine::ParticleEmitter::Play ( )

If mode is set to Stream, then the particle emitter will emit continuously until it is stopped. If mode is set to Burst, then the particle emitter will emit a single burst during the next rendered frame.

◆ Reset()

void RavEngine::ParticleEmitter::Reset ( )
inline

Set active particles to 0, and kill all existing active particles

◆ Stop()

void RavEngine::ParticleEmitter::Stop ( )

If the emitter is set to stream mode, then this will prevent creation of new particles.


The documentation for this struct was generated from the following files: