16 #ifndef QGSPOINTCLOUD3DSYMBOL_P_H
17 #define QGSPOINTCLOUD3DSYMBOL_P_H
29 #include <QFutureWatcher>
30 #include <Qt3DRender/QGeometry>
31 #include <Qt3DRender/QBuffer>
32 #include <Qt3DRender/QMaterial>
39 class QgsPointCloud3DSymbolHandler
42 QgsPointCloud3DSymbolHandler();
44 virtual ~QgsPointCloud3DSymbolHandler() =
default;
50 float zMinimum()
const {
return mZMin; }
51 float zMaximum()
const {
return mZMax; }
56 QVector<QVector3D> positions;
57 QVector<float> parameter;
58 QVector<QVector3D> colors;
62 float mZMin = std::numeric_limits<float>::max();
63 float mZMax = std::numeric_limits<float>::lowest();
66 virtual Qt3DRender::QGeometry *makeGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride ) = 0;
73 class QgsSingleColorPointCloud3DSymbolHandler :
public QgsPointCloud3DSymbolHandler
76 QgsSingleColorPointCloud3DSymbolHandler();
83 Qt3DRender::QGeometry *makeGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride )
override;
86 class QgsColorRampPointCloud3DSymbolHandler :
public QgsPointCloud3DSymbolHandler
89 QgsColorRampPointCloud3DSymbolHandler();
96 Qt3DRender::QGeometry *makeGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride )
override;
99 class QgsRGBPointCloud3DSymbolHandler :
public QgsPointCloud3DSymbolHandler
102 QgsRGBPointCloud3DSymbolHandler();
109 Qt3DRender::QGeometry *makeGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride )
override;
112 class QgsClassificationPointCloud3DSymbolHandler :
public QgsPointCloud3DSymbolHandler
115 QgsClassificationPointCloud3DSymbolHandler();
122 Qt3DRender::QGeometry *makeGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride )
override;
126 class QgsPointCloud3DGeometry:
public Qt3DRender::QGeometry
129 QgsPointCloud3DGeometry( Qt3DCore::QNode *parent,
unsigned int byteStride );
132 virtual void makeVertexBuffer(
const QgsPointCloud3DSymbolHandler::PointData &data ) = 0;
134 Qt3DRender::QAttribute *mPositionAttribute =
nullptr;
135 Qt3DRender::QAttribute *mParameterAttribute =
nullptr;
136 Qt3DRender::QAttribute *mColorAttribute =
nullptr;
137 Qt3DRender::QBuffer *mVertexBuffer =
nullptr;
138 int mVertexCount = 0;
140 unsigned int mByteStride = 16;
143 class QgsSingleColorPointCloud3DGeometry :
public QgsPointCloud3DGeometry
146 QgsSingleColorPointCloud3DGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride );
149 void makeVertexBuffer(
const QgsPointCloud3DSymbolHandler::PointData &data )
override;
152 class QgsColorRampPointCloud3DGeometry :
public QgsPointCloud3DGeometry
155 QgsColorRampPointCloud3DGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride );
158 void makeVertexBuffer(
const QgsPointCloud3DSymbolHandler::PointData &data )
override;
161 class QgsRGBPointCloud3DGeometry :
public QgsPointCloud3DGeometry
164 QgsRGBPointCloud3DGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride );
166 void makeVertexBuffer(
const QgsPointCloud3DSymbolHandler::PointData &data )
override;
Represents a indexed point cloud node in octree.
Encapsulates the render context for a 3D point cloud rendering operation.
Base class for storing raw data from point cloud nodes.
Represents a indexed point clouds data in octree.
Point cloud data request.