16 #ifndef QGSCHUNKNODE_P_H 
   17 #define QGSCHUNKNODE_P_H 
   41 struct QgsChunkListEntry;
 
   43 class QgsChunkQueueJob;
 
   44 class QgsChunkQueueJobFactory;
 
   57   QgsChunkNodeId( 
int _d = -1, 
int _x = -1, 
int _y = -1, 
int _z = -1 )
 
   58     : d( _d ), x( _x ), y( _y ), z( _z ) {}
 
   66       return QStringLiteral( 
"%1/%2/%3" ).arg( d ).arg( x ).arg( y );   
 
   68       return QStringLiteral( 
"%1/%2/%3/%4" ).arg( d ).arg( x ).arg( y ).arg( z );   
 
   71   bool operator==( 
const QgsChunkNodeId &other )
 const 
   73     return d == other.d && x == other.x && y == other.y && z == other.z;
 
   76   bool operator!=( 
const QgsChunkNodeId &other )
 const 
   78     return !( *
this == other );
 
  102     QgsChunkNode( 
const QgsChunkNodeId &nodeId, 
const QgsAABB &bbox, 
float error, QgsChunkNode *parent = 
nullptr );
 
  135     QgsAABB bbox()
 const { 
return mBbox; }
 
  137     float error()
 const { 
return mError; }
 
  139     QgsChunkNodeId tileId()
 const { 
return mNodeId; }
 
  141     QgsChunkNode *parent()
 const { 
return mParent; }
 
  143     int childCount()
 const { 
return mChildCount; }
 
  145     QgsChunkNode *
const *children()
 const { 
return mChildren; }
 
  147     State state()
 const { 
return mState; }
 
  150     QgsChunkListEntry *loaderQueueEntry()
 const { 
return mLoaderQueueEntry; }
 
  152     QgsChunkListEntry *replacementQueueEntry()
 const { 
return mReplacementQueueEntry; }
 
  154     QgsChunkLoader *loader()
 const { 
return mLoader; }
 
  156     Qt3DCore::QEntity *entity()
 const { 
return mEntity; }
 
  158     QgsChunkQueueJob *updater()
 const { 
return mUpdater; }
 
  161     bool allChildChunksResident( QTime currentTime ) 
const;
 
  164     void populateChildren( 
const QVector<QgsChunkNode *> &children );
 
  170     QList<QgsChunkNode *> descendants();
 
  177     void setQueuedForLoad( QgsChunkListEntry *entry );
 
  180     void cancelQueuedForLoad();
 
  183     void setLoading( QgsChunkLoader *chunkLoader );
 
  186     void cancelLoading();
 
  189     void setLoaded( Qt3DCore::QEntity *mEntity );
 
  195     void setQueuedForUpdate( QgsChunkListEntry *entry, QgsChunkQueueJobFactory *updateJobFactory );
 
  198     void cancelQueuedForUpdate();
 
  204     void cancelUpdating();
 
  210     void setExactBbox( 
const QgsAABB &box );
 
  213     void setHasData( 
bool hasData ) { mHasData = hasData; }
 
  215     bool hasData()
 const { 
return mHasData; }
 
  221     QgsChunkNodeId mNodeId;  
 
  223     QgsChunkNode *mParent;        
 
  224     QgsChunkNode *mChildren[8];   
 
  225     int mChildCount = -1;         
 
  229     QgsChunkListEntry *mLoaderQueueEntry;       
 
  230     QgsChunkListEntry *mReplacementQueueEntry;  
 
  232     QgsChunkLoader *mLoader;         
 
  233     Qt3DCore::QEntity *mEntity;   
 
  235     QgsChunkQueueJobFactory *mUpdaterFactory;  
 
  236     QgsChunkQueueJob *mUpdater;                
 
  238     QTime mEntityCreatedTime;
 
  239     bool mHasData = 
true;   
 
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)