16 #ifndef QGSDEMTERRAINTILEGEOMETRY_P_H
17 #define QGSDEMTERRAINTILEGEOMETRY_P_H
32 #include <Qt3DExtras/qt3dextras_global.h>
33 #include <Qt3DRender/qgeometry.h>
46 namespace QgsRayCastingUtils
56 class DemTerrainTileGeometry :
public Qt3DRender::QGeometry
66 explicit DemTerrainTileGeometry(
int resolution,
float side,
float vertScale,
float skirtHeight,
const QByteArray &heightMap, QNode *parent =
nullptr );
68 bool rayIntersection(
const QgsRayCastingUtils::Ray3D &ray,
const QMatrix4x4 &worldTransform, QVector3D &intersectionPoint );
70 Qt3DRender::QAttribute *positionAttribute() {
return mPositionAttribute; }
71 Qt3DRender::QAttribute *normalAttribute() {
return mNormalAttribute; }
72 Qt3DRender::QAttribute *texCoordsAttribute() {
return mTexCoordAttribute; }
73 Qt3DRender::QAttribute *indexAttribute() {
return mIndexAttribute; }
82 QByteArray mHeightMap;
83 Qt3DRender::QAttribute *mPositionAttribute =
nullptr;
84 Qt3DRender::QAttribute *mNormalAttribute =
nullptr;
85 Qt3DRender::QAttribute *mTexCoordAttribute =
nullptr;
86 Qt3DRender::QAttribute *mIndexAttribute =
nullptr;
87 Qt3DRender::QBuffer *mVertexBuffer =
nullptr;
88 Qt3DRender::QBuffer *mIndexBuffer =
nullptr;
93 #endif // QGSDEMTERRAINTILEGEOMETRY_P_H