| 32 | } |
| 33 | |
| 34 | void EmitterSystem::reuseParticles() |
| 35 | { |
| 36 | if (m_reuseParticles) |
| 37 | { |
| 38 | m_reusedParticles.clear(); |
| 39 | for (unsigned int i = 0; i < m_model->numActiveParticles(); i++) |
| 40 | { |
| 41 | Vector3r &x = m_model->getPosition(i); |
| 42 | if ((x[0] < m_boxMin[0]) || (x[1] < m_boxMin[1]) || (x[2] < m_boxMin[2]) || |
| 43 | (x[0] > m_boxMax[0]) || (x[1] > m_boxMax[1]) || (x[2] > m_boxMax[2])) |
| 44 | { |
| 45 | m_reusedParticles.push_back(i); |
| 46 | m_model->getVelocity(i) *= static_cast<Real>(0.95); // make particles slow so that they don't influence |
| 47 | // the CFL condition |
| 48 | //model->getPosition(0, i) = Vector3r(1000 + i, 1000, 1000); |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | void EmitterSystem::step() |
| 55 | { |
nothing calls this directly
no test coverage detected