cCuboid boundary inclusion change
#1
I'd like to change cCuboid's understanding of its boundaries. Right now the class considers both of its boundaries inclusive, meaning that there is no way to represent an empty cCuboid. I'd like to change it so that the lower boundary is inclusive and the upper boundary is exclusive, similar to how STL defines iterators (begin() is inclusive, end() is exclusive).
Once we have that, it makes little sense to support "unsorted" cCuboids, so I'd like to enforce sorting as well.

In the C++ code there's only one area that uses the cCuboid for bounds checking, and that's the generator (mineshafts and generic piece-based). These should be pretty straightforward to fix.

However, on the Lua side there may be a lot more of these. So I'm asking here about what plugins will need changing.

This is suggested on GitHub as part of #4363: https://github.com/cuberite/cuberite/issues/4363
Reply
Thanks given by:


Messages In This Thread
cCuboid boundary inclusion change - by xoft - 08-19-2019, 10:20 PM
RE: cCuboid boundary inclusion change - by xoft - 08-19-2019, 10:52 PM



Users browsing this thread: 3 Guest(s)