Graphics/ParticleGroup: Remove fixed step parameter (wasn't used)

Former-commit-id: 9e0d603d8bf47cb971bdacbaa662f3068d035515 [formerly afc7e78d0e517d87ea1239fea4105f6a07ab3aea]
Former-commit-id: 3c972ba5345592c2f35e1caf886ce6aa87560d4a
This commit is contained in:
Lynix 2016-07-29 13:55:59 +02:00
parent 2203d57818
commit 2468fd63a4
2 changed files with 2 additions and 45 deletions

View File

@ -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<ParticleGeneratorRef> 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;

View File

@ -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();