16#ifndef QGSCHUNKLOADER_H
17#define QGSCHUNKLOADER_H
41class QgsChunkLoader :
public QgsChunkQueueJob
46 QgsChunkLoader( QgsChunkNode *node ) : QgsChunkQueueJob( node ) { }
52 virtual Qt3DCore::QEntity *createEntity( Qt3DCore::QEntity *parent ) = 0;
60class QgsChunkLoaderFactory :
public QObject
64 virtual ~QgsChunkLoaderFactory() =
default;
67 virtual QgsChunkLoader *createChunkLoader( QgsChunkNode *node )
const = 0;
70 virtual int primitivesCount( QgsChunkNode *node )
const
77 virtual QgsChunkNode *createRootNode()
const = 0;
79 virtual QVector<QgsChunkNode *> createChildren( QgsChunkNode *node )
const = 0;
92 virtual bool canCreateChildren( QgsChunkNode *node ) { Q_UNUSED( node );
return true; }
104 virtual void prepareChildren( QgsChunkNode *node ) { Q_UNUSED( node ); }
108 void childrenPrepared( QgsChunkNode *node );
121class _3D_EXPORT QgsQuadtreeChunkLoaderFactory :
public QgsChunkLoaderFactory
125 QgsQuadtreeChunkLoaderFactory();
126 virtual ~QgsQuadtreeChunkLoaderFactory();
129 void setupQuadtree(
const QgsAABB &rootBbox,
float rootError,
int maxLevel,
const QgsAABB &clippingBbox =
QgsAABB() );
131 virtual QgsChunkNode *createRootNode()
const override;
132 virtual QVector<QgsChunkNode *> createChildren( QgsChunkNode *node )
const override;
137 float mRootError = 0;