QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgs3dwiredmesh_p.h
Go to the documentation of this file.
1/***************************************************************************
2 qgs3dwiredmesh_p.h
3 --------------------------------------
4 Date : March 2022
5 Copyright : (C) 2022 by Jean Felder
6 Email : jean dot felder at oslandia dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGS3DWIREDMESH_P_H
17#define QGS3DWIREDMESH_P_H
18
20
21//
22// W A R N I N G
23// -------------
24//
25// This file is not part of the QGIS API. It exists purely as an
26// implementation detail. This header file may change from version to
27// version without notice, or even be removed.
28//
29
30#include <QVector3D>
31
32#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
33#include <Qt3DRender/QBuffer>
34#else
35#include <Qt3DCore/QBuffer>
36#endif
37#include <Qt3DRender/QGeometryRenderer>
38
39class QgsAABB;
40
41#define SIP_NO_FILE
42
49class Qgs3DWiredMesh : public Qt3DRender::QGeometryRenderer
50{
51 Q_OBJECT
52
53 public:
57 Qgs3DWiredMesh( Qt3DCore::QNode *parent = nullptr );
58 ~Qgs3DWiredMesh() override;
59
63 void setVertices( const QList<QVector3D> &vertices );
64
68 void setVertices( const QList<QgsAABB> &bboxes );
69
70 private:
71#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
72 Qt3DRender::QGeometry *mGeom = nullptr;
73 Qt3DRender::QAttribute *mPositionAttribute = nullptr;
74 Qt3DRender::QBuffer *mVertexBuffer = nullptr;
75#else
76 Qt3DCore::QGeometry *mGeom = nullptr;
77 Qt3DCore::QAttribute *mPositionAttribute = nullptr;
78 Qt3DCore::QBuffer *mVertexBuffer = nullptr;
79#endif
80};
81
83
84#endif // QGS3DWIREDMESH_P_H