mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 15:01:49 +00:00
feat: add app.save_world() function and update documentation
This commit is contained in:
parent
96577ee041
commit
ed7dc1f901
8 changed files with 48 additions and 7 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include "constants.hpp"
|
||||
#include "lighting/Lightmap.hpp"
|
||||
#include "util/SmallHeap.hpp"
|
||||
#include "maths/aabb.hpp"
|
||||
#include "voxel.hpp"
|
||||
|
||||
inline constexpr int CHUNK_DATA_LEN = CHUNK_VOL * 4;
|
||||
|
|
@ -75,4 +76,11 @@ public:
|
|||
bool decode(const ubyte* data);
|
||||
|
||||
static void convert(ubyte* data, const ContentReport* report);
|
||||
|
||||
AABB getAABB() const {
|
||||
return AABB(
|
||||
glm::vec3(x * CHUNK_W, -INFINITY, z * CHUNK_D),
|
||||
glm::vec3((x + 1) * CHUNK_W, INFINITY, (z + 1) * CHUNK_D)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue