16#ifndef QGS3DMAPSCENEENTITY_H
17#define QGS3DMAPSCENEENTITY_H
30#include <Qt3DCore/QEntity>
47class Qgs3DMapSceneEntity :
public Qt3DCore::QEntity
52 Qgs3DMapSceneEntity(
Qgs3DMapSettings *mapSettings, Qt3DCore::QNode *parent =
nullptr )
54 , mMapSettings( mapSettings )
57 mGpuMemoryLimit = settings.
value( QStringLiteral(
"map3d/gpuMemoryLimit" ), 500.0,
QgsSettings::App ).toDouble();
66 QMatrix4x4 viewProjectionMatrix;
70 virtual void handleSceneUpdate(
const SceneContext &sceneContext ) { Q_UNUSED( sceneContext ) }
73 virtual int pendingJobsCount()
const {
return 0; }
76 virtual bool needsUpdate()
const {
return false; }
89 void setGpuMemoryLimit(
double gpuMemoryLimit ) { mGpuMemoryLimit = gpuMemoryLimit; }
92 double gpuMemoryLimit()
const {
return mGpuMemoryLimit; }
95 bool hasReachedGpuMemoryLimit()
const {
return mHasReachedGpuMemoryLimit; }
99 void setHasReachedGpuMemoryLimit(
bool reached ) { mHasReachedGpuMemoryLimit = reached; }
103 void pendingJobsCountChanged();
106 void newEntityCreated( Qt3DCore::QEntity *entity );
112 double mGpuMemoryLimit = 500.0;
114 bool mHasReachedGpuMemoryLimit =
false;
A template based class for storing ranges (lower to upper values).
This class is a composition of two QSettings instances:
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.