|
Muto 0.0.1
|
A simple particle system for stress testing the renderer. This is a temporary starter particle system and will be replaced with a more robust implementation in the future. More...
#include <ParticleSystem.h>
Public Member Functions | |
| void | Emit (const ParticleProps &particleProps) |
| void | OnRender () |
| void | OnUpdate (Timestep ts) |
| ParticleSystem () | |
| ParticleSystem (uint32_t maxParticles) | |
| void | ResetParticle (Particle &particle, const ParticleProps &particleProps) |
| void | ResetSystem () |
| void | SetParticleProps (const ParticleProps &particleProps) |
Public Attributes | |
| int | m_EmitRate = 100 |
| bool | m_IsEmitting = true |
| bool | m_Loop = true |
| ParticleProps | m_Props |
| float | m_TimeSinceLastEmit = 0.0f |
Private Attributes | |
| int | m_activeParticleCount = 0 |
| std::vector< Particle > | m_ParticlePool |
| uint32_t | m_PoolIndex = 999 |
A simple particle system for stress testing the renderer. This is a temporary starter particle system and will be replaced with a more robust implementation in the future.
| Muto::ParticleSystem::ParticleSystem | ( | ) |
References m_activeParticleCount, and m_PoolIndex.
| Muto::ParticleSystem::ParticleSystem | ( | uint32_t | maxParticles | ) |
References m_activeParticleCount, and m_PoolIndex.
| void Muto::ParticleSystem::Emit | ( | const ParticleProps & | particleProps | ) |
References Muto::Particle::Active, Muto::Random::Float1(), Muto::Particle::LifeRemaining, Muto::ParticleProps::Lifetime, Muto::Particle::Lifetime, Muto::ParticleProps::LifetimeVariation, m_PoolIndex, Muto::ParticleProps::Rotation, Muto::Particle::Rotation, Muto::ParticleProps::RotationVariation, Muto::ParticleProps::SizeBegin, Muto::Particle::SizeBegin, Muto::ParticleProps::SizeEnd, Muto::Particle::SizeEnd, and Muto::ParticleProps::SizeVariation.
Referenced by Muto::SceneHierarchyPanel::DrawComponents().
| void Muto::ParticleSystem::OnRender | ( | ) |
| void Muto::ParticleSystem::OnUpdate | ( | Muto::Timestep | ts | ) |
References m_activeParticleCount, m_EmitRate, m_IsEmitting, m_Loop, m_TimeSinceLastEmit, and ResetSystem().
| void Muto::ParticleSystem::ResetParticle | ( | Particle & | particle, |
| const ParticleProps & | particleProps | ||
| ) |
References Muto::Particle::Active, Muto::Random::Float1(), Muto::Particle::LifeRemaining, Muto::ParticleProps::Lifetime, Muto::Particle::Lifetime, Muto::ParticleProps::LifetimeVariation, Muto::ParticleProps::Rotation, Muto::Particle::Rotation, Muto::ParticleProps::RotationVariation, Muto::ParticleProps::SizeBegin, Muto::Particle::SizeBegin, Muto::ParticleProps::SizeEnd, Muto::Particle::SizeEnd, and Muto::ParticleProps::SizeVariation.
|
inline |
References m_IsEmitting, and m_TimeSinceLastEmit.
Referenced by Muto::SceneHierarchyPanel::DrawComponents(), and OnUpdate().
|
inline |
|
private |
Referenced by OnUpdate(), ParticleSystem(), and ParticleSystem().
| int Muto::ParticleSystem::m_EmitRate = 100 |
Referenced by OnUpdate().
Referenced by OnUpdate(), and ResetSystem().
Referenced by OnUpdate().
|
private |
|
private |
Referenced by Emit(), ParticleSystem(), and ParticleSystem().
| ParticleProps Muto::ParticleSystem::m_Props |
| float Muto::ParticleSystem::m_TimeSinceLastEmit = 0.0f |
Referenced by OnUpdate(), and ResetSystem().