![]() |
Walls And Holes
1
|
An object that keeps track of map-to-mesh conversion. More...
#include <map2mesh.h>
Classes | |
struct | Properties |
Public Slots | |
void | tileChanged (int x, int y) |
Modifies the mesh near the tile that changed. More... | |
void | remakeAll () |
Completely remakes all tile meshes. More... | |
Public Member Functions | |
Map2Mesh (TileMap *tileMap, QObject *parent=nullptr) | |
Creates the conversion object. More... | |
SharedSimpleTexturedScene | getScene () const |
Returns the Scene that this Map2Mesh instance works with. More... | |
Protected Types | |
using | TileObjectGrid = Array2D< QVector< QSharedPointer< SimpleTexturedObject > >> |
Protected Member Functions | |
void | updateScene () |
Updates the scene for all tiles that need updates. More... | |
Protected Attributes | |
TileMap * | mTileMap |
The TileMap that is the input to this Map2Mesh object. More... | |
SharedSimpleTexturedScene | mScene |
The Scene which contains the output of the Map2Mesh object. More... | |
TileObjectGrid | mTileObjects |
Mesh data for every tile. More... | |
bool | mSceneUpdateScheduled |
Whether an updateScene() call has been scheduled. Used in tileChanged(). More... | |
QSet< QPoint > | mTilesToUpdate |
Coordinates of tiles that need updating. More... | |
QMutex | mSceneUpdateMutex |
Mutex for scene-update related operations. More... | |
An object that keeps track of map-to-mesh conversion.
|
protected |
A grid containing lists of objects. A tile's "mesh" may consist of several objects for texturing purposes.
Map2Mesh::Map2Mesh | ( | TileMap * | tileMap, |
QObject * | parent = nullptr |
||
) |
Creates the conversion object.
tilemap | - The tilemap on which the conversion will happen. |
SharedSimpleTexturedScene Map2Mesh::getScene | ( | ) | const |
Returns the Scene that this Map2Mesh instance works with.
|
slot |
Completely remakes all tile meshes.
|
slot |
Modifies the mesh near the tile that changed.
x | |
y |
|
protected |
Updates the scene for all tiles that need updates.
|
protected |
The Scene which contains the output of the Map2Mesh object.
|
protected |
Mutex for scene-update related operations.
|
protected |
Whether an updateScene() call has been scheduled. Used in tileChanged().
|
protected |
Mesh data for every tile.
|
protected |
Coordinates of tiles that need updating.