Shanee wrote:
Ok, the unlock crash is related to a negative or 0 depth I think.
Once added
Code:
if (croppedRegion.width() <= 0 || croppedRegion.height() <= 0 || croppedRegion.depth() <= 0)
return;
to smoothRegion (this btw happens in the one David made for boxes and my sphere one as they are exactly the same function except one added line pretty much) then it stops crashing.
When trying to see if anything might suddenly change for the bigger sizes which bug out, no difference.
That could make sense... potentially there could be a bug if you try to extract a region which is 0 or negative. I'll be interested if you can confirm this and PolyVox should handle it gracefully.
On a related note, I'm in the process of removing the width(), height(), depth() functions from the Region class, because they are ambiguous. In some cases it makes sense to define it as upperCorner - lowerCorner, but in other cases it makes sense for it to be one bigger than this. From now on you should compute the dimensions yourself when you need them.