Alphabetical commit
Former-commit-id: bacf8ab447d3022b48aac5f5ca2d337bc1283f8c
This commit is contained in:
parent
5d16d7ab7e
commit
e2d4ba030c
|
|
@ -69,8 +69,8 @@ class NAZARA_API NzParticleSystem : public NzSceneNode, NzUpdatable
|
|||
void Register() override;
|
||||
void ResizeBuffer();
|
||||
void Unregister() override;
|
||||
void UpdateBoundingVolume() const;
|
||||
void Update() override;
|
||||
void UpdateBoundingVolume() const;
|
||||
|
||||
std::set<unsigned int, std::greater<unsigned int>> m_dyingParticles;
|
||||
mutable std::vector<nzUInt8> m_buffer;
|
||||
|
|
|
|||
|
|
@ -295,18 +295,6 @@ void NzParticleSystem::Unregister()
|
|||
m_scene->UnregisterForUpdate(this);
|
||||
}
|
||||
|
||||
void NzParticleSystem::UpdateBoundingVolume() const
|
||||
{
|
||||
if (m_boundingVolume.IsNull())
|
||||
GenerateAABB();
|
||||
|
||||
if (!m_transformMatrixUpdated)
|
||||
UpdateTransformMatrix();
|
||||
|
||||
m_boundingVolume.Update(m_transformMatrix);
|
||||
m_boundingVolumeUpdated = true;
|
||||
}
|
||||
|
||||
void NzParticleSystem::Update()
|
||||
{
|
||||
float elapsedTime = m_scene->GetUpdateTime();
|
||||
|
|
@ -345,8 +333,7 @@ void NzParticleSystem::Update()
|
|||
controller->Apply(*this, mapper, 0, m_particleCount-1, elapsedTime);
|
||||
}
|
||||
|
||||
m_processing = false;
|
||||
onExit.Reset();
|
||||
onExit.CallAndReset();
|
||||
|
||||
// On tue maintenant les particules mortes durant la mise à jour
|
||||
if (m_dyingParticles.size() < m_particleCount)
|
||||
|
|
@ -363,3 +350,15 @@ void NzParticleSystem::Update()
|
|||
m_dyingParticles.clear();
|
||||
}
|
||||
}
|
||||
|
||||
void NzParticleSystem::UpdateBoundingVolume() const
|
||||
{
|
||||
if (m_boundingVolume.IsNull())
|
||||
GenerateAABB();
|
||||
|
||||
if (!m_transformMatrixUpdated)
|
||||
UpdateTransformMatrix();
|
||||
|
||||
m_boundingVolume.Update(m_transformMatrix);
|
||||
m_boundingVolumeUpdated = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue