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)
65#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
66class DemTerrainTileGeometry :
public Qt3DRender::QGeometry
68class DemTerrainTileGeometry :
public Qt3DCore::QGeometry
79 explicit DemTerrainTileGeometry(
int resolution,
float side,
float vertScale,
float skirtHeight,
const QByteArray &heightMap, QNode *parent =
nullptr );
81 bool rayIntersection(
const QgsRayCastingUtils::Ray3D &ray,
const QMatrix4x4 &worldTransform, QVector3D &intersectionPoint );
83#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
84 Qt3DRender::QAttribute *positionAttribute() {
return mPositionAttribute; }
85 Qt3DRender::QAttribute *normalAttribute() {
return mNormalAttribute; }
86 Qt3DRender::QAttribute *texCoordsAttribute() {
return mTexCoordAttribute; }
87 Qt3DRender::QAttribute *indexAttribute() {
return mIndexAttribute; }
89 Qt3DCore::QAttribute *positionAttribute() {
return mPositionAttribute; }
90 Qt3DCore::QAttribute *normalAttribute() {
return mNormalAttribute; }
91 Qt3DCore::QAttribute *texCoordsAttribute() {
return mTexCoordAttribute; }
92 Qt3DCore::QAttribute *indexAttribute() {
return mIndexAttribute; }
102 QByteArray mHeightMap;
103#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
104 Qt3DRender::QAttribute *mPositionAttribute =
nullptr;
105 Qt3DRender::QAttribute *mNormalAttribute =
nullptr;
106 Qt3DRender::QAttribute *mTexCoordAttribute =
nullptr;
107 Qt3DRender::QAttribute *mIndexAttribute =
nullptr;
108 Qt3DRender::QBuffer *mVertexBuffer =
nullptr;
109 Qt3DRender::QBuffer *mIndexBuffer =
nullptr;
111 Qt3DCore::QAttribute *mPositionAttribute =
nullptr;
112 Qt3DCore::QAttribute *mNormalAttribute =
nullptr;
113 Qt3DCore::QAttribute *mTexCoordAttribute =
nullptr;
114 Qt3DCore::QAttribute *mIndexAttribute =
nullptr;
115 Qt3DCore::QBuffer *mVertexBuffer =
nullptr;
116 Qt3DCore::QBuffer *mIndexBuffer =
nullptr;