|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <HeightSource.h>
Inheritance diagram for ProceduralHeightSource:
Collaboration diagram for ProceduralHeightSource:Public Member Functions | |
| int | requestPatchHeights (const TileMath::TileKey &key, int gridSize) final |
| Request the vertex height grid for a patch. Returns a request id (> 0). | |
| void | cancelRequest (int requestId) final |
| Cancel a pending request. No signal is emitted for a cancelled request. | |
| bool | requestTile (const TileMath::TileKey &key) override |
| HeightSource (QObject *parent=nullptr) | |
Public Member Functions inherited from HeightSource | |
| HeightSource (QObject *parent=nullptr) | |
| void | setHeightField (HeightField *field) |
| Field that receives whole tiles requested via requestTile (not owned) | |
Static Public Attributes | |
| static constexpr int | kSynthGridSize = 33 |
| samples per edge of a synthesized tile | |
Protected Member Functions | |
| virtual float | heightAtWorld (const QPointF &world) const =0 |
| Height in meters at a world-space ground position. | |
Protected Member Functions inherited from HeightSource | |
| int | _nextRequestId () |
Additional Inherited Members | |
Signals inherited from HeightSource | |
| 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) |
Protected Attributes inherited from HeightSource | |
| HeightField * | _heightField = nullptr |
| tile delivery target for requestTile (not owned) | |
Height source used by synchronous procedural implementations: computes the grid immediately but delivers it through the event loop, honoring cancellation.
Definition at line 69 of file HeightSource.h.
|
finalvirtual |
Cancel a pending request. No signal is emitted for a cancelled request.
Implements HeightSource.
Definition at line 51 of file HeightSource.cc.
|
protectedpure virtual |
Height in meters at a world-space ground position.
Implemented in FlatHeightSource, and DebugHeightSource.
Referenced by HeightSource(), and requestTile().
|
explicit |
Definition at line 33 of file HeightSource.cc.
References heightAtWorld().
|
finalvirtual |
Request the vertex height grid for a patch. Returns a request id (> 0).
Implements HeightSource.
Definition at line 17 of file HeightSource.cc.
References HeightSource::_nextRequestId(), TileMath::tileMinCorner(), TileMath::tileSpanAtZoom(), and TileMath::TileKey::zoom.
|
overridevirtual |
Synthesizes the tile grid from heightAtWorld and inserts it into the attached field through the event loop (mimicking async tile delivery)
Reimplemented from HeightSource.
Definition at line 56 of file HeightSource.cc.
References HeightSource::_heightField, HeightField::hasTile(), ElevationTilePyramid::Grid::height, heightAtWorld(), ElevationTilePyramid::Grid::heights, TileMath::isValidKey(), kSynthGridSize, TileMath::tileMinCorner(), TileMath::tileSpanAtZoom(), ElevationTilePyramid::Grid::width, and TileMath::TileKey::zoom.
|
staticconstexpr |
samples per edge of a synthesized tile
Definition at line 76 of file HeightSource.h.
Referenced by requestTile().