VOX
A little voxel engine
Loading...
Searching...
No Matches
ChunkData Struct Reference

#include <Chunk.hpp>

Collaboration diagram for ChunkData:
Collaboration graph

Public Member Functions

 ChunkData ()=default
 
 ChunkData (const Chunk &chunk)
 
 ChunkData (ChunkData &&other)=default
 
ChunkDataoperator= (ChunkData &&other)=default
 
 ChunkData (const ChunkData &other)=default
 
ChunkDataoperator= (const ChunkData &other)=default
 
std::vector< char > serialize () const
 
void deserialize (const char *data, const size_t &size)
 

Public Attributes

Chunk::BlockArray blocks
 
Chunk::LightArray light
 
Chunk::BiomeArray biome
 
Chunk::HeightArray height
 
Chunk::genLevel gen_level
 
glm::ivec3 position
 

Static Public Attributes

static constexpr size_t DATA_SIZE = sizeof(blocks) + sizeof(light) + sizeof(biome) + sizeof(height) + sizeof(gen_level) + sizeof(position)
 

Constructor & Destructor Documentation

◆ ChunkData() [1/4]

ChunkData::ChunkData ( )
default

◆ ChunkData() [2/4]

ChunkData::ChunkData ( const Chunk chunk)

◆ ChunkData() [3/4]

ChunkData::ChunkData ( ChunkData &&  other)
default

◆ ChunkData() [4/4]

ChunkData::ChunkData ( const ChunkData other)
default

Member Function Documentation

◆ deserialize()

void ChunkData::deserialize ( const char *  data,
const size_t &  size 
)

◆ operator=() [1/2]

ChunkData & ChunkData::operator= ( ChunkData &&  other)
default

◆ operator=() [2/2]

ChunkData & ChunkData::operator= ( const ChunkData other)
default

◆ serialize()

std::vector< char > ChunkData::serialize ( ) const

Member Data Documentation

◆ biome

Chunk::BiomeArray ChunkData::biome

◆ blocks

Chunk::BlockArray ChunkData::blocks

◆ DATA_SIZE

constexpr size_t ChunkData::DATA_SIZE = sizeof(blocks) + sizeof(light) + sizeof(biome) + sizeof(height) + sizeof(gen_level) + sizeof(position)
staticconstexpr

◆ gen_level

Chunk::genLevel ChunkData::gen_level

◆ height

Chunk::HeightArray ChunkData::height

◆ light

Chunk::LightArray ChunkData::light

◆ position

glm::ivec3 ChunkData::position

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