add StructurePlacement & add SurroundMap visualization test

This commit is contained in:
MihailRis
2024-09-20 23:43:54 +03:00
parent 88b0f8e3d6
commit 4f882a3ca3
5 changed files with 72 additions and 9 deletions
+13 -2
View File
@@ -20,18 +20,29 @@ enum class ChunkPrototypeLevel {
BIOMES, HEIGHTMAP
};
struct StructurePlacement {
VoxelStructure& structure;
glm::ivec3 position;
StructurePlacement(VoxelStructure& structure, glm::ivec3 position)
: structure(structure), position(std::move(position)) {}
};
struct ChunkPrototype {
ChunkPrototypeLevel level;
/// @brief chunk biomes matrix
std::vector<const Biome*> biomes;
std::unique_ptr<const Biome*[]> biomes;
/// @brief chunk heightmap
std::shared_ptr<Heightmap> heightmap;
std::vector<StructurePlacement> structures;
ChunkPrototype(
ChunkPrototypeLevel level,
std::vector<const Biome*> biomes,
std::unique_ptr<const Biome*[]> biomes,
std::shared_ptr<Heightmap> heightmap
) : level(level),
biomes(std::move(biomes)),