Luanti 5.19.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)
int crack_level = -1
v3s16 crack_pos
MeshMakeData * data = nullptr
std::vector< MapBlock * > map_blocks
u16 epoch = U16_MAX
bool urgent = false

Constructor & Destructor Documentation

◆ QueuedMeshUpdate()

QueuedMeshUpdate::QueuedMeshUpdate ( )
default

References QueuedMeshUpdate(), checkSkip(), dropBlocks(), and retrieveBlocks().

Referenced by QueuedMeshUpdate(), MeshUpdateQueue::addBlock(), and MeshUpdateQueue::reAddBlock().

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

◆ ~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.

Referenced by QueuedMeshUpdate().

Here is the caller graph for this function:

◆ dropBlocks()

void QueuedMeshUpdate::dropBlocks ( )

Drop block references.

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

References map_blocks.

Referenced by QueuedMeshUpdate().

Here is the caller graph for this function:

◆ 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().

Referenced by QueuedMeshUpdate().

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

Member Data Documentation

◆ crack_level

int QueuedMeshUpdate::crack_level = -1

◆ crack_pos

v3s16 QueuedMeshUpdate::crack_pos

◆ data

◆ epoch

u16 QueuedMeshUpdate::epoch = U16_MAX

◆ map_blocks

◆ p

◆ urgent

bool QueuedMeshUpdate::urgent = false

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