]> git.localhorst.tv Git - blank.git/blobdiff - src/world/Chunk.hpp
tentative optimization of chunk intersection test
[blank.git] / src / world / Chunk.hpp
index 6e87a0907d15059cea8b15e5255022b333b4c12b..e8773faa5dbf84691d9fbbcf054c796c6e1a6bcc 100644 (file)
@@ -30,6 +30,8 @@ public:
        static constexpr int size = side * side * side;
 
        static AABB Bounds() noexcept { return AABB{ { 0.0f, 0.0f, 0.0f }, ExactLocation::FExtent() }; }
+       static glm::vec3 Center() noexcept { return glm::vec3(8.0f); }
+       static float Radius() noexcept { return 27.71281292110203669632f; /* 16 * √3 */ }
 
        static constexpr bool InBounds(const ExactLocation::Fine &pos) noexcept {
                return