Luanti 5.10.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 (const MeshUpdateResult &r)
 
bool getNextResult (MeshUpdateResult &r)
 
void start ()
 
void stop ()
 
void wait ()
 
bool isRunning ()
 

Public Attributes

v3s16 m_camera_offset
 

Private Member Functions

void deferUpdate ()
 

Private Attributes

MeshUpdateQueue m_queue_in
 
MutexedQueue< MeshUpdateResultm_queue_out
 
MutexedQueue< MeshUpdateResultm_queue_out_urgent
 
std::vector< std::unique_ptr< MeshUpdateWorkerThread > > m_workers
 

Constructor & Destructor Documentation

◆ MeshUpdateManager()

MeshUpdateManager::MeshUpdateManager ( Client * client)

References g_settings, Thread::getNumberOfProcessors(), Settings::getS32(), infostream, m_camera_offset, m_queue_in, m_workers, MYMAX, MYMIN, and rangelim.

+ Here is the call graph for this function:

Member Function Documentation

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

References MutexedQueue< T >::empty(), m_queue_out, m_queue_out_urgent, and MutexedQueue< T >::pop_frontNoEx().

Referenced by Client::~Client(), and Client::step().

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

◆ isRunning()

bool MeshUpdateManager::isRunning ( )

References m_workers.

Referenced by Client::handleCommand_AnnounceMedia(), Client::handleCommand_ItemDef(), Client::handleCommand_Media(), Client::handleCommand_NodeDef(), and Client::isShutdown().

+ Here is the caller graph for this function:

◆ putResult()

void MeshUpdateManager::putResult ( const MeshUpdateResult & r)

References m_queue_out, m_queue_out_urgent, MutexedQueue< T >::push_back(), and MeshUpdateResult::urgent.

Referenced by MeshUpdateWorkerThread::doUpdate().

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

◆ start()

void MeshUpdateManager::start ( )

References m_workers.

Referenced by Client::afterContentReceived().

+ Here is the caller graph for this function:

◆ stop()

void MeshUpdateManager::stop ( )

References m_workers.

Referenced by Client::~Client(), and Client::Stop().

+ Here is the caller graph for this function:

◆ updateBlock()

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

References MeshUpdateQueue::addBlock(), deferUpdate(), g_26dirs, g_6dirs, g_settings, Settings::getBool(), Settings::getFlag(), m_queue_in, p(), and warningstream.

Referenced by Client::addUpdateMeshTask(), Client::addUpdateMeshTaskForNode(), and Client::addUpdateMeshTaskWithEdge().

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

◆ wait()

void MeshUpdateManager::wait ( )

References m_workers.

Referenced by Client::~Client().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_camera_offset

v3s16 MeshUpdateManager::m_camera_offset

◆ m_queue_in

MeshUpdateQueue MeshUpdateManager::m_queue_in
private

Referenced by MeshUpdateManager(), and updateBlock().

◆ m_queue_out

MutexedQueue<MeshUpdateResult> MeshUpdateManager::m_queue_out
private

Referenced by getNextResult(), and putResult().

◆ m_queue_out_urgent

MutexedQueue<MeshUpdateResult> MeshUpdateManager::m_queue_out_urgent
private

Referenced by getNextResult(), and putResult().

◆ m_workers

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

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