12#include <QtCore/QHash>
13#include <QtCore/QList>
14#include <QtCore/QObject>
15#include <QtCore/QRectF>
90 bool updateSettled()
const {
return !_updatePending && !_addsDeferred && !_removalsDeferred; }
122#ifdef QGC_UNITTEST_BUILD
130 }
while ((_addsDeferred || _removalsDeferred) && (--guard > 0));
144 void _fieldRegionChanged(
const QRectF& worldRect);
149 QList<float> heights;
150 float maxHeight = 0.0f;
153 double _projectedPixels(
const TileMath::TileKey& key,
const QPointF& cameraGround,
double cameraHeight)
const;
154 QList<TileMath::TileKey> _desiredPatches(
const QRectF& visible,
const QPointF& cameraGround,
155 double cameraHeight)
const;
156 QRectF _visibleGroundRect(
double terrainZ)
const;
157 double _maxTerrainZ()
const;
159 void _scheduleUpdate();
164 QHash<TileMath::TileKey, PatchData> _patches;
165 UpdateStats _updateStats;
166 bool _updatePending =
false;
167 bool _addsDeferred =
false;
168 bool _removalsDeferred =
false;
169 int _removalsThisPass = 0;
170 double _culledTerrainZ = 0.0;
static constexpr double kRecullHeightMargin
static constexpr int kMaxPatchAddsPerUpdate
static constexpr double kMaxRangeMultiplier
visible-range cap in camera distances
std::optional< Patch > patch(const TileMath::TileKey &key) const
Single-patch lookup; std::nullopt when the key is not resident.
static constexpr int kMaxPatchRemovalsPerUpdate
static constexpr int kGridSize
QList< Patch > patches() const
bool updateSettled() const
False while a scheduled update pass or deferred patch churn is outstanding.
void patchEdgeDeltasChanged(const TileMath::TileKey &key)
QList< int > edgeLodDeltas(const TileMath::TileKey &key) const
void patchRemoved(const TileMath::TileKey &key)
static constexpr int kVisibleSampleGrid
void patchAdded(const TileMath::TileKey &key)
static constexpr double kRefinePixelThreshold
subdivide above this projected size
void patchMeshChanged(const TileMath::TileKey &key)
The patch's mesh content changed (heights re-sampled): consumers must re-pull heights.
QRectF visibleGroundRect() const
Estimated visible ground region in world meters (see class comment)
UpdateStats takeUpdateStats()
Returns the counters accumulated since the previous call and resets them.
static constexpr int kMaxPatches
bool covered
always false (see ready)
update() call/duration counters for the perf overlay