voxelman.world.storage.chunk

Members

Aliases

LayerDataLenType
alias LayerDataLenType = uint

is used as array size when non-uniform. Used to allocate full array when uniform. Assumes array length as CHUNK_SIZE_CUBE, but element size is dataLength/CHUNK_SIZE_CUBE if CHUNK_SIZE_CUBE > dataLength Or CHUNK_SIZE_CUBE/dataLength otherwise. Element size is used to fill created array. If dataLength < CHUNK_SIZE_CUBE then element size is less than byte. Element size must be power of two, either of bytes or of bits.

Enums

StorageType
enum StorageType
Undocumented in source.
isSomeLayer
eponymoustemplate isSomeLayer(Layer)
Undocumented in source.

Functions

allocLayerArray
ubyte[] allocLayerArray(ubyte[] dataToCopy)
Undocumented in source. Be warned that the author may not have intended to support it.
allocLayerArray
ubyte[] allocLayerArray(size_t length)
Undocumented in source. Be warned that the author may not have intended to support it.
applyChanges
void applyChanges(WriteBuffer* writeBuffer, BlockChange[] changes)
Undocumented in source. Be warned that the author may not have intended to support it.
applyChanges
void applyChanges(WriteBuffer* writeBuffer, ChunkChange[] changes)
Undocumented in source. Be warned that the author may not have intended to support it.
applyLayer
void applyLayer(Layer1 layer, Layer2 writeBuffer)
Undocumented in source. Be warned that the author may not have intended to support it.
areaOfImpact
ushort[2] areaOfImpact(BlockChange[] changes)
Undocumented in source. Be warned that the author may not have intended to support it.
bitsToUniformLength
ubyte bitsToUniformLength()
Undocumented in source. Be warned that the author may not have intended to support it.
bitsToUniformLength
ubyte bitsToUniformLength(ubyte bits)
Undocumented in source. Be warned that the author may not have intended to support it.
compressLayerData
ubyte[] compressLayerData(ubyte[] data, ubyte[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
copyLayer
void copyLayer(Layer1 source, Layer2 dest)
Undocumented in source. Be warned that the author may not have intended to support it.
copyToBuffer
void copyToBuffer(Layer layer, BlockId[] outBuffer)
Undocumented in source. Be warned that the author may not have intended to support it.
decompressLayerData
ubyte[] decompressLayerData(Layer layer, ubyte[] outBuffer)
Undocumented in source. Be warned that the author may not have intended to support it.
decompressLayerData
ubyte[] decompressLayerData(ubyte[] _compressedData)
Undocumented in source. Be warned that the author may not have intended to support it.
decompressLayerData
ubyte[] decompressLayerData(ubyte[] _compressedData, ubyte[] outBuffer)
Undocumented in source. Be warned that the author may not have intended to support it.
ensureLayerArrayLength
ubyte[] ensureLayerArrayLength(Layer layer, size_t length)
Undocumented in source. Be warned that the author may not have intended to support it.
expandUniform
void expandUniform(ubyte[] buffer, ubyte itemBits, ulong uniformData)
Undocumented in source. Be warned that the author may not have intended to support it.
expandUniformLayer
void expandUniformLayer(Layer layer)
Undocumented in source. Be warned that the author may not have intended to support it.
freeLayerArray
void freeLayerArray(Layer layer)
Undocumented in source. Be warned that the author may not have intended to support it.
fromBlockData
ChunkLayerItem fromBlockData(ChunkLayerData bd)
Undocumented in source. Be warned that the author may not have intended to support it.
getArray
T[] getArray(Layer layer)
Undocumented in source. Be warned that the author may not have intended to support it.
getBlockId
BlockId getBlockId(Layer layer, BlockChunkIndex index)
Undocumented in source. Be warned that the author may not have intended to support it.
getBlockId
BlockId getBlockId(Layer layer, int x, int y, int z)
Undocumented in source. Be warned that the author may not have intended to support it.
getLayerDataBytes
size_t getLayerDataBytes(Layer layer)
Undocumented in source. Be warned that the author may not have intended to support it.
getLayerItemNoncompressed
T getLayerItemNoncompressed(Layer layer, BlockChunkIndex index)
Undocumented in source. Be warned that the author may not have intended to support it.
getUniform
T getUniform(Layer layer)
Undocumented in source. Be warned that the author may not have intended to support it.
isUniform
bool isUniform(Layer layer)
Undocumented in source. Be warned that the author may not have intended to support it.
reallocLayerArray
ubyte[] reallocLayerArray(Layer layer, size_t newLength)
Undocumented in source. Be warned that the author may not have intended to support it.
toBlockData
ChunkLayerData toBlockData(Layer layer, ubyte layerId)
Undocumented in source. Be warned that the author may not have intended to support it.
uncompressedDataLength
size_t uncompressedDataLength(ubyte[] compressedData)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

BLOCKID_UNIFORM_FILL_BITS
enum BLOCKID_UNIFORM_FILL_BITS;
Undocumented in source.
BLOCKS_DATA_LENGTH
enum BLOCKS_DATA_LENGTH;
Undocumented in source.
BLOCK_LAYER
enum BLOCK_LAYER;
Undocumented in source.
BLOCK_METADATA_UNIFORM_FILL_BITS
enum BLOCK_METADATA_UNIFORM_FILL_BITS;
Undocumented in source.
ENTITY_LAYER
enum ENTITY_LAYER;
Undocumented in source.
METADATA_LAYER
enum METADATA_LAYER;
Undocumented in source.
NUM_CHUNK_LAYERS
enum NUM_CHUNK_LAYERS;
Undocumented in source.

Structs

BlockChange
struct BlockChange
Undocumented in source.
BlockDataSnapshot
struct BlockDataSnapshot
Undocumented in source.
ChunkChange
struct ChunkChange

Container for chunk updates If blockChanges is null uses newBlockData

ChunkHeaderItem
struct ChunkHeaderItem
Undocumented in source.
ChunkLayerData
struct ChunkLayerData
Undocumented in source.
ChunkLayerItem
struct ChunkLayerItem

Stores layer of chunk data. Used for transferring and saving chunk layers. Stores layerId. Stores no user count.

ChunkLayerSnap
struct ChunkLayerSnap

Stores layer of chunk data. Blocks are stored as array of blocks or uniform.

ChunkLayerTimestampItem
struct ChunkLayerTimestampItem
Undocumented in source.
WriteBuffer
struct WriteBuffer
Undocumented in source.

Meta

Authors

Andrey Penechko.