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; }
79 virtual QgsRange<float> getNearFarPlaneRange(
const QMatrix4x4 &viewMatrix )
const
81 Q_UNUSED( viewMatrix )
93 void setGpuMemoryLimit(
double gpuMemoryLimit ) { mGpuMemoryLimit = gpuMemoryLimit; }
96 double gpuMemoryLimit()
const {
return mGpuMemoryLimit; }
99 bool hasReachedGpuMemoryLimit()
const {
return mHasReachedGpuMemoryLimit; }
103 void setHasReachedGpuMemoryLimit(
bool reached ) { mHasReachedGpuMemoryLimit = reached; }
107 void pendingJobsCountChanged();
110 void newEntityCreated( Qt3DCore::QEntity *entity );
116 double mGpuMemoryLimit = 500.0;
118 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.