16#ifndef QGSCHUNKLOADER_H
17#define QGSCHUNKLOADER_H
43class QgsChunkLoader :
public QgsChunkQueueJob
48 QgsChunkLoader( QgsChunkNode *node )
49 : QgsChunkQueueJob( node ) {}
55 virtual Qt3DCore::QEntity *createEntity( Qt3DCore::QEntity *parent ) = 0;
63class QgsChunkLoaderFactory :
public QObject
67 virtual ~QgsChunkLoaderFactory() =
default;
70 virtual QgsChunkLoader *createChunkLoader( QgsChunkNode *node )
const = 0;
73 virtual int primitivesCount( QgsChunkNode *node )
const
80 virtual QgsChunkNode *createRootNode()
const = 0;
82 virtual QVector<QgsChunkNode *> createChildren( QgsChunkNode *node )
const = 0;
95 virtual bool canCreateChildren( QgsChunkNode *node )
111 virtual void prepareChildren( QgsChunkNode *node ) { Q_UNUSED( node ); }
115 void childrenPrepared( QgsChunkNode *node );
126class _3D_EXPORT QgsQuadtreeChunkLoaderFactory :
public QgsChunkLoaderFactory
130 QgsQuadtreeChunkLoaderFactory();
131 virtual ~QgsQuadtreeChunkLoaderFactory();
134 void setupQuadtree(
const QgsBox3D &rootBox3D,
float rootError,
int maxLevel,
const QgsBox3D &clippingBox3D =
QgsBox3D() );
136 virtual QgsChunkNode *createRootNode()
const override;
137 virtual QVector<QgsChunkNode *> createChildren( QgsChunkNode *node )
const override;
142 float mRootError = 0;
A 3-dimensional box composed of x, y, z coordinates.