Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
voxelalgorithms.cpp File Reference
#include <array>
#include "voxelalgorithms.h"
#include "nodedef.h"
#include "mapblock.h"
#include "map.h"
+ Include dependency graph for voxelalgorithms.cpp:

Classes

struct  voxalgo::ChangingLight
 Contains information about a node whose light is about to change. More...
 
struct  voxalgo::LightQueue
 
struct  voxalgo::SunlightPropagationUnit
 
struct  voxalgo::SunlightPropagationData
 

Namespaces

namespace  voxalgo
 

Macros

#define B_1   (MAP_BLOCKSIZE - 1)
 
#define B_1   (MAP_BLOCKSIZE - 1)
 
#define B_2   (MAP_BLOCKSIZE - 2)
 

Typedefs

typedef u8 voxalgo::direction
 
typedef v3s16 voxalgo::relative_v3
 
typedef v3s16 voxalgo::mapblock_v3
 
typedef LightQueue voxalgo::UnlightQueue
 
typedef LightQueue voxalgo::ReLightQueue
 

Functions

bool voxalgo::step_rel_block_pos (direction dir, relative_v3 &rel_pos, mapblock_v3 &block_pos)
 
void voxalgo::unspread_light (Map *map, const NodeDefManager *nodemgr, LightBank bank, UnlightQueue &from_nodes, ReLightQueue &light_sources, std::map< v3s16, MapBlock * > &modified_blocks)
 
void voxalgo::spread_light (Map *map, const NodeDefManager *nodemgr, LightBank bank, LightQueue &light_sources, std::map< v3s16, MapBlock * > &modified_blocks)
 
bool voxalgo::is_sunlight_above (Map *map, v3s16 pos, const NodeDefManager *ndef)
 
void voxalgo::update_lighting_nodes (Map *map, const std::vector< std::pair< v3s16, MapNode > > &oldnodes, std::map< v3s16, MapBlock * > &modified_blocks)
 
bool voxalgo::is_light_locally_correct (Map *map, const NodeDefManager *ndef, LightBank bank, v3s16 pos)
 
void voxalgo::update_block_border_lighting (Map *map, MapBlock *block, std::map< v3s16, MapBlock * > &modified_blocks)
 
void voxalgo::fill_with_sunlight (MMVManip *vm, const NodeDefManager *ndef, v2s16 offset, bool light[MAP_BLOCKSIZE][MAP_BLOCKSIZE])
 
void voxalgo::is_sunlight_above_block (Map *map, mapblock_v3 pos, const NodeDefManager *ndef, bool light[MAP_BLOCKSIZE][MAP_BLOCKSIZE])
 
bool voxalgo::propagate_block_sunlight (Map *map, const NodeDefManager *ndef, SunlightPropagationData *data, UnlightQueue *unlight, ReLightQueue *relight)
 
void voxalgo::finish_bulk_light_update (Map *map, mapblock_v3 minblock, mapblock_v3 maxblock, UnlightQueue unlight[2], ReLightQueue relight[2], std::map< v3s16, MapBlock * > *modified_blocks)
 
void voxalgo::blit_back_with_light (Map *map, MMVManip *vm, std::map< v3s16, MapBlock * > *modified_blocks)
 
void voxalgo::fill_with_sunlight (MapBlock *block, const NodeDefManager *ndef, bool light[MAP_BLOCKSIZE][MAP_BLOCKSIZE])
 
void voxalgo::repair_block_light (Map *map, MapBlock *block, std::map< v3s16, MapBlock * > *modified_blocks)
 

Variables

static const v3s16 voxalgo::neighbor_dirs [6]
 
static constexpr LightBank voxalgo::banks [] = { LIGHTBANK_DAY, LIGHTBANK_NIGHT }
 
static const VoxelArea voxalgo::block_borders []
 
static const VoxelArea voxalgo::block_pad []
 

Macro Definition Documentation

◆ B_1 [1/2]

#define B_1   (MAP_BLOCKSIZE - 1)

Borders of a map block in relative node coordinates. Compatible with type 'direction'.

Borders of a map block in relative node coordinates. The areas do not overlap. Compatible with type 'direction'.

◆ B_1 [2/2]

#define B_1   (MAP_BLOCKSIZE - 1)

Borders of a map block in relative node coordinates. Compatible with type 'direction'.

Borders of a map block in relative node coordinates. The areas do not overlap. Compatible with type 'direction'.

◆ B_2

#define B_2   (MAP_BLOCKSIZE - 2)