16#ifndef QGSANNOTATIONLAYERCHUNKLOADER_P_H
17#define QGSANNOTATIONLAYERCHUNKLOADER_P_H
48#include <QFutureWatcher>
57class QgsAnnotationLayerChunkLoaderFactory :
public QgsQuadtreeChunkLoaderFactory
63 QgsAnnotationLayerChunkLoaderFactory(
const Qgs3DRenderContext &context, QgsAnnotationLayer *layer,
int leafLevel,
Qgis::AltitudeClamping clamping,
double zOffset,
bool showCallouts,
const QColor &calloutLineColor,
double calloutLineWidth,
const QgsTextFormat &textFormat,
double zMin,
double zMax );
66 QgsChunkLoader *createChunkLoader( QgsChunkNode *node )
const override;
68 Qgs3DRenderContext mRenderContext;
69 QgsAnnotationLayer *mLayer =
nullptr;
73 bool mShowCallouts =
false;
74 QColor mCalloutLineColor;
75 double mCalloutLineWidth = 2;
76 QgsTextFormat mTextFormat;
87class QgsAnnotationLayerChunkLoader :
public QgsChunkLoader
93 QgsAnnotationLayerChunkLoader(
const QgsAnnotationLayerChunkLoaderFactory *factory, QgsChunkNode *node );
94 ~QgsAnnotationLayerChunkLoader()
override;
96 void start()
override;
97 void cancel()
override;
98 Qt3DCore::QEntity *createEntity( Qt3DCore::QEntity *parent )
override;
101 const QgsAnnotationLayerChunkLoaderFactory *mFactory =
nullptr;
102 Qgs3DRenderContext mRenderContext;
103 bool mCanceled =
false;
104 QFutureWatcher<void> *mFutureWatcher =
nullptr;
106 QgsVector3D mChunkOrigin;
108 std::vector< std::unique_ptr< QgsAnnotationItem > > mItemsToRender;
110 QVector< QgsBillboardGeometry::BillboardAtlasData > mBillboardPositions;
111 QVector< QgsBillboardGeometry::BillboardAtlasData > mTextBillboardPositions;
112 QVector< QgsLineString > mCalloutLines;
113 QImage mBillboardAtlas;
114 QImage mTextBillboardAtlas;
115 double mZMin = std::numeric_limits< double >::max();
116 double mZMax = std::numeric_limits< double >::lowest();
130class QgsAnnotationLayerChunkedEntity :
public QgsChunkedEntity
135 explicit QgsAnnotationLayerChunkedEntity( Qgs3DMapSettings *map, QgsAnnotationLayer *layer,
Qgis::AltitudeClamping clamping,
double zOffset,
bool showCallouts,
const QColor &calloutLineColor,
double calloutLineWidth,
const QgsTextFormat &textFormat,
double zMin,
double zMax );
136 ~QgsAnnotationLayerChunkedEntity()
override;
139 void onTerrainElevationOffsetChanged();
142 Qt3DCore::QTransform *mTransform =
nullptr;
144 bool applyTerrainOffset()
const;
146 friend class TestQgsChunkedEntity;
AltitudeClamping
Altitude clamping.
@ Relative
Elevation is relative to terrain height (final elevation = terrain elevation + feature elevation).
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
Represents a map layer containing a set of georeferenced annotations, e.g.