QGIS API Documentation  3.2.0-Bonn (bc43194)
qgsdemterraintilegeometry_p.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdemterraintilegeometry_p.h
3  --------------------------------------
4  Date : July 2017
5  Copyright : (C) 2017 by Martin Dobias
6  Email : wonder dot sk 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 QGSDEMTERRAINTILEGEOMETRY_P_H
17 #define QGSDEMTERRAINTILEGEOMETRY_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 <Qt3DExtras/qt3dextras_global.h>
31 #include <Qt3DRender/qgeometry.h>
32 #include <QSize>
33 
34 #include <QImage>
35 
36 namespace Qt3DRender
37 {
38 
39  class QAttribute;
40  class QBuffer;
41 
42 } // Qt3DRender
43 
44 
50 class DemTerrainTileGeometry : public Qt3DRender::QGeometry
51 {
52  public:
53 
58  explicit DemTerrainTileGeometry( int resolution, float skirtHeight, const QByteArray &heightMap, QNode *parent = nullptr );
59 
60  private:
61  void init();
62 
63  int mResolution;
64  float mSkirtHeight;
65  QByteArray mHeightMap;
66  Qt3DRender::QAttribute *mPositionAttribute = nullptr;
67  Qt3DRender::QAttribute *mNormalAttribute = nullptr;
68  Qt3DRender::QAttribute *mTexCoordAttribute = nullptr;
69  Qt3DRender::QAttribute *mIndexAttribute = nullptr;
70  Qt3DRender::QBuffer *mVertexBuffer = nullptr;
71  Qt3DRender::QBuffer *mIndexBuffer = nullptr;
72 };
73 
75 
76 #endif // QGSDEMTERRAINTILEGEOMETRY_P_H