16 #ifndef QGSCHUNKEDENTITY_P_H 17 #define QGSCHUNKEDENTITY_P_H 30 #include <Qt3DCore/QEntity> 35 class QgsChunkQueueJob;
36 class QgsChunkLoaderFactory;
37 class QgsChunkBoundsEntity;
38 class QgsChunkQueueJobFactory;
51 class QgsChunkedEntity :
public Qt3DCore::QEntity
56 QgsChunkedEntity(
const QgsAABB &rootBbox,
float rootError,
float mTau,
int mMaxLevel, QgsChunkLoaderFactory *loaderFactory, Qt3DCore::QNode *parent =
nullptr );
57 ~QgsChunkedEntity()
override;
65 QMatrix4x4 viewProjectionMatrix;
69 void update(
const SceneState &state );
72 bool needsUpdate()
const {
return mNeedsUpdate; }
75 void setShowBoundingBoxes(
bool enabled );
78 void updateNodes(
const QList<QgsChunkNode *> &nodes, QgsChunkQueueJobFactory *updateJobFactory );
81 QList<QgsChunkNode *> activeNodes()
const {
return mActiveNodes; }
83 QgsChunkNode *rootNode()
const {
return mRootNode; }
86 int pendingJobsCount()
const;
90 void cancelActiveJob();
92 void setNeedsUpdate(
bool needsUpdate ) { mNeedsUpdate = needsUpdate; }
95 void update( QgsChunkNode *node,
const SceneState &state );
98 void requestResidency( QgsChunkNode *node );
103 void onActiveJobFinished();
107 void pendingJobsCountChanged();
111 QgsChunkNode *mRootNode =
nullptr;
113 bool mNeedsUpdate =
false;
119 QgsChunkLoaderFactory *mChunkLoaderFactory =
nullptr;
121 QgsChunkList *mChunkLoaderQueue =
nullptr;
123 QgsChunkList *mReplacementQueue =
nullptr;
125 QList<QgsChunkNode *> mActiveNodes;
127 int mFrustumCulled = 0;
134 int mMaxLoadedChunks = 512;
137 QgsChunkBoundsEntity *mBboxesEntity =
nullptr;
140 QgsChunkQueueJob *mActiveJob =
nullptr;
145 #endif // QGSCHUNKEDENTITY_P_H 3 Axis-aligned bounding box - in world coords.