void MapBlock::copyFrom(VoxelManipulator &dst) { v3s16 data_size(MAP_BLOCKSIZE, MAP_BLOCKSIZE, MAP_BLOCKSIZE); VoxelArea data_area(v3s16(0,0,0), data_size - v3s16(1,1,1)); // Copy from VoxelManipulator to data dst.copyTo(data, data_area, v3s16(0,0,0), getPosRelative(), data_size); }
void MeshMakeData::fillBlockData(const v3s16 &block_offset, MapNode *data) { v3s16 data_size(MAP_BLOCKSIZE, MAP_BLOCKSIZE, MAP_BLOCKSIZE); VoxelArea data_area(v3s16(0,0,0), data_size - v3s16(1,1,1)); v3s16 bp = m_blockpos + block_offset; v3s16 blockpos_nodes = bp * MAP_BLOCKSIZE; m_vmanip.copyFrom(data, data_area, v3s16(0,0,0), blockpos_nodes, data_size); }
void MapBlock::copyTo(VoxelManipulator &dst) { auto lock = lock_shared_rec(); v3s16 data_size(MAP_BLOCKSIZE, MAP_BLOCKSIZE, MAP_BLOCKSIZE); VoxelArea data_area(v3s16(0,0,0), data_size - v3s16(1,1,1)); // Copy from data to VoxelManipulator dst.copyFrom(data, data_area, v3s16(0,0,0), getPosRelative(), data_size); }