#include <mesh_generator_thread.h>
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< MeshUpdateResult > | m_queue_out |
MutexedQueue< MeshUpdateResult > | m_queue_out_urgent |
std::vector< std::unique_ptr< MeshUpdateWorkerThread > > | m_workers |
MeshUpdateManager::MeshUpdateManager | ( | Client * | client | ) |
References g_settings, Thread::getNumberOfProcessors(), Settings::getS32(), infostream, m_camera_offset, m_queue_in, m_workers, MYMAX, MYMIN, and rangelim.
|
private |
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().
bool MeshUpdateManager::isRunning | ( | ) |
References m_workers.
Referenced by Client::handleCommand_AnnounceMedia(), Client::handleCommand_ItemDef(), Client::handleCommand_Media(), Client::handleCommand_NodeDef(), and Client::isShutdown().
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().
void MeshUpdateManager::start | ( | ) |
References m_workers.
Referenced by Client::afterContentReceived().
void MeshUpdateManager::stop | ( | ) |
References m_workers.
Referenced by Client::~Client(), and Client::Stop().
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().
void MeshUpdateManager::wait | ( | ) |
v3s16 MeshUpdateManager::m_camera_offset |
Referenced by MeshUpdateManager(), and Client::updateCameraOffset().
|
private |
Referenced by MeshUpdateManager(), and updateBlock().
|
private |
Referenced by getNextResult(), and putResult().
|
private |
Referenced by getNextResult(), and putResult().
|
private |
Referenced by MeshUpdateManager(), deferUpdate(), isRunning(), start(), stop(), and wait().