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;
72 class QgsSingleColorPointCloud3DSymbolHandler :
public QgsPointCloud3DSymbolHandler
75 QgsSingleColorPointCloud3DSymbolHandler();
82 Qt3DRender::QGeometry *makeGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride )
override;
85 class QgsColorRampPointCloud3DSymbolHandler :
public QgsPointCloud3DSymbolHandler
88 QgsColorRampPointCloud3DSymbolHandler();
95 Qt3DRender::QGeometry *makeGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride )
override;
98 class QgsRGBPointCloud3DSymbolHandler :
public QgsPointCloud3DSymbolHandler
101 QgsRGBPointCloud3DSymbolHandler();
108 Qt3DRender::QGeometry *makeGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride )
override;
111 class QgsClassificationPointCloud3DSymbolHandler :
public QgsPointCloud3DSymbolHandler
114 QgsClassificationPointCloud3DSymbolHandler();
121 Qt3DRender::QGeometry *makeGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride )
override;
125 class QgsPointCloud3DGeometry:
public Qt3DRender::QGeometry
128 QgsPointCloud3DGeometry( Qt3DCore::QNode *parent,
unsigned int byteStride );
131 virtual void makeVertexBuffer(
const QgsPointCloud3DSymbolHandler::PointData &data ) = 0;
133 Qt3DRender::QAttribute *mPositionAttribute =
nullptr;
134 Qt3DRender::QAttribute *mParameterAttribute =
nullptr;
135 Qt3DRender::QAttribute *mColorAttribute =
nullptr;
136 Qt3DRender::QBuffer *mVertexBuffer =
nullptr;
137 int mVertexCount = 0;
139 unsigned int mByteStride = 16;
142 class QgsSingleColorPointCloud3DGeometry :
public QgsPointCloud3DGeometry
145 QgsSingleColorPointCloud3DGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride );
148 void makeVertexBuffer(
const QgsPointCloud3DSymbolHandler::PointData &data )
override;
151 class QgsColorRampPointCloud3DGeometry :
public QgsPointCloud3DGeometry
154 QgsColorRampPointCloud3DGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride );
157 void makeVertexBuffer(
const QgsPointCloud3DSymbolHandler::PointData &data )
override;
160 class QgsRGBPointCloud3DGeometry :
public QgsPointCloud3DGeometry
163 QgsRGBPointCloud3DGeometry( Qt3DCore::QNode *parent,
const QgsPointCloud3DSymbolHandler::PointData &data,
unsigned int byteStride );
165 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.
Represents a indexed point clouds data in octree.