Minetest  5.4.0
VoxelManipulator Class Reference

#include <voxel.h>

+ Inheritance diagram for VoxelManipulator:
+ Collaboration diagram for VoxelManipulator:

Public Member Functions

 VoxelManipulator ()=default
 
virtual ~VoxelManipulator ()
 
MapNode getNode (const v3s16 &p)
 
MapNode getNodeNoEx (const v3s16 &p)
 
MapNode getNodeNoExNoEmerge (const v3s16 &p)
 
MapNodegetNodeRefUnsafe (const v3s16 &p)
 
const MapNodegetNodeRefUnsafeCheckFlags (const v3s16 &p)
 
u8 & getFlagsRefUnsafe (const v3s16 &p)
 
bool exists (const v3s16 &p)
 
void setNode (const v3s16 &p, const MapNode &n)
 
void setNodeNoRef (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)
 
void addArea (const VoxelArea &area)
 
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)
 
void clearFlag (u8 flag)
 

Public Attributes

VoxelArea m_area
 
MapNodem_data = nullptr
 
u8 * m_flags = nullptr
 

Static Public Attributes

static const MapNode ContentIgnoreNode = MapNode(CONTENT_IGNORE)
 

Constructor & Destructor Documentation

◆ VoxelManipulator()

VoxelManipulator::VoxelManipulator ( )
default

◆ ~VoxelManipulator()

VoxelManipulator::~VoxelManipulator ( )
virtual

References clear().

+ Here is the call graph for this function:

Member Function Documentation

◆ addArea()

void VoxelManipulator::addArea ( const VoxelArea area)

References VoxelArea::addArea(), addarea_time, 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clear()

void VoxelManipulator::clear ( )
virtual

Reimplemented in MMVManip.

References m_area, m_data, and m_flags.

Referenced by ~VoxelManipulator(), MMVManip::clear(), and MeshMakeData::fillBlockDataBegin().

+ Here is the caller graph for this function:

◆ clearFlag()

void VoxelManipulator::clearFlag ( u8  flag)

References clearflag_time, VoxelArea::getVolume(), m_area, and m_flags.

Referenced by DungeonGen::generate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyFrom()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyTo()

void VoxelManipulator::copyTo ( MapNode dst,
const VoxelArea dst_area,
v3s16  dst_pos,
v3s16  from_pos,
const v3s16 size 
)

References CONTENT_IGNORE, VoxelArea::index(), m_area, and m_data.

Referenced by MapBlock::copyFrom().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exists()

bool VoxelManipulator::exists ( const v3s16 p)
inline

References VoxelArea::contains(), getFlagsRefUnsafe(), m_area, p(), and VOXELFLAG_NO_DATA.

+ Here is the call graph for this function:

◆ getFlagsRefUnsafe()

u8& VoxelManipulator::getFlagsRefUnsafe ( const v3s16 p)
inline

References VoxelArea::index(), m_area, m_flags, and p().

Referenced by exists().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNode()

MapNode VoxelManipulator::getNode ( const v3s16 p)
inline

References addArea(), VoxelArea::index(), m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.

Referenced by TestVoxelManipulator::testVoxelManipulator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNodeNoEx()

MapNode VoxelManipulator::getNodeNoEx ( const v3s16 p)
inline

References addArea(), CONTENT_IGNORE, VoxelArea::index(), m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.

Referenced by MapblockMeshGenerator::drawFencelikeNode(), MapblockMeshGenerator::drawFirelikeNode(), MapblockMeshGenerator::drawGlasslikeFramedNode(), MapblockMeshGenerator::drawNodeboxNode(), MapblockMeshGenerator::drawPlantlikeRootedNode(), MapblockMeshGenerator::generate(), MapblockMeshGenerator::getLiquidNeighborhood(), MinimapMapblock::getMinimapNodes(), MapblockMeshGenerator::isSameRail(), and MapblockMeshGenerator::prepareLiquidNodeDrawing().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNodeNoExNoEmerge()

MapNode VoxelManipulator::getNodeNoExNoEmerge ( const v3s16 p)
inline

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNodeRefUnsafe()

