From 7562a79fa214245544cb379423314c3a0766a7f2 Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 14 Aug 2023 03:40:10 +0200 Subject: Generate AABBs for terrain that collides with Player --- src/World/Chunk.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/World/Chunk.hpp') diff --git a/src/World/Chunk.hpp b/src/World/Chunk.hpp index 0b00c97..ed3220d 100644 --- a/src/World/Chunk.hpp +++ b/src/World/Chunk.hpp @@ -1,6 +1,7 @@ #pragma once #include "../Common/Sizes.hpp" +#include "../Math/AABB.hpp" #include "ChunkDimensions.hpp" #include "BiomeType.hpp" #include "BlockType.hpp" @@ -35,8 +36,6 @@ public: const BlockData& at(Position::BlockLocal pos) const; BlockData& at(Position::BlockLocal pos); - Bool is_empty(U32 x, U32 y, U32 z) const; - struct Details { Matrix landmass_values{}; Matrix hill_values{}; @@ -55,7 +54,8 @@ public: Bool is_damaged() const; void damage(); - static Bool is_valid_position(U32 x, U32 y, U32 z); + static Bool is_valid_position(Position::BlockLocal pos); + static AABB block_bounds(Position::BlockLocal pos); private: static U64 pos(U32 x, U32 y, U32 z); -- cgit 1.4.1