Minetest  5.4.0
MeshUpdateThread Class Reference

#include <mesh_generator_thread.h>

+ Inheritance diagram for MeshUpdateThread:
+ Collaboration diagram for MeshUpdateThread:

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< MeshUpdateResultm_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
 

Constructor & Destructor Documentation

◆ MeshUpdateThread()

MeshUpdateThread::MeshUpdateThread ( Client client)

References g_settings, Settings::getU16(), m_generation_interval, and rangelim.

+ Here is the call graph for this function:

Member Function Documentation

◆ doUpdate()

void MeshUpdateThread::doUpdate ( )
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.

+ Here is the call graph for this function:

◆ updateBlock()

void MeshUpdateThread::updateBlock ( Map map,
v3s16  p,
bool  ack_block_to_server,
bool  urgent 
)

References MeshUpdateQueue::addBlock(), UpdateThread::deferUpdate(), m_queue_in, and p().

Referenced by Client::addUpdateMeshTask().

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

Member Data Documentation

◆ m_camera_offset

v3s16 MeshUpdateThread::m_camera_offset

◆ m_generation_interval

int MeshUpdateThread::m_generation_interval
private

Referenced by MeshUpdateThread(), and doUpdate().

◆ m_queue_in

MeshUpdateQueue MeshUpdateThread::m_queue_in
private

Referenced by doUpdate(), and updateBlock().

◆ m_queue_out

MutexedQueue<MeshUpdateResult> MeshUpdateThread::m_queue_out

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