#include <voxel.h>
Public Member Functions | |
| 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 | |
| VoxelArea | m_area |
| MapNode * | m_data = nullptr |
| u8 * | m_flags = nullptr |
Static Public Attributes | |
| static const MapNode | ContentIgnoreNode = MapNode(CONTENT_IGNORE) |
|
default |
|
virtual |
| void VoxelManipulator::addArea | ( | const VoxelArea & | area | ) |
References VoxelArea::addArea(), checkArea(), VoxelArea::getVolume(), VoxelArea::hasEmptyExtent(), VoxelArea::index(), m_area, m_data, m_flags, VOXELFLAG_NO_DATA, y, and z.
Referenced by getNode(), getNodeNoEx(), MMVManip::initialEmerge(), setNode(), TestVoxelManipulator::testBasic(), TestVoxelManipulator::testBlitBack2(), and TestMapBlock::testMonoblock().
| void VoxelManipulator::clear | ( | ) |
References VoxelArea::getVolume(), m_area, m_data, m_flags, and porting::TrackFreedMemory().
Referenced by ~VoxelManipulator(), LuaVoxelManip::l_close(), and TestVoxelManipulator::testEmerge().
| void VoxelManipulator::clearFlags | ( | const VoxelArea & | area, |
| u8 | flag ) |
References VoxelArea::getExtent(), VoxelArea::hasEmptyExtent(), m_area, m_flags, VoxelArea::MaxEdge, VoxelArea::MinEdge, y, and z.
| void VoxelManipulator::copyFrom | ( | MapNode * | src, |
| bool | is_mono_block, | ||
| const VoxelArea & | src_area, | ||
| v3s16 | from_pos, | ||
| v3s16 | to_pos, | ||
| const v3s16 & | size ) |
References VoxelArea::getExtent(), VoxelArea::index(), m_area, m_data, m_flags, y, and z.
Referenced by MapBlock::copyTo().
| void VoxelManipulator::copyTo | ( | MapNode * | dst, |
| const VoxelArea & | dst_area, | ||
| v3s16 | dst_pos, | ||
| v3s16 | from_pos, | ||
| const v3s16 & | size ) const |
References CONTENT_IGNORE, VoxelArea::index(), m_area, m_data, x, y, and z.
Referenced by MapBlock::copyFrom().
|
inline |
References getFlagsRefUnsafe(), m_area, p(), and VOXELFLAG_NO_DATA.
Referenced by TestVoxelManipulator::testBlitBack(), and TestVoxelManipulator::testEmerge().
|
inline |
References addArea(), m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.
Referenced by TestVoxelManipulator::testBasic(), and TestMapBlock::testMonoblock().
References addArea(), CONTENT_IGNORE, m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.
Referenced by MinimapMapblock::getMinimapNodes().
References CONTENT_IGNORE, m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.
Referenced by voxalgo::blit_back_with_light(), getSmoothLightCombined(), LuaVoxelManip::l_get_node_at(), and TestVoxelManipulator::testEmerge().
References m_area, m_data, and p().
Referenced by get_solid_sides().
References ContentIgnoreNode, m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.
| void VoxelManipulator::print | ( | std::ostream & | o, |
| const NodeDefManager * | nodemgr, | ||
| VoxelPrintMode | mode = VOXELPRINT_MATERIAL ) const |
References CONTENT_AIR, NodeDefManager::get(), MapNode::getContent(), MapNode::getLight(), NodeDefManager::getLightingFlags(), ContentFeatures::isLiquid(), ContentFeatures::light_propagates, ContentFeatures::light_source, LIGHTBANK_DAY, m_area, m_data, m_flags, MapNode::param2, VOXELFLAG_NO_DATA, VOXELPRINT_LIGHT_DAY, VOXELPRINT_MATERIAL, VOXELPRINT_WATERPRESSURE, x, y, and z.
Referenced by TestVoxelManipulator::testBasic().
| void VoxelManipulator::setFlags | ( | const VoxelArea & | area, |
| u8 | flag ) |
References VoxelArea::getExtent(), VoxelArea::hasEmptyExtent(), m_area, m_flags, VoxelArea::MaxEdge, VoxelArea::MinEdge, y, and z.
Referenced by MMVManip::initialEmerge(), and TestVoxelManipulator::testBlitBack2().
References addArea(), m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.
Referenced by TestVoxelManipulator::testBasic(), and TestMapBlock::testMonoblock().
References m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.
Referenced by LuaVoxelManip::l_set_node_at(), TEST_CASE(), TestVoxelManipulator::testBlitBack(), TestVoxelManipulator::testBlitBack2(), and TestVoxelAlgorithms::testLighting().
|
static |
Referenced by getNodeRefUnsafeCheckFlags().
| VoxelArea VoxelManipulator::m_area |
Referenced by addArea(), voxalgo::blit_back_with_light(), MMVManip::blitBackAll(), Schematic::blitToVManip(), ModApiMapgen::calc_lighting(), Decoration::canPlaceDecoration(), clear(), clearFlags(), MMVManip::clone(), copyFrom(), copyTo(), exists(), voxalgo::fill_with_sunlight(), DecoSchematic::generate(), DecoSimple::generate(), OreBlob::generate(), OrePuff::generate(), OreScatter::generate(), OreSheet::generate(), OreStratum::generate(), OreVein::generate(), CavernsNoise::generateCaverns(), CavesNoiseIntersection::generateCaves(), get_solid_sides(), MMVManip::getCoveredBlocks(), getFlagsRefUnsafe(), getNode(), getNodeNoEx(), getNodeNoExNoEmerge(), getNodeRefUnsafe(), getNodeRefUnsafeCheckFlags(), Schematic::getSchematicFromMap(), MMVManip::initialEmerge(), ModApiMapgen::l_generate_decorations(), ModApiMapgen::l_generate_ores(), LuaVoxelManip::l_get_emerged_area(), ModApiMapgen::l_get_mapgen_object(), treegen::make_jungletree(), treegen::make_pine_tree(), treegen::make_tree(), Schematic::placeOnVManip(), print(), ModApiMapgen::set_lighting(), setFlags(), setNode(), setNodeNoEmerge(), TEST_CASE(), TestVoxelManipulator::testBasic(), TestVoxelManipulator::testEmerge(), TestVoxelAlgorithms::testLighting(), treegen::tree_fruit_placement(), treegen::tree_leaves_placement(), treegen::tree_single_leaves_placement(), treegen::tree_trunk_placement(), ModApiMapgen::update_liquids(), and ServerMap::updateVManip().
| MapNode* VoxelManipulator::m_data = nullptr |
Referenced by addArea(), Schematic::blitToVManip(), Decoration::canPlaceDecoration(), clear(), MMVManip::clone(), copyFrom(), copyTo(), voxalgo::fill_with_sunlight(), DecoSimple::generate(), OreBlob::generate(), OrePuff::generate(), OreScatter::generate(), OreSheet::generate(), OreStratum::generate(), OreVein::generate(), CavernsNoise::generateCaverns(), CavesNoiseIntersection::generateCaves(), getNode(), getNodeNoEx(), getNodeNoExNoEmerge(), getNodeRefUnsafe(), getNodeRefUnsafeCheckFlags(), Schematic::getSchematicFromMap(), treegen::make_jungletree(), treegen::make_pine_tree(), treegen::make_tree(), print(), setNode(), setNodeNoEmerge(), TEST_CASE(), TestVoxelAlgorithms::testLighting(), treegen::tree_fruit_placement(), treegen::tree_leaves_placement(), treegen::tree_single_leaves_placement(), treegen::tree_trunk_placement(), and ServerMap::updateVManip().
| u8* VoxelManipulator::m_flags = nullptr |
Referenced by addArea(), clear(), clearFlags(), MMVManip::clone(), copyFrom(), voxalgo::fill_with_sunlight(), MMVManip::getCoveredBlocks(), getFlagsRefUnsafe(), getNode(), getNodeNoEx(), getNodeNoExNoEmerge(), getNodeRefUnsafeCheckFlags(), print(), setFlags(), setNode(), setNodeNoEmerge(), and ServerMap::updateVManip().