#include <minimap.h>
Inheritance diagram for MinimapUpdateThread:
Collaboration diagram for MinimapUpdateThread:Public Member Functions | |
| MinimapUpdateThread () | |
| virtual | ~MinimapUpdateThread () |
| void | getMap (v3s16 pos, s16 size, s16 height) |
| void | enqueueBlock (v3s16 pos, MinimapMapblock *data) |
| bool | pushBlockUpdate (v3s16 pos, MinimapMapblock *data) |
| bool | popBlockUpdate (QueuedMinimapUpdate *update) |
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 | |
| MinimapData * | data = nullptr |
Protected Member Functions | |
| virtual void | doUpdate () |
Private Attributes | |
| std::mutex | m_queue_mutex |
| std::deque< QueuedMinimapUpdate > | m_update_queue |
| std::map< v3s16, MinimapMapblock * > | m_blocks_cache |
Additional Inherited Members | |
Static Public Member Functions inherited from Thread | |
| static Thread * | getCurrentThread () |
| static void | setName (const std::string &name) |
| static unsigned int | getNumberOfProcessors () |
Protected Attributes inherited from Thread | |
| std::string | m_name |
|
inline |
|
virtual |
References m_blocks_cache, and m_update_queue.
|
protectedvirtual |
Implements UpdateThread.
References data, QueuedMinimapUpdate::data, getMap(), m_blocks_cache, MinimapData::map_invalidated, MinimapModeDef::map_size, MINIMAP_TYPE_RADAR, MINIMAP_TYPE_SURFACE, MinimapData::mode, popBlockUpdate(), MinimapData::pos, QueuedMinimapUpdate::pos, MinimapModeDef::scan_height, and MinimapModeDef::type.
Here is the call graph for this function:| void MinimapUpdateThread::enqueueBlock | ( | v3s16 | pos, |
| MinimapMapblock * | data ) |
References data, UpdateThread::deferUpdate(), and pushBlockUpdate().
Referenced by Minimap::addBlock().
Here is the call graph for this function:
Here is the caller graph for this function:| void MinimapUpdateThread::getMap | ( | v3s16 | pos, |
| s16 | size, | ||
| s16 | height ) |
References MinimapPixel::air_count, componentwise_max(), componentwise_min(), CONTENT_AIR, MinimapMapblock::data, data, getNodeBlockPos(), MinimapPixel::height, m_blocks_cache, MAP_BLOCKSIZE, MinimapData::minimap_scan, MinimapPixel::n, MapNode::param0, x, and z.
Referenced by doUpdate().
Here is the call graph for this function:
Here is the caller graph for this function:| bool MinimapUpdateThread::popBlockUpdate | ( | QueuedMinimapUpdate * | update | ) |
References m_queue_mutex, and m_update_queue.
Referenced by doUpdate().
Here is the caller graph for this function:| bool MinimapUpdateThread::pushBlockUpdate | ( | v3s16 | pos, |
| MinimapMapblock * | data ) |
References data, QueuedMinimapUpdate::data, m_queue_mutex, m_update_queue, and QueuedMinimapUpdate::pos.
Referenced by enqueueBlock().
Here is the caller graph for this function:| MinimapData* MinimapUpdateThread::data = nullptr |
Referenced by Minimap::Minimap(), doUpdate(), enqueueBlock(), getMap(), and pushBlockUpdate().
|
private |
Referenced by ~MinimapUpdateThread(), doUpdate(), and getMap().
|
private |
Referenced by popBlockUpdate(), and pushBlockUpdate().
|
private |
Referenced by ~MinimapUpdateThread(), popBlockUpdate(), and pushBlockUpdate().