]> git.localhorst.tv Git - blank.git/blobdiff - src/world/Chunk.hpp
some tests for Chunk
[blank.git] / src / world / Chunk.hpp
index 8493ef6e2ef1b7f4f61ef5439484282a8e3ffbab..d986874445cc09829a87f6646df94585303d53f0 100644 (file)
@@ -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