VOX
A little voxel engine
Loading...
Searching...
No Matches
Chunk.hpp File Reference
#include "hashes.hpp"
#include <array>
#include <glm/vec3.hpp>
#include <mutex>
#include <condition_variable>
#include <unordered_map>
#include <unordered_set>
#include "Block.hpp"
#include "Status.hpp"
#include "define.hpp"
#include "Tracy.hpp"
Include dependency graph for Chunk.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Chunk
 
struct  Chunk::biomeInfo
 
struct  std::hash< Chunk::genLevel >
 
struct  std::hash< std::pair< glm::ivec3, Chunk::genLevel > >
 
struct  ChunkData
 

Namespaces

namespace  std
 

Macros

#define CHUNK_Y_SIZE   512
 
#define CHUNK_X_SIZE   16
 
#define CHUNK_Z_SIZE   16
 
#define BLOCKS_PER_CHUNK   CHUNK_Y_SIZE * CHUNK_X_SIZE * CHUNK_Z_SIZE
 
#define CHUNK_SIZE_IVEC3   glm::ivec3(CHUNK_X_SIZE, CHUNK_Y_SIZE, CHUNK_Z_SIZE)
 
#define CHUNK_SIZE_VEC3   glm::vec3(CHUNK_X_SIZE, CHUNK_Y_SIZE, CHUNK_Z_SIZE)
 

Typedefs

typedef std::unordered_map< glm::ivec3, std::shared_ptr< Chunk > > ChunkMap
 
typedef Chunk::e_biome BiomeType
 

Functions

glm::ivec3 getChunkPos (const glm::ivec3 &block_pos)
 
glm::ivec3 getBlockChunkPos (const glm::ivec3 &block_pos)
 

Macro Definition Documentation

◆ BLOCKS_PER_CHUNK

#define BLOCKS_PER_CHUNK   CHUNK_Y_SIZE * CHUNK_X_SIZE * CHUNK_Z_SIZE

◆ CHUNK_SIZE_IVEC3

#define CHUNK_SIZE_IVEC3   glm::ivec3(CHUNK_X_SIZE, CHUNK_Y_SIZE, CHUNK_Z_SIZE)

◆ CHUNK_SIZE_VEC3

#define CHUNK_SIZE_VEC3   glm::vec3(CHUNK_X_SIZE, CHUNK_Y_SIZE, CHUNK_Z_SIZE)

◆ CHUNK_X_SIZE

#define CHUNK_X_SIZE   16

◆ CHUNK_Y_SIZE

#define CHUNK_Y_SIZE   512

◆ CHUNK_Z_SIZE

#define CHUNK_Z_SIZE   16

Typedef Documentation

◆ BiomeType

◆ ChunkMap

typedef std::unordered_map<glm::ivec3, std::shared_ptr<Chunk> > ChunkMap

Function Documentation

◆ getBlockChunkPos()

glm::ivec3 getBlockChunkPos ( const glm::ivec3 &  block_pos)

◆ getChunkPos()

glm::ivec3 getChunkPos ( const glm::ivec3 &  block_pos)