Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
QueuedMeshUpdate Struct Reference

#include <mesh_generator_thread.h>

+ Collaboration diagram for QueuedMeshUpdate:

Public Member Functions

 QueuedMeshUpdate ()=default
 
 ~QueuedMeshUpdate ()
 
void retrieveBlocks (Map *map, u16 cell_size)
 Get blocks needed for this mesh update from the map.
 
void dropBlocks ()
 Drop block references.
 
bool checkSkip (u16 cell_size)
 Check if the blocks that would comprise the mesh are all air, so the update can be skipped entirely.
 

Public Attributes

v3s16 p = v3s16(-1337, -1337, -1337)
 
std::vector< v3s16ack_list
 
int crack_level = -1
 
v3s16 crack_pos
 
MeshMakeDatadata = nullptr
 
std::vector< MapBlock * > map_blocks
 
bool urgent = false
 

Constructor & Destructor Documentation

◆ QueuedMeshUpdate()

QueuedMeshUpdate::QueuedMeshUpdate ( )
default

◆ ~QueuedMeshUpdate()

QueuedMeshUpdate::~QueuedMeshUpdate ( )

References data.

Member Function Documentation

◆ checkSkip()

bool QueuedMeshUpdate::checkSkip ( u16 cell_size)

Check if the blocks that would comprise the mesh are all air, so the update can be skipped entirely.

Parameters
cell_sizemesh grid cell size
Returns
(true = all air)

References map_blocks, and p.

◆ dropBlocks()

void QueuedMeshUpdate::dropBlocks ( )

Drop block references.

Note
not done by destructor, since this is only safe on main thread

References map_blocks.

◆ retrieveBlocks()

void QueuedMeshUpdate::retrieveBlocks ( Map * map,
u16 cell_size )

Get blocks needed for this mesh update from the map.

Blocks that were already loaded are skipped.

Parameters
mapMap
cell_sizemesh grid cell size

References Map::getBlockNoCreateNoEx(), map_blocks, p, and MapBlock::refGrab().

+ Here is the call graph for this function:

Member Data Documentation

◆ ack_list

std::vector<v3s16> QueuedMeshUpdate::ack_list

◆ crack_level

int QueuedMeshUpdate::crack_level = -1

◆ crack_pos

v3s16 QueuedMeshUpdate::crack_pos

◆ data

◆ map_blocks

◆ p

◆ urgent

bool QueuedMeshUpdate::urgent = false

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