dump particles to stdout for debugging
| 377 | |
| 378 | // dump particles to stdout for debugging |
| 379 | void ParticleSystem::dumpParticles(uint start, uint count) |
| 380 | { |
| 381 | m_pos.copy(GpuArray<float4>::DEVICE_TO_HOST); |
| 382 | float4 *pos = m_pos.getHostPtr(); |
| 383 | |
| 384 | m_vel.copy(GpuArray<float4>::DEVICE_TO_HOST); |
| 385 | float4 *vel = m_vel.getHostPtr(); |
| 386 | |
| 387 | for (uint i = start; i < start + count; i++) { |
| 388 | printf("%d: ", i); |
| 389 | printf("pos: (%.4f, %.4f, %.4f, %.4f)\n", pos[i].x, pos[i].y, pos[i].z, pos[i].w); |
| 390 | printf("vel: (%.4f, %.4f, %.4f, %.4f)\n", vel[i].x, vel[i].y, vel[i].z, vel[i].w); |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | // dump particles to a system memory host |
| 395 | void ParticleSystem::dumpBin(float4 **posData, float4 **velData) |
nothing calls this directly
no test coverage detected