Every time you try to save a voxel by setVoxelAt function, polyvox checks if the voxel was actually modified before effectively saving it.
Don't you think it's a bit wasteful doing this kind of check instead of just writing the data back to the volume?
I mean, I know that probably some work must be done and it could be avoided if the voxel wasn't changed, but I guess most of the time the voxel is just gonna be saved because if the programmer called that function, he meant to _do_ some modifications. Doing all of those checks might waste some CPU time and HELL, I SPENT HALF AN HOUR LOOKING FOR A BUG JUST BECAUSE MY OPERATOR == WAS NOT KEEPING INTO ACCOUNT ONE VARIABLE OF THE STRUCT
(sorry for the little rant
)
My voxels store one quantity (let's say, "how much stuff is in there") and the kind of voxel (for example, air, oil, water). What happened is that the volume wasn't updating because the operator == was not checking for the "how much stuff" variable, but just for the "what is in there" one.
Apart from me being a bit "stupid", I think that just straight copying might work just better and faster. Any thoughts?