VOX
A little voxel engine
Loading...
Searching...
No Matches
World::WorldGenerator Class Reference

#include <World.hpp>

Collaboration diagram for World::WorldGenerator:
Collaboration graph

Public Types

typedef std::unordered_set< glm::ivec3 > ChunkGenList
 

Public Member Functions

 WorldGenerator (World &world)
 
 ~WorldGenerator ()
 
std::shared_ptr< task::TaskGraphgetGenerationGraph (ChunkGenList &chunks_to_gen)
 get the generation info for the given gen level and chunk position More...
 

Member Typedef Documentation

◆ ChunkGenList

typedef std::unordered_set<glm::ivec3> World::WorldGenerator::ChunkGenList

Constructor & Destructor Documentation

◆ WorldGenerator()

World::WorldGenerator::WorldGenerator ( World world)
Warning
the zone sizes must be in the same order as the genLevel enum
the zone sizes must be multiples of the zone sizes of the previous gen level (ex 5x5 and 10x10)

◆ ~WorldGenerator()

World::WorldGenerator::~WorldGenerator ( )

Member Function Documentation

◆ getGenerationGraph()

std::shared_ptr< task::TaskGraph > World::WorldGenerator::getGenerationGraph ( ChunkGenList chunks_to_gen)

get the generation info for the given gen level and chunk position

Parameters
gen_level
old_level
chunkPos3D
Returns
a genInfo struct

will do a generation pass to the chunks

Parameters
infothe struct returned by the getGenInfo function
chunkGenGridthe chunks to generate
Warning
the chunks MUST be locked before calling and unlocked after

creates a task graph that when runned will generate every chunk in the list

Parameters
chunks_to_gen
Returns
task::TaskGraph&&

The documentation for this class was generated from the following files: