#include <mesh_generator_thread.h>
Public Member Functions | |
MeshUpdateThread (Client *client) | |
void | updateBlock (Map *map, v3s16 p, bool ack_block_to_server, bool urgent) |
Public Member Functions inherited from UpdateThread | |
UpdateThread (const std::string &name) | |
~UpdateThread ()=default | |
void | deferUpdate () |
void | stop () |
void * | run () |
Public Member Functions inherited from Thread | |
Thread (const std::string &name="") | |
virtual | ~Thread () |
bool | start () |
bool | stop () |
bool | wait () |
bool | isCurrentThread () |
bool | isRunning () |
bool | stopRequested () |
std::thread::id | getThreadId () |
bool | getReturnValue (void **ret) |
bool | bindToProcessor (unsigned int proc_number) |
bool | setPriority (int prio) |
Public Attributes | |
v3s16 | m_camera_offset |
MutexedQueue< MeshUpdateResult > | m_queue_out |
Protected Member Functions | |
virtual void | doUpdate () |
Private Attributes | |
MeshUpdateQueue | m_queue_in |
int | m_generation_interval |
Additional Inherited Members | |
Static Public Member Functions inherited from Thread | |
static void | setName (const std::string &name) |
static unsigned int | getNumberOfProcessors () |
Protected Attributes inherited from Thread | |
std::string | m_name |
MeshUpdateThread::MeshUpdateThread | ( | Client * | client | ) |
References g_settings, Settings::getU16(), m_generation_interval, and rangelim.
|
protectedvirtual |
Implements UpdateThread.
References QueuedMeshUpdate::ack_block_to_server, MeshUpdateResult::ack_block_to_server, QueuedMeshUpdate::data, g_profiler, m_camera_offset, m_generation_interval, m_queue_in, m_queue_out, MeshUpdateResult::mesh, QueuedMeshUpdate::p, MeshUpdateResult::p, MeshUpdateQueue::pop(), MutexedQueue< T >::push_back(), and sleep_ms.
References MeshUpdateQueue::addBlock(), UpdateThread::deferUpdate(), m_queue_in, and p().
Referenced by Client::addUpdateMeshTask().
v3s16 MeshUpdateThread::m_camera_offset |
Referenced by doUpdate(), and Client::updateCameraOffset().
|
private |
Referenced by MeshUpdateThread(), and doUpdate().
|
private |
Referenced by doUpdate(), and updateBlock().
MutexedQueue<MeshUpdateResult> MeshUpdateThread::m_queue_out |
Referenced by Client::~Client(), doUpdate(), and Client::step().