working on chunk generation

This commit is contained in:
2025-05-09 09:37:23 +02:00
parent 2336835250
commit 8c94d86fd4
18 changed files with 242 additions and 155 deletions

27
Application/Chunk.h git.filemode.normal_file
View File

@@ -0,0 +1,27 @@
#ifndef CHUNK_H
#define CHUNK_H
#include <vector>
#include <ScopGraphics.h>
#include <ScopMaths.h>
constexpr Scop::Vec3ui CHUNK_SIZE = Scop::Vec3ui{ 16, 256, 16 };
constexpr std::uint32_t CHUNK_VOLUME = CHUNK_SIZE.x * CHUNK_SIZE.y * CHUNK_SIZE.z;
class Chunk
{
public:
Chunk(Scop::Scene& world, Scop::Vec2ui offset);
void GenerateChunk();
~Chunk() = default;
private:
std::vector<std::uint32_t> m_data;
Scop::Vec2ui m_offset; // In chunks
Scop::Vec2ui m_position; // In blocks
Scop::NonOwningPtr<Scop::Actor> p_actor = nullptr;
};
#endif