|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <HeightSource.h>
Inheritance diagram for HeightSource:
Collaboration diagram for HeightSource:Signals | |
| void | patchHeightsReady (int requestId, const QList< float > &heights) |
| heights has (gridSize+1)^2 entries, row-major from the north-west corner | |
| void | patchHeightsFailed (int requestId) |
Public Member Functions | |
| HeightSource (QObject *parent=nullptr) | |
| virtual int | requestPatchHeights (const TileMath::TileKey &key, int gridSize)=0 |
| Request the vertex height grid for a patch. Returns a request id (> 0). | |
| virtual void | cancelRequest (int requestId)=0 |
| Cancel a pending request. No signal is emitted for a cancelled request. | |
| void | setHeightField (HeightField *field) |
| Field that receives whole tiles requested via requestTile (not owned) | |
| virtual bool | requestTile (const TileMath::TileKey &key) |
Protected Member Functions | |
| int | _nextRequestId () |
Protected Attributes | |
| HeightField * | _heightField = nullptr |
| tile delivery target for requestTile (not owned) | |
Async source of per-patch terrain height grids for the GeoMap surface mesh.
A patch is addressed by its slippy TileKey. A request returns the heights (meters) of the (gridSize+1) x (gridSize+1) vertex grid covering the patch, row-major from the north-west corner. Results are always delivered asynchronously (queued), even for sources that can answer immediately, so consumers see one consistent flow.
TerrariumTileFetcher adapts the terrarium elevation tile source behind this interface.
Definition at line 28 of file HeightSource.h.
|
explicit |
Definition at line 10 of file HeightSource.cc.
|
protected |
Definition at line 12 of file HeightSource.cc.
Referenced by ProceduralHeightSource::requestPatchHeights(), and TerrariumTileFetcher::requestPatchHeights().
|
pure virtual |
Cancel a pending request. No signal is emitted for a cancelled request.
Implemented in ProceduralHeightSource, and TerrariumTileFetcher.
|
signal |
|
signal |
heights has (gridSize+1)^2 entries, row-major from the north-west corner
|
pure virtual |
Request the vertex height grid for a patch. Returns a request id (> 0).
Implemented in ProceduralHeightSource, and TerrariumTileFetcher.
|
inlinevirtual |
Ensures the attached field holds (or will receive) elevation data for this tile. Default: no tile data available — the field keeps serving its current best estimate (flat zero when empty).
Reimplemented in ProceduralHeightSource, FlatHeightSource, and TerrariumTileFetcher.
Definition at line 47 of file HeightSource.h.
Referenced by SurfaceModel::update().
|
inline |
Field that receives whole tiles requested via requestTile (not owned)
Definition at line 42 of file HeightSource.h.
References _heightField.
|
protected |
tile delivery target for requestTile (not owned)
Definition at line 61 of file HeightSource.h.
Referenced by ProceduralHeightSource::requestTile(), TerrariumTileFetcher::requestTile(), and setHeightField().