24 lines
363 B
C++
24 lines
363 B
C++
#ifndef WORLD_H
|
|
#define WORLD_H
|
|
|
|
#include <unordered_map>
|
|
#include <optional>
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
#include "Chunk.h"
|
|
|
|
class World
|
|
{
|
|
public:
|
|
std::unordered_map<glm::ivec3, Chunk> chunks;
|
|
|
|
World();
|
|
|
|
void set_voxel(glm::ivec3 position, std::optional<VoxelKind> kind);
|
|
|
|
Chunk* get_or_create_chunk(glm::ivec3 chunk_position);
|
|
};
|
|
|
|
#endif WORLD_H
|