16 #ifndef QGSCHUNKNODE_P_H 17 #define QGSCHUNKNODE_P_H 39 struct QgsChunkListEntry;
41 class QgsChunkQueueJob;
42 class QgsChunkQueueJobFactory;
63 QgsChunkNode(
int tileX,
int tileY,
int tileZ,
const QgsAABB &bbox,
float error, QgsChunkNode *parent =
nullptr );
96 QgsAABB bbox()
const {
return mBbox; }
98 float error()
const {
return mError; }
100 int tileX()
const {
return mTileX; }
102 int tileY()
const {
return mTileY; }
104 int tileZ()
const {
return mTileZ; }
106 QgsChunkNode *parent()
const {
return mParent; }
108 QgsChunkNode *
const *children()
const {
return mChildren; }
110 State state()
const {
return mState; }
113 QgsChunkListEntry *loaderQueueEntry()
const {
return mLoaderQueueEntry; }
115 QgsChunkListEntry *replacementQueueEntry()
const {
return mReplacementQueueEntry; }
117 QgsChunkLoader *loader()
const {
return mLoader; }
119 Qt3DCore::QEntity *entity()
const {
return mEntity; }
121 QgsChunkQueueJob *updater()
const {
return mUpdater; }
124 bool allChildChunksResident(
const QTime ¤tTime )
const;
127 void ensureAllChildrenExist();
133 QList<QgsChunkNode *> descendants();
140 void setQueuedForLoad( QgsChunkListEntry *entry );
143 void cancelQueuedForLoad();
146 void setLoading( QgsChunkLoader *chunkLoader );
149 void cancelLoading();
152 void setLoaded( Qt3DCore::QEntity *mEntity );
158 void setQueuedForUpdate( QgsChunkListEntry *entry, QgsChunkQueueJobFactory *updateJobFactory );
161 void cancelQueuedForUpdate();
167 void cancelUpdating();
173 void setExactBbox(
const QgsAABB &box );
176 void setHasData(
bool hasData ) { mHasData = hasData; }
178 bool hasData()
const {
return mHasData; }
184 int mTileX, mTileY, mTileZ;
186 QgsChunkNode *mParent;
187 QgsChunkNode *mChildren[4];
191 QgsChunkListEntry *mLoaderQueueEntry;
192 QgsChunkListEntry *mReplacementQueueEntry;
194 QgsChunkLoader *mLoader;
195 Qt3DCore::QEntity *mEntity;
197 QgsChunkQueueJobFactory *mUpdaterFactory;
198 QgsChunkQueueJob *mUpdater;
200 QTime mEntityCreatedTime;
201 bool mHasData =
true;
206 #endif // CHUNKNODE_H 3 Axis-aligned bounding box - in world coords.