diff --git a/include/Nazara/Graphics/ParticleGroup.hpp b/include/Nazara/Graphics/ParticleGroup.hpp index aaa65bb7f..412b94511 100644 --- a/include/Nazara/Graphics/ParticleGroup.hpp +++ b/include/Nazara/Graphics/ParticleGroup.hpp @@ -40,19 +40,14 @@ namespace Nz void* CreateParticle(); void* CreateParticles(unsigned int count); - void EnableFixedStep(bool fixedStep); - void* GenerateParticle(); void* GenerateParticles(unsigned int count); const ParticleDeclarationConstRef& GetDeclaration() const; - float GetFixedStepSize() const; unsigned int GetMaxParticleCount() const; unsigned int GetParticleCount() const; unsigned int GetParticleSize() const; - bool IsFixedStepEnabled() const; - void KillParticle(unsigned int index); void KillParticles(); @@ -60,7 +55,6 @@ namespace Nz void RemoveEmitter(ParticleEmitter* emitter); void RemoveGenerator(ParticleGenerator* generator); - void SetFixedStepSize(float stepSize); void SetRenderer(ParticleRenderer* renderer); void Update(float elapsedTime); @@ -79,10 +73,7 @@ namespace Nz std::vector m_generators; ParticleDeclarationConstRef m_declaration; ParticleRendererRef m_renderer; - bool m_fixedStepEnabled; bool m_processing; - float m_stepAccumulator; - float m_stepSize; unsigned int m_maxParticleCount; unsigned int m_particleCount; unsigned int m_particleSize; diff --git a/src/Nazara/Graphics/ParticleGroup.cpp b/src/Nazara/Graphics/ParticleGroup.cpp index 08fb03f39..d93c085db 100644 --- a/src/Nazara/Graphics/ParticleGroup.cpp +++ b/src/Nazara/Graphics/ParticleGroup.cpp @@ -154,7 +154,6 @@ namespace Nz * \param particleCount Number of particles * \param elapsedTime Delta time between the previous frame */ - void ParticleGroup::ApplyControllers(ParticleMapper& mapper, unsigned int particleCount, float elapsedTime) { m_processing = true; @@ -174,8 +173,8 @@ namespace Nz if (m_dyingParticles.size() < m_particleCount) { // We kill them in reverse order, std::set sorting them via std::greater - // The reason is simple, as the death of a particle means the move of the last particle in the buffer, - // without this solution, certain particles could avoid the death + // The reason is simple, as the death of a particle means moving the last particle in the buffer, + // without this solution, certain particles could avoid death for (unsigned int index : m_dyingParticles) KillParticle(index); } @@ -252,16 +251,6 @@ namespace Nz return m_declaration; } - /*! - * \brief Gets the fixed step size - * \return Current fixed step size - */ - - float ParticleGroup::GetFixedStepSize() const - { - return m_stepSize; - } - /*! * \brief Gets the maximum number of particles * \return Current maximum number @@ -292,16 +281,6 @@ namespace Nz return m_particleSize; } - /*! - * \brief Checks whether the fixed step is enabled - * \return true If it is the case - */ - - bool ParticleGroup::IsFixedStepEnabled() const - { - return m_fixedStepEnabled; - } - /*! * \brief Kills one particle * @@ -372,17 +351,6 @@ namespace Nz m_generators.erase(it); } - /*! - * \brief Sets the fixed step size - * - * \param stepSize Fixed step size - */ - - void ParticleGroup::SetFixedStepSize(float stepSize) - { - m_stepSize = stepSize; - } - /*! * \brief Sets the renderer of the particles * @@ -448,12 +416,10 @@ namespace Nz m_particleCount = system.m_particleCount; m_particleSize = system.m_particleSize; m_renderer = system.m_renderer; - m_stepSize = system.m_stepSize; // The copy can not (or should not) happen during the update, there is no use to copy m_dyingParticles.clear(); m_processing = false; - m_stepAccumulator = 0.f; m_buffer.clear(); // To avoid a copy due to resize() which will be pointless ResizeBuffer();