X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FChunk.hpp;h=d986874445cc09829a87f6646df94585303d53f0;hb=f2f254f8d576b48fde9305c3d2927552d1d4c20d;hp=8493ef6e2ef1b7f4f61ef5439484282a8e3ffbab;hpb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;p=blank.git diff --git a/src/world/Chunk.hpp b/src/world/Chunk.hpp index 8493ef6..d986874 100644 --- a/src/world/Chunk.hpp +++ b/src/world/Chunk.hpp @@ -71,6 +71,15 @@ public: } glm::mat4 ToTransform(const Pos &pos, int idx) const noexcept; + static bool IsBorder(const Pos &pos) noexcept { + return + pos.x == 0 || + pos.x == width - 1 || + pos.y == 0 || + pos.y == height - 1 || + pos.z == 0 || + pos.z == depth - 1; + } static constexpr bool IsBorder(int idx) noexcept { return idx < width * height || // low Z plane