Skip to content
Permalink
Browse files

remove geometry intersection check from the renderer's traverseTree

  • Loading branch information
NEDJIMAbelgacem authored and nyalldawson committed Jan 4, 2021
1 parent 93e13e1 commit 3f1d5a35e533dfb07ac04e3f3de5448e79302801
@@ -187,8 +187,7 @@ QVector<IndexedPointCloudNode> QgsPointCloudLayerRenderer::traverseTree( const Q
const QgsRenderContext &context,
IndexedPointCloudNode n,
float maxErrorPixels,
float nodeErrorPixels,
const QgsGeometry &geometry )
float nodeErrorPixels )
{
QVector<IndexedPointCloudNode> nodes;

@@ -206,9 +205,6 @@ QVector<IndexedPointCloudNode> QgsPointCloudLayerRenderer::traverseTree( const Q
if ( !context.zRange().isInfinite() && !context.zRange().overlaps( adjustedNodeZRange ) )
return nodes;

if ( !geometry.isNull() && !geometry.intersects( pc->nodeMapExtent( n ) ) )
return nodes;

nodes.append( n );

float childrenErrorPixels = nodeErrorPixels / 2.0f;
@@ -218,8 +214,7 @@ QVector<IndexedPointCloudNode> QgsPointCloudLayerRenderer::traverseTree( const Q
const QList<IndexedPointCloudNode> children = pc->nodeChildren( n );
for ( const IndexedPointCloudNode &nn : children )
{
if ( geometry.isNull() || geometry.intersects( pc->nodeMapExtent( nn ) ) )
nodes += traverseTree( pc, context, nn, maxErrorPixels, childrenErrorPixels );
nodes += traverseTree( pc, context, nn, maxErrorPixels, childrenErrorPixels );
}

return nodes;
@@ -63,9 +63,7 @@ class CORE_EXPORT QgsPointCloudLayerRenderer: public QgsMapLayerRenderer
bool forceRasterRender() const override;

private:

//! Traverses tree and returns all nodes that intersects with a \a geometry in specified depth (if the geometry is null all nodes are considered)
QVector<IndexedPointCloudNode> traverseTree( const QgsPointCloudIndex *pc, const QgsRenderContext &context, IndexedPointCloudNode n, float maxErrorPixels, float nodeErrorPixels, const QgsGeometry &geometry = QgsGeometry() );
QVector<IndexedPointCloudNode> traverseTree( const QgsPointCloudIndex *pc, const QgsRenderContext &context, IndexedPointCloudNode n, float maxErrorPixels, float nodeErrorPixels );

QgsPointCloudLayer *mLayer = nullptr;

0 comments on commit 3f1d5a3

Please sign in to comment.
You can’t perform that action at this time.