Luanti 5.16.0-dev
Loading...
Searching...
No Matches
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) const
MapNodegetNodeRefUnsafe (const v3s16 &p)
const MapNodegetNodeRefUnsafeCheckFlags (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
MapNodem_data = nullptr
u8 * m_flags = nullptr

Static Public Attributes

static const MapNode ContentIgnoreNode = MapNode(CONTENT_IGNORE)

Constructor & Destructor Documentation

◆ VoxelManipulator()

VoxelManipulator::VoxelManipulator ( )
default

Referenced by MMVManip::MMVManip().

Here is the caller graph for this function:

◆ ~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(), 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().

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

◆ clear()

void VoxelManipulator::clear ( )

References VoxelArea::getVolume(), m_area, m_data, m_flags, and porting::TrackFreedMemory().

Referenced by ~VoxelManipulator(), LuaVoxelManip::l_close(), and TestVoxelManipulator::testEmerge().

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

◆ clearFlags()

void VoxelManipulator::clearFlags ( const VoxelArea & area,
u8 flag )

References VoxelArea::getExtent(), VoxelArea::hasEmptyExtent(), m_area, m_flags, VoxelArea::MaxEdge, VoxelArea::MinEdge, y, and z.

Here is the call graph for this function:

◆ copyFrom()

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

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 ) const

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

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 getFlagsRefUnsafe(), m_area, p(), and VOXELFLAG_NO_DATA.

Referenced by TestVoxelManipulator::testBlitBack(), and TestVoxelManipulator::testEmerge().

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

◆ getFlagsRefUnsafe()

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

References 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(), m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.

Referenced by TestVoxelManipulator::testBasic(), and TestMapBlock::testMonoblock().

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, m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.

Referenced by MinimapMapblock::getMinimapNodes().

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

◆ getNodeNoExNoEmerge()

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

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

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 m_area, m_data, and p().

Referenced by get_solid_sides().

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

◆ getNodeRefUnsafeCheckFlags()

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

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

Here is the call graph for this function:

◆ print()

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

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

◆ setFlags()

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

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(), m_area, m_data, m_flags, p(), and VOXELFLAG_NO_DATA.

Referenced by TestVoxelManipulator::testBasic(), and TestMapBlock::testMonoblock().

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

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

◆ m_data

◆ m_flags


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