Skip to content
Permalink
Browse files

fix tests

  • Loading branch information
NEDJIMAbelgacem authored and wonder-sk committed Feb 10, 2021
1 parent 6019168 commit 5da9686e4e0f6d012dcde796d7f9d8bc6c7f96db
@@ -56,7 +56,7 @@ class QgsChunkLoader : public QgsChunkQueueJob
*/
virtual Qt3DCore::QEntity *createEntity( Qt3DCore::QEntity *parent ) = 0;

virtual int primitiveCount() { return 0; }
virtual int primitiveCount() const { return 0; }
virtual int primitiveBudget() const { return mPrimitiveBudget; }
protected:
int mPrimitiveBudget = 1000000;
@@ -78,7 +78,11 @@ class QgsChunkLoaderFactory : public QObject
virtual QgsChunkLoader *createChunkLoader( QgsChunkNode *node ) const = 0;

//! Returns the primitives count for the chunk \a node
virtual int primitivesCount( QgsChunkNode *node ) { return 0; }
virtual int primitivesCount( QgsChunkNode *node ) const
{
Q_UNUSED(node);
return 0;
}

//! Creates root node of the hierarchy. Ownership of the returned object is passed to the caller.
virtual QgsChunkNode *createRootNode() const = 0;
@@ -126,7 +126,7 @@ Qt3DCore::QEntity *QgsPointCloudLayerChunkLoader::createEntity( Qt3DCore::QEntit
return entity;
}

int QgsPointCloudLayerChunkLoader::primitiveCount()
int QgsPointCloudLayerChunkLoader::primitiveCount() const
{
return mPointsCount;
}
@@ -154,7 +154,7 @@ QgsChunkLoader *QgsPointCloudLayerChunkLoaderFactory::createChunkLoader( QgsChun
return new QgsPointCloudLayerChunkLoader( this, node, std::unique_ptr< QgsPointCloud3DSymbol >( static_cast< QgsPointCloud3DSymbol * >( mSymbol->clone() ) ), mZValueScale, mZValueOffset, mPointBudget, pointCount );
}

int QgsPointCloudLayerChunkLoaderFactory::primitivesCount( QgsChunkNode *node )
int QgsPointCloudLayerChunkLoaderFactory::primitivesCount( QgsChunkNode *node ) const
{
QgsChunkNodeId id = node->tileId();
IndexedPointCloudNode n( id.d, id.x, id.y, id.z );
@@ -66,7 +66,7 @@ class QgsPointCloudLayerChunkLoaderFactory : public QgsChunkLoaderFactory
virtual QgsChunkLoader *createChunkLoader( QgsChunkNode *node ) const override;
virtual QgsChunkNode *createRootNode() const override;
virtual QVector<QgsChunkNode *> createChildren( QgsChunkNode *node ) const override;
virtual int primitivesCount( QgsChunkNode *node ) override;
virtual int primitivesCount( QgsChunkNode *node ) const override;
const Qgs3DMapSettings &mMap;
QgsPointCloudIndex *mPointCloudIndex;
std::unique_ptr< QgsPointCloud3DSymbol > mSymbol;
@@ -95,7 +95,7 @@ class QgsPointCloudLayerChunkLoader : public QgsChunkLoader
QgsPointCloudLayerChunkLoader( const QgsPointCloudLayerChunkLoaderFactory *factory, QgsChunkNode *node, std::unique_ptr< QgsPointCloud3DSymbol > symbol, double zValueScale, double zValueOffset, int pointBudget, int count );
~QgsPointCloudLayerChunkLoader() override;

int primitiveCount() override;
int primitiveCount() const override;

virtual void cancel() override;
virtual Qt3DCore::QEntity *createEntity( Qt3DCore::QEntity *parent ) override;
@@ -222,6 +222,9 @@ class CORE_EXPORT QgsPointCloudIndex: public QObject
*/
int span() const;

/**
* Returns the number of poiny of indexed point cloud node \a n
*/
int nodePointCount( const IndexedPointCloudNode &n );

protected: //TODO private

0 comments on commit 5da9686

Please sign in to comment.