Added getArray() python API method to get all particle attribute data in a single python tuple#31
Added getArray() python API method to get all particle attribute data in a single python tuple#31mattebb wants to merge 6 commits intowdas:masterfrom mattebb:master
Conversation
…e python tuple This is a much faster way of getting the particle attribute data than iterating over particles in python using .get(). In my test case, loading a large point cloud for display in openGL, it's around a factor of 10 speedup.
|
This is nice! It would probably be even faster if you used the particle iterator. It would also be cool to add a setArray() function to do the opposite as well. |
|
Ah yes, thanks, I should take a look at both of those. Also may have been a bit hasty with this pull request, I'm now looking into other things like generating numpy arrays directly - I tried loading up a 2GB ptc (50M points) and all the copying that had to be done brought memory usage up quite high - without colour I could display it ok at 5fps, but with colour it went over 20GB of memory and hit swap. I know python's not designed to be ideal for this sort of thing, but I think it can be pushed a little bit further too :) |
|
Hi, I've reworked this substantially to use NumPy and it's going quite well! I've re-forked off the redpawfx repo though, so I've added a new pull request here: cheers |
This is a much faster way of getting the particle attribute data than iterating over particles in python using .get(). In my test case, loading a large point cloud for display in openGL, it's around a factor of 10 speedup.