From cfa27fd8eed42599195fdff6d7d0e25586e8f18c Mon Sep 17 00:00:00 2001 From: untodesu Date: Thu, 11 Sep 2025 16:00:57 +0500 Subject: Graft header-only math::AABB from qfengine --- game/shared/world/chunk_aabb.hh | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'game/shared/world/chunk_aabb.hh') diff --git a/game/shared/world/chunk_aabb.hh b/game/shared/world/chunk_aabb.hh index a9e0205..3a2d26f 100644 --- a/game/shared/world/chunk_aabb.hh +++ b/game/shared/world/chunk_aabb.hh @@ -2,32 +2,13 @@ #define SHARED_CHUNK_AABB 1 #pragma once +#include "core/math/aabb.hh" + #include "shared/types.hh" namespace world { -class ChunkAABB final { -public: - ChunkAABB(void) = default; - virtual ~ChunkAABB(void) = default; - - void set_bounds(const chunk_pos& min, const chunk_pos& max); - void set_offset(const chunk_pos& base, const chunk_pos& size); - - const chunk_pos& get_min(void) const; - const chunk_pos& get_max(void) const; - - bool contains(const chunk_pos& point) const; - bool intersect(const ChunkAABB& other_box) const; - - ChunkAABB combine_with(const ChunkAABB& other_box) const; - ChunkAABB multiply_with(const ChunkAABB& other_box) const; - ChunkAABB push(const chunk_pos& vector) const; - -public: - chunk_pos min; - chunk_pos max; -}; +using ChunkAABB = math::AABB; } // namespace world #endif // SHARED_CHUNK_AABB -- cgit