QGIS API Documentation 4.1.0-Master (01362494303)
Loading...
Searching...
No Matches
qgsabstractfeaturebasedchunkedentity.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsabstractfeaturebasedchunkedentity.h
3 --------------------------------------
4 Date : March 2026
5 Copyright : (C) 2026 by Jean Felder
6 Email : jean dot felder at oslandia 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 QGSABSTRACTFEATUREBASEDCHUNKEDENTITY_H
17#define QGSABSTRACTFEATUREBASEDCHUNKEDENTITY_H
18
19#include "qgis_3d.h"
20
21#define SIP_NO_FILE
22
24
25//
26// W A R N I N G
27// -------------
28//
29// This file is not part of the QGIS API. It exists purely as an
30// implementation detail. This header file may change from version to
31// version without notice, or even be removed.
32//
33
34#include "qgschunkedentity.h"
35
36namespace Qt3DCore
37{
38 class QTransform;
39}
40
46class _3D_EXPORT QgsAbstractFeatureBasedChunkedEntity : public QgsChunkedEntity
47{
48 Q_OBJECT
49
50 public:
52 QgsAbstractFeatureBasedChunkedEntity(
53 Qgs3DMapSettings *mapSettings, float tau, QgsChunkLoaderFactory *loaderFactory, bool ownsFactory, int primitivesBudget = std::numeric_limits<int>::max(), Qt3DCore::QNode *parent = nullptr
54 );
55
56 QList<QgsRayCastHit> rayIntersection( const QgsRay3D &ray, const QgsRayCastContext &context ) const override;
57
58 protected slots:
59 void onTerrainElevationOffsetChanged();
60
61 private:
63 virtual bool applyTerrainOffset() const = 0;
64
66 QList<QgsRayCastHit> rayIntersection( const QList<QgsChunkNode *> &activeNodes, const QMatrix4x4 &transformMatrix, const QgsRay3D &ray, const QgsRayCastContext &context, const QgsVector3D &origin ) const;
67
68 private:
69 Qt3DCore::QTransform *mTransform = nullptr;
70};
71
73
74#endif // QGSABSTRACTFEATUREBASEDCHUNKEDENTITY_H