If you have read my previous posts, you are aware of the speed problem of my first polygonise operator. Processing a scalar field using a
distance like formula is very slow even on a medium point cloud !
So I spend some time learning how to implement an octree structure in my C++ plugin. It was really interesting but then I realised it was a serious task, a real developper job in fact. As I do those search in my (short) spare time, I was rather upset by the amount of time before I can get something working. And to be honest, I was not very confident on writing enough efficient code for this task !
So I choosed to use ICE for the big bottleneck of the polygonise operator, the processing a scalar field in a voxel grid. I build two ICEtrees (voxel center and corners) to store all the needed voxels data.
It is easy to get the distance between each voxels corners and an other particle cloud using just an ICEtree. And it is FAST !
The other advantage is that the formula for the scalar field is open. You can plug any super formula you want as far as it returns a scalar value :).
The custom operator job is to read the scalar field, send it to the marching cube function and then use the result to build the triangles.