16#ifndef QGSCHUNKLOADER_H
17#define QGSCHUNKLOADER_H
43class QgsChunkLoader :
public QgsChunkQueueJob
48 QgsChunkLoader( QgsChunkNode *node ) : QgsChunkQueueJob( node ) { }
54 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 );
121class _3D_EXPORT QgsQuadtreeChunkLoaderFactory :
public QgsChunkLoaderFactory
125 QgsQuadtreeChunkLoaderFactory();
126 virtual ~QgsQuadtreeChunkLoaderFactory();
129 void setupQuadtree(
const QgsBox3D &rootBox3D,
float rootError,
int maxLevel,
const QgsBox3D &clippingBox3D =
QgsBox3D() );
131 virtual QgsChunkNode *createRootNode()
const override;
132 virtual QVector<QgsChunkNode *> createChildren( QgsChunkNode *node )
const override;
137 float mRootError = 0;
A 3-dimensional box composed of x, y, z coordinates.