Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
voxelalgorithms.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5#pragma once
6
7#include <map>
8#include "mapnode.h"
9
10class Map;
11class MapBlock;
12class MMVManip;
13
14namespace voxalgo
15{
16
30 Map *map,
31 const std::vector<std::pair<v3s16, MapNode>> &oldnodes,
32 std::map<v3s16, MapBlock*> &modified_blocks);
33
44 std::map<v3s16, MapBlock*> &modified_blocks);
45
54void blit_back_with_light(Map *map, MMVManip *vm,
55 std::map<v3s16, MapBlock*> *modified_blocks);
56
63void repair_block_light(Map *map, MapBlock *block,
64 std::map<v3s16, MapBlock*> *modified_blocks);
65
73{
74public:
84 v3f m_next_intersection_multi { 10000.0f, 10000.0f, 10000.0f };
89 v3f m_intersection_multi_inc { 10000.0f, 10000.0f, 10000.0f };
103
112 VoxelLineIterator(const v3f &start_position,const v3f &line_vector);
113
121 void next();
122
126 inline bool hasNext() const
127 {
129 }
130
137 s16 getIndex(v3s16 voxel);
138};
139
140} // namespace voxalgo
Definition map.h:301
Definition mapblock.h:58
Definition map.h:100
core::vector3d< s16 > v3s16
Definition irr_v3d.h:13
core::vector3df v3f
Definition irr_v3d.h:11
Definition voxelalgorithms.cpp:13
void blit_back_with_light(Map *map, MMVManip *vm, std::map< v3s16, MapBlock * > *modified_blocks)
Definition voxelalgorithms.cpp:1030
void repair_block_light(Map *map, MapBlock *block, std::map< v3s16, MapBlock * > *modified_blocks)
Definition voxelalgorithms.cpp:1169
void update_block_border_lighting(Map *map, MapBlock *block, std::map< v3s16, MapBlock * > &modified_blocks)
Definition voxelalgorithms.cpp:677
void update_lighting_nodes(Map *map, const std::vector< std::pair< v3s16, MapNode > > &oldnodes, std::map< v3s16, MapBlock * > &modified_blocks)
Definition voxelalgorithms.cpp:454
Definition voxelalgorithms.h:73
v3f m_intersection_multi_inc
Definition voxelalgorithms.h:89
bool hasNext() const
Definition voxelalgorithms.h:126
v3s16 m_current_node_pos
Position of the current node.
Definition voxelalgorithms.h:96
v3f m_line_vector
Direction and length of the line in world coordinates.
Definition voxelalgorithms.h:78
s16 getIndex(v3s16 voxel)
Definition voxelalgorithms.cpp:1301
VoxelLineIterator(const v3f &start_position, const v3f &line_vector)
Definition voxelalgorithms.cpp:1243
v3f m_start_position
Starting position of the line in world coordinates.
Definition voxelalgorithms.h:76
s16 m_current_index
Index of the current node.
Definition voxelalgorithms.h:98
v3f m_next_intersection_multi
Definition voxelalgorithms.h:84
s16 m_last_index
Index of the last node.
Definition voxelalgorithms.h:102
void next()
Definition voxelalgorithms.cpp:1285
v3s16 m_step_directions
Definition voxelalgorithms.h:94
v3s16 m_start_node_pos
Position of the start node.
Definition voxelalgorithms.h:100