16#ifndef QGSPOINTCLOUDLAYERCHUNKLOADER_P_H
17#define QGSPOINTCLOUDLAYERCHUNKLOADER_P_H
39#include <QFutureWatcher>
41#include <Qt3DCore/QBuffer>
42#include <Qt3DCore/QGeometry>
54class QgsPointCloudLayerChunkLoader :
public QgsChunkLoader
63 QgsPointCloudLayerChunkLoader(
64 const Qgs3DRenderContext &context,
const QgsCoordinateTransform &coordinateTransform, QgsPointCloudIndex pc, QgsPointCloud3DSymbol *symbol,
double zValueScale,
double zValueOffset
67 QFuture<QgsChunkLoaderResult> loadChunk( QgsChunkNode *node )
override;
68 QgsChunkNode *createRootNode()
const override;
69 QFuture<QVector<QgsChunkNode *>> createChildren( QgsChunkNode *node )
override;
70 int primitivesCount( QgsChunkNode *node )
const override;
74 QFuture<void> fetchHierarchyForNode(
const QgsPointCloudNodeId &nodeId );
76 QVector<QgsChunkNode *> createChildrenInner( QgsChunkNode *node );
78 Qgs3DRenderContext mRenderContext;
79 QgsCoordinateTransform mCoordinateTransform;
80 QgsPointCloudIndex mPointCloudIndex;
81 std::unique_ptr<QgsPointCloud3DSymbol> mSymbol;
82 double mZValueScale = 1.0;
83 double mZValueOffset = 0;
86 friend class QgsPointCloudLayerChunkedEntity;
100class QgsPointCloudLayerChunkedEntity :
public QgsChunkedEntity
104 explicit QgsPointCloudLayerChunkedEntity(
105 Qgs3DMapSettings *map,
106 QgsPointCloudLayer *pcl,
107 const int indexPosition,
108 const QgsCoordinateTransform &coordinateTransform,
109 QgsPointCloud3DSymbol *symbol,
110 float maxScreenError,
111 bool showBoundingBoxes,
117 QList<QgsRayCastHit> rayIntersection(
const QgsRay3D &ray,
const QgsRayCastContext &context )
const override;
119 ~QgsPointCloudLayerChunkedEntity()
override;
132 static QgsPointCloudIndex resolveIndex(
const QgsPointCloudLayer *pcl,
int indexPosition );
134 QgsPointCloudLayer *mLayer =
nullptr;