Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
reflowscan.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2016 MillersMan <millersman@users.noreply.github.com>
4
5#pragma once
6
7#include "util/container.h"
9
10class NodeDefManager;
11class Map;
12class MapBlock;
13
15public:
16 ReflowScan(Map *map, const NodeDefManager *ndef);
17 void scan(MapBlock *block, UniqueQueue<v3s16> *liquid_queue);
18
19private:
20 MapBlock *lookupBlock(int x, int y, int z);
21 bool isLiquidFlowableTo(int x, int y, int z);
22 bool isLiquidHorizontallyFlowable(int x, int y, int z);
23 void scanColumn(int x, int z);
24
25private:
26 Map *m_map = nullptr;
27 const NodeDefManager *m_ndef = nullptr;
30 MapBlock *m_lookup[3 * 3 * 3];
32};
Definition mapblock.h:58
Definition map.h:101
This class is for getting the actual properties of nodes from their content ID.
Definition nodedef.h:540
Definition reflowscan.h:14
u32 m_lookup_state_bitset
Definition reflowscan.h:31
void scanColumn(int x, int z)
Definition reflowscan.cpp:100
bool isLiquidFlowableTo(int x, int y, int z)
Definition reflowscan.cpp:70
UniqueQueue< v3s16 > * m_liquid_queue
Definition reflowscan.h:29
const NodeDefManager * m_ndef
Definition reflowscan.h:27
MapBlock * m_lookup[3 *3 *3]
Definition reflowscan.h:30
Map * m_map
Definition reflowscan.h:26
ReflowScan(Map *map, const NodeDefManager *ndef)
Definition reflowscan.cpp:12
v3s16 m_rel_block_pos
Definition reflowscan.h:28
bool isLiquidHorizontallyFlowable(int x, int y, int z)
Definition reflowscan.cpp:90
v3s16 m_block_pos
Definition reflowscan.h:28
void scan(MapBlock *block, UniqueQueue< v3s16 > *liquid_queue)
Definition reflowscan.cpp:18
MapBlock * lookupBlock(int x, int y, int z)
Definition reflowscan.cpp:50
Definition container.h:26
core::vector3d< s16 > v3s16
Definition irr_v3d.h:13