16#ifndef QGSCHUNKLOADER_P_H
17#define QGSCHUNKLOADER_P_H
42class QgsChunkLoader :
public QgsChunkQueueJob
47 QgsChunkLoader( QgsChunkNode *node ) : QgsChunkQueueJob( node ) { }
53 virtual Qt3DCore::QEntity *createEntity( Qt3DCore::QEntity *parent ) = 0;
62class QgsChunkLoaderFactory :
public QObject
66 virtual ~QgsChunkLoaderFactory() =
default;
69 virtual QgsChunkLoader *createChunkLoader( QgsChunkNode *node )
const = 0;
72 virtual int primitivesCount( QgsChunkNode *node )
const
79 virtual QgsChunkNode *createRootNode()
const = 0;
81 virtual QVector<QgsChunkNode *> createChildren( QgsChunkNode *node )
const = 0;
94 virtual bool canCreateChildren( QgsChunkNode *node ) { Q_UNUSED( node );
return true; }
106 virtual void prepareChildren( QgsChunkNode *node ) { Q_UNUSED( node ); }
110 void childrenPrepared( QgsChunkNode *node );
123class _3D_EXPORT QgsQuadtreeChunkLoaderFactory :
public QgsChunkLoaderFactory
127 QgsQuadtreeChunkLoaderFactory();
128 virtual ~QgsQuadtreeChunkLoaderFactory();
131 void setupQuadtree(
const QgsAABB &rootBbox,
float rootError,
int maxLevel,
const QgsAABB &clippingBbox =
QgsAABB() );
133 virtual QgsChunkNode *createRootNode()
const override;
134 virtual QVector<QgsChunkNode *> createChildren( QgsChunkNode *node )
const override;
139 float mRootError = 0;