// Destroy all particles in the system. void BodyContactTests::DestroyAllParticles() { const int32 count = m_particleSystem->GetParticleCount(); for (int32 i = 0; i < count; ++i) { m_particleSystem->DestroyParticle(i); } }
void b2World::DrawParticleSystem(const b2ParticleSystem& system) { int32 particleCount = system.GetParticleCount(); if (particleCount) { float32 radius = system.GetRadius(); const b2Vec2* positionBuffer = system.GetPositionBuffer(); if (system.m_colorBuffer.data) { const b2ParticleColor* colorBuffer = system.GetColorBuffer(); m_debugDraw->DrawParticles(positionBuffer, radius, colorBuffer, particleCount); } else { m_debugDraw->DrawParticles(positionBuffer, radius, NULL, particleCount); } } }