Luanti 5.16.0-dev
Loading...
Searching...
No Matches
MeshUpdateManager Class Reference

#include <mesh_generator_thread.h>

Collaboration diagram for MeshUpdateManager:

Public Member Functions

 MeshUpdateManager (Client *client)
void updateBlock (Map *map, v3s16 p, bool ack_block_to_server, bool urgent, bool update_neighbors=false)
void putResult (MeshUpdateResult &&r)
bool getNextResult (MeshUpdateResult &r)
void clearAllQueues (bool finish=false)
void start ()
void stop ()
void wait ()
bool isRunning ()

Private Types

typedef MutexedQueue< MeshUpdateResultResultQueue

Private Member Functions

void deferUpdate ()

Private Attributes

MeshUpdateQueue m_queue_in
ResultQueue m_queue_out
ResultQueue m_queue_out_urgent
std::vector< std::unique_ptr< MeshUpdateWorkerThread > > m_workers

Member Typedef Documentation

◆ ResultQueue

Constructor & Destructor Documentation

◆ MeshUpdateManager()

MeshUpdateManager::MeshUpdateManager ( Client * client)

References g_settings, Thread::getNumberOfProcessors(), infostream, m_queue_in, m_workers, and rangelim().

Here is the call graph for this function:

Member Function Documentation

◆ clearAllQueues()

void MeshUpdateManager::clearAllQueues ( bool finish = false)
Parameters
finishif true, also clears updates that need to be acked to the server

References m_queue_in, m_queue_out, and m_queue_out_urgent.

◆ deferUpdate()

void MeshUpdateManager::deferUpdate ( )
private

References m_workers.

Referenced by updateBlock().

Here is the caller graph for this function:

◆ getNextResult()

bool MeshUpdateManager::getNextResult ( MeshUpdateResult & r)
Note
caller needs to refDrop() the affected map_blocks

References m_queue_out, and m_queue_out_urgent.

◆ isRunning()

bool MeshUpdateManager::isRunning ( )

References m_workers.

◆ putResult()

void MeshUpdateManager::putResult ( MeshUpdateResult && r)

References m_queue_out, and m_queue_out_urgent.

◆ start()

void MeshUpdateManager::start ( )

References m_workers.

◆ stop()

void MeshUpdateManager::stop ( )

References m_workers.

◆ updateBlock()

void MeshUpdateManager::updateBlock ( Map * map,
v3s16 p,
bool ack_block_to_server,
bool urgent,
bool update_neighbors = false )

References deferUpdate(), g_26dirs, g_6dirs, g_settings, m_queue_in, p(), and warningstream.

Here is the call graph for this function:

◆ wait()

void MeshUpdateManager::wait ( )

References m_workers.

Member Data Documentation

◆ m_queue_in

MeshUpdateQueue MeshUpdateManager::m_queue_in
private

◆ m_queue_out

ResultQueue MeshUpdateManager::m_queue_out
private

◆ m_queue_out_urgent

ResultQueue MeshUpdateManager::m_queue_out_urgent
private

◆ m_workers

std::vector<std::unique_ptr<MeshUpdateWorkerThread> > MeshUpdateManager::m_workers
private

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