QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsbillboardgeometry.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsbillboardgeometry.h
3  --------------------------------------
4  Date : Jul 2019
5  Copyright : (C) 2019 by Ismail Sunni
6  Email : imajimatika at gmail 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 QGSBILLBOARDGEOMETRY_H
17 #define QGSBILLBOARDGEOMETRY_H
18 
19 #include <QObject>
20 #include <Qt3DRender/QGeometry>
21 #include <Qt3DRender/QBuffer>
22 #include <Qt3DRender/QAttribute>
23 
24 #define SIP_NO_FILE
25 
34 class QgsBillboardGeometry : public Qt3DRender::QGeometry
35 {
36  Q_OBJECT
37 
38  Q_PROPERTY( int count READ count NOTIFY countChanged )
39  public:
41  QgsBillboardGeometry( Qt3DCore::QNode *parent = nullptr );
42 
44  void setPoints( const QVector<QVector3D> &vertices );
45 
47  int count() const;
48  signals:
50  void countChanged( int count );
51 
52  private:
53  Qt3DRender::QAttribute *mPositionAttribute = nullptr;
54  Qt3DRender::QBuffer *mVertexBuffer = nullptr;
55  int mVertexCount = 0;
56 };
57 
58 #endif // QGSBILLBOARDGEOMETRY_H
QgsBillboardGeometry::count
int count
Definition: qgsbillboardgeometry.h:38
QgsBillboardGeometry::countChanged
void countChanged(int count)
Signal when the number of points changed.
QgsBillboardGeometry
Geometry of the billboard rendering for points in 3D map view.
Definition: qgsbillboardgeometry.h:34
QgsBillboardGeometry::QgsBillboardGeometry
QgsBillboardGeometry(Qt3DCore::QNode *parent=nullptr)
Constructor of QgsBillboardGeometry.
Definition: qgsbillboardgeometry.cpp:20
QgsBillboardGeometry::setPoints
void setPoints(const QVector< QVector3D > &vertices)
Set the points for the billboard with vertices.
Definition: qgsbillboardgeometry.cpp:38