diff options
| author | Mel <einebeere@gmail.com> | 2023-08-14 03:40:10 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2023-08-14 03:40:10 +0200 |
| commit | 7562a79fa214245544cb379423314c3a0766a7f2 (patch) | |
| tree | 0aaafd06c6026fabc82dbc3454487d009c9043e7 /src/World/Chunk.hpp | |
| parent | 5a1b126f1f6d55226c2b5068d0c17c428fd29ba8 (diff) | |
| download | meowcraft-7562a79fa214245544cb379423314c3a0766a7f2.tar.zst meowcraft-7562a79fa214245544cb379423314c3a0766a7f2.zip | |
Generate AABBs for terrain that collides with Player
Diffstat (limited to 'src/World/Chunk.hpp')
| -rw-r--r-- | src/World/Chunk.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<Width, Width> landmass_values{}; Matrix<Width, Width> 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); |
