Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
ReflowScan Class Reference

#include <reflowscan.h>

+ Collaboration diagram for ReflowScan:

Public Member Functions

 ReflowScan (Map *map, const NodeDefManager *ndef)
 
void scan (MapBlock *block, UniqueQueue< v3s16 > *liquid_queue)
 

Private Member Functions

MapBlocklookupBlock (int x, int y, int z)
 
bool isLiquidFlowableTo (int x, int y, int z)
 
bool isLiquidHorizontallyFlowable (int x, int y, int z)
 
void scanColumn (int x, int z)
 

Private Attributes

Mapm_map = nullptr
 
const NodeDefManagerm_ndef = nullptr
 
v3s16 m_block_pos
 
v3s16 m_rel_block_pos
 
UniqueQueue< v3s16 > * m_liquid_queue = nullptr
 
MapBlockm_lookup [3 *3 *3]
 
u32 m_lookup_state_bitset
 

Constructor & Destructor Documentation

◆ ReflowScan()

ReflowScan::ReflowScan ( Map * map,
const NodeDefManager * ndef )

Member Function Documentation

◆ isLiquidFlowableTo()

bool ReflowScan::isLiquidFlowableTo ( int x,
int y,
int z )
inlineprivate

References CONTENT_IGNORE, ContentFeatures::floodable, NodeDefManager::get(), MapNode::getContent(), MapBlock::getNodeNoCheck(), lookupBlock(), m_ndef, and MAP_BLOCKSIZE.

Referenced by isLiquidHorizontallyFlowable().

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

◆ isLiquidHorizontallyFlowable()

bool ReflowScan::isLiquidHorizontallyFlowable ( int x,
int y,
int z )
inlineprivate

References isLiquidFlowableTo().

Referenced by scanColumn().

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

◆ lookupBlock()

MapBlock * ReflowScan::lookupBlock ( int x,
int y,
int z )
inlineprivate

References Map::getBlockNoCreateNoEx(), idx, m_block_pos, m_lookup, m_lookup_state_bitset, m_map, and MAP_BLOCKSIZE.

Referenced by isLiquidFlowableTo(), and scanColumn().

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

◆ scan()

void ReflowScan::scan ( MapBlock * block,
UniqueQueue< v3s16 > * liquid_queue )

References MapBlock::getPos(), MapBlock::getPosRelative(), m_block_pos, m_liquid_queue, m_lookup, m_lookup_state_bitset, m_rel_block_pos, MAP_BLOCKSIZE, and scanColumn().

Referenced by ServerMap::loadBlock().

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

◆ scanColumn()

void ReflowScan::scanColumn ( int x,
int z )
private

References CONTENT_IGNORE, ContentFeatures::floodable, NodeDefManager::get(), MapNode::getContent(), MapBlock::getNodeNoCheck(), ContentFeatures::isLiquid(), isLiquidHorizontallyFlowable(), LIQUID_FLOWING, ContentFeatures::liquid_type, lookupBlock(), m_liquid_queue, m_ndef, m_rel_block_pos, MAP_BLOCKSIZE, and UniqueQueue< Value >::push_back().

Referenced by scan().

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

Member Data Documentation

◆ m_block_pos

v3s16 ReflowScan::m_block_pos
private

Referenced by lookupBlock(), and scan().

◆ m_liquid_queue

UniqueQueue<v3s16>* ReflowScan::m_liquid_queue = nullptr
private

Referenced by scan(), and scanColumn().

◆ m_lookup

MapBlock* ReflowScan::m_lookup[3 *3 *3]
private

Referenced by lookupBlock(), and scan().

◆ m_lookup_state_bitset

u32 ReflowScan::m_lookup_state_bitset
private

Referenced by lookupBlock(), and scan().

◆ m_map

Map* ReflowScan::m_map = nullptr
private

Referenced by lookupBlock().

◆ m_ndef

const NodeDefManager* ReflowScan::m_ndef = nullptr
private

Referenced by isLiquidFlowableTo(), and scanColumn().

◆ m_rel_block_pos

v3s16 ReflowScan::m_rel_block_pos
private

Referenced by scan(), and scanColumn().


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