#include <map.h>
Inheritance diagram for MMVManip:
Collaboration diagram for MMVManip:Public Member Functions | |
| MMVManip (Map *map) | |
| virtual | ~MMVManip ()=default |
| void | initialEmerge (v3s16 blockpos_min, v3s16 blockpos_max, bool load_if_inexistent=true) |
| std::map< v3s16, bool > | getCoveredBlocks () const |
| Uses the flags array to determine which blocks the VManip covers, and for which of them we have any data. | |
| void | blitBackAll (std::map< v3s16, MapBlock * > *modified_blocks, bool overwrite_generated=true) const |
| Writes data in VManip back to the map. | |
| MMVManip * | clone () const |
| void | reparent (Map *map) |
| bool | isOrphan () const |
Public Member Functions inherited from VoxelManipulator | |
| VoxelManipulator ()=default | |
| virtual | ~VoxelManipulator () |
| MapNode | getNode (const v3s16 &p) |
| MapNode | getNodeNoEx (const v3s16 &p) |
| MapNode | getNodeNoExNoEmerge (const v3s16 &p) const |
| MapNode & | getNodeRefUnsafe (const v3s16 &p) |
| const MapNode & | getNodeRefUnsafeCheckFlags (const v3s16 &p) const |
| u8 & | getFlagsRefUnsafe (const v3s16 &p) |
| bool | exists (const v3s16 &p) |
| void | setNode (const v3s16 &p, const MapNode &n) |
| bool | setNodeNoEmerge (const v3s16 &p, MapNode n) |
| void | clear () |
| void | print (std::ostream &o, const NodeDefManager *nodemgr, VoxelPrintMode mode=VOXELPRINT_MATERIAL) const |
| void | addArea (const VoxelArea &area) |
| void | setFlags (const VoxelArea &area, u8 flag) |
| void | clearFlags (const VoxelArea &area, u8 flag) |
| void | copyFrom (MapNode *src, bool is_mono_block, const VoxelArea &src_area, v3s16 from_pos, v3s16 to_pos, const v3s16 &size) |
| void | copyTo (MapNode *dst, const VoxelArea &dst_area, v3s16 dst_pos, v3s16 from_pos, const v3s16 &size) const |
Public Attributes | |
| bool | m_is_dirty = false |
Public Attributes inherited from VoxelManipulator | |
| VoxelArea | m_area |
| MapNode * | m_data = nullptr |
| u8 * | m_flags = nullptr |
Protected Member Functions | |
| MMVManip () | |
Protected Attributes | |
| Map * | m_map = nullptr |
Additional Inherited Members | |
Static Public Attributes inherited from VoxelManipulator | |
| static const MapNode | ContentIgnoreNode = MapNode(CONTENT_IGNORE) |
| MMVManip::MMVManip | ( | Map * | map | ) |
|
virtualdefault |
|
inlineprotected |
| void MMVManip::blitBackAll | ( | std::map< v3s16, MapBlock * > * | modified_blocks, |
| bool | overwrite_generated = true ) const |
Writes data in VManip back to the map.
Blocks without any data in the VManip are skipped.
| modified_blocks | output array of touched blocks (optional) |
| overwrite_generated | if false, blocks marked as generate in the map are not changed |
References blockpos_over_max_limit(), MapBlock::copyFrom(), Map::emergeBlock(), MapBlock::expireIsAirCache(), Map::getBlockNoCreateNoEx(), getCoveredBlocks(), VoxelArea::hasEmptyExtent(), MapBlock::isGenerated(), VoxelManipulator::m_area, m_map, MOD_REASON_VMANIP, MOD_STATE_WRITE_NEEDED, p(), MapBlock::raiseModified(), verbosestream, and warningstream.
Referenced by voxalgo::blit_back_with_light(), ServerMap::finishBlockMake(), LuaVoxelManip::l_write_to_map(), and TestVoxelManipulator::testBlitBack2().
Here is the call graph for this function:
Here is the caller graph for this function:| MMVManip * MMVManip::clone | ( | ) | const |
References MMVManip(), VoxelArea::getVolume(), VoxelManipulator::m_area, VoxelManipulator::m_data, VoxelManipulator::m_flags, and m_is_dirty.
Referenced by LuaVoxelManip::packIn(), and TestVoxelManipulator::testBlitBack().
Here is the call graph for this function:
Here is the caller graph for this function:| std::map< v3s16, bool > MMVManip::getCoveredBlocks | ( | ) | const |
Uses the flags array to determine which blocks the VManip covers, and for which of them we have any data.
References getNodeBlockPos(), VoxelArea::hasEmptyExtent(), VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_flags, MAP_BLOCKSIZE, VoxelArea::MaxEdge, VoxelArea::MinEdge, VOXELFLAG_NO_DATA, x, y, and z.
Referenced by blitBackAll(), initialEmerge(), and TestVoxelManipulator::testBlitBack2().
Here is the call graph for this function:
Here is the caller graph for this function:| void MMVManip::initialEmerge | ( | v3s16 | blockpos_min, |
| v3s16 | blockpos_max, | ||
| bool | load_if_inexistent = true ) |
References VoxelManipulator::addArea(), blockpos_over_max_limit(), MapBlock::copyTo(), emerge_time, Map::emergeBlock(), Map::getBlockNoCreateNoEx(), getCoveredBlocks(), VoxelArea::getVolume(), VoxelArea::hasEmptyExtent(), infostream, VoxelArea::intersect(), VoxelManipulator::m_area, m_is_dirty, m_map, MAP_BLOCKSIZE, p(), VoxelArea::print(), VoxelManipulator::setFlags(), VOXELFLAG_NO_DATA, x, y, and z.
Referenced by Schematic::getSchematicFromMap(), ServerMap::initBlockMake(), LuaVoxelManip::l_read_from_map(), Schematic::placeOnMap(), treegen::spawn_ltree(), TEST_CASE(), TestVoxelManipulator::testBlitBack(), TestVoxelManipulator::testEmerge(), and TestVoxelAlgorithms::testLighting().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_map.
Referenced by LuaVoxelManip::l_read_from_map(), LuaVoxelManip::l_write_to_map(), and TestVoxelManipulator::testEmerge().
Here is the caller graph for this function:| void MMVManip::reparent | ( | Map * | map | ) |
References m_map.
Referenced by LuaVoxelManip::packOut().
Here is the caller graph for this function:| bool MMVManip::m_is_dirty = false |
Referenced by clone(), initialEmerge(), LuaVoxelManip::l_was_modified(), and ServerMap::updateVManip().
|
protected |
Referenced by blitBackAll(), initialEmerge(), isOrphan(), and reparent().