MapNode& VoxelManipulator::getNodeRefUnsafe ( const v3s16 p)
inline

References VoxelArea::index(), m_area, m_data, and p().

Referenced by getTileInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNodeRefUnsafeCheckFlags()

const MapNode& VoxelManipulator::getNodeRefUnsafeCheckFlags ( const v3s16 p)
inline

References ContentIgnoreNode, VoxelArea::index(), m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.

Referenced by getTileInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print()

void VoxelManipulator::print ( std::ostream &  o,
const NodeDefManager nodemgr,
VoxelPrintMode  mode = VOXELPRINT_MATERIAL 
)

References CONTENT_AIR, NodeDefManager::get(), MapNode::getContent(), VoxelArea::getExtent(), MapNode::getLight(), 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setNode()

void VoxelManipulator::setNode ( const v3s16 p,
const MapNode n 
)
inline

References addArea(), VoxelArea::index(), m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.

Referenced by setNodeNoRef().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setNodeNoEmerge()

bool VoxelManipulator::setNodeNoEmerge ( const v3s16 p,
MapNode  n 
)
inline

References VoxelArea::contains(), VoxelArea::index(), m_area, m_data, and p().

Referenced by LuaVoxelManip::l_set_node_at().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setNodeNoRef()

void VoxelManipulator::setNodeNoRef ( const v3s16 p,
const MapNode n 
)
inline

References p(), and setNode().

Referenced by TestVoxelManipulator::testVoxelManipulator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ ContentIgnoreNode

const MapNode VoxelManipulator::ContentIgnoreNode = MapNode(CONTENT_IGNORE)
static

◆ m_area

VoxelArea VoxelManipulator::m_area

Referenced by addArea(), MapgenV6::addMud(), voxalgo::blit_back_with_light(), MMVManip::blitBackAll(), Schematic::blitToVManip(), Decoration::canPlaceDecoration(), CavesRandomWalk::carveRoute(), CavesV6::carveRoute(), clear(), clearFlag(), copyFrom(), copyTo(), MapgenBasic::dustTopNodes(), exists(), voxalgo::fill_with_sunlight(), MapgenV6::find_stone_level(), Mapgen::findGroundLevel(), Mapgen::findLiquidSurface(), DungeonGen::findPlaceForDoor(), DungeonGen::findPlaceForRoomDoor(), MapgenV6::flowMud(), OreScatter::generate(), OreSheet::generate(), OrePuff::generate(), OreBlob::generate(), OreVein::generate(), OreStratum::generate(), DecoSimple::generate(), DecoSchematic::generate(), DungeonGen::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(), MMVManip::initialEmerge(), 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(), LuaVoxelManip::l_update_liquids(), 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(), Mapgen::setLighting(), setNode(), setNodeNoEmerge(), Mapgen::spreadLight(), treegen::tree_fruit_placement(), treegen::tree_leaves_placement(), treegen::tree_single_leaves_placement(), treegen::tree_trunk_placement(), Mapgen::updateLiquid(), and ServerMap::updateVManip().

◆ m_data

MapNode* VoxelManipulator::m_data = nullptr

Referenced by addArea(), MapgenV6::addMud(), Schematic::blitToVManip(), Decoration::canPlaceDecoration(), CavesRandomWalk::carveRoute(), CavesV6::carveRoute(), clear(), copyFrom(), copyTo(), MapgenBasic::dustTopNodes(), voxalgo::fill_with_sunlight(), MapgenV6::find_stone_level(), Mapgen::findGroundLevel(), Mapgen::findLiquidSurface(), MapgenV6::flowMud(), OreScatter::generate(), OreSheet::generate(), OrePuff::generate(), OreBlob::generate(), OreVein::generate(), OreStratum::generate(), DecoSimple::generate(), DungeonGen::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(), treegen::tree_fruit_placement(), treegen::tree_leaves_placement(), treegen::tree_single_leaves_placement(), treegen::tree_trunk_placement(), Mapgen::updateLiquid(), and ServerMap::updateVManip().

◆ m_flags


The documentation for this class was generated from the following files: