QGIS API Documentation
3.99.0-Master (09f76ad7019)
Loading...
Searching...
No Matches
src
3d
terrain
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
#define SIP_NO_FILE
31
32
#include <QImage>
33
#include <QSize>
34
#include <Qt3DCore/QGeometry>
35
#include <Qt3DExtras/qt3dextras_global.h>
36
37
namespace
Qt3DCore
38
{
39
class
QAttribute;
40
class
QBuffer;
41
}
// namespace Qt3DCore
42
43
class
QgsRay3D
;
44
class
QgsRayCastContext
;
45
50
class
DemTerrainTileGeometry :
public
Qt3DCore::QGeometry
51
{
52
Q_OBJECT
53
54
public
:
59
explicit
DemTerrainTileGeometry(
int
resolution,
float
side,
float
vertScale,
float
skirtHeight,
const
QByteArray &heightMap, QNode *parent =
nullptr
);
60
61
bool
rayIntersection(
const
QgsRay3D &ray,
const
QgsRayCastContext &context,
const
QMatrix4x4 &worldTransform, QVector3D &intersectionPoint );
62
63
Qt3DCore::QAttribute *positionAttribute() {
return
mPositionAttribute; }
64
Qt3DCore::QAttribute *normalAttribute() {
return
mNormalAttribute; }
65
Qt3DCore::QAttribute *texCoordsAttribute() {
return
mTexCoordAttribute; }
66
Qt3DCore::QAttribute *indexAttribute() {
return
mIndexAttribute; }
67
68
private
:
69
void
init();
70
71
int
mResolution;
72
float
mSide;
73
float
mVertScale;
74
float
mSkirtHeight;
75
QByteArray mHeightMap;
76
Qt3DCore::QAttribute *mPositionAttribute =
nullptr
;
77
Qt3DCore::QAttribute *mNormalAttribute =
nullptr
;
78
Qt3DCore::QAttribute *mTexCoordAttribute =
nullptr
;
79
Qt3DCore::QAttribute *mIndexAttribute =
nullptr
;
80
Qt3DCore::QBuffer *mVertexBuffer =
nullptr
;
81
Qt3DCore::QBuffer *mIndexBuffer =
nullptr
;
82
};
83
85
86
#endif
// QGSDEMTERRAINTILEGEOMETRY_P_H
QgsRay3D
A representation of a ray in 3D.
Definition
qgsray3d.h:31
QgsRayCastContext
Responsible for defining parameters of the ray casting operations in 3D map canvases.
Definition
qgsraycastcontext.h:29
Qt3DCore
Definition
qgsabstract3drenderer.h:31
Generated on
for QGIS API Documentation by
1.15.0