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,
int pointBudget
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;
84 int mPointBudget = 1000000;
85 bool mTriangulate =
false;
88 friend class QgsPointCloudLayerChunkedEntity;
102class QgsPointCloudLayerChunkedEntity :
public QgsChunkedEntity
106 explicit QgsPointCloudLayerChunkedEntity(
107 Qgs3DMapSettings *map,
108 QgsPointCloudLayer *pcl,
109 const int indexPosition,
110 const QgsCoordinateTransform &coordinateTransform,
111 QgsPointCloud3DSymbol *symbol,
112 float maxScreenError,
113 bool showBoundingBoxes,
119 QList<QgsRayCastHit> rayIntersection(
const QgsRay3D &ray,
const QgsRayCastContext &context )
const override;
121 ~QgsPointCloudLayerChunkedEntity()
override;
134 static QgsPointCloudIndex resolveIndex(
const QgsPointCloudLayer *pcl,
int indexPosition );
136 QgsPointCloudLayer *mLayer =
nullptr;