QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
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 
31 class QgsBillboardGeometry : public Qt3DRender::QGeometry
32 {
33  Q_OBJECT
34 
35  Q_PROPERTY( int count READ count NOTIFY countChanged )
36  public:
38  QgsBillboardGeometry( Qt3DCore::QNode *parent = nullptr );
39 
41  void setPoints( const QVector<QVector3D> &vertices );
42 
44  int count() const;
45 
46  signals:
48  void countChanged( int count );
49 
50  private:
51  Qt3DRender::QAttribute *mPositionAttribute = nullptr;
52  Qt3DRender::QBuffer *mVertexBuffer = nullptr;
53  int mVertexCount = 0;
54 };
55 
56 #endif // QGSBILLBOARDGEOMETRY_H
3 Geometry of the billboard rendering for points in 3D map view.
void countChanged(int count)
Signal when the number of points changed.
int count() const
Returns the number of points.
void setPoints(const QVector< QVector3D > &vertices)
Set the points for the billboard with vertices.
QgsBillboardGeometry(Qt3DCore::QNode *parent=nullptr)
Constructor of QgsBillboardGeometry.