16#ifndef QGSDEMTERRAINTILEGEOMETRY_P_H
17#define QGSDEMTERRAINTILEGEOMETRY_P_H
32#include <Qt3DExtras/qt3dextras_global.h>
33#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
34#include <Qt3DRender/QGeometry>
36#include <Qt3DCore/QGeometry>
42#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
56namespace QgsRayCastingUtils
66#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
67class DemTerrainTileGeometry :
public Qt3DRender::QGeometry
69class DemTerrainTileGeometry :
public Qt3DCore::QGeometry
80 explicit DemTerrainTileGeometry(
int resolution,
float side,
float vertScale,
float skirtHeight,
const QByteArray &heightMap, QNode *parent =
nullptr );
82 bool rayIntersection(
const QgsRayCastingUtils::Ray3D &ray,
const QMatrix4x4 &worldTransform, QVector3D &intersectionPoint );
84#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
85 Qt3DRender::QAttribute *positionAttribute() {
return mPositionAttribute; }
86 Qt3DRender::QAttribute *normalAttribute() {
return mNormalAttribute; }
87 Qt3DRender::QAttribute *texCoordsAttribute() {
return mTexCoordAttribute; }
88 Qt3DRender::QAttribute *indexAttribute() {
return mIndexAttribute; }
90 Qt3DCore::QAttribute *positionAttribute() {
return mPositionAttribute; }
91 Qt3DCore::QAttribute *normalAttribute() {
return mNormalAttribute; }
92 Qt3DCore::QAttribute *texCoordsAttribute() {
return mTexCoordAttribute; }
93 Qt3DCore::QAttribute *indexAttribute() {
return mIndexAttribute; }
103 QByteArray mHeightMap;
104#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
105 Qt3DRender::QAttribute *mPositionAttribute =
nullptr;
106 Qt3DRender::QAttribute *mNormalAttribute =
nullptr;
107 Qt3DRender::QAttribute *mTexCoordAttribute =
nullptr;
108 Qt3DRender::QAttribute *mIndexAttribute =
nullptr;
109 Qt3DRender::QBuffer *mVertexBuffer =
nullptr;
110 Qt3DRender::QBuffer *mIndexBuffer =
nullptr;
112 Qt3DCore::QAttribute *mPositionAttribute =
nullptr;
113 Qt3DCore::QAttribute *mNormalAttribute =
nullptr;
114 Qt3DCore::QAttribute *mTexCoordAttribute =
nullptr;
115 Qt3DCore::QAttribute *mIndexAttribute =
nullptr;
116 Qt3DCore::QBuffer *mVertexBuffer =
nullptr;
117 Qt3DCore::QBuffer *mIndexBuffer =
nullptr;