| 4478 | } |
| 4479 | |
| 4480 | void b2ParticleSystem::ApplyLinearImpulse(int32 firstIndex, int32 lastIndex, |
| 4481 | const b2Vec2& impulse) |
| 4482 | { |
| 4483 | const float32 numParticles = (float32)(lastIndex - firstIndex); |
| 4484 | const float32 totalMass = numParticles * GetParticleMass(); |
| 4485 | const b2Vec2 velocityDelta = impulse / totalMass; |
| 4486 | for (int32 i = firstIndex; i < lastIndex; i++) |
| 4487 | { |
| 4488 | m_velocityBuffer.data[i] += velocityDelta; |
| 4489 | } |
| 4490 | } |
| 4491 | |
| 4492 | void b2ParticleSystem::QueryAABB(b2QueryCallback* callback, |
| 4493 | const b2AABB& aabb) const |
no outgoing calls
no test coverage detected