depth sort the particles
| 131 | |
| 132 | // depth sort the particles |
| 133 | void ParticleSystem::depthSort() |
| 134 | { |
| 135 | if (!m_doDepthSort) { |
| 136 | return; |
| 137 | } |
| 138 | |
| 139 | m_pos.map(); |
| 140 | m_indices.map(); |
| 141 | |
| 142 | // calculate depth |
| 143 | calcDepth(m_pos.getDevicePtr(), m_sortKeys.getDevicePtr(), m_indices.getDevicePtr(), m_sortVector, m_numParticles); |
| 144 | |
| 145 | // radix sort |
| 146 | sortParticles(m_sortKeys.getDevicePtr(), m_indices.getDevicePtr(), m_numParticles); |
| 147 | |
| 148 | m_pos.unmap(); |
| 149 | m_indices.unmap(); |
| 150 | } |
| 151 | |
| 152 | uint *ParticleSystem::getSortedIndices() |
| 153 | { |
no test coverage detected