16#ifndef QGSVECTORLAYERCHUNKLOADER_P_H
17#define QGSVECTORLAYERCHUNKLOADER_P_H
40class QgsFeature3DHandler;
47#include <QFutureWatcher>
57class QgsVectorLayerChunkLoaderFactory :
public QgsQuadtreeChunkLoaderFactory
63 QgsVectorLayerChunkLoaderFactory(
const Qgs3DRenderContext &context, QgsVectorLayer *vl, QgsAbstract3DSymbol *symbol,
int leafLevel,
double zMin,
double zMax );
66 QgsChunkLoader *createChunkLoader( QgsChunkNode *node )
const override;
68 Qgs3DRenderContext mRenderContext;
69 QgsVectorLayer *mLayer;
70 std::unique_ptr<QgsAbstract3DSymbol> mSymbol;
83class QgsVectorLayerChunkLoader :
public QgsChunkLoader
89 QgsVectorLayerChunkLoader(
const QgsVectorLayerChunkLoaderFactory *factory, QgsChunkNode *node );
90 ~QgsVectorLayerChunkLoader()
override;
92 void start()
override;
93 void cancel()
override;
94 Qt3DCore::QEntity *createEntity( Qt3DCore::QEntity *parent )
override;
97 const QgsVectorLayerChunkLoaderFactory *mFactory;
98 std::unique_ptr<QgsFeature3DHandler> mHandler;
99 Qgs3DRenderContext mRenderContext;
100 std::unique_ptr<QgsVectorLayerFeatureSource> mSource;
101 bool mCanceled =
false;
102 QFutureWatcher<void> *mFutureWatcher =
nullptr;
117class QgsVectorLayerChunkedEntity :
public QgsChunkedEntity
122 explicit QgsVectorLayerChunkedEntity( Qgs3DMapSettings *map, QgsVectorLayer *vl,
double zMin,
double zMax,
const QgsVectorLayer3DTilingSettings &tilingSettings, QgsAbstract3DSymbol *symbol );
124 QList<QgsRayCastHit> rayIntersection(
const QgsRay3D &ray,
const QgsRayCastContext &context )
const override;
126 ~QgsVectorLayerChunkedEntity()
override;
128 void onTerrainElevationOffsetChanged();
131 friend class QgsRuleBasedChunkedEntity;
133 static QList<QgsRayCastHit> rayIntersection(
const QList<QgsChunkNode *> &activeNodes,
const QMatrix4x4 &transformMatrix,
const QgsRay3D &ray,
const QgsRayCastContext &context,
const QgsVector3D &origin );
135 Qt3DCore::QTransform *mTransform =
nullptr;
137 bool applyTerrainOffset()
const;
139 friend class TestQgsChunkedEntity;
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
Defines configuration of how a vector layer gets tiled for 3D rendering.
Partial snapshot of vector layer's state (only the members necessary for access to features).
Represents a vector layer which manages a vector based dataset.