#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) |
virtual 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, 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(), VoxelArea::contains(), VoxelArea::getVolume(), VoxelArea::hasEmptyExtent(), VoxelArea::index(), m_area, m_data, m_flags, VoxelArea::MaxEdge, VoxelArea::MinEdge, and VOXELFLAG_NO_DATA.
Referenced by MeshMakeData::fillBlockDataBegin(), getNode(), getNodeNoEx(), MMVManip::initialEmerge(), setNode(), and TestVoxelManipulator::testVoxelManipulator().
|
virtual |
Reimplemented in MMVManip.
References VoxelArea::getVolume(), m_area, m_data, m_flags, and porting::TrackFreedMemory().
Referenced by ~VoxelManipulator(), MMVManip::clear(), and MeshMakeData::fillBlockDataBegin().
void VoxelManipulator::clearFlags | ( | const VoxelArea & | area, |
u8 | flag ) |
References VoxelArea::contains(), VoxelArea::getExtent(), VoxelArea::hasEmptyExtent(), VoxelArea::index(), m_area, m_flags, VoxelArea::MaxEdge, and VoxelArea::MinEdge.
Referenced by DungeonGen::generate().
void VoxelManipulator::copyFrom | ( | MapNode * | src, |
const VoxelArea & | src_area, | ||
v3s16 | from_pos, | ||
v3s16 | to_pos, | ||
const v3s16 & | size ) |
References VoxelArea::getExtent(), VoxelArea::index(), m_area, m_data, and m_flags.
Referenced by MapBlock::copyTo(), and MeshMakeData::fillBlockData().
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, and m_data.
Referenced by MapBlock::copyFrom().
|
inline |
References VoxelArea::contains(), getFlagsRefUnsafe(), m_area, p(), and VOXELFLAG_NO_DATA.
|
inline |
References VoxelArea::index(), m_area, m_flags, and p().
Referenced by exists().
References addArea(), VoxelArea::index(), m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.
Referenced by TestVoxelManipulator::testVoxelManipulator().
References addArea(), CONTENT_IGNORE, VoxelArea::index(), m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.
Referenced by MapBlockMesh::MapBlockMesh(), MapblockMeshGenerator::drawFencelikeNode(), MapblockMeshGenerator::drawFirelikeNode(), MapblockMeshGenerator::drawGlasslikeFramedNode(), MapblockMeshGenerator::drawNodeboxNode(), MapblockMeshGenerator::drawPlantlikeRootedNode(), MapblockMeshGenerator::drawSolidNode(), MapblockMeshGenerator::generate(), MapblockMeshGenerator::getLiquidNeighborhood(), MinimapMapblock::getMinimapNodes(), MapblockMeshGenerator::isSameRail(), and MapblockMeshGenerator::prepareLiquidNodeDrawing().
References VoxelArea::contains(), CONTENT_IGNORE, VoxelArea::index(), m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.
Referenced by voxalgo::blit_back_with_light(), MapblockMeshGenerator::drawGlasslikeNode(), DungeonGen::findPlaceForDoor(), getSmoothLightCombined(), and LuaVoxelManip::l_get_node_at().
References VoxelArea::index(), m_area, m_data, and p().
Referenced by get_solid_sides().
References ContentIgnoreNode, VoxelArea::index(), 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(), VoxelArea::getExtent(), MapNode::getLight(), NodeDefManager::getLightingFlags(), VoxelArea::index(), ContentFeatures::isLiquid(), ContentFeatures::light_propagates, ContentFeatures::light_source, LIGHTBANK_DAY, m_area, m_data, m_flags, VoxelArea::MaxEdge, VoxelArea::MinEdge, MapNode::param2, VOXELFLAG_NO_DATA, VOXELPRINT_LIGHT_DAY, VOXELPRINT_MATERIAL, and VOXELPRINT_WATERPRESSURE.
Referenced by TestVoxelManipulator::testVoxelManipulator().
void VoxelManipulator::setFlags | ( | const VoxelArea & | area, |
u8 | flag ) |
References VoxelArea::contains(), VoxelArea::getExtent(), VoxelArea::hasEmptyExtent(), VoxelArea::index(), m_area, m_flags, VoxelArea::MaxEdge, and VoxelArea::MinEdge.
Referenced by MMVManip::initialEmerge().
References addArea(), VoxelArea::index(), m_area, m_data, m_flags, and p().
Referenced by TestVoxelManipulator::testVoxelManipulator().
References VoxelArea::contains(), VoxelArea::index(), m_area, m_data, and p().
Referenced by LuaVoxelManip::l_set_node_at(), TEST_CASE(), and TestVoxelAlgorithms::testLighting().
|
static |
Referenced by getNodeRefUnsafeCheckFlags().
VoxelArea VoxelManipulator::m_area |
Referenced by addArea(), MapgenV6::addMud(), voxalgo::blit_back_with_light(), MMVManip::blitBackAll(), Schematic::blitToVManip(), ModApiMapgen::calc_lighting(), Decoration::canPlaceDecoration(), CavesRandomWalk::carveRoute(), CavesV6::carveRoute(), clear(), clearFlags(), MMVManip::clone(), copyFrom(), copyTo(), MapgenBasic::dustTopNodes(), exists(), voxalgo::fill_with_sunlight(), MapgenV6::find_stone_level(), Mapgen::findGroundLevel(), Mapgen::findLiquidSurface(), DungeonGen::findPlaceForDoor(), DungeonGen::findPlaceForRoomDoor(), MapgenV6::flowMud(), DecoSchematic::generate(), DecoSimple::generate(), DungeonGen::generate(), OreBlob::generate(), OrePuff::generate(), OreScatter::generate(), OreSheet::generate(), OreStratum::generate(), OreVein::generate(), MapgenV5::generateBaseTerrain(), MapgenBasic::generateBiomes(), CavernsNoise::generateCaverns(), CavesNoiseIntersection::generateCaves(), MapgenV6::generateGround(), MapgenCarpathian::generateTerrain(), MapgenFlat::generateTerrain(), MapgenFractal::generateTerrain(), MapgenV7::generateTerrain(), MapgenValleys::generateTerrain(), getFlagsRefUnsafe(), getNode(), getNodeNoEx(), getNodeNoExNoEmerge(), getNodeRefUnsafe(), getNodeRefUnsafeCheckFlags(), Schematic::getSchematicFromMap(), Mapgen::getSurfaces(), MapgenV6::growGrass(), LuaVoxelManip::l_calc_lighting(), ModApiMapgen::l_generate_decorations(), ModApiMapgen::l_generate_ores(), LuaVoxelManip::l_get_data(), LuaVoxelManip::l_get_emerged_area(), LuaVoxelManip::l_get_light_data(), ModApiMapgen::l_get_mapgen_object(), LuaVoxelManip::l_get_param2_data(), LuaVoxelManip::l_read_from_map(), LuaVoxelManip::l_set_data(), LuaVoxelManip::l_set_light_data(), LuaVoxelManip::l_set_lighting(), LuaVoxelManip::l_set_param2_data(), Mapgen::lightSpread(), treegen::make_jungletree(), treegen::make_pine_tree(), treegen::make_tree(), MapgenSinglenode::makeChunk(), DungeonGen::makeCorridor(), DungeonGen::makeDoor(), DungeonGen::makeDungeon(), DungeonGen::makeFill(), DungeonGen::makeRoom(), MapgenV6::moveMud(), Schematic::placeOnVManip(), MapgenV6::placeTreesAndJungleGrass(), print(), Mapgen::propagateSunlight(), ModApiMapgen::set_lighting(), setFlags(), Mapgen::setLighting(), setNode(), setNodeNoEmerge(), Mapgen::spreadLight(), TEST_CASE(), TestVoxelAlgorithms::testLighting(), treegen::tree_fruit_placement(), treegen::tree_leaves_placement(), treegen::tree_single_leaves_placement(), treegen::tree_trunk_placement(), ModApiMapgen::update_liquids(), Mapgen::updateLiquid(), and ServerMap::updateVManip().
MapNode* VoxelManipulator::m_data = nullptr |
Referenced by addArea(), MapgenV6::addMud(), Schematic::blitToVManip(), Decoration::canPlaceDecoration(), CavesRandomWalk::carveRoute(), CavesV6::carveRoute(), clear(), MMVManip::clone(), copyFrom(), copyTo(), MapgenBasic::dustTopNodes(), voxalgo::fill_with_sunlight(), MapgenV6::find_stone_level(), Mapgen::findGroundLevel(), Mapgen::findLiquidSurface(), MapgenV6::flowMud(), DecoSimple::generate(), DungeonGen::generate(), OreBlob::generate(), OrePuff::generate(), OreScatter::generate(), OreSheet::generate(), OreStratum::generate(), OreVein::generate(), MapgenV5::generateBaseTerrain(), MapgenBasic::generateBiomes(), CavernsNoise::generateCaverns(), CavesNoiseIntersection::generateCaves(), MapgenV6::generateGround(), MapgenCarpathian::generateTerrain(), MapgenFlat::generateTerrain(), MapgenFractal::generateTerrain(), MapgenV7::generateTerrain(), MapgenValleys::generateTerrain(), getNode(), getNodeNoEx(), getNodeNoExNoEmerge(), getNodeRefUnsafe(), getNodeRefUnsafeCheckFlags(), Schematic::getSchematicFromMap(), Mapgen::getSurfaces(), MapgenV6::growGrass(), Mapgen::isLiquidHorizontallyFlowable(), LuaVoxelManip::l_get_data(), LuaVoxelManip::l_get_light_data(), LuaVoxelManip::l_get_param2_data(), LuaVoxelManip::l_set_data(), LuaVoxelManip::l_set_light_data(), LuaVoxelManip::l_set_param2_data(), Mapgen::lightSpread(), treegen::make_jungletree(), treegen::make_pine_tree(), treegen::make_tree(), MapgenSinglenode::makeChunk(), DungeonGen::makeCorridor(), DungeonGen::makeDoor(), DungeonGen::makeDungeon(), DungeonGen::makeFill(), DungeonGen::makeRoom(), MapgenV6::moveMud(), MapgenV6::placeTreesAndJungleGrass(), print(), Mapgen::propagateSunlight(), Mapgen::setLighting(), setNode(), setNodeNoEmerge(), Mapgen::spreadLight(), TEST_CASE(), TestVoxelAlgorithms::testLighting(), treegen::tree_fruit_placement(), treegen::tree_leaves_placement(), treegen::tree_single_leaves_placement(), treegen::tree_trunk_placement(), Mapgen::updateLiquid(), and ServerMap::updateVManip().
u8* VoxelManipulator::m_flags = nullptr |
Referenced by addArea(), CavesRandomWalk::carveRoute(), CavesV6::carveRoute(), clear(), clearFlags(), MMVManip::clone(), copyFrom(), voxalgo::fill_with_sunlight(), DungeonGen::findPlaceForRoomDoor(), DungeonGen::generate(), getFlagsRefUnsafe(), getNode(), getNodeNoEx(), getNodeNoExNoEmerge(), getNodeRefUnsafeCheckFlags(), LuaVoxelManip::l_get_data(), LuaVoxelManip::l_get_light_data(), LuaVoxelManip::l_get_param2_data(), DungeonGen::makeCorridor(), DungeonGen::makeDungeon(), DungeonGen::makeFill(), DungeonGen::makeRoom(), print(), setFlags(), setNode(), and ServerMap::updateVManip().