step the simulation
| 103 | |
| 104 | // step the simulation |
| 105 | void ParticleSystem::step(float deltaTime) |
| 106 | { |
| 107 | assert(m_bInitialized); |
| 108 | |
| 109 | m_params.time = m_time; |
| 110 | setParameters(&m_params); |
| 111 | |
| 112 | m_pos.map(); |
| 113 | m_vel.map(); |
| 114 | |
| 115 | // integrate particles |
| 116 | integrateSystem(m_pos.getDevicePtr(), |
| 117 | m_pos.getDeviceWritePtr(), |
| 118 | m_vel.getDevicePtr(), |
| 119 | m_vel.getDeviceWritePtr(), |
| 120 | deltaTime, |
| 121 | m_numParticles); |
| 122 | |
| 123 | m_pos.unmap(); |
| 124 | m_vel.unmap(); |
| 125 | |
| 126 | m_pos.swap(); |
| 127 | m_vel.swap(); |
| 128 | |
| 129 | m_time += deltaTime; |
| 130 | } |
| 131 | |
| 132 | // depth sort the particles |
| 133 | void ParticleSystem::depthSort() |
no test coverage detected